如何调整目录中章节的字体大小?

如何调整目录中章节的字体大小?

我正在使用以下软件包准备我的论文。输出中出现的目录如上传的图所示。章节标题异常大,我想缩小它。请帮忙。

\documentclass[12pt,a4paper,oneside]{Thesis}
\graphicspath{figures/}  
\usepackage{verbatim}
\usepackage{vector}
\usepackage{hyperref}
\hypersetup{colorlinks=true, citecolor=red}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{mathrsfs}
\usepackage{wrapfig}
\usepackage{epsfig}
\usepackage{setspace}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{textcomp}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{subfigure,caption,multirow}
\usepackage{subcaption}
\usepackage{pifont}
\usepackage{xcolor}
\usepackage{enumitem} 
\usepackage{soul}
\usepackage{bm}
\usepackage{etoolbox}
\definecolor{myblue}{RGB}{0,29,119}
\newcommand{\itemcolor}[1]{% Update list item colour
\renewcommand{\makelabel}[1]{\color{#1}\hfil ##1}}
\usepackage[capitalise]{cleveref}
\usepackage{float}
\linespread{1.3}
\usepackage{graphics,psfrag}
\usepackage{graphicx,psfrag}
\usepackage{cite}
\usepackage{blindtext}

\begin{document}
\frontmatter    

\newpage
\pagenumbering{roman}
\pagestyle{plain}

\tableofcontents

内容输出

答案1

您应避免在每次调用\chapter或任何部分单元时设置与字体相关的设置;最好坚持常规语义用法并全局定义此类格式选项。这样可以实现更好的一致性,并便于将来更新/更改。

尝试以下任一选项(因为Thesis可能不允许某些...):

  • 如果Thesis基于book或者report,补丁\@makechapterhead\@makeschapterheadetoolbox

    % ...
    \usepackage{etoolbox}
    \makeatletter
    \patchcmd{\@makechapterhead}% <cmd>
      {\huge}% <search>
      {\Huge}% <replace>
      {}{}% <success><failure>
    \patchcmd{\@makeschapterhead}% <cmd>
      {\huge}% <search>
      {\Huge}% <replace>
      {}{}% <success><failure>
    \makeatletter
    % ...
    \chapter{...}
    
  • 使用sectsty(或者相似的):

    % ...
    \usepackage{sectsty}
    \chapterfont{\Huge}
    % ...
    \chapter{...}
    
  • 手动更新\chapter包括\Huge

    % ...
    \usepackage{xparse}
    \let\oldchapter\chapter% Store \chapter in \oldchapter
    \RenewDocumentCommand{\chapter}{s o m}{%
      \IfBooleanTF{#1}
        {\oldchapter*{\Huge #3}}% \chapter*{...}
        {\IfValueTF{#2}
           {\oldchapter[#2]{\Huge #3}}% \chapter[..]{...}
           {\oldchapter[#3]{\Huge #3}}% \chapter{...}
        }%
    }
    % ...
    \chapter{...}
    
  • 暂时更新\huge(默认章节字体大小)\Huge

    % ...
    \usepackage{xparse}
    \let\oldchapter\chapter% Store \chapter in \oldchapter
    \let\oldhuge\huge% Store \huge in \oldhuge
    \RenewDocumentCommand{\chapter}{s o m}{%
      \let\huge\Huge% Update \huge to be \Huge
      \IfBooleanTF{#1}
        {\oldchapter*{#3}}% \chapter*{...}
        {\IfValueTF{#2}
           {\oldchapter[#2]{#3}}% \chapter[..]{...}
           {\oldchapter{#3}}% \chapter{...}
        }%
      \let\huge\oldhuge% Restore \huge font
    }%
    % ...
    \chapter{...}
    
  • 手动提供非\Huge可选参数:

    \chapter[<main title>]{\Huge <main title>}
    

相关内容