emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Force new page on exporting


From: York Zhao
Subject: Re: [O] Force new page on exporting
Date: Tue, 1 Jul 2014 11:52:14 -0400

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]