A Practical Guide to the Terminal, Tools, and Reproducible Workflows
book/
├── main.tex # Entry point — defines the document & includes chapters
├── preamble.tex # All packages, styles, custom commands
├── chapters/
│ ├── 00_foreword.tex
│ ├── 01_introduction.tex
│ └── 02_terminal.tex
└── .gitignore
Run pdflatex twice (the first pass builds the table of contents, the second
fills in the page numbers):
pdflatex main.tex
pdflatex main.texOr use latexmk which figures out how many passes are needed:
latexmk -pdf main.texTo clean up auxiliary files:
latexmk -c # keeps the PDF
latexmk -C # also removes the PDF- Create
chapters/03_your_chapter.texstarting with\chapter{...}. - Add
\include{chapters/03_your_chapter}tomain.tex(no.texextension). - Compile.
Uncomment the \includeonly{} line in main.tex and list only the chapter you
want to compile. Cross-references and the TOC will still know the others exist.
\code{...}— inline code (just\texttt, escape$,_,#,%,&,~,\if needed)\begin{reflection} ... \end{reflection}— blue callout box for reflection promptslstlistingenvironments are styled as bash shell sessions by default. The$at the start of a line renders in blue to highlight prompts.