emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Embedded LaTeX does not work with Unicode quotes


From: Marcin Borkowski
Subject: Re: [O] Embedded LaTeX does not work with Unicode quotes
Date: Wed, 12 Nov 2014 19:37:19 +0100

On 2014-11-12, at 07:05, Nick Dokos wrote:

> Marcin Borkowski <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]