LaTeX is a tool for creating beautiful writing, or a torture device that drives users to the brink of madness every time they see bad spacing for the rest of their lives. One of the two. Despite origins that can be traced back four decades, it remains one of the best typesetting programs around. Many of its guides, however, haven't aged as well. This short book will get you started with LaTeX without bogging you down in arcana that lost its relevance back in the 90s.
An up-to-date version should be available at https://assets.bitbashing.io/modern-latex.pdf
-
Install LuaLaTeX, a modern, Unicode-aware version of LaTeX. On Linux, this is usually as simple as installing your distro's TeX Live package, e.g.,
texlive-baseortexlive-core. The same package should also provide thelatexmkscript. (See below) -
Check out the
onlinebranch of the source repository, which is optimized for digital display instead of a printed book. Changes include even margins, centered page numbers, a lack of blank pages between chapters, and so on. -
Change the fonts as-needed.
The official version of this book is typeset with Garamond Premier, Neue Haas Grotesk, URW Futura, Drive Mono, Noto, and (of course) Latin Modern. In the likely case that you don't have all of these typefaces, change the
fontspeccommands (e.g.,setmainfont, etc.) appropriately, then modify or remove the colophon at the back of the book. -
Build the book using
latexmk -lualatex -latexoption=-halt-on-error modern-latex.texNote that
latexmkwill run LuaLaTeX multiple times, since TeX generates cross references in one pass, then links them in a second.If you can't use
latexmkfor some reason, you can manually invokelualatex -halt-on-error -shell-escape modern-latex.texuntil it no longer warns, "Label(s) may have changed. Rerun to get cross-references right."
...is welcome! Please issue pull requests on this book's Github page, or contact the author via matt <at> bitbashing.io
Enjoy!