From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Embedded LaTeX does not work with Unicode quotes Date: Wed, 12 Nov 2014 01:05:32 -0500 Message-ID: <87k331j6mr.fsf@pierrot.dokosmarshall.org> References: <877fz1e7s5.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoR42-0000Mq-Fe for emacs-orgmode@gnu.org; Wed, 12 Nov 2014 01:06:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoR3w-00023Y-60 for emacs-orgmode@gnu.org; Wed, 12 Nov 2014 01:05:58 -0500 Received: from plane.gmane.org ([80.91.229.3]:55391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoR3v-00023S-VX for emacs-orgmode@gnu.org; Wed, 12 Nov 2014 01:05:52 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XoR3s-00070a-6e for emacs-orgmode@gnu.org; Wed, 12 Nov 2014 07:05:48 +0100 Received: from pool-108-20-41-17.bstnma.fios.verizon.net ([108.20.41.17]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Nov 2014 07:05:48 +0100 Received: from ndokos by pool-108-20-41-17.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Nov 2014 07:05:48 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Marcin Borkowski 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... > 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. -- Nick