From: "Salome \=\?iso-8859-1\?Q\?S\=F6dergran"?= <salome.soedergran@gmx.ch>
To: emacs-orgmode@gnu.org
Subject: export to latex without labels
Date: Sat, 19 Jul 2014 16:02:13 +0200 [thread overview]
Message-ID: <21450.31333.840496.200548@gargle.gargle.HOWL> (raw)
Hello experts,
I've been fiddling around for a while now with the following problem:
When I export something from org to latex I get plenty of \labels that I never refer to. I'd like to get rid of all those labels.
I found some code [1] that uses a hook that does not work in orgmode anymore. So I tried to adapt that code to the new orgmode way with org-export-filter-final-functions:
(defun ks/org-latex-remove-labels (backend info)
"Remove labels generated by org-mode"
(when (org-export-derived-backend-p backend 'latex)
(let ((case-fold-search nil))
(goto-char 1)
(replace-regexp "\\\\label{sec-[0-9][^}]*}" "")
)))
(eval-after-load 'ox-latex
'(add-to-list 'org-export-filter-final-output-functions
'ks/org-latex-remove-labels))
When I now try to export something from org to latex, I get the following error message:
Wrong number of arguments: (lambda (backend) "Remove labels generated by org-mode" (if (org-export-derived-backend-p backend (quote latex)) (progn (let ((case-fold-search nil)) (goto-char 1) (replace-regexp "\\\\label{sec-[0-9][^}]*}" ""))))), 3
I am just an emacs user, not a programmer, and I have no idea what's wrong and what I have to change to make it work. Can anyone give me a hint?
TIA, Salome
[1] http://stackoverflow.com/questions/18076328/org-mode-export-to-latex-suppress-generation-of-labels
next reply other threads:[~2014-07-19 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-19 14:02 Salome =?iso-8859-1?Q?S=F6dergran ?= [this message]
2014-07-19 14:40 ` export to latex without labels Eric Abrahamsen
2014-07-19 14:47 ` Eric Abrahamsen
2014-07-19 16:05 ` Nick Dokos
[not found] <mailman.83.1405785624.1721.emacs-orgmode@gnu.org>
2014-07-19 20:24 ` Salome Soedergran
2014-07-20 3:18 ` Eric Abrahamsen
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=21450.31333.840496.200548@gargle.gargle.HOWL \
--to=salome.soedergran@gmx.ch \
--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).