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 11:52:14 -0400 Message-ID: References: <87k37xaygu.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]:33491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X20Lw-0000hY-GC for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 11:52:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X20Lv-0001aA-LD for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 11:52:16 -0400 Received: from mail-vc0-x229.google.com ([2607:f8b0:400c:c03::229]:55249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X20Lv-0001a6-HC for emacs-orgmode@gnu.org; Tue, 01 Jul 2014 11:52:15 -0400 Received: by mail-vc0-f169.google.com with SMTP id la4so9143094vcb.14 for ; Tue, 01 Jul 2014 08:52:14 -0700 (PDT) In-Reply-To: <87k37xaygu.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 > My understanding is that you need extra machinery to implement "ignoreheading" I had implemented machinery the "ignoreheading" and posted the code in the post "Wrong numbering after removal of headline". But anyways here's my code: (defun yz/org-export-process-heading-removal (backend) "Ignore headlines with tag `ignoreheading'." (save-excursion (let ((org-allow-promoting-top-level-subtree t)) (org-map-entries (lambda () (when (member "removeheading" (org-get-local-tags)) (org-promote-subtree) (delete-region (line-beginning-position) (progn (forward-line) (point))))))))) (add-hook 'org-export-before-parsing-hook #'yz/org-export-process-heading-removal) This code worked for ignoring the headline with tag "removeheading", and did re-numbering all the headlines properly. But: * Latex New Page :ignoreheading: #+latex: \newpage Still didn't work which I have no idea at this moment yet. Any idea?