all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* export to latex without labels
@ 2014-07-19 14:02 Salome =?iso-8859-1?Q?S=F6dergran ?=
  2014-07-19 14:40 ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Salome =?iso-8859-1?Q?S=F6dergran ?= @ 2014-07-19 14:02 UTC (permalink / raw)
  To: emacs-orgmode

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 

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <mailman.83.1405785624.1721.emacs-orgmode@gnu.org>]

end of thread, other threads:[~2014-07-20  3:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-19 14:02 export to latex without labels Salome =?iso-8859-1?Q?S=F6dergran ?=
2014-07-19 14:40 ` 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.