[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Again problems with latex inside footnotes.
From: |
Nick Dokos |
Subject: |
Re: [O] Again problems with latex inside footnotes. |
Date: |
Tue, 12 Jul 2011 02:37:52 -0400 |
Rafael Calsaverini <address@hidden> wrote:
> Also, I have problems with equations even when I use \(...\) instead of
> $...$.
>
> This, for example:
> --8<--
> * example
> Example[fn:note].
> [fn:note]An equation: \(\bar{a}\).
> ---8<--
>
> becomes this:
>
> ---8<---
> Example\footnote{An equation: \(\bar\{a\}\). }.
> ---8<---
>
Unfortunately, the LaTeX exporter does have a lot of weaknesses in this
area: it tends to escape special characters willy-nilly - sometimes
that's the right thing to do, sometimes not.
This particular escaping is done by org-export-latex-special-chars: this
basically loops over four (horrendous-looking) regexps and tries to find
all matches in the buffer for that regexp. It then proceeds to transform
the matched text (and matched pieces of text *around* the main match) in
some (hopefully meaningful) way. In this case, it fails.
The only way I know around this problem is a mechanism that Tom Dye
describes in his (excellent) LaTeX exporting tutorial on Worg. He
credits Lawrence Mitchell for the case that he describes in the tutorial.
Evaluate this expression
--8<---------------cut here---------------start------------->8---
(setq org-entities-user '(("l" "{" nil "" "" "" "")
("r" "}" nil "" "" "" "")))
--8<---------------cut here---------------end--------------->8---
and then export the following:
--8<---------------cut here---------------start------------->8---
* example
Example[fn:note].
[fn:note] An equation: \(\bar \l a\r \).
blablabla [fn:bla]
[fn:bla] this is what \cite\l she\r said.
--8<---------------cut here---------------end--------------->8---
The trick fools the exporter but there are added spaces - I know no
way to get rid of those.
> I'm not really sure, but I suspect this worked before I instaled the
> latest version of org-mode.
I doubt that. Although patches have been applied to deal with a host of
such problems, it is a long-standing problem that is unlikely to be
completely solved - ever[fn:1].
Nick
Footnotes:
[fn:1] ... although I would love to be proved wrong.