emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explicit page breaks


From: Ihor Radchenko
Subject: Re: Explicit page breaks
Date: Wed, 05 Oct 2022 15:59:46 +0800

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Ihor Radchenko writes:
>
>> May we introduce a new standard macro {{{page-break(backend)}}}
>> that will expand to an appropriate
>> @@backend:<whatever is needed to mark new page in the given backend@@
>> ?
>
> The macro seems like a good idea. The only (minor) inconvenience that I
> see, if I have understood it correctly, is in the case of LaTeX, where
> there are several commands that do different things: \pagebreak,
> \clearpage, \newpage, etc.
>
> Since \pagebreak is a more low-level command (introduces a hard break),
> it could be left as the default command \clearpage, which starts a new
> page and ends the old one. I don't know...
>
> By the way, in LaTeX there is also the opposite of \pagebreak:
> \nopagebreak, with a mandatory level from 1 to 4. I see this type of
> commands more useful for defining new LaTeX commands than for inserting
> them directly into the document.

Hmm... Then I am wondering about the utility of page break macro outside
odt export.

> And, in any case, I think this page break topic is most useful
> especially for odt, which only has a hard break (and also splits the
> paragraph in two if added inside the paragraph). For LaTeX, after all,
> putting things like @@latex:\pagrebreak[2]@@ doesn't involve much
> verbosity.
>
> Anyway, the opendocument schema is completely arcane to me. I have taken
> a look at the Org Manual and it says that this snippet adds a page break
> in odt export:
>
> #+odt:<text:p text:style-name="PageBreak"/>
>
> But I have tried:
>
> foo
>
> #+odt:<text:p text:style-name="PageBreak"/>
>
> bar
>
> and the document is not exported with the page break. I don't know if
> I'm missing something. But as i said, XML is beyond me :-).

I missed this part of the manual.
If adding page break is this easy, I am not sure if we really need to
bother with macro.

The only thing might be adding the PageBreak style into
etc/styles/OrgOdtStyles.xml, which you likely missed. (see *Hint* in the
manual).

Or we may also add {{{odt-page-break}}} macro for odt specifically.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



reply via email to

[Prev in Thread] Current Thread [Next in Thread]