Skip to content

Commit 6642e8c

Browse files
committed
unbreak the A4 pdf a bit
1 parent d7bf4e3 commit 6642e8c

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

doc/source/8_debugging.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ correctly. The process of creating the tests is also a very good way of
551551
establishing whether you understand the problem, and that specification is
552552
well-posed.
553553

554+
.. only:: book
555+
556+
.. raw:: latex
557+
558+
\clearpage
559+
554560
Debugging tactics
555561
-----------------
556562

doc/source/9_trees_and_directed_acyclic_graphs.rst

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ huge range of interconnected networks. :numref:`graph` illustrates a simple exam
170170
e -- d
171171
}
172172

173-
.. raw:: latex
173+
.. only:: book
174174

175-
\clearpage
175+
.. raw:: latex
176+
177+
\clearpage
176178

177179
.. _digraph:
178180

@@ -207,9 +209,11 @@ huge range of interconnected networks. :numref:`graph` illustrates a simple exam
207209
edge is the source of the next, and the target of the last edge is the
208210
source of the first.
209211

210-
.. raw:: latex
212+
.. only:: book
211213

212-
\clearpage
214+
.. raw:: latex
215+
216+
\clearpage
213217

214218
.. proof:definition:: Directed acyclic graph.
215219
@@ -241,9 +245,11 @@ and the target nodes of the edges emerging from a node are referred to as its
241245
e -> d
242246
}
243247

244-
.. raw:: latex
248+
.. only:: book
245249

246-
\clearpage
250+
.. raw:: latex
251+
252+
\clearpage
247253

248254
.. _tree_image:
249255

@@ -402,9 +408,11 @@ node, *before* calling :func:`fn` on the current node. As a trivial example,
402408
:numref:`linenos_postorder` prints out the nodes of the graph in
403409
:numref:`tree_image` in postorder.
404410

405-
.. raw:: latex
411+
.. only:: book
406412

407-
\clearpage
413+
.. raw:: latex
414+
415+
\clearpage
408416

409417
.. _linenos_postorder:
410418

@@ -451,9 +459,11 @@ as :numref:`preorder_recursive` shows. This time, we call :func:`fn` on the
451459
current tree node first, and then pass this result through as we recursively
452460
call :func:`previsitor` on the child nodes.
453461

454-
.. raw:: latex
462+
.. only:: book
455463

456-
\clearpage
464+
.. raw:: latex
465+
466+
\clearpage
457467

458468
.. _preorder_recursive:
459469

doc/source/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,12 @@
353353
# u'M345A47 Finite Elements: Analysis and Implementation',
354354
# u'David A. Ham and Colin J. Cotter', 'manual'),
355355
# ]
356-
latex_documents = [
357-
('index', 'objectorientedprogramming.tex',
358-
'Object oriented programming\\\\\\LARGE in Python for mathematicians',
359-
'David A. Ham', 'book'),
360-
]
356+
if tags.has("book"):
357+
latex_documents = [
358+
('index', 'objectorientedprogramming.tex',
359+
'Object oriented programming\\\\\\LARGE in Python for mathematicians',
360+
'David A. Ham', 'book'),
361+
]
361362

362363
# The name of an image file (relative to this directory) to place at the top of
363364
# the title page.

0 commit comments

Comments
 (0)