From aaa251e2532e4bb7448d6d3b7466df781641776b Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 31 Jul 2021 18:51:21 -0400 Subject: [PATCH] ENH put figures in their own subsections --- tex/thesis.tex | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tex/thesis.tex b/tex/thesis.tex index 1705d2e..c99548e 100644 --- a/tex/thesis.tex +++ b/tex/thesis.tex @@ -1,6 +1,5 @@ % \documentclass[twocolumn]{article} \documentclass{report} -% TODO I want to keep figures in each subsection, which this doesn't do \usepackage[section]{placeins} \usepackage[top=1in,left=1.5in,right=1in,bottom=1in]{geometry} \usepackage{siunitx} @@ -20,7 +19,27 @@ \usepackage{pgfgantt} \usepackage{setspace} -% TODO glossary can't apparently be used in section header (even thought it +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% benevolently force figures stay in their own subsection +% +% NOTE the placeins package only has a 'section' option which puts +% floatbarriers after every \section call; this does the same for \subsection + +\makeatletter +\AtBeginDocument{% + \expandafter\renewcommand\expandafter\subsection\expandafter + {\expandafter\@fb@secFB\subsection}% + \newcommand\@fb@subsecFB{\FloatBarrier + \gdef\@fb@afterHHook{\@fb@topbarrier \gdef\@fb@afterHHook{}}}% + \g@addto@macro\@afterheading{\@fb@afterHHook}% + \gdef\@fb@afterHHook{}% +} +\makeatother + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% header configuration +% +% NOTE glossary can't apparently be used in section header (even thought it % would be nice) \doublespacing{} @@ -36,6 +55,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % acronyms for the lazy +% +% adding as many as possible has the added benefit of making the thesis longer +% and making me sound more sophisticated \renewcommand{\glossarysection}[2][]{} % remove glossary title \makeglossaries @@ -150,6 +172,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % commands for lazy farts like me +% gatech format conformity \newcommand{\mytitle}{ \Large{ \textbf{