On 2009-09-21, Tom Hoffman wrote: > On Mon, Sep 21, 2009 at 2:45 PM, Roberto Alsina ><rals...@netmanagers.com.ar> wrote:
>> On Monday 21 September 2009 15:05:00 Tom Hoffman wrote: >>> Hi all, >>> Is there any way to force page breaks in pdf generation? >> Via latex or via rst2pdf? > Well... just generally inserting page breaks in my Sphinx scripts. I > don't have any preference regarding the specific technique. * There is no generally supported page-break element in the reStructuredText markup language. * You can configure page-breaks at certain elements (e.g. before level-1 sections) in the custom style sheets. Custom style sheets are writer dependent, so it matters, whether you use rst2latex, rst2newlatex, or the rst2pdf extension. With rst2latex: * Page breaks before top-level sections are the default with a documentclass that provides "chapters", e.g. "book", "memoir" or "scrbook". * Redefining the \section or \section* command in a style sheet is possible too. * `Raw latex` can be used:: .. raw:: latex \newpage % hard pagebreak at exactly this position or .. raw:: latex \pagebreak[2] % recommended page break after line end (precedence 1...4) * The transition element can be re-defined to produce a page break, e.g. in a style sheet:: \newcommand*{\DUtransition}{\pagebreak[4]} or in the document:: .. raw:: latex \renewcommand*{\DUtransition}{\pagebreak[4]} (The redefining of the transition element requires a recent snapshot of the Docutils and might not (yet) work with Sphinx.) Günter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-dev@googlegroups.com To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---