emacs-orgmode
[Top][All Lists]

## Re: [Orgmode] Latex Export

 From: Bastien Subject: Re: [Orgmode] Latex Export Date: Sun, 02 Dec 2007 21:44:33 +0000 User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

```Hi Russell,

> The exporters all refuse to export text before the first headline. I
> agree with that.

The exporters skip text before the first headline only if you set the
relevant option:

#+OPTIONS: skip:t

exporters will fall back on `org-export-skip-text-before-1st-heading'.

This applies to normal text as well as text inside #+BEGIN_LaTeX and
#+END_LaTeX markers.

But this does not apply to text after #+TEXT though.  This text is
*always* exported.

> However I'm including per buffer options at the top of my file,
> #+OPTIONS and the like. Turns out that #+BEGIN_LaTeX and #+END_LaTeX
>
> This is a problem where I'm trying to select a style or define
> variables used later in LaTeX code.

I think the right way to do this is to set a local value for the

,----
| * COMMENT LaTeX local variable
|
| # Local Variables:
| # End:
`----

This will append "\usepackage{fancyhrd}" to the LaTeX header that is
defined in `org-export-latex-classes'.

> I think that BEGIN/END latex should be considered configuration data
> like other /^#/ directives and exported before the first headline.
>

#+BEGIN_LaTeX and #+END_LaTeX have a more general purpose than just
adding "configuration" and you should be able to use them anywhere
in the Org source.

I think the real question is: what people are doing of #+TEXT?

Is it useful as it is now ("this text comes before the first heading,
overriding the skip option")?  Or should it be redefined so as to mean
"This piece of text should be inserted in the *header* of the target
format?"

Comment?

--
Bastien

```