Hi,


(I'm sorry for a duplicated email - it was sent my a mistake)


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-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 - any help would be greatly appreciated. 

Best,
Joon



From: Joon Ro <joon.ro@outlook.com>
Sent: Wednesday, February 8, 2017 1:52:42 PM
To: emacs-orgmode@gnu.org
Subject: Adding #+LATEX: \newpage before section header using org-export-before-parsing-hook
 

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-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