[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] funny problem for table of contents when publishing org-latex wi
From: |
tg |
Subject: |
Re: [O] funny problem for table of contents when publishing org-latex with #+INCLUDE other.org |
Date: |
Fri, 13 Jan 2012 16:36:54 +0100 |
On Sat, 12 Nov 2011 15:28:25 -0500, jack song wrote:
> I got a funny (or strange) problem when I published to latex with #+INCLUDE
> other org file
>
> problem: if there is no any * first line in the index.org file before the
> #+INCLUDE otherfile.org, there will be no table of contents. Other wise it
> works.
This bug also occured to me, I could reproduce it with the following files
using org-mode 7.7 and 7.8.03:
test.org:
------------------------------------------------------------------------------
#+TITLE: Test
#+AUTHOR: Foo Bar
start
#+INCLUDE inc.org
end
------------------------------------------------------------------------------
inc.org:
------------------------------------------------------------------------------
inc
* Foo
bar
------------------------------------------------------------------------------
The relevant part of the exported latex document is:
------------------------------------------------------------------------------
\begin{document}
\maketitle
\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
\section{Foo}
\label{sec-1}
bar
\end{document}
------------------------------------------------------------------------------
Everything is removed between the start of the document and the first section
of the included file.
A workaround is to add a non-exported section to the main file:
test2.org:
------------------------------------------------------------------------------
#+TITLE: Test
#+AUTHOR: Foo Bar
start
* :NOEXPORT:
#+INCLUDE inc.org
end
------------------------------------------------------------------------------
In this case the latex export looks like:
test2.tex:
------------------------------------------------------------------------------
\begin{document}
\maketitle
\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
start
\section{Foo}
\label{sec-1}
bar
end
\end{document}
------------------------------------------------------------------------------
This workaround is not perfect, though, the part before the first section
in the included file is still missing.
> a, No table of contents in latex file, IF index.org is below,
The table of contents remained in the exported document in all cases for me.
--
tg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [O] funny problem for table of contents when publishing org-latex with #+INCLUDE other.org,
tg <=