Adicione ao sumário alguma seção da tabela

Adicione ao sumário alguma seção da tabela

Eu uso uma longa tabela "longtblr" que se espalha em 5 páginas. A tabela está em \section. A tabela possui vários tópicos com muitos parâmetros: isso significa 10 linhas sobre ITEM_a e 30 linhas sobre ITEM_b, .... Do TOC posso chegar apenas ao início da tabela. E por exemplo, o tópico necessário está no final da tabela, preciso rolar 5 páginas para baixo.

Como posso adicionar links ou subseções à tabela, que aparecerão no sumário na seção principal?

Agradeço antecipadamente.

\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}

Responder1

Não está claro por que você quer o ITEM_…índice em vez da lista de tabelas, mas você é o chefe…

Como de costume, você pode usar \addcontentslinepara adicionar entradas ao índice. No seu caso faria mais sentido usar o subsectionnível, então você deve usar

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

etc.

Eu também sugeriria usar um comando para gerar os itens:

\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}

insira a descrição da imagem aqui

Apenas uma opinião: essas tabelas com muitas linhas verticais e horizontais não são apenas feias, mas também tipograficamente questionáveis. Para tabelas com duas colunas e um tipo de itens (numerados), geralmente uma lista de enumeração usandopacoteenumitemé a melhor solução.

informação relacionada