Live data from Hacker News

Ask HN: What software should I use to write a textbook?

news.ycombinator.com

11–20 of 70 posts

Re: Ask HN: What software should I use to write a textbook?

#11
Your favorite coding editor (intellij, vim, emacs, notepad++,...), markdown and pandoc.

Markdown lets you focus on content and structure, pandoc creates a PDF of it by using latex, which you can later use to define how the text shall be printed (twosided? Us legal/a4/a5? Title, author,... ) and gives you latex formatted text, which is always correct & professional.

Pandoc also allows tables and images in markdown.

Re: Ask HN: What software should I use to write a textbook?

#12
"What is Best" always depends on what you need. For writing a book, the final answer is probably LaTeX. That's assuming what you need is not highly simple. (However, the advice to work in plain text before you typeset is really solid)

However... for something simple, I'll point to https://casual-effects.com/markdeep/ I've found that Visual Studio Code + https://marketplace.visualstudio.com/items?itemName=Flixs.vs... make for a lovely editing experience. Basically, you write plain text, hit ctrl-s and see formatted HTML in a side panel. The homepage explains how to generate PDFs.

Here's some notes about fancy typesetting from someone who wrote a book using Markdeep: https://imaginary-institute.com/resources/MarkdeepToInDesign...

Re: Ask HN: What software should I use to write a textbook?

#14
If you have time to invest, go for a TeX variant (LaTeX or ConTeXt). That gives full control over any typesetting detail.

I’d recommend ConTeXt [0] over LaTeX. A minimal document is as simple as

    \starttext
    Start writing here…
    \stoptext
and you can go a long way from there, including making ebooks. Much better than LaTeX for layout control, language support, graphics integration, table generation, etc… It’s also intimately integrated with Lua for your scripting needs.

The documentation is possibly its weak point: it’s rich and comprehensive, although somewhat sparse and at times heavily technical. But it’s worth the effort, IMHO.

You may get inspired by the TeX showcase [1] (not only ConTeXt, but also LaTeX and plain TeX).

[0] http://wiki.contextgarden.net/Main_Page [1] https://www.tug.org/texshowcase/

Re: Ask HN: What software should I use to write a textbook?

#16

If you have time to invest, go for a TeX variant (LaTeX or ConTeXt). That gives full control over any typesetting detail. I’d recommend ConTeXt [0] over LaTeX. A minimal document is as simple as \starttext Start writing here… \stoptext and you can go a long way from there, including making ebooks. Much better than LaTeX for layout control, language support, graphics integration, table generation, etc… It’s also intim…

For a book I'd recomment ConTeXt. It's rougher around the edges but it's geared more towards "rich" presentation with sidebars, imaages, maybe even some color vs LaTeX which at it's core is optimized for things like journal articles with relatively little formatting.

If I was going to compare them to commerical software, ConTexT is closer to InDesign and LaTeX is closer to Word.

Re: Ask HN: What software should I use to write a textbook?

#17
My process is to use markdown [1] (very little style related formatting) and then convert to a desired format using pandoc [2]. Building multiple books that look the same, later revisions, etc - becomes really easy.

One of the benefits is that you can convert a chapter to a webpage and gauge interest in the book itself.

[1] https://daringfireball.net/projects/markdown/

[2] http://pandoc.org/

Re: Ask HN: What software should I use to write a textbook?

#18
post #4

Begin with plain ASCII text. It's very easy to get distracted by the formatting and looks. Content is what's important. So begin with a basic editor like notepad/vi/emacs. Perhaps at best markdown. Get it done, then edited, then you can typeset with something like Latex/Word.

I don't see why Latex shouldn't be used for that. Whether you write # (markdown) or \section (Latex) to start a new section doesn't really matter for you as a writer, but the latter already gives you a correctly formatted basic version "for free" (who would be insane enough to use Word for an entire textbook?).

If you get distracted by the formatting and looks during the writing process, then just limit yourself to the basic Latex commands (\section, \emph, etc.).

Re: Ask HN: What software should I use to write a textbook?

#19
Check out Pollen: http://docs.racket-lang.org/pollen/

The author of the package, Matthew Butterick, wrote several books with it, such as

- Practical Typography: https://practicaltypography.com/

- Beautiful Racket: https://beautifulracket.com/

Looking at the results, I can't help but be impressed. If I was writing a book, I would start here.

I think you can get it to output LaTeX which you can then use to generate your final PDF and ePub, if you like.

Previous HN discussion here with some other real-world users chiming in with their experiences: https://news.ycombinator.com/item?id=15335010

Post reply on HN