ENH put figures in their own subsections

This commit is contained in:
Nathan Dwarshuis 2021-07-31 18:51:21 -04:00
parent 499721c2ce
commit aaa251e253
1 changed files with 25 additions and 2 deletions

View File

@ -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{