mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-11-16 12:05:12 -06:00
Simplifies chapter and section spacing
Removes testing commands for chapter and section spacing. Adjusts the spacing for chapter titles in the frontmatter to eliminate the space between number and title.
This commit is contained in:
@@ -538,41 +538,6 @@ align=right,font={\fontsize{40pt}{40}\selectfont}]
|
||||
{#1}
|
||||
\titlespacing*{\section}{0pc}{14pt plus 4pt minus 4pt}{6pt plus 2pt minus 2pt}[0pc]
|
||||
|
||||
% Utility commands for testing different spacing options
|
||||
\newcommand{\tighterchapterspacing}{%
|
||||
\titleformat{name=\chapter,numberless}
|
||||
{\normalfont\huge\bfseries\color{crimson}}
|
||||
{}
|
||||
{5pt} % Very tight spacing for frontmatter
|
||||
{\Huge #1}
|
||||
[]
|
||||
}
|
||||
|
||||
\newcommand{\normalchapterspacing}{%
|
||||
\titleformat{name=\chapter,numberless}
|
||||
{\normalfont\huge\bfseries\color{crimson}}
|
||||
{}
|
||||
{20pt} % Normal spacing
|
||||
{\Huge #1}
|
||||
[]
|
||||
}
|
||||
|
||||
\newcommand{\tightersectionspacing}{%
|
||||
\titleformat{\section}
|
||||
{\normalfont\Large\bfseries\color{crimson}\raggedright}
|
||||
{\thesection}
|
||||
{0.2em} % Tighter spacing
|
||||
{#1}
|
||||
}
|
||||
|
||||
\newcommand{\normalsectionspacing}{%
|
||||
\titleformat{\section}
|
||||
{\normalfont\Large\bfseries\color{crimson}\raggedright}
|
||||
{\thesection}
|
||||
{0.5em} % Normal spacing
|
||||
{#1}
|
||||
}
|
||||
|
||||
% Redefine \subsection
|
||||
\titleformat{\subsection}
|
||||
{\normalfont\large\bfseries\color{crimson}\raggedright} % Set the color to crimson
|
||||
@@ -619,7 +584,7 @@ align=right,font={\fontsize{40pt}{40}\selectfont}]
|
||||
\titleformat{name=\chapter,numberless}%[display]
|
||||
{\normalfont\huge\bfseries\color{crimson}} % Apply the crimson color
|
||||
{} % Prefix "Chapter X"
|
||||
{10pt} % Reduced spacing for frontmatter chapters
|
||||
{0pt} % Space between number and title
|
||||
{\Huge #1} % Format the title itself#1
|
||||
[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user