From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joon Ro Subject: Adding #+LATEX: \newpage before section header using org-export-before-parsing-hook Date: Wed, 8 Feb 2017 19:52:42 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_CY4PR15MB162257957B23344B1822FF17EB420CY4PR15MB1622namp_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbYIL-0005YZ-6N for emacs-orgmode@gnu.org; Wed, 08 Feb 2017 14:52:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbYII-0006CN-4J for emacs-orgmode@gnu.org; Wed, 08 Feb 2017 14:52:49 -0500 Received: from blu004-omc1s25.hotmail.com ([65.55.116.36]:62984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cbYIH-0006Bs-Ov for emacs-orgmode@gnu.org; Wed, 08 Feb 2017 14:52:46 -0500 Content-Language: en-US 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" To: "emacs-orgmode@gnu.org" --_000_CY4PR15MB162257957B23344B1822FF17EB420CY4PR15MB1622namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, In latex export, sometimes I want to make sure a section starts in a new pa= ge. It seems I should be able to add a hook to org-export-before-parsing-hook, = so if it sees a section with :newpage: tag (for example), it adds #+LATEX: = \newpage before the section header so I would get \newpage \section{Section Name} in the exported file. I have a couple of hooks already so in general I'm using the following code= : (org-map-entries (lambda () (progn )) "+newpage") but I'm not sure how to add #+LATEX: \newpage before the section header - . Best Regards, Joon --_000_CY4PR15MB162257957B23344B1822FF17EB420CY4PR15MB1622namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,


In latex export, sometimes I want to make sure a section starts in a new= page. 

It seems I should be able to add a hook to org-export-be= fore-parsing-hook, so if it sees a section with :newpage: tag (for example)= , it adds #+LATEX: \newpage before the section header so I w= ould get 


\newpage

\section{Section Name}

in the exported file. 

I have a couple of hooks already so in general I'm using the following= code:

      (org-map-entries
       (lambda ()
         (progn
           
          &n= bsp;))
       "+newpage")

but I'm not sure how to add #+LATEX: \newpage before the section header - . 

Best Regards,
Joon


--_000_CY4PR15MB162257957B23344B1822FF17EB420CY4PR15MB1622namp_--