emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Giacomo M <jackjackk@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-export-latex-final-hook not working
Date: Fri, 24 Jun 2016 13:02:59 +0200	[thread overview]
Message-ID: <48764c2a-de70-caed-32e6-69d68040b9b3@gmail.com> (raw)
In-Reply-To: <87h9cj7wxy.fsf@saiph.selenimh>

Il 24/06/2016 11:33, Nicolas Goaziou ha scritto:
> Giacomo M <jackjackk@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	other threads:[~2016-06-24 11:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-24  9:01 org-export-latex-final-hook not working Giacomo M
2016-06-24  9:11 ` Rasmus
2016-06-24  9:22   ` Giacomo M
2016-06-24  9:33     ` Nicolas Goaziou
2016-06-24 11:02       ` Giacomo M [this message]
2016-06-24  9:11 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48764c2a-de70-caed-32e6-69d68040b9b3@gmail.com \
    --to=jackjackk@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).