* Footnotes issue with LaTeX export @ 2011-12-27 0:15 John Hendy 2011-12-27 10:43 ` Nicolas Goaziou 0 siblings, 1 reply; 8+ messages in thread From: John Hendy @ 2011-12-27 0:15 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 685 bytes --] I'm experiencing an issue similar to this one: --- http://osdir.com/ml/emacs-orgmode-gnu/2011-10/msg00544.html I have a paragraph in which I reference a dollar amount (preceded by "$"). Attempting to insert a footnote anywhere in that paragraph gets me the error "Cannot insert a footnote here." Inserting one manually leaves the text black vs. fontified in the typical link color. Export produces it as the verbatim text ([fn:xx]) instead of converting it. Trying to escape the $ sign with \ doesn't fix the issue. Inserting another $ re-activates the footnote, but that will obviously convert my dollar amount to math font, which isn't what I want. Any suggestions? Thanks, John [-- Attachment #2: Type: text/html, Size: 901 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Footnotes issue with LaTeX export 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 0 siblings, 1 reply; 8+ messages in thread From: Nicolas Goaziou @ 2011-12-27 10:43 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode Hello, John Hendy <jw.hendy@gmail.com> writes: > I'm experiencing an issue similar to this one: > --- http://osdir.com/ml/emacs-orgmode-gnu/2011-10/msg00544.html > > I have a paragraph in which I reference a dollar amount (preceded by "$"). > Attempting to insert a footnote anywhere in that paragraph gets me the > error "Cannot insert a footnote here." [...] > Any suggestions? Yes: Can you provide an ECM (Complete Minimal Example), and tell the version of Org you're using? Also, does M-: (org-inside-LaTeX-fragment-p) return coherent values (that is nil when point isn't inside a LaTeX fragment) when evaluated throughout the paragraph? Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Footnotes issue with LaTeX export 2011-12-27 10:43 ` Nicolas Goaziou @ 2012-01-08 19:30 ` John Hendy 2012-01-09 7:05 ` Nicolas Goaziou 0 siblings, 1 reply; 8+ messages in thread From: John Hendy @ 2012-01-08 19:30 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1882 bytes --] On Tue, Dec 27, 2011 at 4:43 AM, Nicolas Goaziou <n.goaziou@gmail.com>wrote: > Hello, > > John Hendy <jw.hendy@gmail.com> writes: > > > I'm experiencing an issue similar to this one: > > --- http://osdir.com/ml/emacs-orgmode-gnu/2011-10/msg00544.html > > > > I have a paragraph in which I reference a dollar amount (preceded by > "$"). > > Attempting to insert a footnote anywhere in that paragraph gets me the > > error "Cannot insert a footnote here." > > [...] > > > Any suggestions? > > Yes: Can you provide an ECM (Complete Minimal Example), and tell the > version of Org you're using? > > Sure. Here you are: -- M-x org-version: Org-mode version 7.8.03 (release_7.8.03.61.g59df6) -- Emacs: 23.3.1 -- Minimal example: #+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 > Also, does M-: (org-inside-LaTeX-fragment-p) return coherent values > (that is nil when point isn't inside a LaTeX fragment) when evaluated > throughout the paragraph? > > I don't necessarily understand the debugger (what constitutes a full set of output), but it looks like I might be getting two outputs depending on where I execute that function: -- One: eval((org-inside-LaTeX-fragment p)) eval-expression((org-inside-LaTeX-fragment p) nil) call-interactively(eval-expression nil nil) recursive-edit() byte-code("\306\x10 @\307=\203! -- The other: eval((org-inside-LaTeX-fragment p)) eval-expression((org-inside-LaTeX-fragment p) nil) call-interactively(eval-expression nil nil) Thoughts? Thanks, John > Regards, > > -- > Nicolas Goaziou > [-- Attachment #2: Type: text/html, Size: 3242 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Footnotes issue with LaTeX export 2012-01-08 19:30 ` John Hendy @ 2012-01-09 7:05 ` Nicolas Goaziou 2012-01-09 13:56 ` John Hendy 0 siblings, 1 reply; 8+ messages in thread From: Nicolas Goaziou @ 2012-01-09 7:05 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Footnotes issue with LaTeX export 2012-01-09 7:05 ` Nicolas Goaziou @ 2012-01-09 13:56 ` John Hendy 2012-01-09 17:31 ` Nicolas Goaziou 2012-01-09 17:49 ` Eric S Fraga 0 siblings, 2 replies; 8+ messages in thread From: John Hendy @ 2012-01-09 13:56 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: emacs-orgmode [-- 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 --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Footnotes issue with LaTeX export 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 1 sibling, 1 reply; 8+ messages in thread From: Nicolas Goaziou @ 2012-01-09 17:31 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode Hello, John Hendy <jw.hendy@gmail.com> writes: >> 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. You can already use \(inline math\). I don't think there is a need for extra syntax. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Footnotes issue with LaTeX export 2012-01-09 17:31 ` Nicolas Goaziou @ 2012-01-09 17:56 ` John Hendy 0 siblings, 0 replies; 8+ messages in thread From: John Hendy @ 2012-01-09 17:56 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1264 bytes --] On Mon, Jan 9, 2012 at 11:31 AM, Nicolas Goaziou <n.goaziou@gmail.com>wrote: > Hello, > > John Hendy <jw.hendy@gmail.com> writes: > > >> 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. > > You can already use \(inline math\). I don't think there is > a need for extra syntax. > > Ah. Neat. I was unaware of this. That should do it. I'd still kind of prefer not to have to tweak around with stuff. Given that special combinations of "\" + "char" are LaTeX specific, it would seem that a natural combination would be to activate such combinations when LaTeX:t is used in #+options. Your solution will work for me for now. Thanks for the assistance! John > > Regards, > > -- > Nicolas Goaziou > [-- Attachment #2: Type: text/html, Size: 2042 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Footnotes issue with LaTeX export 2012-01-09 13:56 ` John Hendy 2012-01-09 17:31 ` Nicolas Goaziou @ 2012-01-09 17:49 ` Eric S Fraga 1 sibling, 0 replies; 8+ messages in thread From: Eric S Fraga @ 2012-01-09 17:49 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode John Hendy <jw.hendy@gmail.com> writes: [...] > If I removed $ as you suggest, could I use \begin{math}/\end{math} inline? > I have quite a bit of inline math. You can use \( ... \) for inline math. Works well for me. -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1 : using Org-mode version 7.8.03 (release_7.8.03.66.g1283) ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-01-09 19:35 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2012-01-09 17:31 ` Nicolas Goaziou 2012-01-09 17:56 ` John Hendy 2012-01-09 17:49 ` Eric S Fraga
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).