emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] \newpage in HTML export


From: Suvayu Ali
Subject: Re: [O] \newpage in HTML export
Date: Thu, 21 Nov 2013 00:36:29 +0100
User-agent: Mutt/1.5.22 (2013-10-16)

On Wed, Nov 20, 2013 at 03:20:02PM -0600, Russell Adams wrote:
> On Wed, Nov 20, 2013 at 09:15:43PM +0000, Luke Crook wrote:
> >
> > That works.  But that means I need both #+HTML: and #+Latex: for the same
> > thing. \newpage should convert as appropriate depending on the export.
> >
> > So, \newpage should translate to the HTML equivalent on HTML export, and the
> > Latex equivalent on Latex export.
> >
> > It only works correctly on Latex export
> 
> \newpage is a Latex command, and so you need the #+Latex: prefix if
> you're exporting to multiple formats. That will prevent it from
> happening.

To add a historical comment, eventhough Org claims to be backend
neutral, it treats LaTeX preferencially in practice.  e.g. many common
LaTeX commands/macros are "understood" by Org.

Just follow what Russel said, put them both where you need a pagebreak.
Try this:

#+MACRO: pagebreak @@latex:\newpage@@ @@html:<div style="page-break-before: 
always">&nbsp;</div>@@

{{{pagebreak}}}

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

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