Ask HN: What software should I use to write a textbook?
If you have time to invest, go for a TeX variant (LaTeX or ConTeXt). That gives full control over any typesetting detail.<p>I’d recommend ConTeXt [0] over LaTeX. A minimal document is as simple as<p><pre><code>    \starttext
    Start writing here…
    \stoptext
</code></pre>
and you can go a <i>long</i> 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.<p>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.<p>You may get inspired by the TeX showcase [1] (not only ConTeXt, but also LaTeX and plain TeX).<p>[0] <a href="http:&#x2F;&#x2F;wiki.contextgarden.net&#x2F;Main_Page" rel="nofollow">http:&#x2F;&#x2F;wiki.contextgarden.net&#x2F;Main_Page</a>
[1] <a href="https:&#x2F;&#x2F;www.tug.org&#x2F;texshowcase&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.tug.org&#x2F;texshowcase&#x2F;</a>