我想知道如何更改目录中的字体大小。也许可以将其设为 14pt 或 16pt。
\documentclass[12pt]{report}
\begin{document}
\tableofcontents
\addcontentsline{toc}{chapter}{Introduction}
\addcontentsline{toc}{chapter}{Factoring the Group Determinant}
\addcontentsline{toc}{section}{Finite Abelian Groups}
\addcontentsline{toc}{chapter}{References}
\end{document}
答案1
您可以使用tocloft
包和命令系列\cftXfont
(用于章节编号和标题)和\cftXpagefont
(用于页码):
\documentclass[12pt]{report}
\usepackage{tocloft}
\renewcommand\cftchapfont{\LARGE\bfseries}
\renewcommand\cftsecfont{\LARGE}
\renewcommand\cftchappagefont{\LARGE\bfseries}
\renewcommand\cftsecpagefont{\LARGE}
\begin{document}
\tableofcontents
Some text in standard size just for comparison.
\addcontentsline{toc}{chapter}{Introduction}
\addcontentsline{toc}{chapter}{Factoring the Group Determinant}
\addcontentsline{toc}{section}{Finite Abelian Groups}
\addcontentsline{toc}{chapter}{References}
\end{document}
您可以\LARGE
使用任何其他字体大小开关或\fontsize{...}{...}\selectfont
。
重新定义家庭\cftXafterpnum
将为你提供更好的条目间距:
\documentclass[12pt]{report}
\usepackage{tocloft}
\renewcommand\cftchapfont{\LARGE\bfseries}
\renewcommand\cftsecfont{\LARGE}
\renewcommand\cftchappagefont{\LARGE\bfseries}
\renewcommand\cftsecpagefont{\LARGE}
\renewcommand\cftchapafterpnum{\par\addvspace{6pt}}
\renewcommand\cftsecafterpnum{\par\addvspace{6pt}}
\begin{document}
\tableofcontents
Some text in standard size just for comparison.
\addcontentsline{toc}{chapter}{Introduction}
\addcontentsline{toc}{chapter}{Factoring the Group Determinant}
\addcontentsline{toc}{section}{Finite Abelian Groups}
\addcontentsline{toc}{chapter}{References}
\end{document}
答案2
\usepackage{titlesec}
\usepackage[titletoc]{appendix}
% TABLE OF CONTENTS
\pagebreak
\renewcommand{\contentsname}{TABLE OF CONTENTS} % Rename ToC title
\renewcommand{\baselinestretch}{0.5}\normalsize % Adjust spacing of ToC
{\small \tableofcontents} % Set font size for ToC
\renewcommand{\baselinestretch}{1.0}\normalsize % Reset spacing for rest of document