

Ask HN: How to create textbook-like PDFs? - mknits

Currently I&#x27;m reading one of the books available on http:&#x2F;&#x2F;inventwithpython.com&#x2F;. How Al is able to produce such beautiful PDFs? What free and open-source software you can recommend (I use windows)?
======
tinyProton
It's definitely LaTex. You can find some very nice LaTex templates in:
[http://www.latextemplates.com/](http://www.latextemplates.com/). See this
template for example:
[http://www.latextemplates.com/templates/books/2/book_2.pdf](http://www.latextemplates.com/templates/books/2/book_2.pdf)

------
_pius
I don't know what the author used, but the typical solution to this is LaTeX:
[http://www.latex-project.org/](http://www.latex-project.org/)

------
cabacon
That reminds me of using Docbook to write the book, then using the various
transformation engines to turn the docbook into PDF. I setup some docbook
documentation that just used xsltproc to generate HTML and PDF from the same
source. [http://stackoverflow.com/questions/2615002/how-to-
generate-p...](http://stackoverflow.com/questions/2615002/how-to-generate-pdf-
from-docbook-5-0) has some notes about the process.

For my part, I enjoyed the semantic markup it gave for something as big as a
book, with auto-generating index and glossary as well. It's a lot of work, but
the output reflects it. Looking at the HTML in the first chapter there, the
spans with "term" and "menuitem" make me think something like docbook is going
on behind this too.

~~~
ig1
The docbook tool chain is a nightmare to setup though.

------
ekr
I've seen much more beautifully crafted books in Latex, compared to that.

Another (free-software) solution, embraced by people like Andrew Tanenbaum, is
GNU Troff
([http://www.gnu.org/software/groff/](http://www.gnu.org/software/groff/)).

------
ada1981
Http://PressBooks.com

