TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently writing up my thesis and I have a section "content summary" in my introduction section. This gives an indication to what each section contains and is about. At the minute, each chapter / section is in text files, "introduction.tex", "background.tex" etc..

My question is whether or not, in each of the chapter ".tex" files - Can I add a tag like "\contentsummary" for each chapter which then get's inserted to the "content summary" section within the introduction file?

Sorry if this does not make sense.

share|improve this question
up vote 4 down vote accepted

You can use the collect package:





\section{Contents summary}

\section{Test section one}
\begin{contsummary}{Test section one}
This is the description of the first section. Here we add some more text for the example

\section{Test section two}
\begin{contsummary}{Test section two}
This is the description of the second section. Here we add some more text for the example

\section{Test section three}
\begin{contsummary}{Test section three}
This is the description of the third section. Here we add some more text for the example


enter image description here

I declared a collection contsum. For each \section, use the contsummary environment (which will add its contents to the collection) to enclose the corresponding summary. In the section containing the summaries all you have to do is to invoke \includecollection{contsum}. The mandatory argument for the contsummary environment is used to produce a heading in the contents summary section.

share|improve this answer
Yes this works :) Is it possible to have for example \textbf{Background Section} \\ This section provides the background..` so basically it would auto generate the header titles for the content? – Phorce Mar 22 '14 at 17:00
@user1326876 Sure. I modified the environment definition so now it has one mandatory argument in which you provide the title; this is automatically formatted as a proper heading in the contents summary. – Gonzalo Medina Mar 22 '14 at 17:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.