Skip to content

Commit a93210e

Browse files
committed
w
1 parent f592f07 commit a93210e

File tree

5 files changed

+538
-3
lines changed

5 files changed

+538
-3
lines changed

.claude/commands/mathml-general-exam.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,30 @@ Use this entity mapping:
9393
- Greek letters: α (α), β (β), γ (γ), δ (δ), ε (ε), η (η), θ (θ), λ (λ), μ (μ), ν (ν), π (π), σ (σ), τ (τ), φ (φ), ω (ω), Γ (Γ), Δ (Δ), Θ (Θ), Λ (Λ), Σ (Σ), Φ (Φ), Ω (Ω)
9494
- Other: ∞ (∞), × (×), ⋅ (⋅), ± (±), ∠ (∠), ⊕ (⊕), ⊗ (⊗)
9595

96-
### Step 6: Save to final location
96+
### Step 6: Add proper indentation for exam problems
97+
Use the Python script `scripts/add_exam_indentation.py` to add proper visual indentation:
98+
99+
```bash
100+
python3 scripts/add_exam_indentation.py /tmp/output_fixed.html /tmp/output_indented.html
101+
```
102+
103+
This script:
104+
1. Adds CSS classes for problem structure (`.problem`, `.problem-number`, `.subproblem`)
105+
2. Adds double line breaks (`<br /><br />`) between main problems (2), (3), (4), etc.
106+
3. Wraps problem numbers in `<span class="problem-number">` for consistent spacing
107+
4. Wraps sub-problems (a), (b), (c), etc. in `<span class="subproblem">` tags
108+
5. Applies 2em left margin to sub-problems for visual indentation
109+
110+
**Why this matters:**
111+
- Preserves the visual hierarchy and spacing from the PDF
112+
- Makes it easier to distinguish main problems from sub-parts
113+
- Adds proper vertical spacing between problems
114+
- Improves readability and accessibility
115+
116+
### Step 7: Save to final location
97117
Save the processed HTML file next to the original PDF with the same name but .html extension.
98118

99-
### Step 7: Add accessible HTML link to the generals page
119+
### Step 8: Add accessible HTML link to the generals page
100120
After saving the HTML file, you MUST update the link in `graduate/general_exams.md` to follow accessibility best practices:
101121

102122
1. Read the file `graduate/general_exams.md`
@@ -125,6 +145,36 @@ After saving the HTML file, you MUST update the link in `graduate/general_exams.
125145
- Clearly labeling the PDF as "for printing" to indicate its purpose
126146
- Using ARIA labels to communicate that PDFs may have accessibility limitations
127147

148+
### Step 9: Final Review - Read Both Files
149+
After completing all processing steps, you MUST read both the original PDF and the generated HTML file to provide a final quality assessment:
150+
151+
```bash
152+
# Read both files
153+
Read <PATH_TO_PDF>
154+
Read <PATH_TO_HTML>
155+
```
156+
157+
**Review and report on:**
158+
1. **Content Accuracy**: Verify that all mathematical expressions, problems, and text from the PDF are correctly represented in the HTML
159+
2. **MathML Quality**: Confirm that math expressions render correctly as MathML (not SVG or Unicode)
160+
3. **Accessibility**: Check that all accessibility features are present and correct:
161+
- Proper title and H1 heading
162+
- Breadcrumb and back button navigation
163+
- ARIA labels on math elements
164+
- Semantic HTML structure
165+
4. **Formatting and Spacing**: Ensure the HTML preserves the PDF's visual structure:
166+
- Proper spacing between main problems
167+
- Sub-problems (a), (b), (c) are visually indented
168+
- Problem hierarchy is clear and readable
169+
5. **Completeness**: Verify nothing was lost or corrupted during conversion
170+
171+
**Provide a concise summary stating:**
172+
- ✓ What looks correct
173+
- ⚠️ Any issues found (and fix them if possible)
174+
- Overall assessment: "Ready for production" or "Needs fixes"
175+
176+
This final human-in-the-loop check ensures quality before the files go live.
177+
128178
## Important Notes
129179
- Do NOT use the direct .html download from Mathpix - it uses MathJax SVG rendering
130180
- Always use the tex.zip → pandoc → post-processing pipeline
@@ -146,3 +196,4 @@ The output HTML must have:
146196
✓ Valid, well-formed HTML5 document with proper semantic structure
147197
✓ HTML file saved next to the PDF with .html extension
148198
✓ Link in graduate/general_exams.md updated with HTML as primary, PDF as secondary with aria-label
199+
✓ Both PDF and HTML reviewed side-by-side with final quality assessment provided

0 commit comments

Comments
 (0)