emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Error when exporting to LaTeX


From: Carsten Dominik
Subject: Re: [Orgmode] Re: Error when exporting to LaTeX
Date: Fri, 15 Jan 2010 08:04:40 +0100

Hi Sebastian,

On Jan 14, 2010, at 12:15 PM, Sébastien Vauban wrote:

Hi all,

Sébastien 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 \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 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]