From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: \newpage in HTML export Date: Thu, 21 Nov 2013 00:36:29 +0100 Message-ID: <20131120233629.GD19844@kuru.dyndns-at-home.com> References: <20131120212002.GC5155@cardamom.adamsinfoserv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjHK7-0002HY-Rm for emacs-orgmode@gnu.org; Wed, 20 Nov 2013 18:36:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjHJz-00077f-Ee for emacs-orgmode@gnu.org; Wed, 20 Nov 2013 18:36:43 -0500 Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:38599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjHJz-00077a-7G for emacs-orgmode@gnu.org; Wed, 20 Nov 2013 18:36:35 -0500 Received: by mail-ea0-f174.google.com with SMTP id b10so1995058eae.5 for ; Wed, 20 Nov 2013 15:36:33 -0800 (PST) Received: from kuru.dyndns-at-home.com (sd44012d5.adsl.online.nl. [212.64.18.213]) by mx.google.com with ESMTPSA id a45sm47452509eem.6.2013.11.20.15.36.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2013 15:36:32 -0800 (PST) Content-Disposition: inline In-Reply-To: <20131120212002.GC5155@cardamom.adamsinfoserv.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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:
 
@@ {{{pagebreak}}} Hope this helps, -- Suvayu Open source is the future. It sets us free.