Use this route for polished Chinese technical books, engineering monographs, source-code reading books, algorithm books, systems design books, or long-form book-like content that should be typeset with LaTeX rather than HTML.
This is distinct from the academic-thesis route. Do not apply university thesis formatting rules here unless the user explicitly asks for an academic thesis.
Start from:
templates/latex-technical-book/source.tex
The template uses a TikZ animal-style placeholder by default, so no binary cover illustration is
required. If the user provides a real cover image, copy it into figures/ and replace the
placeholder block in source.tex with an \includegraphics call. If the source HTML references an
image that is absent, tell the user instead of pretending the image exists.
Inspect source structure first
dropcap, pullquote, timeline, arch-diagram, dep-flow,
flow-diagram, code, table, etc.Generate semantic LaTeX, not literal CSS
\chapter, \section, \subsection.diagramBox; do not drop structural
diagrams.pullquotebox/insightbox/warningbox.\path|...| when ASCII-heavy.Keep navigation clickable
hyperref is mandatory.\tableofcontents.\phantomsection before manual TOC entries.Compile with XeLaTeX
latexmk -xelatex -interaction=nonstopmode main.tex.Verify before delivery
Use semantic mappings rather than literal CSS copying:
p.dropcap, span.dropcap → \fancydropcap{首}{剩余文字} for Chinese prose only; skip
ASCII/digit starts.div.pullquote, .pull-quote, blockquote → pullquotebox.ul.timeline with .year → diagramBox plus description..arch-diagram, .dep-flow → TikZ diagram inside diagramBox..flow-diagram, .flow-chain, .path-diagram, .flow-row → TikZ or structured diagramBox;
preserve all nodes/arrows.<code> → \path+...+ (or another delimiter) when ASCII/path/API-like; escaped normal
text when CJK-heavy.<pre><code> → lstlisting with low-saturation highlighting.<table> → tabularx with ragged Y columns; reduce \tabcolsep; use \scriptsize for many
columns.<ul> / <ol> → enumitem lists with restrained red marker/number accents.source.tex.lettrine warns near page boundaries.\path, xurl, tabularx, and manual line breaks for
extreme cells.