
解決策章番号付き目次の LOF+LOT+BIB私の場合は機能しません。
確かに私は他の人のテンプレートを使用しました。彼のコードで PDF を作成すると、上記のセクションはすべて番号が付けられます。しかし、自分のコードの PDF を作成すると、これらのセクションは番号なしのままになります。これは望ましくありません。誰か助けてくれませんか? 逆効果の usepackage に依存しているのではないかと思います。
コードは次のとおりです:
\documentclass[10pt,a4paper,bibliography=totocnumbered,listof=totocnumbered]{scrartcl}
\usepackage[tocbibind]
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage[subfigure,titles]{tocloft}
\usepackage{caption}
\setcounter{tocdepth}{2}
\renewcommand\cftchapafterpnum{\vskip8pt}
\renewcommand\cftsecafterpnum{\vskip10pt}
\usepackage{listings}
\lstset{basicstyle=\footnotesize, captionpos=b, breaklines=true, showstringspaces=false, tabsize=2, frame=lines, numbers=left, numberstyle=\tiny, xleftmargin=3em, framexleftmargin=3.0em}
\makeatletter
\def\l@lstlisting#1#2{\@dottedtocline{1}{0em}{1em}{\hspace{2,0em} Lst. #1}{#2}}
\makeatother
\geometry{a4paper, top=28mm, left=31mm, right=28mm, bottom=26mm, headsep=4mm, footskip=4mm}
\begin{document}
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\renewcommand{\contentsname}{II Contents}
\phantomsection
\addtocounter{section}{1}
\tableofcontents
\pagebreak
\listoffigures
\pagebreak
\listoftables
\pagebreak
\noindent\section{List of Acronyms}
\begin{acronym}
\setlength{\itemsep}{-\parsep}
\acro{CEO}{Chief Executive Officer}
\end{acronym}
\newpage
\setcounter{section}{0}
\renewcommand\refname{0. Introduction}
\section{{\Large Introduction}}
\markright{Introduction}
\phantomsection
\addcontentsline{toc}{section}{0. Introduction}
\addtocontents{toc}{\vspace{-0.5em}}
Lorem ipsum...
\newpage
\setcounter{section}{1}
\renewcommand\refname{Chapter 1}
\section*{{\Large Chapter 1}}
\markright{Chapter 1}
\phantomsection
\addcontentsline{toc}{section}{Chapter 1}
\addtocontents{toc}{\vspace{-0.5em}}
Lorem Ipsum again
\end{document}
答え1
パッケージtocbibind
、、tocloft
はKOMA クラスでは推奨されtitlesec
ませfancyhdr
ん。これらは標準クラスにはない機能を提供します。KOMA-script はこれらの機能を提供しますが、前述のパッケージによってオーバーロードされます。これらを使用しないことが解決策です。
上記のコードはテンプレートで見つかったと記載されています。このコードは非常に多くの奇妙な動作をするため、誰にも使用を勧めることはできません。
注意してください。多くのテンプレートは良くありません。