[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-export-latex-final-hook not working
From: |
Nicolas Goaziou |
Subject: |
Re: [O] org-export-latex-final-hook not working |
Date: |
Fri, 24 Jun 2016 11:33:45 +0200 |
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,