titletoc이 포함된 목차는 첫 페이지 이후 잘립니다.

titletoc이 포함된 목차는 첫 페이지 이후 잘립니다.

titletoc을 삽입하고 목차를 변경한 후 첫 번째 페이지가 가득 차면 ToC가 종료됩니다. 이 설정을 추가하기 전에 자동으로 새 페이지가 시작되었습니다.

내 목차는 다음과 같습니다. 여기에 이미지 설명을 입력하세요 보시다시피 8.3에서는 표가 잘려서 다음 페이지에서 계속되지 않습니다.

이것은 내 코드입니다.

\documentclass[fontsize=9pt, BCOR=5mm, ngerman, paper=a4]{scrreprt}
%+------------------------------------------------------------------------------+
%| packages einbinden                                                             |
%+------------------------------------------------------------------------------+

\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes} 
\usepackage{fontspec}
\usepackage{hyperref}
\usepackage{framed}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{titletoc}
\usepackage{scrpage2}
\usepackage{lastpage}
\usepackage{geometry}
\usepackage{float}
\usepackage{tocloft}
\usepackage{csquotes}
%+------------------------------------------------------------------------------+
%| settings                                                               |
%+------------------------------------------------------------------------------+

% —– titletoc - format ToC —– %
\titlecontents{chapter}[1.5em]{\addvspace{1pc}\bfseries}{\contentslabel{1.5em}}
{\hspace*{-1.5em}}{\titlerule*[0.3pc]{.}\contentspage}
\titlecontents{section}[3.7em]{}{\contentslabel{2.2em}}{}
{\titlerule*[0.3pc]{.}\contentspage}
\titlecontents{subsection}[6.7em]{}{\contentslabel{2.95em}}{}
{\titlerule*[0.3pc]{.}\contentspage}

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
% —– End: format ToC —– %

%+------------------------------------------------------------------------------+
%| document                                                    |
%+------------------------------------------------------------------------------+
\begin{document}
\tableofcontents

 \chapter{ 1 }
   Some example Text
  \section{1.1}
  \section{1.2}
  \section{1.3}
  \section{1.4}

 \chapter{ 2 }
  \section{2.1}
  \section{2.2}
  \section{2.3}
  \section{2.4}
  \section{2.5}

 \chapter{ 3 }
   ...
\end{document}

내 titletoc 형식에 대한 일부 옵션이 누락된 것 같지만 이를 수정하는 방법을 모르겠습니다.

답변1

패키지를 사용하여 titletocTOC를 포맷하려면 패키지를 제거하십시오 tocloft.

\documentclass[fontsize=9pt, BCOR=5mm, ngerman, paper=a4,DIV=calc]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes} 
\usepackage{fontspec}
\usepackage{hyperref}
\usepackage{framed}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{titletoc}
\usepackage{scrlayer-scrpage}% replaces the outdated scrpage2
\usepackage{lastpage}
\usepackage{geometry}
\usepackage{float}
\usepackage{scrhack}% if package float is really needed, load scrhack too
\usepackage{csquotes}

% —– titletoc - format ToC —– %
\titlecontents{chapter}[1.5em]{\addvspace{1pc}\bfseries}{\contentslabel{1.5em}}
{\hspace*{-1.5em}}{\titlerule*[0.3pc]{.}\contentspage}
\titlecontents{section}[3.7em]{}{\contentslabel{2.2em}}{}
{\titlerule*[0.3pc]{.}\contentspage}
\titlecontents{subsection}[6.7em]{}{\contentslabel{2.95em}}{}
{\titlerule*[0.3pc]{.}\contentspage}

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

\begin{document}
\tableofcontents
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\end{document}

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

KOMA-Script 클래스는 scrreprt패키지를 tocbasic자동으로 로드합니다. 따라서 titletoc너무 제거하고 다음과 같은 것을 사용하는 것이 더 나을 수도 있습니다.

\documentclass[fontsize=9pt, BCOR=5mm, ngerman, paper=a4,DIV=calc]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes} 
\usepackage{fontspec}
\usepackage{hyperref}
\usepackage{framed}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{scrlayer-scrpage}% replaces the outdated scrpage2
\usepackage{lastpage}
\usepackage{geometry}
\usepackage{float}
\usepackage{scrhack}% if package float is really needed, load scrhack too
\usepackage{csquotes}

\RedeclareSectionCommand[
  toclinefill=\TOCLineLeaderFill,
  tocbeforeskip=1pc
]{chapter}
\RedeclareSectionCommand[
  tocnumwidth=2.2em
]{section}
\RedeclareSectionCommand[
  tocindent=3.75em,
  tocnumwidth=2.95em
]{subsection}

\makeatletter
\show\@dotsep
\renewcommand\@dotsep{1}
\makeatother

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

\begin{document}
\tableofcontents
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\chapter{A Chapter}
\section{A Section}\section{A Section}\section{A Section}\section{A Section}
\section{A Section}\section{A Section}\section{A Section}
\end{document}

관련 정보