Skip to content

Update MD picture sizing from the original docx manual#43

Merged
cycomachead merged 6 commits intomainfrom
cycomachead/ai/11/2
May 4, 2026
Merged

Update MD picture sizing from the original docx manual#43
cycomachead merged 6 commits intomainfrom
cycomachead/ai/11/2

Conversation

@cycomachead
Copy link
Copy Markdown
Member

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:

  • Fix broken image path (01-blocks-scripts-And-sprites/image138 → lowercase) that caused a missing block icon in the Etcetera section
  • Replace Quarto-style :::{.evenly-spaced-images} divs in 06-procedures-as-data.md with MyST-compatible :::{grid} blocks (a <br/> inside the old div was generating invalid LaTeX)
  • Fix index corruption caused by in index entries — makeindex was emitting an unclosed \textbf{ that aborted the index multicols early; add asciiSortKey() to map non-ASCII symbols to ASCII names in the sort field
  • Replace Zenodo SVG badge in index.md with a plain DOI link (the SVG served as text/plain was producing unrenderable mystRoleError nodes)
  • Fix two broken cross-references (@sec-nesting-sprites-anchors-and-parts@nesting-sprites-anchors-and-parts; restructure {#fig-rainbow} into a proper MyST target)

Symbol substitution:

  • Extend latex-shims.mjs body-font symbol map to cover (used in block names like sentence ➔ list) → \textrightarrow{}, preventing missing-glyph boxes in body text and the index

Image sizing:

  • Add _support/scripts/apply-docx-widths.py — re-extracts the docx via pandoc, builds an imageNN → width-in-inches map, and rewrites plain ![alt](path) block images as {img alt="..." width="Xin"} roles
  • 324 images updated across 13 chapter/appendix files; editor screenshots (~5 in. in docx) now render at their original size instead of the 30% linewidth fallback

Visual Changes

Before/after page 5 (annotated IDE screenshot):

  • Before — screenshot shrunk to ~2.25 in.
  • After — screenshot at full usable width

Index pages (≤ block entry and arrow symbols):

  • Index p.188 / p.189 now renders correctly; group no longer breaks the index

Chapter 6 Special Forms layout:

  • Before — Quarto div leaked into LaTeX
  • After — proper 2+1 grid layout

Superconductor Ticket Implementation | Guided Review

- 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>
@cycomachead cycomachead changed the title Convert SnapManual.docx to LaTeX PDF, check for errors, and improve image sizing/placement Update MD picture sizing from the original docx manuak May 4, 2026
@cycomachead cycomachead changed the title Update MD picture sizing from the original docx manuak Update MD picture sizing from the original docx manual May 4, 2026
@cycomachead cycomachead merged commit 2d66b72 into main May 4, 2026
1 check passed
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