I have titles to chapters and sections that span two lines, and I want the interline spacing to be about a quarter of what it is now. As these titles are listed in the Table of Contents, the interline spacing is perfect. I know that this same question has been asked on stackexchange. Here is a link to one of them.
Double-spaced paragraphs, single-spaced headers
The code in the answers did not get me single spacing.
Here is the code for the main file. I use the "\include" command to include an introduction and two chapters.
\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}
Here is the code for "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!
Here is the code for "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!
Here is the code for "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.}
\singlespacingwith\setstretch{0.25}... but I had to delete the commands in the preamble in the code in my original post between\makeatletterand\makeatotherto get the spacing that I wanted. – user143462 Feb 19 '23 at 19:17titlesecand would not mix it up with other solutions as I find it more convenient. I run your new code and don't see problems with words exceeding the right margin. Are you using different fonts or load different language? BTW, you need to add\phantomsectionbefore\addcontentsline. Otherwise, the link in ToC will lead to 2.4 The Legend of Lucretia, not to the Bibliography! – Celdor Feb 19 '23 at 21:34\texorpdfstring{TEXstring}{PDFstring}. I also updated your project file on Overleaf (the same link). The chapter right after Introduction have the math. Also, look at bookmark in the PDF Overleaf generates. – Celdor Feb 20 '23 at 16:13!Font U/bbold/m/n24.88=bbold25 at 24.88pt not loadable: Metric (TFM) file not found. I have no clue what this error message means, but I know it is not compiling due to the expression for the Fibonacci sequence typeset in math mode in the title in Chapter 1. It does compile in Overleaf, though. – user143462 Mar 29 '23 at 22:28https://tex.stackexchange.com/questions/681312/error-compiling-code-due-to-text-in-the-title-of-a-chapter-that-is-encoded-in-ma. – user143462 Mar 30 '23 at 15:57