$ show vEnhance/napkin
This repository contains the complete LaTeX source for 'An Infinitely Large Napkin', a comprehensive advanced mathematics textbook by Evan Chen. The project is primarily a document production pipeline: the core content is a collection of modular .tex files organized by topic (algebra, topology, analysis, etc.), with extensive cross-references, custom macros, and Asymptote figures. However, the repository also exhibits strong software engineering practices: it includes a Nix flake for reproducible builds, GitHub Actions CI/CD workflows that compile the PDF and deploy to GitHub Pages, pre-commit hooks for code quality, and helper scripts (export-flowchart.sh, print-toc.py) for generating dependency graphs and split PDFs. This hybrid nature makes it both a textbook source and a well-automated document production application.
The LLM identified 5 files worth highlighting for reuse:
Defines hundreds of custom LaTeX commands (e.g., \vocab, \prototype, \ZZ, \RR, \Hom) for consistent mathematical notation across the textbook. This file is self-contained and can be reused in any LaTeX document to achieve a uniform style for advanced mathematics.
A custom LaTeX package that integrates Asymptote figures with proper scaling, positioning, and label handling. It provides a clean interface for embedding 2D and 3D Asymptote graphics, reusable in any LaTeX project that uses Asymptote.
A standalone Python script that extracts the table of contents from a compiled LaTeX PDF and generates split PDFs for each part or chapter. It uses QPDF and is parameterized, making it reusable for any multi-chapter LaTeX document that needs per-part PDFs.
A shell script that uses Graphviz dot to generate a dependency graph of chapters based on cross-references. It is self-contained and can be adapted to visualize the structure of any interconnected LaTeX document.
A Nix flake that pins a specific TeX Live distribution and all required packages, providing a fully reproducible build environment for the textbook. This pattern is reusable for any LaTeX project that needs deterministic compilation across machines.