1

I use suftesi for a book with several articles. The table of content for the book shows only the title of the articles. How do I change to include the sections as well?

My (reduced) code:

\documentclass[12pt
    , structure=collection
    , pagelayout=compactaureo
    , version=draft
    , headerstyle=inner
    , footnotestyle=bulged
    , liststyle=indented
    , revauthortitle=false  % to have the author after the title 
    , titlefont=roman
    ]{suftesi}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{natbib} 
\usepackage{csquotes}
\usepackage{amsmath}

\begin{document}
    \collectiontitle{ontobook}
    \collectioneditor {AUF}
    \tableofcontents
    \input{intro_papersSelected}
\end{document}

The article intro_papersSelected is:

\begin{article}
    \author { }
    \title{Introduction - The paper selected}
    \maketitle

\section{Papers to include:}
\begin{itemize}[align=left]
\item [{N}] The rationality of epistemology and the rationality of ontology.\\\\
Philosophers have proposed many different ontologies. 

\item [{K}] Ontology for spatio-temporal databases. \citet{frank03:9[TUW-119444]}
\end{itemize}

\section{test}
Towards a Mathematical Theory for Snapshot. In order to achieve
interoperability of \{GIS\}, the meaning of the 
data must be expressed in a compatible description. 

\end{article}

What must be changed to include the section names in the table of content? It currently lists only the article title Introduction - The paper selected and the page number.

If I add \chapter{exampletitle} in the article included then theexampletitle` is listed as 1 in the table of contents

2

Just add

\setcounter{tocdepth}{1}

before \begin{document}.

By the way, hyperref should be the last among the packages you load.

In the example I use filecontents in order to make it self-countained and to avoid clobbering my files.

\begin{filecontents}{\jobname-article}
\begin{article}
    \author { }
    \title{Introduction - The paper selected}
    \maketitle

\section{Papers to include:}
\begin{itemize}[align=left]
\item [{N}] The rationality of epistemology and the rationality of ontology.\\\\
Philosophers have proposed many different ontologies. 

\item [{K}] Ontology for spatio-temporal databases. \citet{frank03:9[TUW-119444]}
\end{itemize}

\section{test}
Towards a Mathematical Theory for Snapshot. In order to achieve
interoperability of \{GIS\}, the meaning of the 
data must be expressed in a compatible description. 

\end{article}
\end{filecontents}

\documentclass[
  12pt,
  structure=collection,
  pagelayout=compactaureo,
  version=draft,
  headerstyle=inner,
  footnotestyle=bulged,
  liststyle=indented,
  revauthortitle=false,  % to have the author after the title 
  titlefont=roman,
]{suftesi}
\usepackage[utf8]{inputenc}
\usepackage{natbib} 
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{hyperref} % should be last

\setcounter{tocdepth}{1}

\begin{document}

\collectiontitle{ontobook}

\collectioneditor {AUF}

\tableofcontents

\input{\jobname-article}

\end{document}

enter image description here

From the class documentation:

enter image description here

  • thank you for the solution and the hint to use filecontent and loading hyperref last. what is the best way to include the pdf output in a question? – user855443 Apr 19 '18 at 21:53
  • @user855443 I usually do a screenshot and include the PNG file. The filecontents environment is very useful for examples here (not for the production version); using \jobname avoids the risk of clobbering existing files. – egreg Apr 19 '18 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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