From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hsiu-Khuern Tang Subject: Re: LaTeX export gives extra lines between table of contents and first section Date: Fri, 3 Oct 2008 11:13:52 -0700 Message-ID: <20081003181352.GA26226@hplhtang1> References: <20081003010416.GY17766@hplhtang1> Reply-To: Hsiu-Khuern Tang 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 1KlpBi-0007zQ-Hs for emacs-orgmode@gnu.org; Fri, 03 Oct 2008 14:15:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlpBg-0007yS-Nw for emacs-orgmode@gnu.org; Fri, 03 Oct 2008 14:15:38 -0400 Received: from [199.232.76.173] (port=44773 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlpBg-0007yL-IA for emacs-orgmode@gnu.org; Fri, 03 Oct 2008 14:15:36 -0400 Received: from madara.hpl.hp.com ([192.6.19.124]:64274) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlpBg-0004cp-3r for emacs-orgmode@gnu.org; Fri, 03 Oct 2008 14:15:36 -0400 Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25]) by madara.hpl.hp.com (8.14.3/8.14.3/HPL-PA Relay) with ESMTP id m93IDttE020092 for ; Fri, 3 Oct 2008 11:13:55 -0700 (PDT) Received: from hplhtang1.hpl.hp.com (hplhtang1.hpl.hp.com [15.4.92.205]) by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id m93IDtgV031938 for ; Fri, 3 Oct 2008 11:13:55 -0700 Received: from htang by hplhtang1.hpl.hp.com with local (Exim 4.62) (envelope-from ) id 1KlpA0-0002Tj-Bu for emacs-orgmode@gnu.org; Fri, 03 Oct 2008 11:13:52 -0700 Content-Disposition: inline In-Reply-To: <20081003010416.GY17766@hplhtang1> 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 * On Fri 01:04AM +0000, 03 Oct 2008, Tang, Hsiu-Khuern (hsiu-khuern.tang@hp.com) wrote: > I'm new to Org-Mode, and I'm getting to like it a lot! > > I am running Org 6.07b. I have this simple Org file: > > ---------------------------------------- > * top level > > ** second level > test > ---------------------------------------- > > If I run M-x org-export-region-as-latex, I get this output: Sorry, I meant M-x org-export-as-latex here. I've narrowed this down to the following behavior: with the above input file, the exported LaTeX is: ---------------------------------------- % standard preamble \title{* top level} \author{Tang Hsiu Khuern} \date{03 October 2008} \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents ** second level test \section{second level} test \end{document} ---------------------------------------- Here, the first heading is used for the title, as documented in "12.7.1 LaTeX export command". (That description is perhaps inaccurate, since it suggests that this only happens if there is an active region.) If I suppress this by add the option #+TITLE: my title, I get this output, without the extra lines: ---------------------------------------- % standard preamble \title{my title} \author{Tang Hsiu Khuern} \date{03 October 2008} \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \section{top level} \subsection{second level} test \end{document} ---------------------------------------- I also get output without extra lines if, instead of setting #+TITLE explicitly, I give a dummy heading to be used as the title: ---------------------------------------- * my title * something else ** second level test > * top level > > ** second level > test ---------------------------------------- So it seems like something undesirable happens when org-export-as-latex needs to use the heading name as the title, _and_ the next section is a subheading. -- Best, Hsiu-Khuern.