> 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