
Quiero crear una capa de contenidos que se parezca a la siguiente:
A chapter page
1 section page
1.1 subsection1 page
subsubsection1 - subsubsection2
subsubsection3 - subsubsection4
1.2 subsection2 page
subsubsection1 - subsubsection2
La subsubsección no debe estar numerada y debe mostrarse en una lista que se ajuste a las líneas siguientes y debe estar separada por guiones.
Tuve éxito con la numeración de capítulos y secciones, pero no tengo idea de cómo lograr el estilo de subsubsección. ¿Algunas ideas? Para el capítulo y la sección uso
\renewcommand\thechapter{\Alph{chapter}}
\renewcommand{\thesection}{\arabic{section}}
Gracias por la ayuda
Respuesta1
Puedes usar eltitletoc
paquete para esto:
El 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}
Actualizar
En un comentario se solicitó agregar el número de página después del título; aquí hay una manera de hacerlo; Agregué una coma y un espacio irrompible entre el título y el número de página (ajustar según las necesidades):
\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}