emacs-orgmode
[Top][All Lists]
Advanced

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

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,

Russell Adams <address@hidden> writes:

> 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

If you don't specify anything about this in the #+OPTIONS line, then the
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
> before the first headline are considered comments and not exported.
>
> 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
variable `org-export-latex-append-header' at the end of your file:

,----
| * COMMENT LaTeX local variable
| 
| # Local Variables:
| # org-export-latex-append-header: "\\usepackage{fancyhrd}"
| # 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.
>
> Comments?

#+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




reply via email to

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