From: tg <tg@tgbit.net>
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <20120113163654.0dc62705@tgbit.net> (raw)
In-Reply-To: <CAAPtUcVAfR4F8pkYW=cfkhVcCpmS+cdZcz3OnHC0jzHEoqpr3w@mail.gmail.com>
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 parent reply other threads:[~2012-01-13 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-12 20:28 funny problem for table of contents when publishing org-latex with #+INCLUDE other.org jack song
2012-01-13 15:36 ` tg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120113163654.0dc62705@tgbit.net \
--to=tg@tgbit.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).