From: John Hendy <jw.hendy@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Footnotes issue with LaTeX export
Date: Mon, 9 Jan 2012 07:56:06 -0600 [thread overview]
Message-ID: <CA+M2ft8mJxv7+GEcAToQW=S8yW=oY+7QhTwSoR2Hs+MUqZbrjQ@mail.gmail.com> (raw)
In-Reply-To: <871ur9tkxo.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2311 bytes --]
On Mon, Jan 9, 2012 at 1:05 AM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> 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'.
>
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
>
[-- Attachment #2: Type: text/html, Size: 3327 bytes --]
next prev parent reply other threads:[~2012-01-09 13:56 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
2012-01-09 13:56 ` John Hendy [this message]
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='CA+M2ft8mJxv7+GEcAToQW=S8yW=oY+7QhTwSoR2Hs+MUqZbrjQ@mail.gmail.com' \
--to=jw.hendy@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@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).