emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] LaTeX export gives extra lines between table of contents a


From: Hsiu-Khuern Tang
Subject: Re: [Orgmode] LaTeX export gives extra lines between table of contents and first section
Date: Fri, 3 Oct 2008 11:13:52 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

* On Fri 01:04AM +0000, 03 Oct 2008, Tang, Hsiu-Khuern (address@hidden) 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.




reply via email to

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