From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Bastien <bzg@altern.org>
Cc: Greg Minshall <minshall@umich.edu>, emacs-orgmode@gnu.org
Subject: Re: LaTeX-export: letters after $..$ turn off math-mode
Date: Sat, 16 Feb 2013 12:48:16 +0100 [thread overview]
Message-ID: <87r4kg5vjz.fsf@gmail.com> (raw)
In-Reply-To: <87bobk7m9l.fsf@gmail.com> (Nicolas Goaziou's message of "Sat, 16 Feb 2013 08:25:58 +0100")
Completing myself,
> IMO, I would call that an Org limitation. Org is not LaTeX, even if it
> provides many LaTeX facilities. Also, the OP's problem can be solved in
> many ways under Emacs. For example, I use "mt" (both "m" and "t" are on
> my home row) as a snippet to insert "\(\)" in an Org buffer and put
> point inside.
I would even go further. The following text has been in documentation
for years:
* Text within the usual LaTeX math delimiters. To avoid conflicts
with currency specifications, single `$' characters are only
recognized as math delimiters if the enclosed text contains at
most two line breaks, is directly attached to the `$' characters
with no whitespace in between, and if the closing `$' is followed
by whitespace, punctuation or a dash. For the other delimiters,
there is no such restriction, so when in doubt, use `\(...\)' as
inline math delimiters.
and so has been this excerpt from `org-inside-LaTeX-fragment-p'
docstring:
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.
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.
We cannot afford two maintain two implementations, one of them being
frail, of the _same concept_. It's way better to focus on one of them,
and make sure it is solid. It also means a slightly lighter Org, and
less code to debug, which is always good.
Thus, I suggest to announce that $ (both $ and $$, even though $$ don't
have problems /per se/) symbols for should be avoided. Then, in a year
or so, we can remove them completely from code base.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2013-02-16 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 11:51 LaTeX-export: letters after $..$ turn off math-mode Greg Minshall
2013-02-15 22:04 ` Bastien
2013-02-16 7:25 ` Nicolas Goaziou
2013-02-16 11:48 ` Nicolas Goaziou [this message]
2013-02-16 16:33 ` Nick Dokos
2013-02-16 16:45 ` Nick Dokos
2013-02-16 14:32 ` Bastien
2013-02-16 15:26 ` Rasmus
-- strict thread matches above, loose matches on Subject: below --
2012-02-06 18:32 Daniel Schoepe
2012-02-06 19:23 ` Achim Gratz
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=87r4kg5vjz.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
--cc=minshall@umich.edu \
/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).