From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Zhao Subject: Re: Force new page on exporting Date: Tue, 1 Jul 2014 12:59:04 -0400 Message-ID: References: <87k37xaygu.fsf@alphaville.bos.redhat.com> <87bnt9aw2x.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X21Od-0000pz-LQ for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 12:59:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X21Ob-0007Qc-QX for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 12:59:07 -0400 Received: from mail-ve0-x233.google.com ([2607:f8b0:400c:c01::233]:56765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X21Ob-0007QP-M1 for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 12:59:05 -0400 Received: by mail-ve0-f179.google.com with SMTP id sa20so9964332veb.38 for ; Tue, 01 Jul 2014 09:59:05 -0700 (PDT) In-Reply-To: <87bnt9aw2x.fsf@alphaville.bos.redhat.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: Nick Dokos Cc: emacs-orgmode > So before parsing, you are getting rid of the "ignoreheading" headline (first, > "promoting" it to a comment and then deleting the region), so the #+latex: > \newpage line now belongs to headline 2 which is then parsed and discarded. Really great catch Nick, exactly as what you pointed out. Saved me some time on investigating, thanks. > I think you need a filter after parsing (which of course conflicts with > your need in the "Wrong numbering..." thread). Yes, like you said before, using filter is too late because the contents is already LaTeX content and it's impossible to prompt the tree any more. > [fn:1] there is a "removeheading" vs "ignoreheading" inconsistency, btw. I'm sorry for the confusion. I changed the tag name from "ignoreheadline" to "remomeheading" in my implementation. @Thomas, I was using `org-export-filter-headline-functions' before but like Nick and I said, it was not capable of promoting the subtree after removing the headline, which is why I discarded it and used my implementation. Maybe I will implement some addition machinery in the "org-export-before-parsing-hook" when I get some time to handle this new page thing. I will update here once that gets done.