TOC에 테이블의 일부 섹션 추가

TOC에 테이블의 일부 섹션 추가

나는 5페이지에 걸쳐 펼쳐지는 긴 테이블 "longtblr"을 사용합니다. 테이블은 \section 아래에 있습니다. 테이블에는 많은 매개변수가 있는 여러 주제가 있습니다. 즉, ITEM_a에 대한 10개 행과 ITEM_b에 대한 30개의 행을 의미합니다. .... TOC에서는 테이블의 시작 부분에만 도달할 수 있습니다. 예를 들어 필요한 주제가 테이블 끝에 있으므로 5페이지 아래로 스크롤해야 합니다.

주요 섹션 아래 목차에 표시되는 테이블 링크나 하위 섹션에 어떻게 추가할 수 있습니까?

미리 감사드립니다.

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

답변1

ITEM_…왜 표 목록 대신 목차 를 원하는지는 매우 불분명하지만 , 당신은 상사입니다…

\addcontentsline평소와 같이 목차에 항목을 추가하는 데 사용할 수 있습니다 . 귀하의 경우에는 레벨을 사용하는 것이 가장 합리적이므로 subsection다음을 사용해야 합니다.

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

등.

또한 항목을 생성하려면 다음 명령을 사용하는 것이 좋습니다.

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

여기에 이미지 설명을 입력하세요

그냥 의견입니다. 수직선과 수평선이 많은 테이블은 보기에도 좋지 않을 뿐만 아니라 인쇄상으로도 의심스럽습니다. 두 개의 열과 일종의 (숫자) 항목이 있는 테이블의 경우 종종 다음을 사용하는 열거 목록이 사용됩니다.패키지enumitem더 나은 솔루션입니다.

관련 정보