Repository navigation
Building the PDF
Golam Kuadir Khan Prince edited this page Oct 22, 2026
·
2 revisions
A prebuilt copy is in the repo at pdf/Advanced-Chemistry.pdf. It is A4, about 920 pages (core, specializations and appendices), with clickable contents and PDF bookmarks.
- Node.js 18 or newer.
-
A Chromium-based browser: Chrome, Edge or Chromium. It is found automatically on Windows, macOS and Linux. If yours is elsewhere, set
CHROME_PATH.
No LaTeX installation is needed.
npm install
npm run pdf # whole book -> dist/Advanced-Chemistry.pdf
node scripts/build-pdf.mjs --parts 5,6,A # selected chapters/appendices
node scripts/build-pdf.mjs --parts 13 --out ch13.pdf # custom output path
node scripts/build-pdf.mjs --html # also keep the intermediate HTMLParts are chapter numbers (1–23), specializations (S1–S14) or appendix letters (A–E). The full book takes a few minutes to print.
-
Collect the parts.
lib/book.mjslists the chapters and appendices in reading order. -
Render to HTML. markdown-it renders each file. markdown-it-texmath passes every
$…$and$$…$$to KaTeX, which typesets it on the server. - Fix image paths. Relative image links are resolved to absolute file URLs, so figures embed correctly.
- Assemble one document. A cover page, a linked contents page and one section per part are combined. KaTeX's CSS and fonts are inlined.
- Print. puppeteer-core drives your local Chrome to print the PDF, with page numbers and a running header.
The builder reports two kinds of problem:
- Math that KaTeX could not render, with the file and expression.
- Image links whose file does not exist.
A clean build prints neither.
Follow these rules (see Contributing and House Style):
- Use
$…$and$$…$$, never\(…\)or\[…\]. - Use
\begin{aligned}inside$$, notalign. - Inside tables, write
\lvert x\rvertinstead of|x|.
Quantum Chemistry: From Fundamental Physics to Chemical Reactivity · The Studio of Sadiq · MIT License · No arbitrary exceptions — only approximations with domains of validity.
Advanced Chemistry
- Home
- About the Book
- Chapter Guide
- Figures
- Building the PDF
- MCP Server
- Contributing and House Style
- FAQ
Links