이런 방식으로 부품의 로마 숫자를 어떻게 정렬할 수 있습니까? 대안은 아랍어 열거형을 사용하는 것입니다. 나는 부품의 로마 숫자 정렬 외에는 고전학의 목차에서 어떤 변경도 하지 않을 것입니다.
\documentclass{scrreprt} % classe report di KOMA-Script;
\usepackage[%
pdfspacing,% % migliora il riempimento di riga
linedheaders,%
dottedtoc,%
parts% % da decommentare in un documento diviso in parti
]{classicthesis} % stile ClassicThesis
\hypersetup{hidelinks}
\begin{document}
\tableofcontents
\part{Test Part One}
\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}
\part{Test Part Two}
\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}
\part{Test Part Three}
\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}
\end{document}
답변1
\Part
다음은 정의된 대로 재정의를 사용하는 한 가지 가능한 솔루션입니다 classicthesis.sty
.
\documentclass{scrreprt}
\usepackage[%
pdfspacing,%
linedheaders,%
dottedtoc,%
parts%
]{classicthesis}
\hypersetup{bookmarksnumbered,hidelinks}
\makeatletter
\setlength\cftpartnumwidth{1.5em}
\renewcommand\Part[2][]{%
\addtocontents{toc}{\setcounter{tocdepth}{-2}}
\ifpdf\pdfstringdefDisableCommands{\let\thepart\@gobbletwo}%
\oldpart[\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}]{#2}
\else\oldpart[\spacedlowsmallcaps{#1}]{#2}%
\fi%
\addtocontents{toc}{\setcounter{tocdepth}{2}}%
\addcontentsline{toc}{part}{\protect\numberline{%
\hspace*{4pt}\texorpdfstring{\llap{\thepart}}{}}\texorpdfstring{\noexpand\spacedlowsmallcaps{#1}}{#1}}
\ctparttext{\relax}%
}%
\makeatother
\begin{document}
\tableofcontents
\part{Test Part One}
\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}
\part{Test Part Two}
\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}
\part{Test Part Three}
\chapter{Test Chapter One}
\section{Test Section One One}
\section{Test Section One Two}
\end{document}
답변2
다른 단면 명령과 달리 는 \part
ToC에서 해당 번호의 정렬을 사용하지 않습니다. 사용 시 다른 명령과 유사한 정렬이 가능합니다 ( 원본에서 에 \numberline
대한 값을 설정해야 함 ).\@tempdima
1.5em
3em
xpatch
ToC 동작을 수정하는 데 필요한 두 명령인 \l@part
및 를 패치하는 수단을 제공합니다 \@part
.
\documentclass{book}
\usepackage{xpatch}% http://ctan.org/pkg/xpatch
\makeatletter
\patchcmd{\l@part}{3em}{1.5em}{}{}% <cmd><search><replace><success><failure>
\xpatchcmd{\@part}{\thepart\hspace{1em}}{\protect\numberline{\ \llap{\thepart}}}{}{}% <cmd><search><replace><success><failure>
\makeatother
\begin{document}
\tableofcontents
\part{title}
\chapter{title}
\section{title}
\part{title}
\chapter{title}
\section{title}
\part{title}
\chapter{title}
\section{title}
\end{document}