如何才能在所有章节中让章节号和章节标题之间的垂直间距相同?当标题超过一行时,章节号和章节标题之间的间距会减小。在这种情况下,我希望间距与标题只有一行时相同。
\documentclass[12 pt, a4paper]{report}
\usepackage{thesis}
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\fontsize{12}{15}\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontsize{12}{15}\bfseries}{\thesubsection}{1em}{}
\begin{document}
\chapter{Vertical Spacing}
\end{document}
文件thesis.sty
如下所示。
\usepackage{ifthen}
\setlength{\topmargin}{0.0cm} \setlength{\headheight}{.8cm}
\setlength{\headsep}{.4cm} \setlength{\textheight}{23.5cm}
\setlength{\textwidth}{15 cm}
\setlength{\hoffset}{0.0cm}
\setlength{\voffset}{-1cm}
\def\chapter{\newpage\thispagestyle{plain}\secdef\CHAPa\CHAPb}
\def\CHAPa[#1]#2{%
\refstepcounter{chapter}
\addtocontents{lof}{\protect\addvspace{10pt}}%
\addtocontents{lot}{\protect\addvspace{10pt}}%
\addcontentsline{toc}{chapter}%
{\chaptername{\protect\ \thechapter: #1}}%
\renewcommand{\KM}{#2}
{{\centering \chaptername\ \thechapter \par}
{ \centering #2\par}}
\vspace{\baselineskip}}
\def\CHAPb#1{%
{ \centering #1\par}
\vspace{\baselineskip}}
\newcommand{\KM}{Introduction}
\newcommand{\sectionThesis}[1]{\renewcommand{\KM}{\sf #1}\section{#1}}
\newlength{\defbaselineskip}
\setlength{\defbaselineskip}{\baselineskip}
\newcommand{\setlinespacing}[1]%
{\setlength{\baselineskip}{#1 \defbaselineskip}}
\newcommand{\doublespacing}{\setlength{\baselineskip}%
{2.0 \defbaselineskip}}
\newcommand{\singlespacing}{\setlength{\baselineskip}{\defbaselineskip}}
\setlength{\parindent}{10pt}
\usepackage{amsmath,amssymb,amsthm}
\numberwithin{equation}{section}
\renewcommand{\theequation}{\thesection.\arabic{equation}}
\bibliographystyle{amsplain}