From: Nick Dokos <nicholas.dokos@hp.com>
To: emacs-orgmode@gnu.org
Subject: Nick Dokos: Re: Superscripts in LaTeX export
Date: Mon, 28 Sep 2009 20:07:43 -0400 [thread overview]
Message-ID: <24699.1254182863@gamaville.dokosmarshall.org> (raw)
[Forgot to copy the list - again. Giovanni, apologies for
the duplicate.]
------- Forwarded Message
Date: Mon, 28 Sep 2009 20:04:33 -0400
From: Nick Dokos <nicholas.dokos@hp.com>
To: Giovanni Ridolfi <giovanni.ridolfi@yahoo.it>
cc: nicholas.dokos@hp.com
Subject: Re: [Orgmode] Superscripts in LaTeX export
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> wrote:
> --- Lun 28/9/09, Nick Dokos <nicholas.dokos@hp.com> ha scritto:
> > Giovanni Ridolfi <giovanni.ridolfi@yahoo.it>
> > wrote:
> > > ** A Brief History of Attempts to Interpret the
> > > \( ^{14}\)C Dates
> > Did it work for you or are you saying that theoretically it
> > *should* work?
>
> I didn't try. I thought it should have worked.
>
> > PS. I also tried the standard trick: {}^{14}C. It didn't
> > work either.
> > The LaTeX code generated precedes all the special
> > characters with backslashes.
> >
>
> So it should be something concerning the export
> of the heading.
>
No, it happens in other places as well: ``foo ^{14}C'' is mishandled
both in headings and in content, whereas ``foo x^{14}C'' is handled
correctly, so as Thomas surmised initially, it seems to be the space
preceding the ^ that causes it. The breakage seems to happen in
org-export-latex-treat-sub-super-char where the following test fails for
string-before when it is a space, but succeeds when it is e.g. ``x'':
,----
| ...
| ;; this is part of a math formula
| ((and (string-match "\\S-+" string-before)
| (string-match "\\S-+" string-after))
`----
The question is what would break if the first string-match were allowed
to match a space. E.g. the following "fixes" this problem but I have no
idea what it breaks - probably too many things:
,----
| ...
| ;; this is part of a math formula
| ((and t ;(string-match "\\S-+" string-before)
| (string-match "\\S-+" string-after))
`----
Note btw that ``foo ^{14}C'' is exported correctly to HTML (both in headers and
in content).
Thanks,
Nick
PS. Here is the org file I've been playing with:
,----
| #+OPTIONS: LaTeX:t ^:t
|
| * foo ^{14}C
|
| foo ^{14}C
`----
------- End of Forwarded Message
reply other threads:[~2009-09-29 0:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24699.1254182863@gamaville.dokosmarshall.org \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).