Skip to content

Commit ade85ec

Browse files
committed
fix deeply nested prose breaking pdflatex
1 parent 5297fd0 commit ade85ec

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

document/core/conf.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,18 @@
298298

299299
# Additional stuff for the LaTeX preamble.
300300
# Don't type-set cross references with emphasis.
301-
'preamble': '\\renewcommand\\sphinxcrossref[1]{#1}\n',
301+
'preamble': r'''
302+
\renewcommand\sphinxcrossref[1]{#1}
303+
\usepackage{enumitem}
304+
\setlistdepth{9}
305+
\renewlist{enumerate}{enumerate}{9}
306+
\setlist[enumerate,1]{label=\arabic*.}
307+
\setlist[enumerate,2]{label=\alph*.}
308+
\setlist[enumerate,3]{label=\roman*.}
309+
\setlist[enumerate,4]{label=\Alph*.}
310+
\setlist[enumerate,5]{label=\Roman*.}
311+
\renewcommand\sphinxcrossref[1]{#1}
312+
''',
302313

303314
# Latex figure (float) alignment
304315
'figure_align': 'htbp',

document/core/exec/instructions.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,9 @@ $${rule: {Step_read/array.fill-*}}
707707

708708
.. _exec-array.copy:
709709

710-
.. todo:: (3) Introduce if-let instruction instead of "is of the case". (5) Use "the expansion of" instead of $expand function application. + Too deeply nested
710+
$${rule-prose: Step_read/array.copy}
711+
712+
.. todo:: (3) Introduce if-let instruction instead of "is of the case". (5) Use "the expansion of" instead of $expand function application. + Was too deeply nested
711713
Below is the actual prose.
712714

713715
1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.
@@ -1906,6 +1908,8 @@ $${rule: {Step_read/return_call}}
19061908
:math:`\RETURNCALLREF~x`
19071909
........................
19081910

1911+
$${rule-prose: Step_read/return_call_ref}
1912+
19091913
.. todo:: (*) Prose not spliced, Sphinx cannot build the document with deeply nested ordered list. (mainly caused by spurious conditions that should be assertions)
19101914

19111915
1. Assert: due to :ref:`validation <valid-return_call_ref>`, a :ref:`function reference <syntax-ref>` is on the top of the stack.
@@ -1941,7 +1945,9 @@ $${rule: Step/throw}
19411945

19421946
.. _exec-throw_ref:
19431947

1944-
.. todo:: Too deeply nested
1948+
$${rule-prose: Step_read/throw_ref}
1949+
1950+
.. todo:: Was too deeply nested
19451951

19461952
1. Assert: due to :ref:`validation <valid-throw_ref>`, a :ref:`reference <syntax-ref>` is on the top of the stack.
19471953

0 commit comments

Comments
 (0)