]> git.donarmstrong.com Git - resume.git/commitdiff
Make subsections follow sections
authorDon Armstrong <don@donarmstrong.com>
Sun, 16 Mar 2025 05:23:05 +0000 (22:23 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 16 Mar 2025 05:23:05 +0000 (22:23 -0700)
dlaresume.cls

index 8851429cdd3290a9ae94ca67622b513a63c40ff1..7d40b2fb08046d9d525202f67e2c9b3d295dca64 100644 (file)
@@ -43,6 +43,8 @@
 \RequirePackage{biblatex}
 \addbibresource{references.bib}
 
+\RequirePackage{needspace}
+
 \hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Black,
     urlcolor=Black, unicode=true}
 \urlstyle{same}
@@ -93,7 +95,8 @@
 \definecolor{subheadings}{HTML}{500000}
 
 \titleformat{\section}{%
-\color{headings}\fontsize{14pt}{14pt}\selectfont%
+ \Needspace{5\baselineskip}
+ \color{headings}\fontsize{14pt}{14pt}\selectfont%
  \scshape}{}{0pt}{\textcolor{headings}{#1}}[{\titleline{\titlerule[1pt]}}]
 \titlespacing*{\section}{0em}{0.5em}{0em}
 \titleformat{\subsection}{%
  \raggedright}{}{0pt}{\textcolor{subheadings}{#1}}
 \titlespacing*{\subsection}{0em}{0.25em}{-\parskip}
 
+\newcommand{\sectionbreak}{%
+\addpenalty{300}%
+\vspace*{0pt}}
+
+\newcommand{\subsectionbreak}{%
+\addpenalty{300}%
+\vspace*{0pt}}
+
 \def\myauthor{Don Armstrong}
 \def\mytitle{Resume}
 \def\mycopyright{\myauthor}