From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Again problems with latex inside footnotes. Date: Tue, 12 Jul 2011 02:37:52 -0400 Message-ID: <11544.1310452672@alphaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgWbv-0004Tg-Bt for emacs-orgmode@gnu.org; Tue, 12 Jul 2011 02:38:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgWbt-0000Da-IK for emacs-orgmode@gnu.org; Tue, 12 Jul 2011 02:38:23 -0400 Received: from vms173003pub.verizon.net ([206.46.173.3]:33978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgWbt-0000DI-86 for emacs-orgmode@gnu.org; Tue, 12 Jul 2011 02:38:21 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LO700AZ2JR527CI@vms173003.mailsrvcs.net> for emacs-orgmode@gnu.org; Tue, 12 Jul 2011 01:38:05 -0500 (CDT) In-reply-to: Message from Rafael Calsaverini of "Tue\, 12 Jul 2011 00\:02\:36 -0300." 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: Rafael Calsaverini Cc: nicholas.dokos@hp.com, Lista - org-mode Rafael Calsaverini wrote: > Also, I have problems with equations even when I use \(...\) instead of $= ...$.=C2=A0 >=20 > This, for example: > --8<-- > * example > Example[fn:note]. > [fn:note]An equation: \(\bar{a}\). > ---8<-- >=20 > becomes this: >=20 > ---8<--- > Example\footnote{An equation: \(\bar\{a\}\). }. > ---8<--- >=20 Unfortunately, the LaTeX exporter does have a lot of weaknesses in this area: it tends to escape special characters willy-nilly - sometimes that's the right thing to do, sometimes not. This particular escaping is done by org-export-latex-special-chars: this basically loops over four (horrendous-looking) regexps and tries to find all matches in the buffer for that regexp. It then proceeds to transform the matched text (and matched pieces of text *around* the main match) in some (hopefully meaningful) way. In this case, it fails. The only way I know around this problem is a mechanism that Tom Dye describes in his (excellent) LaTeX exporting tutorial on Worg. He credits Lawrence Mitchell for the case that he describes in the tutorial. Evaluate this expression --8<---------------cut here---------------start------------->8--- (setq org-entities-user '(("l" "{" nil "" "" "" "") ("r" "}" nil "" "" "" ""))) --8<---------------cut here---------------end--------------->8--- and then export the following: --8<---------------cut here---------------start------------->8--- * example Example[fn:note]. [fn:note] An equation: \(\bar \l a\r \). blablabla [fn:bla] [fn:bla] this is what \cite\l she\r said. --8<---------------cut here---------------end--------------->8--- The trick fools the exporter but there are added spaces - I know no way to get rid of those. > I'm not really sure, but I suspect this worked before I instaled the > latest version of org-mode. I doubt that. Although patches have been applied to deal with a host of such problems, it is a long-standing problem that is unlikely to be completely solved - ever[fn:1]. Nick Footnotes: [fn:1] ... although I would love to be proved wrong.