Deletes the backup file that contains a list of scripts.
This action streamlines the repository and avoids potential
confusion or conflicts arising from outdated file lists.
Deletes the backup and experimental cross-reference injection filters.
These filters are no longer needed as the primary injection mechanism
has been stabilized and improved. Removing them cleans up the codebase
and avoids confusion.
Removes the Dockerfile that used Chocolatey as the primary means to install packages on Windows. This Dockerfile was failing due to inconsistencies in Chocolatey package availability and reliability.
Removes the `docker/windows/Dockerfile.backup-2025-10-08` file.
This Dockerfile is no longer needed, as it represents a backup of a previous configuration and is superseded by more recent and actively maintained Dockerfiles.
Protects LaTeX commands by using `\protect` to ensure proper expansion and prevent errors, especially when used in environments where arguments might be prematurely evaluated.
Specifically, it ensures correct handling of potentially fragile arguments in `\fbxIncludeIcon` and the `title` argument of the `tcolorbox` environment. Additionally, it corrects the command which was incorrectly replacing all hyphens instead of just the first one.
Fixed StrSubstitute to use asterisk (*) to replace all hyphens, not just
the first one, when converting callout class names to icon filenames.
Problem:
- Without asterisk: callout-quiz-question → icon_callout_quiz-question ❌
- Icon file doesn't exist, PDF build fails or shows missing icons
Solution:
- With asterisk: callout-quiz-question → icon_callout_quiz_question ✅
- Correctly matches existing icon files
Fixes icon loading for 6 callout types with multiple hyphens:
- callout-quiz-question (auto-generated by inject_quizzes.lua)
- callout-quiz-answer (auto-generated by inject_quizzes.lua)
- callout-chapter-connection (margin-connections.lua)
- callout-resource-exercises
- callout-resource-slides
- callout-resource-videos
All icon files verified to match naming convention.
Replaced external check-json hook with custom validator using Python's
built-in json module (json.load). Created validate_json.py wrapper to
handle multiple files.
Benefits:
- No external dependencies
- Uses Python's standard library json parser
- Same validation logic as the build system
- Fast and reliable (0.16s for all JSON files)
Consolidate and standardize callout/foldbox styling architecture:
MAJOR CHANGES:
- Consolidated callout dark mode styles (Extension-First architecture)
- Standardized icon filenames to snake_case only
- Fixed manual dark mode toggle support
- Enhanced left-alignment for all callout content
- Improved example icon size for consistency
COMMITS MERGED (7):
1. refactor(styles): Consolidate callout styling into foldbox.css
2. docs: Document completed consolidation
3. fix(styles): Restore callout dark mode for manual toggle
4. fix(styles): Comprehensive left-alignment for all callouts
5. fix(icons): Increase example icon size to match quiz icons
6. fix(icons): Add hyphenated filenames for PDF (superseded)
7. refactor(icons): Standardize to snake_case filenames only
BENEFITS:
✅ ~190 lines duplicate CSS eliminated
✅ Single source of truth for callout styling
✅ Consistent icon naming (snake_case)
✅ Dark mode works for both system and manual toggle
✅ All formats tested (HTML, PDF, EPUB)
TESTING:
✅ All builds successful (HTML/PDF/EPUB)
✅ Icons render correctly across formats
✅ Dark mode styling verified
✅ Left-alignment consistent
PROBLEM: Mixed naming conventions (hyphenated and underscored) for icon
files causing confusion and maintenance burden.
SOLUTION: Standardize on snake_case (underscored) filenames ONLY and
update TeX macros to convert hyphens to underscores automatically.
CHANGES:
1. Updated foldbox.tex:
- Added xstring package for string manipulation
- Created \fbxIncludeIcon macro that converts hyphens to underscores
- Updated both fbx and fbxSimple environments to use new macro
- Example: callout-quiz-question -> icon_callout_quiz_question.pdf
2. Removed ALL hyphenated icon files (22 files deleted):
- icon_callout-quiz-question.*
- icon_callout-quiz-answer.*
- icon_callout-definition.*
- icon_callout-example.*
- icon_callout-colab.*
- icon_callout-chapter-connection.*
- icon_callout-resource-*.*
- icon_callout-code.*
3. Kept ONLY underscored icon files:
- icon_callout_quiz_question.*
- icon_callout_quiz_answer.*
- icon_callout_definition.*
- icon_callout_example.*
- icon_callout_colab.*
- etc.
HOW IT WORKS:
- HTML: Lua filter converts hyphens to underscores (existing behavior)
- PDF: TeX macro converts hyphens to underscores (new behavior)
- EPUB: Uses PNG with underscored names (existing behavior)
BENEFITS:
✅ Single source of truth (underscored filenames only)
✅ No duplicate files
✅ Consistent naming across all formats
✅ Easier maintenance and less confusion
✅ Follows snake_case standard for file naming
TESTING:
✅ HTML build successful
✅ PDF build successful (with TeX conversion)
✅ No missing icon errors
PDF builds use hyphenated callout class names (callout-quiz-question)
while HTML uses underscored names (callout_quiz_question) for icon lookup.
ISSUE: PDF compilation failed with error:
"Package luatex.def Error: File 'icon_callout-quiz-question.pdf' not found"
SOLUTION: Created hyphenated versions of all icon files to support both
naming conventions used by different Quarto output formats.
FILES ADDED (both PNG and PDF):
- icon_callout-quiz-question (hyphenated)
- icon_callout-quiz-answer (hyphenated)
- icon_callout-definition (hyphenated)
- icon_callout-example (hyphenated)
- icon_callout-colab (hyphenated)
EXISTING FILES KEPT (underscored):
- icon_callout_quiz_question
- icon_callout_quiz_answer
- icon_callout_definition
- icon_callout_example
- icon_callout_colab
This dual naming ensures compatibility with:
- HTML builds (use underscores via Lua filter conversion)
- PDF builds (use hyphens directly from class names)
- EPUB builds (use PNG with either convention)
TESTING:
✅ PDF build successful (./binder pdf intro)
✅ HTML build successful (./binder html intro)
✅ No more missing icon errors
Regenerated example icon with larger, more prominent document and checkmark
to match the visual weight of quiz question/answer icons.
BEFORE:
- 678 bytes, 4-bit colormap
- Very small visual appearance
AFTER:
- 2.0K PNG (16-bit RGBA), 8.6K PDF
- Larger document shape (30,20 to 98,108)
- Bold checkmark with 8px stroke width
- Three horizontal lines on document for better definition
TESTING:
✅ HTML build successful
✅ Icon now comparable in size to quiz icons (12-13K)
✅ Better visibility and consistency across callout types
Added explicit left-alignment rules for all custom callout types to ensure
consistent text alignment across definition, example, quiz, colab callouts.
CHANGES:
- Extended content body styling to ALL callout types (not just fbx-default)
- Added explicit left-alignment for paragraphs (p), lists (ul/ol), and
list items (li) inside all callouts
- Added left-alignment for summary strong elements (callout titles)
- Applied !important flags to override any Quarto defaults
CALLOUT TYPES COVERED:
- definition, example, quiz-question, quiz-answer, colab
- chapter-connection, chapter-forward, chapter-recall
- resource-slides, resource-videos, resource-exercises, code
TESTING:
✅ HTML build successful
✅ All callout content now consistently left-aligned
This ensures proper text flow and readability in both light and dark modes.
ISSUE: Dark mode callouts not styled when using manual toggle button
ROOT CAUSE: Quarto has TWO dark mode mechanisms:
1. System dark mode (@media prefers-color-scheme) - handled by foldbox.css
2. Manual toggle button - loads dark-mode.scss as separate stylesheet
When we removed callout styles from dark-mode.scss (commit 56c30395f),
we broke manual toggle dark mode. The @media query in foldbox.css only
works for system-level dark mode, NOT the manual toggle.
SOLUTION: Restore all callout dark mode styles to dark-mode.scss
WITHOUT @media query (file only loads when dark mode active via toggle)
STYLES RESTORED:
- Callout colors/backgrounds (quiz, definition, example, colab, etc.)
- Summary header text colors (#f0f0f0)
- Content body backgrounds (#212529)
- Arrow styling
- Code element colors
- Link colors with hover states
TESTING:
✅ HTML build successful
✅ Manual toggle dark mode now works
✅ System dark mode still works (via foldbox.css)
✅ No duplication issues (different trigger mechanisms)
This is necessary duplication: same styles, different activation methods.
Implement Extension-First architecture for callout/foldbox styling:
CHANGES:
- foldbox.css: Now the single source of truth for ALL callout styling
(light mode + dark mode via @media query)
- dark-mode.scss: Removed 159 lines of duplicate callout rules
(colors, backgrounds, text, arrows, links) - all now in foldbox.css
- style.scss: Simplified to minimal Quarto overrides (52 references → 8)
Removed redundant alignment/list rules now handled by extension
BENEFITS:
- Eliminates duplication between foldbox.css and dark-mode.scss
- Self-contained extension easier to maintain and debug
- Clear separation: extension handles styling, host SCSS only excludes
- Consistent dark mode behavior via prefers-color-scheme media query
TESTING:
✅ HTML build successful (intro chapter)
✅ EPUB build successful (intro chapter)
✅ Callout icons render correctly (definition, quiz, example)
✅ Dark mode styles present in built foldbox.css
✅ All callout types included (colab, definition, quiz, resources, etc.)
Addresses architecture issues identified in CALLOUT_STYLING_ANALYSIS.md
- Add generate_alt_text.py script for automated image alt-text generation
- Add README_ALT_TEXT.md with detailed usage instructions
- Add QUICK_START_ALT_TEXT.md for quick reference
- Uses Google Gemini API to generate descriptive alt-text for figures
Related to accessibility improvements for image descriptions.
Work in progress - requires GitHub issue tracking.
- Change from markdown heading (##) to title attribute
- Ensures callout-colab renders with same title styling as definition callouts
- Title now appears in summary with proper left alignment and icon placement
This matches the exact pattern used for callout-definition, callout-example, etc.
- Add callout-colab to exclusion from general callout styling (removes box-shadow)
- Add callout-colab to all alignment rules (left-align content, lists, summaries)
- Add callout-colab to empty paragraph handling
- Ensures callout-colab follows exact same pattern as definition/example/quiz callouts
This makes callout-colab render identically to other custom callouts, just with
orange color and code icon.
- Add callout-colab styles to epub.css matching definition/example pattern
- Ensure consistent EPUB rendering with orange color (#FF6B35)
- No changes to foldbox.css since definition/example were already working
The callout-colab now has the same structure as definition/example callouts
with only color and icon differences.
- Upscale definition, quiz, resource, and chapter connection icons from ~43px to 128px
- Replace colab icon with circle design (light circle, bold brackets)
- Use Lanczos filter for high-quality upscaling
- Regenerate all PDF versions from high-res PNGs
- Remove temporary backup and test files
All icons now consistently use 128x128 resolution for crisp, sharp rendering
across HTML, PDF, and EPUB formats.
- Add callout-colab CSS styling (light and dark mode) to match definition/example
- Restore original icon_callout_definition.png/pdf from commit 267fc5518
- Create new icon_callout_example.png/pdf (teal document with checkmark)
- Remove outer box styling from callout-colab to match other callouts
- Add dark mode support for callout-colab with proper color scheme
- Add test callout-colab to Introduction chapter for preview
This completes the visual integration of callout-colab with existing callout types.
- Define colab-interactive group in HTML, PDF, and EPUB configs
- Add callout-colab class mapping in all three formats
- Ensure consistent orange color scheme (FFF5E6/FF6B35) across formats
- Use PDF icons for PDF builds, PNG icons for HTML/EPUB builds
This completes the callout-colab icon infrastructure enabling interactive
Colab notebooks to be referenced throughout the book with consistent styling.
- Add icon_callout_colab.png/pdf for interactive Colab callouts (orange code symbol)
- Add icon_callout-code.png/pdf as base code icon (blue-gray)
- Update Lua filter to support snake_case icon filenames (callout-colab → callout_colab)
- Define callout-colab class in Quarto configs (HTML, PDF, EPUB)
- Remove duplicate hyphenated icon files (definition, example, quiz-question, quiz-answer)
- Add README_ICONS.md for icon documentation and maintenance
This infrastructure enables the integration of interactive Google Colab notebooks
throughout the book using a consistent, styled callout pattern.
Fixes inconsistencies in the representation of weight matrices
and the order of operations in forward propagation. This ensures
accurate calculations and a clearer understanding of neural
network computations.
Improves the Frontiers chapter by removing redundant, speculative, and non-essential content, resulting in a more focused and academically rigorous presentation.
This includes:
- Deleting entire sections (Integrated Development Framework, Speculative Timeline, Career Paths) deemed unnecessary by expert reviewers.
- Consolidating redundant introductions and sections.
- Condensing verbose descriptions of opportunities and AGI applications.
These changes address reviewer feedback regarding clarity, focus, and academic tone, while maintaining technical depth.
Resolved major inconsistency in matrix multiplication notation throughout
the textbook. Previously used two conflicting conventions:
- Convention A (inconsistent): Z = W·A (weight on left)
- Convention B (now standard): Z = A·W (activation on left)
Adopted Convention B throughout to match PyTorch/TensorFlow conventions
and provide intuitive batch-first processing where inputs are (batch×features)
and weights are (input_dim×output_dim).
Changes in dl_primer.qmd:
- Forward propagation equations: Changed Z^(l) = W^(l)·A^(l-1) to A^(l-1)·W^(l)
- Dimension specifications: Changed weight matrices from (output×input) to (input×output)
- Gradient equations: Updated backprop formulas to match new convention
* Weight gradients: (A^(l-1))^T · ∂L/∂Z^(l)
* Input gradients: ∂L/∂Z^(l) · (W^(l))^T
- Weight matrix description: Clarified row vs column interpretation
- Self-check questions: Updated all equation references
Changes in dnn_architectures.qmd:
- MLP layer equation: Changed h^(l) = f(W^(l)·h^(l-1) + b) to h^(l-1)·W^(l)
- Weight matrix dimensions: Changed from R^(d_out×d_in) to R^(d_in×d_out)
- Concrete example: Transposed 3×4 weight matrix to 4×3 to match convention
- Removed unnecessary transposes from computation examples
All numerical examples verified correct (784×100, 100×100, 100×10 for
MNIST example). No linter errors introduced.
Addresses #1041
Co-authored-by: jianqingdu <jianqing.du@live.cn>
Changed the output layer weight matrix W^(L) from n_(L-1) × 10 to
10 × n_(L-1) to match the mathematical formulation and maintain
consistency with the pattern used for all other layers (output_dim × input_dim).
Closes#1041
Co-authored-by: jianqingdu <jianqing.du@live.cn>
* Update TinyML report reference in bibliography
The original url gives 404. I couldn't find another unpaid link on that website. Suggested replacement.
* Change source reference in ML systems documentation
Updated source reference for the Distributed Intelligence Spectrum description.
* Replace market growth report with ABI research report
Replaced to the originally intended article/wp
* Change source reference in ml_systems.qmd
Updated source reference for the Distributed Intelligence Spectrum description.
- Formatted state space model equations using LaTeX math blocks with alignment
- Added Wei et al. 2022 chain-of-thought prompting citation
- Improves readability and proper citation of key techniques
Addresses #1016
Simplified approach:
- Removed pdf.html and epub.html redirect files (unnecessary complexity)
- Changed navbar links to direct asset paths
- Dev builds: Direct links to assets/downloads/ (simpler, no redirects)
- Production: Netlify still provides /pdf and /epub vanity URLs via netlify.toml
This is cleaner because:
- No extra HTML redirect files to maintain
- Dev users don't need vanity URLs (it's for testing)
- Production keeps short URLs via Netlify server redirects
- Fewer moving parts, less complexity
Addresses #1016
Added resources configuration to include pdf.html and epub.html in the
build output so they are available at /pdf and /epub URLs on GitHub Pages.
Addresses #1016
Changes:
- Added pdf.html and epub.html as client-side redirect files
- These use meta refresh and JavaScript redirect for GitHub Pages
- Removed _redirects file copying (Netlify-only feature)
- HTML redirects work on GitHub Pages which doesn't support server redirects
GitHub Pages will serve these HTML files at /pdf and /epub URLs, which
then redirect to the actual files in assets/downloads/.