From: Peter Frings <peter.frings@agfa.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: Re: LaTeX export: underscores and the syntax package
Date: Wed, 18 May 2011 09:23:30 +0200 [thread overview]
Message-ID: <E8F6026D-14A0-4888-BDD4-942899B21013@agfa.com> (raw)
In-Reply-To: <17549.1305345057@alphaville.dokosmarshall.org>
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’t that complicated either, only using rather simple markup and a few floating images, no complex math or so…
I wouldn’t 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’re ugly and harder to type than a hyphen, but since they’re generated automatically those arguments don’t 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:
>>
>>> Good afternoon all,
>>>
>>> I spent the best part of the afternoon trying to figure out why an org-generated .tex file wouldn’t compile with my set-up. It turns out that the `syntax’ package messes a bit with the definition of an underscore, making it impossible to use the underscore in a \label.
>>>
>>> Unfortunately, the LaTeX exporter uses underscores in its section labels.
>>>
>
> I'm really replying to Peter here, not to Robert, but I cannot find
> Peter's original mail.
>
> You can change the underscore to e.g. a hyphen and get
>
> ,----
> | \subsubsection{Experiment 1}
> | \label{sec-1-1-1}
> `----
>
> 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):
>
> ,----
> | 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)
> `----
>
> 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.
>
> Nick
next prev parent reply other threads:[~2011-05-18 7:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 14:00 LaTeX export: underscores and the syntax package peter.frings
2011-05-14 2:51 ` Robert Love
2011-05-14 3:12 ` Nick Dokos
2011-05-14 3:50 ` Nick Dokos
2011-05-18 7:23 ` Peter Frings [this message]
2011-05-18 16:44 ` Nick Dokos
2011-05-24 11:09 ` Carsten Dominik
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E8F6026D-14A0-4888-BDD4-942899B21013@agfa.com \
--to=peter.frings@agfa.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/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 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.