emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Footnotes issue with LaTeX export


From: John Hendy
Subject: Re: [O] Footnotes issue with LaTeX export
Date: Mon, 9 Jan 2012 07:56:06 -0600



On Mon, Jan 9, 2012 at 1:05 AM, Nicolas Goaziou <address@hidden> wrote:
Hello,

John Hendy <address@hidden> writes:

> #+begin_src orgmode
> * Header
>
> Test paragraph where I insert a dollar amount of $100.
>
> Test paragraph where I insert a dollar amount of \$100.
>
> Test paragraph where I insert a dollar amount of 100.[fn:1]
>
> * Footnotes
>
> [fn:1] Successful; the first two give the error 'Cannot insert a footnote
> here'
> #+end_src

Yes, that's what I thought: `org-inside-LaTeX-fragment-p' is the key.

,----
|(org-inside-LaTeX-fragment-p)
|
| Test if point is inside a LaTeX fragment.
| I.e. after a \begin, \(, M-x , $, or $$, without the corresponding closing
| sequence appearing also before point.
| Even though the matchers for math are configurable, this function assumes
| that \begin, \(, \[, and $$ are always used.  Only the single dollar
| delimiters are skipped when they have been removed by customization.
| The return value is nil, or a cons cell with the delimiter and the
| position of this delimiter.
|
| This function does a reasonably good job, but can locally be fooled by
| for example currency specifications.  For example it will assume being in
| inline math after "$22.34".  The LaTeX fragment formatter will only format
| fragments that are properly closed, but during editing, we have to live
| with the uncertainty caused by missing closing delimiters.  This function
| looks only before point, not after.
`----

On purpose, Org won't insert a footnote inside a LaTeX fragment.  But,
in your example, it is fooled by the currency.

One workaround would be to remove "$" as a math delimiter from
`org-format-latex-options'.

How about another idea... would it be possible to remove "\$" as a math delimiter? I *do* use $math$ a bit, at least in this document, and have =TeX:t and LaTeX:t= in my options... thus, I'm very careful about prefixing "\" to any instances of $ and %. Removing \$ as a math delimiter or making "\" register as the "universal escape character" would also do the trick.

If I removed $ as you suggest, could I use \begin{math}/\end{math} inline? I have quite a bit of inline math.


Thanks!
John
 


Regards,

--
Nicolas Goaziou


reply via email to

[Prev in Thread] Current Thread [Next in Thread]