From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Titus von der Malsburg <malsburg@posteo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Inline LaTeX formulae
Date: Sat, 09 May 2015 10:01:21 +0200 [thread overview]
Message-ID: <87fv76xjqm.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87sib6r9kt.fsf@posteo.de> (Titus von der Malsburg's message of "Fri, 08 May 2015 15:25:06 -0700")
Titus von der Malsburg <malsburg@posteo.de> writes:
> This looks indeed much nicer but it’s not what we want. The Emacs
> documentation says:
>
> ‘[:punct:]’
> This matches any punctuation character. (At present, for multibyte
> characters, it matches anything that has non-word syntax.)
>
> If this matches any non-word multibyte character, it also matches things
> like the multiplication sign along with a lot of other non-punctuation
> characters. So if we’d use [:punct:] we would incorrectly detect a
> latex fragment in the following example:
>
> 50$=10$×5
Too bad, then. The current regexp is really ugly.
> Fix detection of latex fragments
>
> * org-element.el (org-element-latex-fragment-parser):
> * org.el (org-latex-regexps): Fix the detection of latex
> fragments. Uses syntax tables to detect whitespaces and punctuation
> marks following the final $ sign.
>
> In order to qualify as a math delimiter, the final $ sign of a LaTeX
> fragment has to be followed by a whitespace or punctuation mark but the
> regexp used in the previous code matched only a small number of
> punctuation marks and therefore missed some latex fragments.
Applied. Thank you.
Regards,
prev parent reply other threads:[~2015-05-09 8:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 20:14 Inline LaTeX formulae Titus von der Malsburg
2015-05-05 20:23 ` Rasmus
2015-05-05 20:27 ` Marcin Borkowski
2015-05-05 21:32 ` Titus von der Malsburg
2015-05-05 22:56 ` Marcin Borkowski
2015-05-06 10:24 ` Rasmus
2015-05-06 20:35 ` Titus von der Malsburg
2015-05-07 7:42 ` Eric S Fraga
2015-05-07 18:00 ` Titus von der Malsburg
2015-05-07 20:00 ` Nicolas Goaziou
2015-05-08 19:52 ` Titus von der Malsburg
2015-05-08 21:40 ` Nicolas Goaziou
2015-05-08 22:25 ` Titus von der Malsburg
2015-05-09 8:01 ` Nicolas Goaziou [this message]
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=87fv76xjqm.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=malsburg@posteo.de \
/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).