From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Problem with org-entities-user Date: Mon, 17 Sep 2012 06:37:10 -1000 Message-ID: References: <87k3vtgnhy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDeK1-0006yT-A3 for emacs-orgmode@gnu.org; Mon, 17 Sep 2012 12:37:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDeJz-0003z0-Ag for emacs-orgmode@gnu.org; Mon, 17 Sep 2012 12:37:21 -0400 Received: from oproxy7-pub.bluehost.com ([67.222.55.9]:55299) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TDeJz-0003xx-0j for emacs-orgmode@gnu.org; Mon, 17 Sep 2012 12:37:19 -0400 In-Reply-To: <87k3vtgnhy.fsf@gmail.com> (Nicolas Goaziou's message of "Mon, 17 Sep 2012 08:41:13 +0200") 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: Nicolas Goaziou Cc: Org-mode Nicolas Goaziou writes: > Hello, > > tsd@tsdye.com (Thomas S. Dye) writes: > >> I'm probably doing something silly here, but can't figure it out. Using >> the new LaTeX exporter, and with org-entities-user defined as below, >> this: >> >> \C14 \frac12 \Omacron >> >> exports as: >> >> \C14 \textonehalf{} \=3D{O} >> >> Why isn't my C14 entity being exported correctly? >> >> All the best, >> Tom >> >> Value: (("U234" "\\textsuperscript{234}U" nil "234U" >> "234U" "234U" "234U") >> ("Th230" "\\textsuperscript{230}Th" nil "230Th" "230Th" >> "230Th" "230Th") >> ("C14" "\\textsuperscript{14}C" nil "" "14C" "14C" "14C") >> ("Umacron" "\\=3D{U}" nil "Ū" "U" "U" "=C5=AA") >> ("Omacron" "\\=3D{O}" nil "Ō" "O" "O" "=C5=8C") >> ("Imacron" "\\=3D{I}" nil "Ī" "I" "I" "=C4=AA") >> ("Emacron" "\\=3D{E}" nil "Ē" "E" "E" "=C4=92") >> ("Amacron" "\\=3D{A}" nil "Ā" "A" "A" "=C4=80") >> ("umacron" "\\=3D{u}" nil "ū" "u" "u" "=C5=AB") >> ("omacron" "\\=3D{o}" nil "ō" "o" "o" "=C5=8D") >> ("imacron" "\\=3D{i}" nil "ī" "i" "i" "=C4=AB") >> ("emacron" "\\=3D{e}" nil "ē" "e" "e" "=C4=93") >> ("amacron" "\\=3D{a}" nil "ā" "a" "a" "=C4=81") >> ("space" "\\ " nil " " " " " " " ")) > > That's because numbers are not allowed in entities, except for a few > exceptions: > > "\\\\\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:= alpha:]]\\)" > > Note that this regexp also matches LaTeX commands. > > One seducing idea would be to drop support for such commands (I'm _not_ > talking about math environments and snippets, but about commands like > \hfill{} or \bigskip{}). After all, if you want to write raw LaTeX in an > Org buffer, you can always use #+LATEX: or @@latex:...@@ like with any > other back-end. I see no compelling reason to keep this convenience if > it gets in the way. > > It would speed-up a bit entities matching, and would allow for a relaxed > regexp (i.e. a regexp built upon already defined entities). Thanks Nicolas. I was confused by the exceptional numbers into thinking they were generally allowed.=20=20 I'm not sure about support for \hfill{}, etc. The new latex and html exporters pass \hfill{} through unchanged, which might be what the latex author wants, or what the html author writing about latex commands wants.=20 All the best, Tom --=20 Thomas S. Dye http://www.tsdye.com