emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-export-latex-final-hook not working


From: Giacomo M
Subject: Re: [O] org-export-latex-final-hook not working
Date: Fri, 24 Jun 2016 13:02:59 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Il 24/06/2016 11:33, Nicolas Goaziou ha scritto:
Giacomo M <address@hidden> writes:

I found an example for html by Rasmus on the mailing list. Just adapting
it to my case works.

#+BEGIN_SRC emacs-lisp
(defun jackjackk/org-latex-remove-section-labels (string backend info)
    "Remove section labels generated by org-mode"
      (when (and (org-export-derived-backend-p backend 'latex)
                 (string-match "\\\\label{sec:.*}" string))
        (replace-regexp-in-string "\\\\label{sec:.*}" "" string)))
FWIW, I suggest

   (when (org-export-derived-backend-p backend 'latex)
     (replace-regexp-in-string "\\\\label{sec:.*?}" "" string)))

A greedy regexp may give you surprises.

Regards,
Thanks, always learning something!

Giacomo



reply via email to

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