From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Frings Subject: Re: LaTeX export: underscores and the syntax package Date: Wed, 18 May 2011 09:23:30 +0200 Message-ID: References: <15300C6C-1B46-42B5-89D5-E38BEF0EE371@agfa.com> <97BE4DB8-21C0-4B5F-90A7-EF6ADB173782@comcast.net> <17549.1305345057@alphaville.dokosmarshall.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMb6W-0006P8-L9 for emacs-orgmode@gnu.org; Wed, 18 May 2011 03:23:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMb6V-0003l2-Dy for emacs-orgmode@gnu.org; Wed, 18 May 2011 03:23:36 -0400 Received: from mornm01-out.agfa.com ([134.54.1.75]:29518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMb6V-0003ka-1O for emacs-orgmode@gnu.org; Wed, 18 May 2011 03:23:35 -0400 In-Reply-To: <17549.1305345057@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: emacs-orgmode mailing list Good morning Nicholas, Your suggested change in org-exp.el did the trick, thanks! I have not = observed any side-effects, but then again, my files aren=92t that = complicated either, only using rather simple markup and a few floating = images, no complex math or so=85=20 I wouldn=92t mind having it changed as a fix, if only to avoid clashes = with the syntax package, which I use a lot. Furthermore, I personally = dislike underscores: they=92re ugly and harder to type than a hyphen, = but since they=92re generated automatically those arguments don=92t = stand a chance :-) Anyway, now I know where to look I can always change it after installing = a new release of org :-) Cheers, Peter. On 14 May 2011, at 05:50, Nick Dokos wrote: >> On May 12, 2011, at 9:00 AM, peter.frings@agfa.com wrote: >>=20 >>> Good afternoon all, >>>=20 >>> I spent the best part of the afternoon trying to figure out why an = org-generated .tex file wouldn=92t compile with my set-up. It turns out = that the `syntax=92 package messes a bit with the definition of an = underscore, making it impossible to use the underscore in a \label. >>>=20 >>> Unfortunately, the LaTeX exporter uses underscores in its section = labels. >>>=20 >=20 > I'm really replying to Peter here, not to Robert, but I cannot find > Peter's original mail. >=20 > You can change the underscore to e.g. a hyphen and get >=20 > ,---- > | \subsubsection{Experiment 1} > | \label{sec-1-1-1} > `---- >=20 > in the LaTeX output, by changing it in org-exp.el around line 1300 (I > don't want this to end up on patchwork, so I am trying to camouflage = it > by boxquoting it - I hope that works for hiding the patch from = patchwork > and also gives you enough context to make the change if you so = desire): >=20 > ,---- > | diff --git a/lisp/org-exp.el b/lisp/org-exp.el > | index cda1f98..ac07c68 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) > `---- >=20 > What I don't know is if this change will break something, either in > the LaTeX exporter or in the other exporters. So you might test it > and report any problems and if there are no problems, maybe you can > suggest it as a permanent fix. In my limited experimentation, = exporting > a simple org file to latex/pdf, text and html, I did not observe any > problems, but that does not mean that they don't exist. >=20 > Nick