emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Footnotes issue with LaTeX export
Date: Mon, 09 Jan 2012 08:05:39 +0100	[thread overview]
Message-ID: <871ur9tkxo.fsf@gmail.com> (raw)
In-Reply-To: <CA+M2ft8_uDJPJWDhXEYGJqrh+77z61hzCbeT6uNzo4MuvWdQRA@mail.gmail.com> (John Hendy's message of "Sun, 8 Jan 2012 13:30:54 -0600")

Hello,

John Hendy <jw.hendy@gmail.com> 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'.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2012-01-09  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-27  0:15 Footnotes issue with LaTeX export John Hendy
2011-12-27 10:43 ` Nicolas Goaziou
2012-01-08 19:30   ` John Hendy
2012-01-09  7:05     ` Nicolas Goaziou [this message]
2012-01-09 13:56       ` John Hendy
2012-01-09 17:31         ` Nicolas Goaziou
2012-01-09 17:56           ` John Hendy
2012-01-09 17:49         ` Eric S Fraga

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=871ur9tkxo.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.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 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).