From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: \newpage in HTML export Date: Thu, 21 Nov 2013 08:11:50 +0700 Message-ID: <87r4aav9rd.fsf@ericabrahamsen.net> References: <20131120212002.GC5155@cardamom.adamsinfoserv.com> <20131120233629.GD19844@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjImx-0003sh-2V for emacs-orgmode@gnu.org; Wed, 20 Nov 2013 20:10:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjImp-0006RU-IB for emacs-orgmode@gnu.org; Wed, 20 Nov 2013 20:10:34 -0500 Received: from plane.gmane.org ([80.91.229.3]:32997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjImp-0006RK-Ad for emacs-orgmode@gnu.org; Wed, 20 Nov 2013 20:10:27 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VjImm-0000hP-OM for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 02:10:24 +0100 Received: from 223.204.248.28 ([223.204.248.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Nov 2013 02:10:24 +0100 Received: from eric by 223.204.248.28 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Nov 2013 02:10:24 +0100 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 Suvayu Ali writes: > 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, Emacs already has the concept of the page-delimiter (defaults to ^L), for page-related commands. I once floated the idea of making a page-break a full org element, that could be handled differently by different backends. I think I made it sound too complicated, though. Anyway, that's still a possibility.