[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.do...@hp.com> To: Giovanni Ridolfi <giovanni.rido...@yahoo.it> cc: nicholas.do...@hp.com Subject: Re: [Orgmode] Superscripts in LaTeX export Giovanni Ridolfi <giovanni.rido...@yahoo.it> wrote: > --- Lun 28/9/09, Nick Dokos <nicholas.do...@hp.com> ha scritto: > > Giovanni Ridolfi <giovanni.rido...@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 _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode