TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to create textbook-like PDFs?

5 pointsby mknitsover 11 years ago
Currently I'm reading one of the books available on http://inventwithpython.com/. How Al is able to produce such beautiful PDFs? What free and open-source software you can recommend (I use windows)?

5 comments

tinyProtonover 11 years ago
It&#x27;s definitely LaTex. You can find some very nice LaTex templates in: <a href="http://www.latextemplates.com/" rel="nofollow">http:&#x2F;&#x2F;www.latextemplates.com&#x2F;</a>. See this template for example: <a href="http://www.latextemplates.com/templates/books/2/book_2.pdf" rel="nofollow">http:&#x2F;&#x2F;www.latextemplates.com&#x2F;templates&#x2F;books&#x2F;2&#x2F;book_2.pdf</a>
_piusover 11 years ago
I don&#x27;t know what the author used, but the typical solution to this is LaTeX: <a href="http://www.latex-project.org/" rel="nofollow">http:&#x2F;&#x2F;www.latex-project.org&#x2F;</a>
cabaconover 11 years ago
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. <a href="http://stackoverflow.com/questions/2615002/how-to-generate-pdf-from-docbook-5-0" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2615002&#x2F;how-to-generate-p...</a> has some notes about the process.<p>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&#x27;s a lot of work, but the output reflects it. Looking at the HTML in the first chapter there, the spans with &quot;term&quot; and &quot;menuitem&quot; make me think something like docbook is going on behind this too.
评论 #6262998 未加载
ekrover 11 years ago
I&#x27;ve seen much more beautifully crafted books in Latex, compared to that.<p>Another (free-software) solution, embraced by people like Andrew Tanenbaum, is GNU Troff (<a href="http://www.gnu.org/software/groff/" rel="nofollow">http:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;groff&#x2F;</a>).
ada1981over 11 years ago
Http:&#x2F;&#x2F;PressBooks.com