sphinx add a page break in my pdf with latexpdf?
Asked Answered
P

3

17

I generate a documentation from rst to pdf with latexpdf and sphinx.

How can I add some page break (=new page) in my PDF?

For now I use PageBreak but it only work with rst2pdf.

.. raw:: pdf

   PageBreak
Propene answered 30/9, 2014 at 12:12 Comment(0)
C
19

You can use raw latex.

.. raw:: latex

    \newpage
Competent answered 30/9, 2014 at 18:28 Comment(0)
G
12

Maybe a slightly better solution, which also "flushes" all pending floats:

.. raw:: latex

    \clearpage
Gardant answered 13/1, 2016 at 13:54 Comment(0)
P
0

When using myst-parser you can use:

    ```{rst-eval}
    .. raw:: latex
  
        \newpage
    ```

first to break out of md. The second as an interpretation in latex.

Potassium answered 15/2 at 18:42 Comment(2)
Note that the "myst" parser parses Markdown while the OP is flagged as "restructuredtext".Rodenhouse
True. But since the headline isn't explicit this is still a valid result for me. But yes, its kind of out there.Potassium

© 2022 - 2024 — McMap. All rights reserved.