From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: emacs-orgmode@gnu.org
Subject: Re: Embedded LaTeX does not work with Unicode quotes
Date: Wed, 12 Nov 2014 19:37:19 +0100 [thread overview]
Message-ID: <87sihonu3k.fsf@wmi.amu.edu.pl> (raw)
In-Reply-To: <87k331j6mr.fsf@pierrot.dokosmarshall.org>
On 2014-11-12, at 07:05, Nick Dokos wrote:
> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>
>> Hi list,
>>
>> I have this: „$n\eps\le b$”, and it seems not to be recognized as a
>> LaTeX fragment. The manual says:
>>
>> ================
>> 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.
>> ================
>>
>> When I C-u C-x = on the closing quote, I get
>>
>> ================
>> ...
>> syntax: . which means: punctuation
>> ...
>> ================
>>
>> so I don't know why it is not recognized as punctuation. Consequently,
>> it is exported verbatim (with `\$') into LaTeX, and also (obviously) C-c
>> C-x C-l does not fontify it. When I change ” into " (the ASCII #x22
>> quote), everything is ok.
>>
>
> The $...$ construct is recognized by a regexp which, while complicated,
> is not complicated enough to recognize everything that's marked
> "punctuation" in the syntax tables. Look for org-latex-regexps in org.el
> (and note that the regexp for "$" is about twice as long as the next
> longest regexp - the one for "begin"). The others (for \(...\), \[...\]
> and $$..$$) are fairly trivial.
>
>> My questions:
>>
>> 1. Isn't it a bug?
>>
>
> Yes, probably - but looking at the regexp, I cringe: I don't want to even
> try deciphering it, let alone change it - life's too short...
Ah, regex. I have no more questions...
>> 2. If not, what can I do to in my config so that it is recognized
>> properly?
>>
>> PS. I just recalled that using \(...\) should help, and indeed it does.
>> Still, I'm curious about the answer to my questions (now that I
>> remembered a workaround, especially #1).
>>
> That is indeed the best solution.
Yep.
Thanks!
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
next prev parent reply other threads:[~2014-11-12 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 21:45 Embedded LaTeX does not work with Unicode quotes Marcin Borkowski
2014-11-12 6:05 ` Nick Dokos
2014-11-12 18:37 ` Marcin Borkowski [this message]
2014-11-12 19:53 ` Florian Beck
2014-11-13 18:24 ` Nicolas Goaziou
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=87sihonu3k.fsf@wmi.amu.edu.pl \
--to=mbork@wmi.amu.edu.pl \
--cc=emacs-orgmode@gnu.org \
/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).