Skip to content

Commit bf3e2b3

Browse files
authored
Merge pull request #147 from Wasm-DSL/pdflatex-hack
Fix deeply nested prose breaking pdflatex
2 parents a1d054c + f033ba5 commit bf3e2b3

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

document/core/conf.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,20 @@
297297
'pointsize': '10pt',
298298

299299
# Additional stuff for the LaTeX preamble.
300+
# enumitem package is used to allow deeper nesting of lists, than the default 4 levels.
300301
# Don't type-set cross references with emphasis.
301-
'preamble': '\\renewcommand\\sphinxcrossref[1]{#1}\n',
302+
'preamble': r'''
303+
\renewcommand\sphinxcrossref[1]{#1}
304+
\usepackage{enumitem}
305+
\setlistdepth{9}
306+
\renewlist{enumerate}{enumerate}{9}
307+
\setlist[enumerate,1]{label=\arabic*.}
308+
\setlist[enumerate,2]{label=\alph*.}
309+
\setlist[enumerate,3]{label=\roman*.}
310+
\setlist[enumerate,4]{label=\Alph*.}
311+
\setlist[enumerate,5]{label=\Roman*.}
312+
\renewcommand\sphinxcrossref[1]{#1}
313+
''',
302314

303315
# Latex figure (float) alignment
304316
'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)