From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Footnotes issue with LaTeX export Date: Mon, 09 Jan 2012 08:05:39 +0100 Message-ID: <871ur9tkxo.fsf@gmail.com> References: <87r4zq8fd6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk9KQ-0001rn-CW for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 02:07:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rk9KP-0001Lo-AV for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 02:07:34 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:45913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk9KP-0001Lk-2L for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 02:07:33 -0500 Received: by wibhq12 with SMTP id hq12so3364551wib.0 for ; Sun, 08 Jan 2012 23:07:32 -0800 (PST) In-Reply-To: (John Hendy's message of "Sun, 8 Jan 2012 13:30:54 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode Hello, John Hendy 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