部分前页的章节标题采用双倍行距

部分前页的章节标题采用双倍行距

我使用的是latextemplates.com并对其进行了一些修改,使其具有人文风格的写作风格。

不过,我注意到在前言中,我的缩写页的章节标题在文本周围的间距似乎比其他前言页标题(如目录或图表列表)更宽。我认为这与页面使用表格有关(这可能完全是错误的!)。如下所述,模板有自己的 .cls,我查看了它,但找不到任何解决方案。

我有一个粗略的 mwe,应该可以突出显示该问题。不幸的是,您必须使用模板中的 Thesis.cls 进行编译。我尝试在文章类中重现该问题,或者通过将 .cls 引入 mwe 来重现该问题,但我是个新手,并且遇到了太多错误。如果我需要以任何方式编辑我的 MWE,请告诉我。

我正在寻找一种解决方案,使缩写页面上的标题与我的 mwe 中的其他页面相同。

\documentclass[12pt,a4paper]{Thesis}
\usepackage[utf8]{inputenc}
\usepackage[Sonny]{fncychap}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{}{}{}% Removes space above \chapter head
\patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{}{}{}% Removes space above \chapter* head
\makeatother
\usepackage [UKenglish,american,british]{babel} %‘‘american’’ goes last, as main option.
\usepackage [babel=once,english=british]{csquotes} %Sets quote style once for whole document
%American quote style
\usepackage[notes, backend=biber, bookpages=false]{biblatex-chicago}
\begin{document}

%------------------------------------------------------------------------------------
%   LIST OF FIGURES/TABLES PAGES
%----------------------------------------------------------------------------------------
\pagestyle{fancy} % The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back

\lhead{\emph{List of Figures}} % Set the left side page header to "List of Figures"
\listoffigures % Write out the List of Figures

%----------------------------------------------------------------------------------------
%   ABBREVIATIONS
%----------------------------------------------------------------------------------------
\clearpage % Start a new page

\lhead{\emph{Abbreviations}} % Set the left side page header to "Abbreviations"

\setstretch{1.5} % Set the line spacing to 1.5, this makes the following tables easier to read

\listofsymbols{ll} % Include a list of Abbreviations (a table of two columns)
{
%\textbf{Acronym} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or \\
\textbf{UN} & \textbf{U}nited \textbf{N}ations \\ 
\textbf{UK} & The \textbf{U}nited \textbf{K}ingdom of Great Britain and Northern Ireland\\
\textbf{US} & The \textbf{U}nited \textbf{S}tates of America\\
}

\end{document}

如果有任何帮助的话,这似乎是 Thesis.cls 文件中处理缩写的相关部分。

\newcommand\listsymbolname{Abbreviations}
\usepackage{longtable}
\newcommand\listofsymbols[2]{
\btypeout{\listsymbolname}
\addtotoc{\listsymbolname}
    \chapter*{\listsymbolname
      \@mkboth{
          \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
\begin{longtable}[c]{#1}#2\end{longtable}\par
    \cleardoublepage
}

答案1

我建议根据和的实现定义一个新的环境loflot需要注意的是,类文件中的每一件事都是用手,没有自动化(辅助宏)。这使得维护起来非常困难,并且会导致奇怪的事情(就像您所描述的那样)。

\documentclass[12pt,a4paper,oneside]{Thesis}
\usepackage[utf8]{inputenc}
\usepackage[Sonny]{fncychap}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{}{}{}
\patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{}{}{}
\makeatother


\makeatletter
\newenvironment{patchedlistofsymbols}[1]{%
    \begingroup%
    \singlespacing%
            \setlength{\parskip}{1pt}%
            \if@twocolumn%
            \@restonecoltrue\onecolumn%
            \else%
            \@restonecolfalse%
            \fi%
            \chapter*{\listsymbolname}%
            \addtotoc{\listsymbolname}%
\endgroup%  <- Note the difference
            \@mkboth{\MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}%
                \begin{longtable}{#1}\ignorespaces
        }{\end{longtable}\cleardoublepage}%
\makeatother

\usepackage{pgffor}
\usepackage{blindtext}


\begin{document}

\pagestyle{fancy} 
\tableofcontents
%\lhead{\emph{List of Figures}} 
\listoffigures 


%\lhead{\emph{Abbreviations}} 

%amend that to your needs

\begin{patchedlistofsymbols}{ll}
%\textbf{Acronym} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or \\
\textbf{UN} & \textbf{U}nited \textbf{N}ations \\ 
\textbf{UK} & The \textbf{U}nited \textbf{K}ingdom of Great Britain and Northern Ireland\\
\textbf{US} & The \textbf{U}nited \textbf{S}tates of America\\
\end{patchedlistofsymbols}
\chapter{Some real content}
\blindtext
\begin{figure}
    \foreach \x in {1,...,50}{\caption{caption \x}}
\end{figure}
\end{document}

所有这些标题只是显示,列表命令自行标记头部,无需用户交互。

相关内容