Skip to content

Part Page Diagrams#58

Open
gklorfine wants to merge 9 commits into
masterfrom
part-pages-test
Open

Part Page Diagrams#58
gklorfine wants to merge 9 commits into
masterfrom
part-pages-test

Conversation

@gklorfine

Copy link
Copy Markdown
Collaborator

The below summary was generated by Claude and then reviewed for accuracy. Note that it might be best to merge the GK-work6 PR (#57) before this one:

Summary

Adds DDAR-style "mind-map" bubble diagrams to the PDF edition: each part page (Parts I–IV) gets a diagram showing the part's chapters, and each chapter opener (Chapters 1–15) gets a diagram of its numbered sections, placed above the krantz chapter head. No book content changed — no .qmd or _quarto.yml edits; everything lives on the LaTeX/PDF side, and the HTML build is unaffected apart from the rebuild.

Diagram infrastructure (new)

  • latex/diagrams/part1–4.tex and chap1–15.tex — TikZ sources for the 19 diagrams (hand-built bands/bubbles rather than the TikZ mindmap library, which produces hairline seam artifacts — rationale documented in issues/GK-part-pages.md)
  • latex/diagrams/diagram-common.tex — shared styles (\band macro, root/satellite bubble styles)
  • latex/diagrams/make-diagrams.sh — compiles the sources with xelatex into figs/diagrams/*.pdf
  • figs/diagrams/*.pdf — the 19 pre-built diagram PDFs the book actually includes
  • issues/make-part-diagrams.py — one-off generator that produced the initial .tex sources

Preamble integration

  • latex/preamble.tex — two new \pretocmd hooks: one on \@endpart (part diagram below the part title, keyed by the existing partnum counter) and one on \@makechapterhead (chapter diagram top-right, keyed by \thechapter). Both are wrapped in \IfFileExists, so the End Matter part and front matter render unchanged.
  • latex/part-colors.tex (new) — part accent colors moved out of preamble.tex into one file \input by both the preamble and the diagram sources, so retheming happens in one place.

Build script (macOS fixes)

  • build.sh — adds TinyTeX//Library/TeX/texbin to PATH when makeindex isn't found, and switches sed -i to sed -i.bak so the index-normalization step works with both BSD and GNU sed.

Docs / housekeeping

  • issues/GK-part-pages.md — full write-up of the design, hooks, and gotchas (e.g., diagram filenames must not be zero-padded)
  • memory/ notes for the diagram and color work; typo fix in the Chapter 13 diagram ("Levene test" → "Levene's test" in bubble 13.9)

Rebuilt output (bulk of the diff)

  • docs/ HTML, index.pdf / pdf/Vis-MLM.pdf, Vis-MLM.tex, index/aux files, and figs/ PNGs/PDFs — regenerated by an all-formats rebuild on macOS after merging master (PNGs grew ~4–6× from the retina-resolution rebuild; no content changes)

Note for reviewers

~610 of the 664 changed files are regenerated output (docs/, figs/, pdf/, TeX aux files). The real change is 34 source files plus the 19 pre-built diagram PDFs in figs/diagrams/.

gklorfine and others added 9 commits July 1, 2026 06:15
# Conflicts:
#	Vis-MLM.tex
#	docs/Vis-MLM.pdf
#	docs/index.html
#	docs/sitemap.xml
#	figs/ch01/fig-diabetes1-1.pdf
#	figs/ch03/fig-davis-diagnostic-1.pdf
#	figs/ch03/fig-davis-reg1-1.pdf
#	figs/ch03/fig-davis-reg2-1.pdf
#	figs/ch03/fig-draft-gg1-1.pdf
#	figs/ch03/fig-draft-gg2-1.pdf
#	figs/ch03/fig-draft-means-1.pdf
#	figs/ch04/fig-Prestige-scatterplot-educ1-1.pdf
#	figs/ch04/fig-Prestige-scatterplot-educ2-1.pdf
#	figs/ch04/fig-Prestige-scatterplot-income1-1.pdf
#	figs/ch04/fig-Prestige-scatterplot2-1.pdf
#	figs/ch04/fig-Prestige-scatterplot3-1.pdf
#	figs/ch04/fig-Salaries-discipline-1.pdf
#	figs/ch04/fig-Salaries-facet-sex-1.pdf
#	figs/ch04/fig-Salaries-faceted-1.pdf
#	figs/ch04/fig-Salaries-lm-1.pdf
#	figs/ch04/fig-Salaries-loess-1.pdf
#	figs/ch04/fig-Salaries-rank-1.pdf
#	figs/ch04/fig-Salaries-scat-1.pdf
#	figs/ch04/fig-crime-cor-1.pdf
#	figs/ch04/fig-crime-corrplot-1.pdf
#	figs/ch04/fig-crime-corrplot-AOE-1.pdf
#	figs/ch04/fig-crime-partial-spring-1.pdf
#	figs/ch04/fig-crime-spm-1.pdf
#	figs/ch04/fig-ellipses-coverage-1.pdf
#	figs/ch04/fig-galton-cqplot-1.pdf
#	figs/ch04/fig-galton-outliers-1.pdf
#	figs/ch04/fig-peng-bagplot-1.pdf
#	figs/ch04/fig-peng-cqplot-1.pdf
#	figs/ch04/fig-peng-ggdensity-1.pdf
#	figs/ch04/fig-peng-ggplot-out-1.pdf
#	figs/ch04/fig-peng-ggplot1-1.pdf
#	figs/ch04/fig-peng-ggplot2-1.pdf
#	figs/ch04/fig-peng-mosaic-1.pdf
#	figs/ch04/fig-peng-spm-1.pdf
#	figs/ch04/fig-prestige-pairs-1.pdf
#	figs/ch04/fig-prestige-spm1-1.pdf
#	figs/ch04/fig-prestige-spm2-1.pdf
#	figs/ch05/fig-crime-biplot1-1.pdf
#	figs/ch05/fig-crime-biplot2-1.pdf
#	figs/ch05/fig-crime-biplot3-1.pdf
#	figs/ch05/fig-crime-factominer-1.pdf
#	figs/ch05/fig-crime-ggscreeplot-1.pdf
#	figs/ch05/fig-crime-scores-plot12-1.pdf
#	figs/ch05/fig-crime-vectors-1.pdf
#	figs/ch05/fig-diabetes-ggbiplot-1.pdf
#	figs/ch05/fig-diabetes-mds-1.pdf
#	figs/ch05/fig-diabetes-stress-1.pdf
#	figs/ch05/fig-diabetes-tsne-1.pdf
#	figs/ch05/fig-fviz-contrib-1.pdf
#	figs/ch05/fig-mona-screeplot-1.pdf
#	figs/ch05/fig-mtcars-biplot-1.pdf
#	figs/ch05/fig-mtcars-corrplot-pcaorder-1.pdf
#	figs/ch05/fig-mtcars-corrplot-varorder-1.pdf
#	figs/ch05/fig-workers-pca-1.pdf
#	figs/ch05/fig-workers-scat-1.pdf
#	figs/ch06/fig-poly-1.pdf
#	figs/ch06/fig-workers-fits-1.pdf
#	figs/ch07/fig-coffee-avPlots-1.pdf
#	figs/ch07/fig-coffee-mcplot-1.pdf
#	figs/ch07/fig-coffee-spm-1.pdf
#	figs/ch07/fig-duncan-beta-diff-1.pdf
#	figs/ch07/fig-duncan-check-model-1.pdf
#	figs/ch07/fig-duncan-infl-1.pdf
#	figs/ch07/fig-duncan-plot-model-1.pdf
#	figs/ch07/fig-ggcoef-compare-1.pdf
#	figs/ch07/fig-ggcoef-compare2-1.pdf
#	figs/ch07/fig-hatvalues-demo1-1.pdf
#	figs/ch07/fig-hatvalues-demo2-1.pdf
#	figs/ch07/fig-levdemo-1.pdf
#	figs/ch07/fig-levdemo-infl-1.pdf
#	figs/ch07/fig-levdemo2-1.pdf
#	figs/ch07/fig-modelplot1-1.pdf
#	figs/ch07/fig-modelplot2-1.pdf
#	figs/ch07/fig-modelplot3-1.pdf
#	figs/ch07/fig-plot-prestige-mod-1.pdf
#	figs/ch07/fig-prestige-allEffects-1.pdf
#	figs/ch07/fig-prestige-av-income-1.pdf
#	figs/ch07/fig-prestige-avplot-1.pdf
#	figs/ch07/fig-prestige-crplot-1.pdf
#	figs/ch07/fig-prestige-crplot-women-1.pdf
#	figs/ch07/fig-prestige-effplot-educ-1.pdf
#	figs/ch07/fig-prestige-effplot-inc-1.pdf
#	figs/ch07/fig-prestige-effplot-inc-log-1.pdf
#	figs/ch07/fig-prestige-effplot-women-1.pdf
#	figs/ch08/fig-coffee-scatmat-1.pdf
#	figs/ch08/fig-measerr-demo-1.pdf
#	figs/ch08/fig-measerr-stats-1.pdf
#	figs/ch09/fig-cars-check-collin-1.pdf
#	figs/ch09/fig-cars-collin-biplot-1.pdf
#	figs/ch09/fig-cars-tableplot-1.pdf
#	figs/ch09/fig-collin-centering-1.pdf
#	figs/ch09/fig-collin-data-beta-1.pdf
#	figs/ch09/fig-longley-pairs-1.pdf
#	figs/ch09/fig-longley-pca-biplot-1.pdf
#	figs/ch09/fig-longley-pca-dim56-1.pdf
#	figs/ch09/fig-longley-pca-pairs-1.pdf
#	figs/ch09/fig-longley-pca-traceplot-1.pdf
#	figs/ch09/fig-longley-plot-ridge-1.pdf
#	figs/ch09/fig-longley-precision-plot-1.pdf
#	figs/ch09/fig-longley-traceplot1-1.pdf
#	figs/ch09/fig-longley-traceplot2-1.pdf
#	figs/ch10/fig-banknote-biplot-1.pdf
#	figs/ch10/fig-banknote-violin-1.pdf
#	figs/ch10/fig-mathscore-HE-1.pdf
#	figs/ch10/fig-mathscore-HE-overlay-1.pdf
#	figs/ch10/fig-mathscore-cov1-1.pdf
#	figs/ch10/fig-mathscore-cov2-1.pdf
#	figs/ch10/fig-mathscore-violins-1.pdf
#	figs/ch11/fig-NLSY-coefplot1-1.pdf
#	figs/ch11/fig-NLSY-density-1.pdf
#	figs/ch11/fig-NLSY-scat1-1.pdf
#	figs/ch11/fig-NLSY-scat2-1.pdf
#	figs/ch11/fig-Rohwer-scats-1.pdf
#	figs/ch11/fig-addhealth-covellipse-1.pdf
#	figs/ch11/fig-addhealth-means-each-1.pdf
#	figs/ch11/fig-dogfood-boxplot-1.pdf
#	figs/ch11/fig-jury-ggline-1.pdf
#	figs/ch11/fig-parenting-boxpl-1.pdf
#	figs/ch11/fig-parenting-covEllipses-1.pdf
#	figs/ch11/fig-plastic-ggline-1.pdf
#	figs/ch11/fig-rohwer-mod1-coef-1.pdf
#	figs/ch11/fig-school-distplot-1.pdf
#	figs/ch11/fig-schooldata-cqplot-1.pdf
#	figs/ch11/fig-schooldata-scats-1.pdf
#	figs/ch11/fig-schoolmod-cqplot-1.pdf
#	figs/ch11/fig-schoolmod-infl-1.pdf
#	figs/ch12/fig-NLSY-heplot1-1.pdf
#	figs/ch12/fig-NLSY-heplot2-1.pdf
#	figs/ch12/fig-dogfood-HE-1.pdf
#	figs/ch12/fig-iris-HE1-1.pdf
#	figs/ch12/fig-iris-HEcan-1.pdf
#	figs/ch12/fig-iris-candisc-1.pdf
#	figs/ch12/fig-iris-contrasts-1.pdf
#	figs/ch12/fig-iris-pairs-1.pdf
#	figs/ch12/fig-iris-spm-1.pdf
#	figs/ch12/fig-jury-HE-1.pdf
#	figs/ch12/fig-jury-can-1.pdf
#	figs/ch12/fig-plastic-HE1-1.pdf
#	figs/ch12/fig-plastic-HE2-1.pdf
#	figs/ch12/fig-rohwer-HE-lohi-1.pdf
#	figs/ch12/fig-rohwer-HE-mod1-pairs-1.pdf
#	figs/ch12/fig-rohwer-HE-mod2-1.pdf
#	figs/ch12/fig-school-can-1.pdf
#	figs/ch12/fig-school-can0-1.pdf
#	figs/ch12/fig-school-hecan-1.pdf
#	figs/ch12/fig-school-heplot1-1.pdf
#	figs/ch12/fig-school-heplot2-1.pdf
#	figs/ch13/fig-iris-covEllipse-pairs-1.pdf
#	figs/ch13/fig-iris-dev-can-1.pdf
#	figs/ch13/fig-iris-dev-pairs-1.pdf
#	figs/ch13/fig-iris-pca-covellipses-1.pdf
#	figs/ch13/fig-iris-pca-covellipses-dim34-1.pdf
#	figs/ch13/fig-peng-boxm-plots-1.pdf
#	figs/ch13/fig-peng-boxplots-1.pdf
#	figs/ch13/fig-peng-covEllipse-pairs-1.pdf
#	figs/ch13/fig-peng-covEllipse0-1.pdf
#	figs/ch13/fig-peng-devplots-1.pdf
#	figs/ch13/fig-peng-iris-boxm-plots-1.pdf
#	figs/ch13/fig-peng-iris-boxm-plots2-1.pdf
#	figs/ch14/fig-NLSY-inflplot1-1.pdf
#	figs/ch14/fig-NLSY-inflplot2-1.pdf
#	figs/ch14/fig-peng-inflplot1-1.pdf
#	figs/ch14/fig-peng-inflplot2-1.pdf
#	figs/ch14/fig-peng-robmlm-plot-1.pdf
#	figs/ch14/fig-toy-dfbetas-1.pdf
#	figs/ch14/fig-toy-inflplot-mlm-LR-1.pdf
#	figs/ch14/fig-toy-inflplot-mlm-stres-1.pdf
#	figs/ch14/fig-toy-inflplots-1.pdf
#	figs/ch14/fig-toy-scatmat-1.pdf
#	figs/discrim/fig-peng-LD-biplot-1.pdf
#	figs/discrim/fig-peng-LD-predict-1.pdf
#	figs/discrim/fig-peng-candisc-1.pdf
#	figs/discrim/fig-peng-candisc-HE-1.pdf
#	figs/discrim/fig-peng-new-data-1.pdf
#	figs/discrim/fig-peng-new-discrim-1.pdf
#	figs/discrim/fig-peng-new-discrim2-1.pdf
#	figs/discrim/fig-peng-partimat1-1.pdf
#	figs/discrim/fig-peng-plot-discrim-1.pdf
#	figs/discrim/fig-peng-qda-regions-1.pdf
#	figs/discrim/fig-peng-regions-1.pdf
#	index.aux
#	index.idx
#	index.ilg
#	index.ind
#	index.log
#	index.toc
#	pdf/Vis-MLM.pdf
#	pdf/index.aux
#	pdf/index.idx
#	pdf/index.ilg
#	pdf/index.ind
#	pdf/index.log
#	pdf/index.tex
#	pdf/index.toc
- Rebuild PDF + HTML from merged sources (./build.sh --all --fix-index)
- build.sh: use portable sed -i.bak (BSD sed chokes on 'sed -i -e')
- build.sh: add TinyTeX bin dir to PATH when makeindex is not found

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant