From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: suppress \label{} in LaTeX export Date: Thu, 01 Oct 2009 16:32:45 -0400 Message-ID: <8757.1254429165@alphaville.usa.hp.com> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtSLN-0002IX-P2 for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 16:33:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtSLJ-0002G0-2q for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 16:33:41 -0400 Received: from [199.232.76.173] (port=60671 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtSLJ-0002Fr-0P for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 16:33:37 -0400 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:42119) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtSLI-0003DZ-LQ for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 16:33:36 -0400 In-Reply-To: Message from "Eric Schulte" of "Thu, 01 Oct 2009 14:12:36 MDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Org Mode Eric Schulte wrote: > Is it possible to suppress the \label{sec-1} lines following each > headline after a LaTeX export? I've found no mention of this in the > manual, and the presence of headline labels is breaking my Beamer TOC. > I don't think so: they seem to be inextricably bound with headings. The code in org-latex.el says: (let* (... (label (org-get-text-property-any 0 'target heading)) ...) and then ... (when label (insert (mapconcat (lambda (l) (format "\\label{%s}" l)) label-list "\n") "\n")) ... I recall having problems with labels (among other things) in combination with beamer before (I "solved" the problem by running the tex file through a script to just get rid of them), but I don't remember what the problem was. Maybe it's time to go back and look at the thing again. Nick PS. Here is a quick-n-dirty patch to disable them - ymmv, uayor and several other cya disclaimers :-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 248d653..f5099f7 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -852,6 +852,8 @@ and its content." (let ((num (plist-get org-export-latex-options-plist :section-numbers))) (mapc (lambda(x) (org-export-latex-subcontent x num)) subcontent))) +(defvar org-export-latex-labels-enabled nil) + (defun org-export-latex-subcontent (subcontent num) "Export each cell of SUBCONTENT to LaTeX. If NUM, export sections as numerical sections." @@ -862,7 +864,7 @@ If NUM, export sections as numerical sections." (occur (number-to-string (cdr (assoc 'occur subcontent)))) (content (cdr (assoc 'content subcontent))) (subcontent (cadr (assoc 'subcontent subcontent))) - (label (org-get-text-property-any 0 'target heading)) + (label (and org-export-latex-labels-enabled (org-get-text-property-any 0 'target heading))) (label-list (cons label (cdr (assoc label org-export-target-aliases))))) (cond