Skip to content

Commit 3321ddf

Browse files
Standardize all raster images to AVIF format
Convert all 48 JPEG/PNG raster images across book/ and slides/ to AVIF (quality 65), reducing total image size from 28 MB to 15 MB (~48% savings). Update all MyST figure references from .jpg/.png to .avif. Add avif2png Makefile targets that auto-generate PNG for XeLaTeX builds (which cannot read AVIF natively). Gitignore generated PNGs in both book/ and slides/. Encode AVIF as the universal image format standard in CLAUDE.md (new "Image Format" section) and planning/course_development.md (new "Technical Standards" section). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7d9dabb commit 3321ddf

109 files changed

Lines changed: 118 additions & 40 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ content/course2025
55
# Jupyter Book build artifacts
66
book/_build/
77

8+
# Generated from AVIF at build time (see Makefile avif2png target)
9+
book/**/figures/*.png
10+
book/**/figures/*.jpg
11+
812
# Byte-compiled / optimized / DLL files
913
__pycache__/
1014
*.py[codz]

CLAUDE.md

Lines changed: 47 additions & 3 deletions

Makefile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
1-
.PHONY: html pdf pdflatex slides clean
1+
.PHONY: html pdf pdflatex slides clean avif2png
22

33
html:
44
jupyter-book build book/
55

66
pdf:
77
jupyter-book build book/ --builder pdfhtml
88

9-
pdflatex:
10-
jupyter-book build book/ --builder pdflatex
9+
# Generate LaTeX, convert AVIF→PNG for XeLaTeX, then compile
10+
pdflatex: avif2png
11+
jupyter-book build book/ --builder latex
12+
@find book/_build/latex/ -name '*.avif' -exec sh -c \
13+
'magick "$$1" "$${1%.avif}.png"' _ {} \;
14+
@sed -i '' 's/\.avif/.png/g' book/_build/latex/*.tex
15+
cd book/_build/latex && make
16+
17+
# Convert AVIF→PNG beside originals for LaTeX builds
18+
avif2png:
19+
@echo "Converting AVIF → PNG for LaTeX..."
20+
@find book/ -name '*.avif' ! -path '*/_build/*' -exec sh -c \
21+
'magick "$$1" "$${1%.avif}.png"' _ {} \;
1122

1223
slides:
1324
$(MAKE) -C slides
1425

1526
clean:
1627
jupyter-book clean book/
28+
@find book/ -name '*.avif' ! -path '*/_build/*' \
29+
-exec sh -c 'rm -f "$${1%.avif}.png"' _ {} \;

book/02_formation_orbits/formation_orbits.md

Lines changed: 1 addition & 1 deletion
70.5 KB
Binary file not shown.
-99.2 KB
Binary file not shown.
25.4 KB
Binary file not shown.
-107 KB
Binary file not shown.

book/03_heat_energy/heat_energy.md

Lines changed: 2 additions & 2 deletions

book/04_differentiation_magnetospheres/differentiation_magnetospheres.md

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)