From: Glenn Hutchings Date: Wed, 13 Apr 2016 17:59:22 +0000 (+0100) Subject: Use titlesec package to handle page breaks before sections. X-Git-Url: https://jxself.org/git/?p=ibg.git;a=commitdiff_plain;h=b3c44842675dc0fd30576f6ffb0c3782144fc86a Use titlesec package to handle page breaks before sections. --- diff --git a/about.rst b/about.rst index a1af7f9..295abe8 100644 --- a/about.rst +++ b/about.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - ================== About this guide ================== diff --git a/appendices/a.rst b/appendices/a.rst index ff216c6..7e20849 100644 --- a/appendices/a.rst +++ b/appendices/a.rst @@ -1,12 +1,7 @@ -.. raw:: latex - - \newpage - ====================================== Appendix A -- How to play an IF game ====================================== - .. only:: html .. image:: /images/picP.png diff --git a/appendices/b.rst b/appendices/b.rst index 048c14a..fcbda9f 100644 --- a/appendices/b.rst +++ b/appendices/b.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - ============================= Appendix B -- "Heidi" story ============================= diff --git a/appendices/c.rst b/appendices/c.rst index c82f0b3..f7287a6 100644 --- a/appendices/c.rst +++ b/appendices/c.rst @@ -1,12 +1,7 @@ -.. raw:: latex - - \newpage - ====================================== Appendix C -- "William Tell" story ====================================== - .. only:: html .. image:: /images/picW.png diff --git a/appendices/d.rst b/appendices/d.rst index 6155e1f..8ff650f 100644 --- a/appendices/d.rst +++ b/appendices/d.rst @@ -1,12 +1,7 @@ -.. raw:: latex - - \newpage - =================================== Appendix D -- "Captain Fate" story =================================== - .. only:: html .. image:: /images/picC.png diff --git a/appendices/g.rst b/appendices/g.rst index 12207ef..ff7a04d 100644 --- a/appendices/g.rst +++ b/appendices/g.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - ======================== Appendix G -- Glossary ======================== diff --git a/chapters/01.rst b/chapters/01.rst index 4d0d20d..fcdb5be 100644 --- a/chapters/01.rst +++ b/chapters/01.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - =================================== Just what is interactive fiction? =================================== diff --git a/chapters/02.rst b/chapters/02.rst index 1511d17..9d727c0 100644 --- a/chapters/02.rst +++ b/chapters/02.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - ==================== Tools of the trade ==================== diff --git a/chapters/03.rst b/chapters/03.rst index 7216e27..72332e3 100644 --- a/chapters/03.rst +++ b/chapters/03.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - ============================== Heidi: our first Inform game ============================== diff --git a/chapters/04.rst b/chapters/04.rst index 9c48dc4..249fdb1 100644 --- a/chapters/04.rst +++ b/chapters/04.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - ====================== Reviewing the basics ====================== diff --git a/chapters/05.rst b/chapters/05.rst index 1dbcfad..89b54da 100644 --- a/chapters/05.rst +++ b/chapters/05.rst @@ -1,7 +1,3 @@ -.. raw:: latex - - \newpage - ================= Heidi revisited ================= diff --git a/config/preamble.tex b/config/preamble.tex index 8557210..0952bc4 100644 --- a/config/preamble.tex +++ b/config/preamble.tex @@ -5,6 +5,7 @@ \usepackage{emerald} \usepackage{type1cm} \usepackage{lettrine} +\usepackage{titlesec} %% Set up page. \pagestyle{fancy} @@ -28,6 +29,9 @@ \renewcommand{\headrulewidth}{0.0pt} \renewcommand{\footrulewidth}{0.0pt} +%% Add page break before each section. +\newcommand{\sectionbreak}{\clearpage} + %% Revert to original table of contents. \makeatletter \renewcommand{\tableofcontents}{\py@OldTableofcontents}