From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Latex Export Date: Sun, 02 Dec 2007 21:44:33 +0000 Message-ID: <87d4tozs8u.fsf@bzg.ath.cx> References: <20071130031506.GA3880@odin.demosthenes.org> <20071130062126.GA4661@fastwebnet.it> <20071130072711.GA11065@odin.demosthenes.org> <871wa7lxel.fsf@bzg.ath.cx> <20071201071430.GA15825@odin.demosthenes.org> <20071202210405.GF4256@odin.demosthenes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IywnH-0001Rv-GD for emacs-orgmode@gnu.org; Sun, 02 Dec 2007 16:56:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IywnG-0001R1-0b for emacs-orgmode@gnu.org; Sun, 02 Dec 2007 16:56:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IywnF-0001Qu-Oj for emacs-orgmode@gnu.org; Sun, 02 Dec 2007 16:56:05 -0500 Received: from nf-out-0910.google.com ([64.233.182.187]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IywnF-0002aT-9s for emacs-orgmode@gnu.org; Sun, 02 Dec 2007 16:56:05 -0500 Received: by nf-out-0910.google.com with SMTP id f5so2509448nfh for ; Sun, 02 Dec 2007 13:56:03 -0800 (PST) In-Reply-To: <20071202210405.GF4256@odin.demosthenes.org> (Russell Adams's message of "Sun, 2 Dec 2007 15:04:05 -0600") 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: emacs-orgmode@gnu.org Hi Russell, Russell Adams 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