
Quero criar um conteúdo capaz de se parecer com o seguinte:
A chapter page
1 section page
1.1 subsection1 page
subsubsection1 - subsubsection2
subsubsection3 - subsubsection4
1.2 subsection2 page
subsubsection1 - subsubsection2
A subsubseção não deve ser numerada e exibida em uma lista que envolve as linhas subsequentes e deve ser separada por hífens.
Tive sucesso com a numeração de capítulos e seções, mas não tenho ideia de como conseguir o estilo de subsubseção. Alguma ideia? Para capítulo e seção eu uso
\renewcommand\thechapter{\Alph{chapter}}
\renewcommand{\thesection}{\arabic{section}}
Obrigado pela ajuda
Responder1
Você pode usar otitletoc
pacote para isso:
O código:
\documentclass{book}
\usepackage{titletoc}
\renewcommand\thechapter{\Alph{chapter}}
\renewcommand{\thesection}{\arabic{section}}
\titlecontents*{subsubsection}
[7em]
{\small}
{\thecontentslabel}
{}
{}
[~---\ ]
\setcounter{tocdepth}{3}
\begin{document}
\tableofcontents
\chapter{A test chapter}
\section{A test section}
\subsection{A test subsection}
\subsubsection{Test subsubsection one one}
\subsubsection{Test subsubsection one two}
\subsubsection{Test subsubsection one three}
\subsubsection{Test subsubsection one four}
\subsection{Another test subsection}
\subsubsection{Test subsubsection two one}
\subsubsection{Test subsubsection two two}
\subsubsection{Test subsubsection two three}
\subsubsection{Test subsubsection two four}
\subsubsection{Test subsubsection two five}
\subsection{Yet another test subsection}
\subsubsection{Test subsubsection three one}
\end{document}
Atualizar
Num comentário foi solicitado adicionar o número da página após o título; aqui está uma maneira de fazer isso; Adicionei uma vírgula e um espaço inseparável entre o título e o número da página (ajuste de acordo com a necessidade):
\documentclass{book}
\usepackage{titletoc}
\renewcommand\thechapter{\Alph{chapter}}
\renewcommand{\thesection}{\arabic{section}}
\titlecontents*{subsubsection}
[7em]
{\small}
{\thecontentslabel}
{}
{,~\thecontentspage}
[~---\ ]
\setcounter{tocdepth}{3}
\begin{document}
\tableofcontents
\chapter{A test chapter}
\section{A test section}
\subsection{A test subsection}
\subsubsection{Test subsubsection one one}
\subsubsection{Test subsubsection one two}
\subsubsection{Test subsubsection one three}
\subsubsection{Test subsubsection one four}
\subsection{Another test subsection}
\subsubsection{Test subsubsection two one}
\subsubsection{Test subsubsection two two}
\subsubsection{Test subsubsection two three}
\subsubsection{Test subsubsection two four}
\subsubsection{Test subsubsection two five}
\subsection{Yet another test subsection}
\subsubsection{Test subsubsection three one}
\end{document}