Agregar al TOC alguna sección de la tabla.

Agregar al TOC alguna sección de la tabla.

Utilizo una tabla larga "longtblr" que se extiende en 5 páginas. La tabla está bajo \sección. La tabla tiene varios temas con muchos parámetros: eso significa 10 filas sobre ITEM_a y 30 filas sobre ITEM_b, .... Desde TOC solo puedo llegar al principio de la tabla. Y, por ejemplo, el tema necesario está al final de la tabla, necesito desplazarme hacia abajo 5 páginas.

¿Cómo puedo agregar a la tabla enlaces o subsección, que aparecerán en TOC en la sección principal?

Gracias de antemano.

\documentclass{article}
\usepackage{blindtext}
\usepackage{titlesec}
\usepackage{longtable}
\title{Sections and Chapters}
\author{Gubert Farnsworth}
\date{ }
\begin{document}

\maketitle

\tableofcontents

\section{Introduction}


\begin{longtable}[c]{| c | c |}
\caption{Long table caption.\label{long}}\\
 \hline
 \multicolumn{2}{| c |}{Begin of Table}\\
 \hline
 Something & something else\\
 \hline
 \endfirsthead

 \hline
 \multicolumn{2}{|c|}{Continuation of Table \ref{long}}\\
 \hline
 Something & something else\\
 \hline
 \endhead

 \hline
 \endfoot

 \hline
 \multicolumn{2}{| c |}{End of Table}\\
 \hline\hline
 \endlastfoot

 ITEM\_a         & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
ITEM\_b             & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
ITEM\_c           & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
ITEM\_d           & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
ITEM\_e           & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
 \end{longtable}


\section{Second Section}

\blindtext
\end{document}

Respuesta1

No está del todo claro por qué quieres que aparezca ITEM_…en la tabla de contenido en lugar de en la lista de tablas, pero tú eres el jefe...

Como de costumbre, puede utilizar \addcontentslinepara agregar entradas a la tabla de contenido. En su caso, tendría más sentido usar el subsectionnivel, por lo que debería usar

\addcontentsline{toc}{subsection}{ITEM\_a}

etc.

También sugeriría usar un comando para generar los elementos:

\documentclass{article}
\usepackage{longtable}
\usepackage{blindtext}

\title{Sections and Chapters}
\author{Gubert Farnsworth}
\date{ }

\newcommand*\ITEM[1]{%
  \addcontentsline{toc}{subsection}{ITEM\_#1}% ToC entry
  ITEM\_#1% item
}

\begin{document}

\maketitle

\tableofcontents

\section{Introduction}


\begin{longtable}[c]{| c | c |}
\caption{Long table caption.\label{long}}\\
 \hline
 \multicolumn{2}{| c |}{Begin of Table}\\
 \hline
 Something & something else\\
 \hline
 \endfirsthead

 \hline
 \multicolumn{2}{|c|}{Continuation of Table \ref{long}}\\
 \hline
 Something & something else\\
 \hline
 \endhead

 \hline
 \endfoot

 \hline
 \multicolumn{2}{| c |}{End of Table}\\
 \hline\hline
 \endlastfoot

 \ITEM{a}         & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
\ITEM{b}             & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
\ITEM{c}           & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
\ITEM{d}           & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
\ITEM{e}           & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
                 & like this\\
 \end{longtable}


\section{Second Section}

\blindtext
\end{document}

ingrese la descripción de la imagen aquí

Sólo una opinión: este tipo de tablas con muchas líneas verticales y horizontales no sólo son feas sino también tipográficamente cuestionables. Para tablas con dos columnas y una especie de elementos (numerados), a menudo se utiliza una lista de enumeración.paqueteenumitemes la mejor solución.

información relacionada