# Publishing

- Page: https://shared.btbytes.com/p/publishing
- Date: 2020-04-13
- Tags: books, publishing

See also: [100-page-book](https://shared.btbytes.com/p/100-page-book)


## Lulu specific notes

- [Using LaTex to publish a novel on Lulu](http://web.archive.org/web/20120105193931/http://vocamus.net/dave/?p=1406).

### Fixing Embedded fonts error

When you are trying to publish a book via Lulu.com, you might encounter
"embed fonts" error. This is the workaround I found on the web that uses
`ghostscript`:

```
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
 -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \
 -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true \
 -dEmbedAllFonts=true -sOutputFile=new.pdf -f old.pdf
```

*See also*: [Embed fonts in a PDF with pdflatex](http://thomer.com/howtos/embed_font_in_pdf.html) which shows a simpler technique:

```bash
pdf2ps doc.pdf
ps2pdf13 -dPDFSETTINGS=/prepress doc.ps doc2.pdf
```

However, the resulting PDF looks fuzzier than the original one.


### Resizing all pages of a PDF to a common size

This can happen if you are combining multiple PDF documents (say using
`pdftk`) to make a compendium. You can resize all the pages to be of
the same size using `ghostscript` --
[source](http://stackoverflow.com/a/3443336/14191):


```
gs -o /path/to/resized.pdf
   -sDEVICE=pdfwrite
   -dPDFFitPage
   -r300x300
   -g2550x3300
   /path/to/original.pdf
```


## Cropping PDFs

- [PDFCrop](http://pdfcrop.sourceforge.net/)


## Self publishing tools

- [The Tools I Use to Write Books | Hacker News](https://news.ycombinator.com/item?id=17910089)
* [lise-henry/crowbook: Converts books written in Markdown to HTML, LaTeX/PDF and EPUB](https://github.com/lise-henry/crowbook/)
* [softcover/softcover: CLI for book generation, building, and publishing to softcover.io](https://github.com/softcover/softcover)


## Manning

- [Writing a Technical Book for Manning | Tune The Web](https://www.tunetheweb.com/blog/writing-a-technical-book-for-manning/)


## Libraries

- [PrinceXML](https://www.princexml.com)
- [Speedata Publisher](http://speedata.github.io/publisher/index.html) to generate reports. XML-\>PDF. Uses LuaTeX. AGPL/Commercial license.
- [PreTeXt](https://pretextbook.org/index.html) <q>An authoring and publishing system for authors of textbooks, research articles, and monographs, especially in STEM disciplines. The best of DocBook, LaTeX, and HTML. Outputs: print, PDF, web, EPUB, Jupyter Notebooks, braille,</q>. [github](https://github.com/PreTeXtBook/pretext); XML based syntax.


## Web publishing

- [HTMLBook](https://oreillymedia.github.io/HTMLBook/) "an HTML replacement to Docbook"
- [Bookiza Abelone](https://www.bookiza.io/) "The book reification framework for the web." See [example](https://bubblin.io/book/bookiza-documentation-by-marvin-danig/1).
- [ONCE — Writebook](https://once.com/writebook)
- [Printing the web, part 2: HTML and CSS for printing books](https://www.michaelperrin.fr/blog/2019/11/printing-the-web-part-2-html-and-css-for-printing-books) using modern print CSS and PrinceXML.


## Zines

- [How to write zines with simple tools - Julia Evans](https://jvns.ca/blog/2019/09/01/ways-to-write-zines-without-fancy-tools/)

## Book covers

- [The 78 Best Book Covers of 2019 | Literary Hub](https://lithub.com/the-78-best-book-covers-of-2019/)

---

See also: [pandoc](https://shared.btbytes.com/p/pandoc)
