Update MD picture sizing from the original docx manual#43
Merged
cycomachead merged 6 commits intomainfrom May 4, 2026
Merged
Conversation
- Fix LaTeX errors in docx conversion that caused missing content and index corruption.
- Implement `apply-docx-widths.py` to preserve original image dimensions from Word.
- Replace broken cross-references and Quarto-style divs with MyST-compatible grids.
- Map non-ASCII symbols (➔, ⚡) to LaTeX commands to prevent missing glyph boxes.
- Update 324 images across 13 chapters to use explicit widths via the `{img}` role.
Co-authored-by: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix LaTeX PDF conversion errors and improve image sizing
Resolves several LaTeX compilation errors from the docx → PDF pipeline that caused missing content, index corruption, and broken layouts. Also introduces a script to restore original image dimensions from the source Word document, updating 324 images across 13 chapters.
Changes
LaTeX error fixes:
01-blocks-scripts-And-sprites/image138→ lowercase) that caused a missing block icon in the Etcetera section:::{.evenly-spaced-images}divs in06-procedures-as-data.mdwith MyST-compatible:::{grid}blocks (a<br/>inside the old div was generating invalid LaTeX)≤in index entries — makeindex was emitting an unclosed\textbf{that aborted the indexmulticolsearly; addasciiSortKey()to map non-ASCII symbols to ASCII names in the sort fieldindex.mdwith a plain DOI link (the SVG served astext/plainwas producing unrenderablemystRoleErrornodes)@sec-nesting-sprites-anchors-and-parts→@nesting-sprites-anchors-and-parts; restructure{#fig-rainbow}into a proper MyST target)Symbol substitution:
latex-shims.mjsbody-font symbol map to cover➔(used in block names likesentence ➔ list) →\textrightarrow{}, preventing missing-glyph boxes in body text and the indexImage sizing:
_support/scripts/apply-docx-widths.py— re-extracts the docx via pandoc, builds animageNN → width-in-inchesmap, and rewrites plainblock images as{img alt="..." width="Xin"}rolesVisual Changes
Before/after page 5 (annotated IDE screenshot):
Index pages (≤ block entry and arrow symbols):
➔now renders correctly;≤group no longer breaks the indexChapter 6 Special Forms layout:
Superconductor Ticket Implementation | Guided Review