Il 24/06/2016 11:33, Nicolas Goaziou ha scritto:
Giacomo M <jackja...@gmail.com> 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