From mboxrd@z Thu Jan 1 00:00:00 1970 From: tg Subject: Re: funny problem for table of contents when publishing org-latex with #+INCLUDE other.org Date: Fri, 13 Jan 2012 16:36:54 +0100 Message-ID: <20120113163654.0dc62705@tgbit.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RljC3-0004wZ-HQ for emacs-orgmode@gnu.org; Fri, 13 Jan 2012 10:37:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RljBy-0006t9-NU for emacs-orgmode@gnu.org; Fri, 13 Jan 2012 10:37:27 -0500 Received: from tgbit.net ([78.24.191.136]:59519 helo=mail.tgbit.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RljBy-0006nD-Ic for emacs-orgmode@gnu.org; Fri, 13 Jan 2012 10:37:22 -0500 Received: from sol.tgbit.net ([10.0.0.1] helo=localhost) by mail.tgbit.net with esmtpa (Exim 4.73) (envelope-from ) id 1RljBQ-0003UO-Nk for emacs-orgmode@gnu.org; Fri, 13 Jan 2012 16:36:48 +0100 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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