From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafael Calsaverini Subject: Again problems with latex inside footnotes. Date: Mon, 11 Jul 2011 23:34:46 -0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6db301ed3fc5504a7d6256f Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgSoX-0006hb-TX for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 22:35:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgSoW-0005Q2-IQ for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 22:35:09 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:43812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgSoW-0005Om-Cj for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 22:35:08 -0400 Received: by bwd14 with SMTP id 14so1499343bwd.0 for ; Mon, 11 Jul 2011 19:35:06 -0700 (PDT) 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: Lista - org-mode --0016e6db301ed3fc5504a7d6256f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, sorry for bothering you again with it, but I'm having a problem with latex inside footnotes and I couldn't find the answer in the manual. When I try something like: ----8<--- blablabla [fn:bla] [fn:bla] this is what \cite{she} said. ----8<--- this gets exported as: ---8<--- blablabla \footnote{ this is what \cite\{she\} said. ---8<--- I believe I'm missing something very basic. I believe that if I put a "#+Latex:xxx" the xxx part would be exported verbatim to the latex file. But this would break the footnote. Is there a way to insert inline latex snippets? --- Rafael Calsaverini Dep. de F=EDsica Geral, Sala 336 Instituto de F=EDsica - Universidade de S=E3o Paulo rafael.calsaverini@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 --0016e6db301ed3fc5504a7d6256f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=A0
sorry for bothering you again with it, but I'm having a prob= lem with latex inside footnotes and I couldn't find the answer in the m= anual.=A0

When I try something like:
----8<---
blablabla [fn:bla]
[fn:bla] thi= s is what \cite{she} said.=A0
----8<---

this gets exported as:=A0

---8<---
blablabla \footnote{ this is what \cite\{she\} said.
---8<---<= /div>

I believe I'm missing something very basic.=A0=
I believe that if I put a "#+Latex:xxx" the xxx part w= ould be exported verbatim to the latex file. But this would break the footn= ote. Is there a way to insert inline latex snippets?=A0

---
Rafael Calsaverini
Dep. de F=EDsica Geral, S= ala 336
Instituto de F=EDsica - Universidade de S=E3o Paulo

rafael.calsaverini@gmail.com=
http://stoa.usp.br/calsav= erini/weblog
CEL: (11) 7525-6222
USP: (11) 3091-6803

--0016e6db301ed3fc5504a7d6256f-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafael Calsaverini Subject: Re: Again problems with latex inside footnotes. Date: Tue, 12 Jul 2011 00:02:36 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016364580745d744f04a7d6896f Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgTFS-0000KZ-Qx for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 23:02:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgTFR-0000bt-FJ for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 23:02:58 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:34716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgTFR-0000bk-AY for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 23:02:57 -0400 Received: by bwd14 with SMTP id 14so1511318bwd.0 for ; Mon, 11 Jul 2011 20:02:56 -0700 (PDT) In-Reply-To: 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: Lista - org-mode --0016364580745d744f04a7d6896f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Also, I have problems with equations even when I use \(...\) instead of $...$. This, for example: --8<-- * example Example[fn:note]. [fn:note]An equation: \(\bar{a}\). ---8<-- becomes this: ---8<--- Example\footnote{An equation: \(\bar\{a\}\). }. ---8<--- I'm not really sure, but I suspect this worked before I instaled the latest version of org-mode. Sorry for any inconvenience. -- Rafael Calsaverini Dep. de F=EDsica Geral, Sala 336 Instituto de F=EDsica - Universidade de S=E3o Paulo rafael.calsaverini@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 --0016364580745d744f04a7d6896f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Also, I have problems with equations even when I use \(...\) instead of $..= .$.=A0

This, for example:
--8<--
=
* example
Example[fn:note].
[fn:note]An equation: = \(\bar{a}\).
---8<--

becomes this:

=
---8<---
Example\footnote{An equation: \(\bar\{a\}\)= . }.
---8<---

I'm not reall= y sure, but I suspect this worked before I instaled the latest version of o= rg-mode.

Sorry for any inconvenience.=A0
--
Rafae= l Calsaverini
Dep. de F=EDsica Geral, Sala 336
Instituto de F=EDsica = - Universidade de S=E3o Paulo

rafael.calsaverini@gmail.com
http://stoa.usp.br/calsav= erini/weblog
CEL: (11) 7525-6222
USP: (11) 3091-6803




--0016364580745d744f04a7d6896f-- 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Again problems with latex inside footnotes. Date: Tue, 12 Jul 2011 12:05:53 +0200 Message-ID: <87pqlfizjy.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgZqs-0007yQ-JW for emacs-orgmode@gnu.org; Tue, 12 Jul 2011 06:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgZqq-0001px-5h for emacs-orgmode@gnu.org; Tue, 12 Jul 2011 06:06:02 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:38597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgZqp-0001pG-B3 for emacs-orgmode@gnu.org; Tue, 12 Jul 2011 06:05:59 -0400 Received: by wwf22 with SMTP id 22so3740358wwf.30 for ; Tue, 12 Jul 2011 03:05:56 -0700 (PDT) In-Reply-To: (Rafael Calsaverini's message of "Mon, 11 Jul 2011 23:34:46 -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: Lista - org-mode Hello, Rafael Calsaverini writes: > sorry for bothering you again with it No problem. > but I'm having a problem with latex inside footnotes and I couldn't > find the answer in the manual. > > When I try something like: > > ----8<--- > blablabla [fn:bla] > [fn:bla] this is what \cite{she} said. > ----8<--- > > this gets exported as: > > ---8<--- > blablabla \footnote{this is what \cite\{she\} said. } > ---8<--- I have pushed a fix for that problem in master. May you try it to confirm it works (or not...)? Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Again problems with latex inside footnotes. Date: Wed, 13 Jul 2011 10:40:16 +0200 Message-ID: <87hb6q4lqn.fsf@gnu.org> References: <11544.1310452672@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QguzE-0000pi-Rf for emacs-orgmode@gnu.org; Wed, 13 Jul 2011 04:40:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qguz4-00030o-Mj for emacs-orgmode@gnu.org; Wed, 13 Jul 2011 04:40:04 -0400 Received: from mail-fx0-f52.google.com ([209.85.161.52]:39126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qguz4-00030e-7y for emacs-orgmode@gnu.org; Wed, 13 Jul 2011 04:39:54 -0400 Received: by fxd18 with SMTP id 18so1852193fxd.39 for ; Wed, 13 Jul 2011 01:39:53 -0700 (PDT) In-Reply-To: <11544.1310452672@alphaville.dokosmarshall.org> (Nick Dokos's message of "Tue, 12 Jul 2011 02:37:52 -0400") 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: nicholas.dokos@hp.com Cc: Rafael Calsaverini , Lista - org-mode Hi Rafael, Nick Dokos writes: > 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]. Yes, we need to rework the way the exporters handle espace chars, especially the LaTeX one --- it's not only ugly and buggy. Don't hold your breath though, I won't be on this before 7.7. Thanks for your understanding, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafael Calsaverini Subject: Re: Again problems with latex inside footnotes. Date: Wed, 13 Jul 2011 14:33:32 -0300 Message-ID: References: <11544.1310452672@alphaville.dokosmarshall.org> <87hb6q4lqn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0022158c0fede592bb04a7f6d16e Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh3Ju-0002I9-Ue for emacs-orgmode@gnu.org; Wed, 13 Jul 2011 13:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qh3Js-0001oy-OD for emacs-orgmode@gnu.org; Wed, 13 Jul 2011 13:33:58 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:63231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh3Js-0001os-7u for emacs-orgmode@gnu.org; Wed, 13 Jul 2011 13:33:56 -0400 Received: by ewy9 with SMTP id 9so2545104ewy.0 for ; Wed, 13 Jul 2011 10:33:53 -0700 (PDT) In-Reply-To: <87hb6q4lqn.fsf@gnu.org> 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: Bastien Cc: nicholas.dokos@hp.com, Lista - org-mode --0022158c0fede592bb04a7f6d16e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bastien, I have enough interest in using org-mode to produce latex texts to get involved. I can't do it right now cause I'm in a critical time to produce results for my thesis, but I've been delaying learning e-lisp and taking a good look on org-mode for some time. Nick Dokos above said that org-mode uses a huge regexp to parse the latex. When this pressing phase pass I'll certainly take a look on that. I played = a bit (only a bit) with funcional parsers in Haskell (monadic parsers and parsers based on arrows) and, in my experience, they are much, much more easy to write and more powerful than regexp's (they can parse html! :D). Well, lisp is functional... Maybe I'll take a look at this in the near future. --- Rafael Calsaverini Dep. de F=EDsica Geral, Sala 336 Instituto de F=EDsica - Universidade de S=E3o Paulo rafael.calsaverini@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 On Wed, Jul 13, 2011 at 05:40, Bastien wrote: > Hi Rafael, > > Nick Dokos writes: > > > 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]. > > Yes, we need to rework the way the exporters handle espace chars, > especially the LaTeX one --- it's not only ugly and buggy. > > Don't hold your breath though, I won't be on this before 7.7. > > Thanks for your understanding, > > -- > Bastien > --0022158c0fede592bb04a7f6d16e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bastien,=A0


I have enough interest in = using org-mode to produce latex texts to get involved. I can't do it ri= ght now cause I'm in a critical time to produce results for my thesis, = but I've been delaying learning e-lisp and taking a good look on org-mo= de for some time.=A0

Nick Dokos above said that org-mode uses a huge regexp = to parse the latex. When this pressing phase pass I'll certainly take a= look on that. I played a bit (only a bit) with funcional parsers in Haskel= l (monadic parsers and parsers based on arrows) and, in my experience, they= are much, much more easy to write and more powerful than regexp's (the= y can parse html! :D). Well, lisp is functional... Maybe I'll take a lo= ok at this in the near future.=A0

---
Rafael Calsaverini
Dep. de F=EDsica Geral, S= ala 336
Instituto de F=EDsica - Universidade de S=E3o Paulo

rafael.calsaverini@gmail.com=
http://stoa.usp.br/calsav= erini/weblog
CEL: (11) 7525-6222
USP: (11) 3091-6803



On Wed, Jul 13, 2011 at 05:40, Bastien <= span dir=3D"ltr"><bzg@altern.org&g= t; wrote:
Hi Rafael,

Nick Dokos <nicholas.dokos@hp.c= om> writes:

> 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].

Yes, we need to rework the way the exporters handle espace chars,
especially the LaTeX one --- it's not only ugly and buggy.

Don't hold your breath though, I won't be on this before 7.7.

Thanks for your understanding,

--
=A0Bastien

--0022158c0fede592bb04a7f6d16e--