Skip to content

Commit fd26dc3

Browse files
committed
w
1 parent 15916e0 commit fd26dc3

File tree

3 files changed

+31
-57
lines changed

3 files changed

+31
-57
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ This script does everything:
7070
6. Add breadcrumb navigation at the top of the page
7171
7. Add a back button navigation below the breadcrumb
7272
8. Wrap main content in <main> landmark element
73-
9. Add proper spacing and indentation:
74-
- Vertical spacing between main problems
75-
- Sub-problems (a), (b), (c) indented with 2em left margin
76-
- CSS classes for problem structure
73+
9. Add proper spacing between main problems:
74+
- Vertical spacing (double line breaks) between numbered problems
75+
- CSS class for consistent problem spacing
7776

7877
**Breadcrumb navigation** should:
7978
- Have aria-label="Breadcrumb"
@@ -153,9 +152,8 @@ Read <PATH_TO_HTML>
153152
- ARIA labels on math elements
154153
- Semantic HTML structure
155154
4. **Formatting and Spacing**: Ensure the HTML preserves the PDF's visual structure:
156-
- Proper spacing between main problems
157-
- Sub-problems (a), (b), (c) are visually indented
158-
- Problem hierarchy is clear and readable
155+
- Proper vertical spacing between main problems
156+
- Problem structure is clear and readable
159157
5. **Completeness**: Verify nothing was lost or corrupted during conversion
160158

161159
**Provide a concise summary stating:**
@@ -184,10 +182,7 @@ The output HTML must have:
184182
✓ Back button navigation with aria-label="Page navigation" below breadcrumb
185183
✓ Main content wrapped in <main> landmark element
186184
✓ Valid, well-formed HTML5 document with proper semantic structure
187-
✓ Proper visual spacing and indentation:
188-
- Vertical spacing between main problems
189-
- Sub-problems (a), (b), (c) indented with 2em left margin
190-
- Problem hierarchy preserved from PDF
185+
✓ Proper vertical spacing between main problems
191186
✓ HTML file saved next to the PDF with .html extension
192187
✓ Link in graduate/general_exams.md updated with HTML as primary, PDF as secondary with aria-label
193188
✓ Both PDF and HTML reviewed side-by-side with final quality assessment provided

graduate/exams/topology/2025-08.html

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,11 @@
169169
vertical-align: middle;
170170
}
171171
/* Exam problem styling */
172-
.problem {
173-
margin-bottom: 1.5em;
174-
}
175172
.problem-number {
176173
display: block;
177174
margin-top: 1.5em;
178175
margin-bottom: 0.5em;
179176
}
180-
.subproblem {
181-
margin-left: 2em;
182-
margin-top: 0.5em;
183-
display: block;
184-
}
185177
</style>
186178
</head>
187179
<body>
@@ -204,40 +196,42 @@
204196
</nav>
205197

206198
<main>
207-
<h1 id="topology-general-exam-fall-2025">TOPOLOGY GENERAL EXAM FALL 2025</h1>
199+
<h1 class="unnumbered" id="topology-general-exam-fall-2025">TOPOLOGY GENERAL EXAM FALL 2025</h1>
208200
<p>Instructions: This is a four hour exam. Your solutions should be
209201
legible and clearly organized, written in complete sentences in good
210202
mathematical style on your own paper. All work should be your own-no
211203
outside sources are permitted-using methods and results from the first
212204
year topology courses. Each problem is worth the same number of
213-
points.</p>
214-
215-
<div class="problem">
216-
<p>(1) Let
217-
<math role="math" aria-label="X=S^{1} \times \mathbb{R} P^{2}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>X</mi><mo>=</mo><msup><mi>S</mi><mn>1</mn></msup><mo>&times;</mo><mi>&Ropf;</mi><msup><mi>P</mi><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">X=S^{1} \times \mathbb{R} P^{2}</annotation></semantics></math>.<br /><span class="subproblem">(a) Compute
218-
<math role="math" aria-label="\pi_{1}(X)" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>&pi;</mi><mn>1</mn></msub><mo stretchy="false" form="prefix">(</mo><mi>X</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\pi_{1}(X)</annotation></semantics></math>.</span><br /><span class="subproblem">(b) Describe the universal cover of
205+
points.<br /><br /><span class="problem-number">(1)</span> Let
206+
<math role="math" aria-label="X=S^{1} \times \mathbb{R} P^{2}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>X</mi><mo>=</mo><msup><mi>S</mi><mn>1</mn></msup><mo>&times;</mo><mi>&Ropf;</mi><msup><mi>P</mi><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">X=S^{1} \times \mathbb{R} P^{2}</annotation></semantics></math>.<br />
207+
(a) Compute
208+
<math role="math" aria-label="\pi_{1}(X)" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>&pi;</mi><mn>1</mn></msub><mo stretchy="false" form="prefix">(</mo><mi>X</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\pi_{1}(X)</annotation></semantics></math>.<br />
209+
(b) Describe the universal cover of
219210
<math role="math" aria-label="X" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>X</mi><annotation encoding="application/x-tex">X</annotation></semantics></math>
220211
and explicitly describe each element in the group of deck
221-
transformations of the universal cover.</span><br /><br /><span class="problem-number">(2)</span> Let
212+
transformations of the universal cover.<br /><br /><span class="problem-number">(2)</span> Let
222213
<math role="math" aria-label="x_{1}, x_{2}, \ldots, x_{10}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mn>1</mn></msub><mo>,</mo><msub><mi>x</mi><mn>2</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>x</mi><mn>10</mn></msub></mrow><annotation encoding="application/x-tex">x_{1}, x_{2}, \ldots, x_{10}</annotation></semantics></math>
223214
be 10 distinct points on the 2 -torus
224215
<math role="math" aria-label="T^{2}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msup><mi>T</mi><mn>2</mn></msup><annotation encoding="application/x-tex">T^{2}</annotation></semantics></math>.
225216
Let
226217
<math role="math" aria-label="X" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>X</mi><annotation encoding="application/x-tex">X</annotation></semantics></math>
227218
be the quotient of
228219
<math role="math" aria-label="T^{2}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msup><mi>T</mi><mn>2</mn></msup><annotation encoding="application/x-tex">T^{2}</annotation></semantics></math>
229-
obtained by identifying all 10 points.<br /><span class="subproblem">(a) Compute
230-
<math role="math" aria-label="\pi_{1}(X)" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>&pi;</mi><mn>1</mn></msub><mo stretchy="false" form="prefix">(</mo><mi>X</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\pi_{1}(X)</annotation></semantics></math>.</span><br /><span class="subproblem">(b) Compute
220+
obtained by identifying all 10 points.<br />
221+
(a) Compute
222+
<math role="math" aria-label="\pi_{1}(X)" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>&pi;</mi><mn>1</mn></msub><mo stretchy="false" form="prefix">(</mo><mi>X</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\pi_{1}(X)</annotation></semantics></math>.<br />
223+
(b) Compute
231224
<math role="math" aria-label="H_{n}(X)" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>H</mi><mi>n</mi></msub><mo stretchy="false" form="prefix">(</mo><mi>X</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">H_{n}(X)</annotation></semantics></math>
232225
for all
233-
<math role="math" aria-label="n \geq 0" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>&ge;</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">n \geq 0</annotation></semantics></math>.</span><br /><br /><span class="problem-number">(3)</span> (a) Let
226+
<math role="math" aria-label="n \geq 0" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>&ge;</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">n \geq 0</annotation></semantics></math>.<br /><br /><span class="problem-number">(3)</span> (a) Let
234227
<math role="math" aria-label="f: S^{1} \rightarrow \mathbb{R}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo>:</mo><msup><mi>S</mi><mn>1</mn></msup><mo>&rarr;</mo><mi>&Ropf;</mi></mrow><annotation encoding="application/x-tex">f: S^{1} \rightarrow \mathbb{R}</annotation></semantics></math>
235228
be a continuous map. Show that there exists some
236229
<math role="math" aria-label="x \in S^{1}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>&isin;</mo><msup><mi>S</mi><mn>1</mn></msup></mrow><annotation encoding="application/x-tex">x \in S^{1}</annotation></semantics></math>
237230
such that
238-
<math role="math" aria-label="f(x)=f(-x)" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false" form="prefix">(</mo><mi>x</mi><mo stretchy="false" form="postfix">)</mo><mo>=</mo><mi>f</mi><mo stretchy="false" form="prefix">(</mo><mi></mi><mi>x</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">f(x)=f(-x)</annotation></semantics></math>.<br /><span class="subproblem">(b) Show that any continuous map
231+
<math role="math" aria-label="f(x)=f(-x)" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false" form="prefix">(</mo><mi>x</mi><mo stretchy="false" form="postfix">)</mo><mo>=</mo><mi>f</mi><mo stretchy="false" form="prefix">(</mo><mi></mi><mi>x</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">f(x)=f(-x)</annotation></semantics></math>.<br />
232+
(b) Show that any continuous map
239233
<math role="math" aria-label="g: \mathbb{R} P^{2} \times \mathbb{R} P^{2} \rightarrow T^{2}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>g</mi><mo>:</mo><mi>&Ropf;</mi><msup><mi>P</mi><mn>2</mn></msup><mo>&times;</mo><mi>&Ropf;</mi><msup><mi>P</mi><mn>2</mn></msup><mo>&rarr;</mo><msup><mi>T</mi><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">g: \mathbb{R} P^{2} \times \mathbb{R} P^{2} \rightarrow T^{2}</annotation></semantics></math>
240-
is nullhomotopic.</span><br /><br /><span class="problem-number">(4)</span> Let (
234+
is nullhomotopic.<br /><br /><span class="problem-number">(4)</span> Let (
241235
<math role="math" aria-label="C, d" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>C</mi><mo>,</mo><mi>d</mi></mrow><annotation encoding="application/x-tex">C, d</annotation></semantics></math>
242236
) and (
243237
<math role="math" aria-label="C^{\prime}, d^{\prime}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>C</mi><mi></mi></msup><mo>,</mo><msup><mi>d</mi><mi></mi></msup></mrow><annotation encoding="application/x-tex">C^{\prime}, d^{\prime}</annotation></semantics></math>
@@ -263,13 +257,14 @@ <h1 id="topology-general-exam-fall-2025">TOPOLOGY GENERAL EXAM FALL 2025</h1>
263257
<math role="math" aria-label="f_{c}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msub><mi>f</mi><mi>c</mi></msub><annotation encoding="application/x-tex">f_{c}</annotation></semantics></math>
264258
transverse to the surface
265259
<math role="math" aria-label="S" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>S</mi><annotation encoding="application/x-tex">S</annotation></semantics></math>
266-
?<br /><span class="subproblem">(b) For what values of
260+
?<br />
261+
(b) For what values of
267262
<math role="math" aria-label="c \in \mathbb{R}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>c</mi><mo>&isin;</mo><mi>&Ropf;</mi></mrow><annotation encoding="application/x-tex">c \in \mathbb{R}</annotation></semantics></math>
268263
is the intersection of the image of
269264
<math role="math" aria-label="f_{c}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msub><mi>f</mi><mi>c</mi></msub><annotation encoding="application/x-tex">f_{c}</annotation></semantics></math>
270265
with
271266
<math role="math" aria-label="S" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>S</mi><annotation encoding="application/x-tex">S</annotation></semantics></math>
272-
a manifold?</span><br /><br /><span class="problem-number">(6)</span> Consider the 3 -form</p>
267+
a manifold?<br /><br /><span class="problem-number">(6)</span> Consider the 3 -form</p>
273268
<p><math role="math" aria-label="\theta=e^{w}(x d y \wedge d z+y d z \wedge d x+z d x \wedge d y)" display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>&theta;</mi><mo>=</mo><msup><mi>e</mi><mi>w</mi></msup><mo stretchy="false" form="prefix">(</mo><mi>x</mi><mi>d</mi><mi>y</mi><mo>&and;</mo><mi>d</mi><mi>z</mi><mo>+</mo><mi>y</mi><mi>d</mi><mi>z</mi><mo>&and;</mo><mi>d</mi><mi>x</mi><mo>+</mo><mi>z</mi><mi>d</mi><mi>x</mi><mo>&and;</mo><mi>d</mi><mi>y</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\theta=e^{w}(x d y \wedge d z+y d z \wedge d x+z d x \wedge d y)</annotation></semantics></math></p>
274269
<p>on
275270
<math role="math" aria-label="\mathbb{R}^{4}" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msup><mi>&Ropf;</mi><mn>4</mn></msup><annotation encoding="application/x-tex">\mathbb{R}^{4}</annotation></semantics></math>
@@ -282,7 +277,7 @@ <h1 id="topology-general-exam-fall-2025">TOPOLOGY GENERAL EXAM FALL 2025</h1>
282277
with the orientation induced as being part of the boundary of the 4
283278
-ball with the standard orientation. Compute</p>
284279
<p><math role="math" aria-label="\int_{S} \mathrm{~d} \theta ." display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mo>&int;</mo><mi>S</mi></msub><mrow><mspace width="0.222em"></mspace><mi mathvariant="normal">d</mi></mrow><mi>&theta;</mi><mi>.</mi></mrow><annotation encoding="application/x-tex">\int_{S} \mathrm{~d} \theta .</annotation></semantics></math></p>
285-
<p>(7) Let
280+
<p><br /><br /><span class="problem-number">(7)</span> Let
286281
<math role="math" aria-label="p: M \rightarrow N" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mo>:</mo><mi>M</mi><mo>&rarr;</mo><mi>N</mi></mrow><annotation encoding="application/x-tex">p: M \rightarrow N</annotation></semantics></math>
287282
be a smooth covering map between closed manifolds of some dimension
288283
<math role="math" aria-label="n" display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>n</mi><annotation encoding="application/x-tex">n</annotation></semantics></math>.

scripts/fix_mathml.py

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -249,25 +249,17 @@ def wrap_content_in_main(html):
249249

250250
return html
251251

252-
def add_exam_indentation(html):
253-
"""Add proper indentation and spacing for exam problems."""
252+
def add_exam_spacing(html):
253+
"""Add proper spacing between exam problems."""
254254

255255
# Add CSS if not present
256-
if '.subproblem' not in html:
256+
if '.problem-number' not in html:
257257
css_insert = """ /* Exam problem styling */
258-
.problem {
259-
margin-bottom: 1.5em;
260-
}
261258
.problem-number {
262259
display: block;
263260
margin-top: 1.5em;
264261
margin-bottom: 0.5em;
265262
}
266-
.subproblem {
267-
margin-left: 2em;
268-
margin-top: 0.5em;
269-
display: block;
270-
}
271263
</style>"""
272264
html = html.replace(' </style>', css_insert)
273265

@@ -286,22 +278,14 @@ def add_exam_indentation(html):
286278
start_pos = body_match.start(1)
287279
end_pos = body_match.end(1)
288280

289-
# Wrap problem numbers (2), (3), etc. with spacing class and add line breaks
290-
# Don't match (1) at the start to avoid affecting the first problem
281+
# Add spacing between problem numbers (2), (3), etc.
282+
# Add double line breaks before numbered problems
291283
content = re.sub(
292284
r'<br\s*/?\>[\s\n]*(\(\d+\))',
293285
r'<br /><br /><span class="problem-number">\1</span>',
294286
content
295287
)
296288

297-
# Wrap sub-problems (a), (b), etc. with indentation divs
298-
content = re.sub(
299-
r'<br\s*/?\>[\s\n]*(\([a-z]\)\s+.*?)(?=<br\s*/?\>[\s\n]*(?:\([a-z]\)|\(\d+\)|$)|</p>)',
300-
r'<br /><span class="subproblem">\1</span>',
301-
content,
302-
flags=re.DOTALL
303-
)
304-
305289
# Replace in original HTML
306290
html = html[:start_pos] + content + html[end_pos:]
307291

@@ -327,7 +311,7 @@ def main():
327311
html = add_breadcrumb_navigation(html)
328312
html = add_back_button(html)
329313
html = wrap_content_in_main(html)
330-
html = add_exam_indentation(html)
314+
html = add_exam_spacing(html)
331315

332316
with open(output_file, 'w', encoding='utf-8') as f:
333317
f.write(html)

0 commit comments

Comments
 (0)