将章节标题的行距设置为单倍行距、半倍行距或四分之一行距

将章节标题的行距设置为单倍行距、半倍行距或四分之一行距

我有跨两行的章节标题,我希望行间距约为现在的四分之一。由于这些标题列在目录中,因此行间距是完美的。我知道 stackexchange 上也问过同样的问题。以下是其中一个问题的链接。

段落双倍行距,标题单倍行距

答案中的代码没有给我单倍行距。

以下是主文件的代码。我使用“\include”命令来包含简介和两章内容。

\documentclass[10pt, oneside]{book}

% packages
\usepackage{amssymb, amsmath, amsthm}

% these make top, right, bottom margins confirming to the requirements

\usepackage[a4paper,bindingoffset=0.0in,%
left=1.5in,right=1in,top=1in,bottom=1in,%
footskip=.25in]{geometry}

\usepackage{setspace}
\usepackage{blindtext}

% small stuff
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{mathbbol}
\usepackage{hyperref}
\urlstyle{same}

\usepackage{footnote}

\hypersetup{colorlinks,linkcolor={black},citecolor={black},urlcolor={black}}

\usepackage{microtype}
% \usepackage{showkeys}
% uncomment this when editing cross-references
\numberwithin{equation}{section}

%This makes the chapters start with a 2" margin
\makeatletter
\renewcommand*\@makechapterhead[1]{%
    \vspace*{0.75in}%
    {\parindent \z@ \raggedright \normalfont
        \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
        \fi
        \interlinepenalty\@M
        \Huge \bfseries #1\par\nobreak
        \vskip 40\p@
}}
\renewcommand*\@makeschapterhead[1]{%
    \vspace*{0.75in}%
    {\parindent \z@ \raggedright
        \normalfont
        \interlinepenalty\@M
        \Huge \bfseries  #1\par\nobreak
        \vskip 40\p@
}}
\makeatother


%------------------------------------------------




% doesn't count introduction when numbering theorems, etc.
\setcounter{chapter}{0}

% makes page numbers appear
\pagestyle{plain}


\begin{document}

% makes the page numbers roman numerals, doesn't count
% these pages in the table of contents
\frontmatter

\thispagestyle{empty}

\vbox to 1truein{}

\centerline{Fairy Tales throughout History}



\vskip 200pt

\centerline{BY}
\vskip 10pt

\centerline{A Storyteller}
\vskip 10pt

\centerline{BA, Bard College}
\centerline{MA, Columbia University}

\vskip 215pt

\centerline{DISSERTATION}
\vskip 10pt

\centerline{Submitted in partial fulfillment of the requirements for}
\centerline{the degree of Doctor of Philosophy in English}
\centerline{in the Graduate School of}
\centerline{Columbia University}


\newpage


\thispagestyle{empty}

\vbox to 8.5truein{}

\centerline{\copyright\ Copyright by A Storyteller 2023}

\

\centerline{All Rights Reserved}

\newpage



\chapter*{Abstract}
\begin{doublespace}
Fairy tales' rich, imaginative stories for children~---~involving fantastical creatures and exotic places~---~offer far more than entertainment and happily-ever-after endings. They furnish children with a landscape for critical thinking skills and a context in which children can evaluate their own emotions and decision making.
\end{doublespace}


\newpage

\chapter*{Dedication}
\bigskip

\centerline{Dedicated to the Grimm Brothers and Hans Christian Anderson}

\newpage

\chapter*{Acknowledgements}
I wish to thank Walt Disney for animating various fairy tales in full color.


\newpage

\tableofcontents

% Changes page numbers to regular numbers, resets the counter
\mainmatter

%This gives 10pt font with 20pt spacing, text from here should be double spaced
\fontsize{10}{20pt} \selectfont

% \include puts in the .tex file with the given name
% make sure that these files don't have any preamble material

\begin{doublespacing}

\include{Introduction_February_18}

\include{Chapter_1_February_18}

\include{Chapter_2_February_18}

\end{doublespacing}

% add a new chapter without a chapter # for the references
\addcontentsline{toc}{chapter}{Bibliography}

\begin{thebibliography}{9}

\bibitem[Southey 1837]{Southey}Robert Southey, \emph{The Doctor},  Longman, Rees, Orme, Brown, Green and Longman, London, England, 1837, pages 318-326

\end{thebibliography}



\end{document}

这是“Introduction_February_18”的代码。

%
%
%
% Introduction
%
%

% make introduction a chapter without a #
\chapter*{Introduction (In case I decide to have a more descriptive name for the introduction, I want it to be single spaced or maybe half-line spaced)}

% and include it on the table of contents
\addcontentsline{toc}{chapter}{Introduction}


We will look at various fairy tales and myths in civilizations throughout history!

这是“Chapter_1_February_18”的代码。

%
%  Chapter 1
%
%
%
%
%
\chapter{Fairy Tales from Ancient Greece (I want the title of this chapter to be single spaced or maybe half-line spaced)}
\label{ch1}
%The label lets you refer to the chapter by number later.




\section{Theogony: Clash of the Titans (Ya know - I also want the title of this section to be single spaced or maybe half-line spaced)}
\label{s1.1}

Talk some more.

\subsection{A Subsection Title}
\label{ss1.1.1}

Be specific.


\subsection{Another Subsection Title}
\label{ss1.1.2}


\section{Prometheus and the Theft of Fire (Single spaced or maybe half-line spaced)}
\label{s1.2}

Talk it up.

% you can do the same with sections, just * them and add them to the contents if you want.



\section{Pandora’s Box (Same here - single spaced or maybe half-line spaced)}

Keep going


\section{The Abduction of Persephone by Hades (Same here - single spaced or maybe half-line spaced)}

Way to go!

这是“Chapter_2_February_18”的代码。

%
%  Chapter 2
%
%
%
%
%
\chapter{Fairy Tales from Ancient Rome (I want the title of this chapter to be single spaced or maybe half-line spaced)}
\label{ch2}
% the label lets you refer to the chapter by number later.

Talk a little. \cite{keyword1}

\section{Romulus and Remus}

{\em Pages of exposition.}

\section{Aeneas (by the poet Virgil)}

{\em Pages of exposition.}
\label{s2.1}

Talk a lot.


\section{Scaevola}

{\em Pages of exposition.}
\label{s2.2}

Do it again.

\section{The Legend of Lucretia}

{\em Pages of exposition.}

答案1

看来您需要加载titlesec包并在序言中添加以下几行。

\titleformat{\chapter}[display]
    {\singlespacing\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
    {\singlespacing\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
    {\singlespacing\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
    {\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}

这些宏将“singlespacing”插入到每个相应部分的格式字段中。文献在第 3 页和第 4 页提供了有关宏本身的详细信息,并在第 24 页提供了标准格式的示例。

编辑。附注:对于自定义行距,更改\singlespacing\setstretch{<factor>}<factor>等于1.0对应于单倍行距。任何大于的值1.0都会增加行距。

答案2

这是主文件,正如 所建议的Celdor。这确实给了我章节标题中想要的行间间距……但“简介”中一个单词的标题超出了右边距,几乎到达了页面的右边缘。

\documentclass[10pt, oneside]{book}

% packages
\usepackage{amssymb, amsmath, amsthm}
%This package allows Chapter titles to be single spaced.
\usepackage{titlesec}
\titleformat{\chapter}[display]
    {\setstretch{0.25}\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
    {\setstretch{0.25}\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
    {\singlespacing\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
    {\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}

% these make top, right, bottom margins confirming to the requirements

\usepackage[a4paper,bindingoffset=0.0in,%
left=1.5in,right=1in,top=1in,bottom=1in,%
footskip=.25in]{geometry}

\usepackage{setspace}
\usepackage{blindtext}

% small stuff
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{mathbbol}
\usepackage{hyperref}
\urlstyle{same}

\usepackage{footnote}

\hypersetup{colorlinks,linkcolor={black},citecolor={black},urlcolor={black}}

\usepackage{microtype}
% \usepackage{showkeys}
% uncomment this when editing cross-references
\numberwithin{equation}{section}




%------------------------------------------------




% doesn't count introduction when numbering theorems, etc.
\setcounter{chapter}{0}

% makes page numbers appear
\pagestyle{plain}


\begin{document}

% makes the page numbers roman numerals, doesn't count
% these pages in the table of contents
\frontmatter

\thispagestyle{empty}

\vbox to 1truein{}

\centerline{Fairy Tales throughout History}



\vskip 200pt

\centerline{BY}
\vskip 10pt

\centerline{A Storyteller}
\vskip 10pt

\centerline{BA, Bard College}
\centerline{MA, Columbia University}

\vskip 215pt

\centerline{DISSERTATION}
\vskip 10pt

\centerline{Submitted in partial fulfillment of the requirements for}
\centerline{the degree of Doctor of Philosophy in English}
\centerline{in the Graduate School of}
\centerline{Columbia University}


\newpage


\thispagestyle{empty}

\vbox to 8.5truein{}

\centerline{\copyright\ Copyright by A Storyteller 2023}

\

\centerline{All Rights Reserved}

\newpage



\chapter*{Abstract}
\begin{doublespace}
Fairy tales' rich, imaginative stories for children~---~involving fantastical creatures and exotic places~---~offer far more than entertainment and happily-ever-after endings. They furnish children with a landscape for critical thinking skills and a context in which children can evaluate their own emotions and decision making.
\end{doublespace}


\newpage

\chapter*{Dedication}
\bigskip

\centerline{Dedicated to the Grimm Brothers and Hans Christian Anderson}

\newpage

\chapter*{Acknowledgements}
I wish to thank Walt Disney for animating various fairy tales in full color.


\newpage

\tableofcontents

% Changes page numbers to regular numbers, resets the counter
\mainmatter

%This gives 10pt font with 20pt spacing, text from here should be double spaced
\fontsize{10}{20pt} \selectfont

% \include puts in the .tex file with the given name
% make sure that these files don't have any preamble material

\begin{doublespacing}

\include{Introduction_February_18}

\include{Chapter_1_February_18}

\include{Chapter_2_February_18}

\end{doublespacing}

% add a new chapter without a chapter # for the references
\addcontentsline{toc}{chapter}{Bibliography}

\begin{thebibliography}{9}

\bibitem[Southey 1837]{Southey}Robert Southey, \emph{The Doctor},  Longman, Rees, Orme, Brown, Green and Longman, London, England, 1837, pages 318-326

\end{thebibliography}



\end{document}

相关内容