目录有问题,章节数与其名称重叠

目录有问题,章节数与其名称重叠

我的目录有问题,部分编号与其名称重叠,因为我对部分和子部分使用了较大的字体。有人知道我该如何改进这个问题吗,或者只是将数字稍微向左移动一点? 在此处输入图片描述

\documentclass[10pt,a4paper,twoside]{exam}
\usepackage{sectsty}
\usepackage{setspace}
\usepackage{tocloft}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    pdftitle={calosc}
    }
\usepackage{geometry}
\newgeometry{tmargin=2.6cm, bmargin=2.6cm, lmargin=2.5cm, rmargin=2.5cm}
\urlstyle{same}

\sectionfont{\LARGE}
\subsectionfont{\Large}
\subsubsectionfont{\large}
\paragraphfont{\large}

\renewcommand\cftsecfont{\LARGE\bfseries}
\renewcommand\cftsubsecfont{\Large}
\renewcommand\cftsubsubsecfont{\large}

\renewcommand\cftsecpagefont{\LARGE\bfseries}
\renewcommand\cftsubsecpagefont{\Large}
\renewcommand\cftsubsubsecpagefont{\large}
\setcounter{section}{9}
\begin{document}

\doublespacing
\tableofcontents
\singlespacing \newpage

\section{Section 1}
\subsection{Subsection 1.1}
\subsubsection{subsubsection 1.1.1}
\subsubsection{subsubsection 1.1.2}
\subsection{Subsection 1.2}
\subsection{Subsection 1.3}
\subsubsection{subsubsection 1.3.1}
\subsubsection{subsubsection 1.3.2}
\subsubsection{subsubsection 1.3.3}
\section{Section 2}
\end{document}

答案1

在您的代码中添加三个命令,它可以正常工作。

\usepackage{tocloft}
\addtolength{\cftsecnumwidth}{12pt}
\addtolength{\cftsubsecnumwidth}{12pt}

\documentclass[10pt,a4paper,twoside]{exam}
\usepackage{sectsty}
\usepackage{setspace}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    pdftitle={calosc}
    }
\usepackage{geometry}
\newgeometry{tmargin=2.6cm, bmargin=2.6cm, lmargin=2.5cm, rmargin=2.5cm}
\urlstyle{same}

\usepackage{tocloft}
\addtolength{\cftsecnumwidth}{12pt}
\addtolength{\cftsubsecnumwidth}{12pt}


\sectionfont{\LARGE}
\subsectionfont{\Large}
\subsubsectionfont{\large}
\paragraphfont{\large}

\renewcommand\cftsecfont{\LARGE\bfseries}
\renewcommand\cftsubsecfont{\Large}
\renewcommand\cftsubsubsecfont{\large}

\renewcommand\cftsecpagefont{\LARGE\bfseries}
\renewcommand\cftsubsecpagefont{\Large}
\renewcommand\cftsubsubsecpagefont{\large}
\setcounter{section}{9}
\begin{document}

\doublespacing
\tableofcontents
\singlespacing \newpage

\section{Section 1}
\subsection{Subsection 1.1}
\subsubsection{subsubsection 1.1.1}
\subsubsection{subsubsection 1.1.2}
\subsection{Subsection 1.2}
\subsection{Subsection 1.3}
\subsubsection{subsubsection 1.3.1}
\subsubsection{subsubsection 1.3.2}
\subsubsection{subsubsection 1.3.3}
\section{Section 2}
\end{document}

在此处输入图片描述

相关内容