From 438536f6157794101ce0957e39cad6bf70580751 Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Thu, 19 May 2011 00:58:40 +0000 Subject: [PATCH] Change underscores to hyphens in section labels * lisp/org-exp.el (org-export-define-heading-targets): Use dash instead of underscore to make labels valid. Currently, the section number (a string of the form "X.Y.Z") is used to manufacture a section label of the form sec-X_Y_Z. Underscores are overloaded however, both in org and in LaTeX, and cause conflicts with some packages. This patch changes underscores to hyphens in section labels. TINYCHANGE --- lisp/org-exp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index e840b6c8a..e188d49a8 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1298,7 +1298,7 @@ Also find all ID and CUSTOM_ID properties and store them." (org-outline-level)))) (setq target (org-solidify-link-text (format "sec-%s" (replace-regexp-in-string - "\\." "_" + "\\." "-" (org-section-number level))))) (setq last-section-target target) (push (cons target target) target-alist)