From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Error when exporting to LaTeX Date: Fri, 15 Jan 2010 08:04:40 +0100 Message-ID: <50EF1D2C-DF86-4644-A49E-148AA67DCAEB@gmail.com> References: <876375d3aj.fsf@mundaneum.com> <87zl4hj5ty.fsf@mundaneum.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVh22-0007x6-Up for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 02:55:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVh1w-0007vv-AL for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 02:55:44 -0500 Received: from [199.232.76.173] (port=39490 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVh1w-0007vq-4Q for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 02:55:40 -0500 Received: from mx20.gnu.org ([199.232.41.8]:3027) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVh1v-0005Pf-An for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 02:55:39 -0500 Received: from mail-ew0-f209.google.com ([209.85.219.209]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVh1u-0002J2-1P for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 02:55:38 -0500 Received: by ewy1 with SMTP id 1so410145ewy.8 for ; Thu, 14 Jan 2010 23:55:36 -0800 (PST) In-Reply-To: <87zl4hj5ty.fsf@mundaneum.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?ISO-8859-1?Q?S=E9bastien_Vauban?= Cc: emacs-orgmode@gnu.org Hi Sebastian, On Jan 14, 2010, at 12:15 PM, S=E9bastien Vauban wrote: > Hi all, > > S=E9bastien Vauban wrote: >> >> Here a problem when exporting such a file: >> > --8<---------------cut here---------------start------------->8--- > #+MACRO: rest {\leavevmode \leaders \hrule height 0.7pt\hfill} \\ > > Nombre de la escuela de idiomas: {{{rest}}} > Nombre y apellidos del estudiante: {{{rest}}} > --8<---------------cut here---------------end--------------->8--- >> >> The `rest' macro is for filling the rest of the current line with an >> horizontal rule. >> >> It needs to be enclosed between accolades. The macro just does text replacement, so the LaTeX exporter sees naked braces which it escapes as it should. In fact there seems to be a bug causing the opening "{" not to be escaped - I have just fixed that, I hope. Org-mode buffers are not LaTeX buffers, so braces are seen as just characters that should appear in print, unless they surround the arguments of a LaTeX macro. So you probably could write #+LaTeX_HEADER: \def\same#1{#1} #+MACRO: rest \same{{\leavevmode \leaders \hrule height 0.7pt=20 \hfill} \\} Nombre de la escuela de idiomas: {{{rest}}} Nombre y apellidos del estudiante: {{{rest}}} However, I think it is must better and more stable to write: #+LaTeX_HEADER: \newcommand{\rest}{{\leavevmode \leaders \hrule =20 height 0.7pt\hfill} \\} Nombre de la escuela de idiomas: \rest Nombre y apellidos del estudiante: \rest Don't forget that LaTeX is the most powerful macro processor here, so just use its capabilities. HTH - Carsten