jerH

afit-etd-update.cls

Aug 13th, 2015
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.41 KB | None | 0 0
  1. \NeedsTeXFormat{LaTeX2e}[1995/12/01]
  2. \ProvidesClass{afit-etd-update}[2012/05/31 version 1.5 Air Force Institute of
  3. Technology Electronic Thesis and Dissertation Class]
  4.  
  5. % This is a full rewrite of the AFIT class file to clean up the code and
  6. % remove some inconsistencies caused by references to older packages. The
  7. % entire class is now contained within this one file. The format was made
  8. % to be consistent with the AFIT Style Guide with only minor differences as
  9. % were present in the existing class file. This version is fully compatible
  10. % with pdfLaTeX.
  11. %
  12. % According to the documentation, the previous templates were maintained by
  13. % Mark Roth and others, Joel Young, and Maj Todd Hale.
  14. %
  15. % Send bug reports to the author at: [email protected]
  16. %
  17. % Changes: v1.1: fully incorporated the SF298 and the acronym package
  18. % brought into compliance with the 2011 AFIT Style Guide
  19. % v1.2: chapter numbers changed to roman numerals
  20. % chapter title fixed for use with natbib and a single appendix
  21. % added space after chapters in TOC
  22. % v1.3: removed SF298 generation from the report document type
  23. % requires totpages.sty (needed to calculate SF298 page count)
  24. % changes cover page to page number 0
  25. % v1.4: added \boxtowidth to support headers on List of Symbols, etc
  26. % added provision to shrink abstract font size on SF298
  27. % v1.5: fixed the code for the SF298 responsible person block
  28.  
  29.  
  30. % define some macros that allow the class to pass options to the underlying
  31. % article.cls without causing erroneous error messages about unused options
  32.  
  33. \newcommand* \afit@leqno{\@gobble}
  34. \newcommand* \afit@fleqn{\@gobble}
  35. \newcommand* \afit@draft{\@gobble}
  36. \newcommand* \afit@fontsize{12pt}
  37.  
  38. \newif \if@AFITnonumbers
  39. \newif \if@AFITdraft
  40. \newif \if@AFITsstables
  41. \newif \if@AFITcmfont
  42. \newif \if@AFITflyleafframe
  43.  
  44. \DeclareOption {draft} {\renewcommand*\afit@draft{draft}\@drafttrue}
  45. \DeclareOption {leqno} {\renewcommand*\afit@fleqn{fleqn}}
  46. \DeclareOption {fleqn} {\renewcommand*\afit@leqno{leqno}}
  47. \DeclareOption {11pt} {\renewcommand*\afit@fontsize{11pt}}
  48. \DeclareOption {12pt} {\renewcommand*\afit@fontsize{12pt}}
  49. \DeclareOption {cmfont} {\@AFITcmfonttrue}
  50. \DeclareOption {nonumbers} {\@AFITnonumberstrue}
  51. \DeclareOption {sstables} {\@AFITsstablestrue}
  52. \ExecuteOptions {12pt}
  53. \ProcessOptions\relax
  54.  
  55. % This class is built on the traditional article class.
  56. \LoadClass[\afit@draft,\afit@fleqn,\afit@leqno,\afit@fontsize]{article}
  57.  
  58. \RequirePackage {url} % intelligent line breaks for URLs and DOIs
  59. \RequirePackage {graphicx} % standard package for including graphics
  60. \RequirePackage {totpages} % required to calculate page count on SF298
  61. \RequirePackage {refcount} % used to extract the page numbers from TotPages
  62. \RequirePackage {ifpdf} % provides for testing for pdfLaTeX
  63. \RequirePackage[noconfig,floatlongboxes]{sf298} % produces the SF 298 page
  64. \RequirePackage{amsmath,amsthm} % AMS math/thm must be defined prior to txfonts
  65. \if@AFITcmfont\else\RequirePackage{txfonts}\fi % Times fonts versus Computer Modern
  66. \urlstyle{same}
  67.  
  68. \AtEndOfClass{%
  69. \ifpdf
  70. \RequirePackage[bookmarks, breaklinks, colorlinks,%
  71. linkcolor=black, urlcolor=black, citecolor=black]{hyperref}%
  72. \else
  73. \RequirePackage[bookmarks, colorlinks,%
  74. linkcolor=black, urlcolor=black,
  75. citecolor=black]{hyperref}%
  76. \fi
  77. }
  78.  
  79. % provide the means to switch back and forth between single and double spacing,
  80. \newcommand* \singlespace{\renewcommand*\baselinestretch{1.0}\large\normalsize}
  81. \newcommand* \afit@doublespace{\renewcommand*\baselinestretch{1.655}\large\normalsize}
  82.  
  83. \newlength \afit@lineskip \setlength \afit@lineskip {1.000\baselineskip}
  84. \newlength \afit@doubleskip \setlength \afit@doubleskip {1.655\baselineskip}
  85. \newlength \afit@fracskip \setlength \afit@fracskip {0.655\baselineskip}
  86. \newlength \afit@partskip \setlength \afit@partskip {0.345\baselineskip}
  87. \newlength \afit@halfskip \setlength \afit@halfskip {1.345\baselineskip}
  88.  
  89. \newcommand*\draftmode{\@AFITdrafttrue}
  90.  
  91.  
  92. \AtBeginDocument{%
  93. \if@AFITdraft\singlespace\else\afit@doublespace\fi
  94. % adjust the acronym package's list format to conform to the AFIT style guide
  95. \@ifpackageloaded{acronym}{%
  96. \newcommand\afit@acronymwidth{Acronym}
  97. \renewcommand{\bflabel}[1]{{#1\hfill}}%
  98. \newlength\afit@acronymlabelsep
  99. \settowidth\afit@acronymlabelsep{\qquad}%
  100. \renewenvironment{AC@deflist}[1]{%
  101. \ifAC@nolist\else
  102. \newwrite\aftfile
  103. \immediate\openout\aftfile=\jobname.aft%
  104. \immediate\write\aftfile{\string\renewcommand\string\afit@acronymwidth{#1}}%
  105. \immediate\closeout\aftfile
  106. \raggedright\begin{list}{}{%
  107. \singlespace
  108. \setlength{\topsep}{\afit@fracskip}%
  109. \setlength{\itemsep}{\afit@fracskip}%
  110. \setlength{\parsep}{0pt}%
  111. \setlength{\partopsep}{0pt}%
  112. \setlength{\parskip}{0pt}%
  113. \settowidth{\labelwidth}{#1}%
  114. \setlength{\labelsep}{\afit@acronymlabelsep}%
  115. \setlength{\leftmargin}{\labelwidth}%
  116. \addtolength{\leftmargin}{\labelsep}%
  117. \renewcommand{\makelabel}{\bflabel}%
  118.  
  119. }%
  120. \fi%
  121. }{%
  122. \ifAC@nolist\else
  123. \end{list}%
  124. \fi
  125. }%
  126. \newcommand\listofacronyms[1]{%
  127. \IfFileExists{\jobname.aft}{\makeatletter\input{\jobname.aft}\makeatother}{}%
  128. \newlength\afit@acronymleftmargin
  129. \settowidth\afit@acronymleftmargin{\afit@acronymwidth}%
  130. \addtolength\afit@acronymleftmargin{\afit@acronymlabelsep}%
  131. \addlistof{Acronyms}{\makebox[\afit@acronymleftmargin][l]{Acronym}Definition}{#1}%
  132. }
  133. }{}%
  134. }
  135.  
  136. \newcounter{@appcount}
  137. \AtEndDocument{%
  138. \if@AFITappendix
  139. \ifnum \c@chapter=\c@@appcount \else
  140. \ClassWarningNoLine{afit-etd}{appendix count has changed.%
  141. Rerun to get labels right}%
  142. \fi
  143. \immediate\write\@auxout{\string\setcounter{@appcount}{\number\c@chapter}}%
  144. \else
  145. \immediate\write\@auxout{\string\setcounter{@appcount}{0}}%
  146. \fi
  147.  
  148. % Definitions required for the SF298
  149. \ReportDate{\afit@gradday--\afit@sfmonth--\afit@gradyear}
  150. \Title\@title
  151. \ifx\afit@doctype\afit@thesis\ReportType{Master's Thesis}
  152. \else
  153. \ifx\afit@doctype\afit@dissertation\ReportType{Dissertation}
  154. \else\ReportType{Graduate Research Project}
  155. \fi
  156. \fi
  157. \Author{\sf@author, \afit@rank}
  158. \PerformingOrg{Air Force Institute of Technology\\Graduate School of Engineering and Management (AFIT/EN)\\2950 Hobson Way\\Wright-Patterson AFB, OH 45433-7765}
  159. \POReportNumber{\afit@designator}
  160. \DistributionStatement{\afit@distribution}
  161. \SupplementaryNotes{This work is declared a work of the U.S. Government and
  162. is not subject to copyright protection in the United
  163. States. \sf@AddlSupplementaryNotes}
  164. \newcommand\AbstractSize\relax
  165. \Abstract{\AbstractSize\sf@abstract}
  166. \NumberPages{\getrefnumber{TotPages}}
  167.  
  168. \afit@vita
  169. \if@isAFITreport\else\MakeRptDocPage\fi
  170. }
  171.  
  172. \setlength\paperheight {11.0in}
  173. \setlength\paperwidth { 8.5in}
  174.  
  175. \setlength\hoffset {0in}
  176. \setlength\voffset {0in}
  177. \setlength\marginparwidth {0in} % no marginal notes
  178. \setlength\marginparsep {0in}
  179. \setlength\marginparpush {0in}
  180.  
  181. \setlength\oddsidemargin {0.25in} % (in addition to the 1in default)
  182. \setlength\evensidemargin {0.25in} % (in addition to the 1in default)
  183. \setlength\topmargin {0in} % (in addition to the 1in default)
  184. \setlength\headheight {0in}
  185. \setlength\headsep {0in}
  186.  
  187. \setlength\footskip{.5in} % set page number .75" from bottom
  188.  
  189. \setlength\textwidth {\paperwidth}
  190. \setlength\textheight{\paperheight}
  191.  
  192. \addtolength \textwidth {-2.5in} % 1.25" for left and right margins
  193. \addtolength \textheight{-2.25in} % 1" top and 1.25" bottom margins
  194. \addtolength \textheight{-\headheight}
  195. \addtolength \textheight{-\headsep}
  196.  
  197. \renewcommand \topfraction {1} % allow floats to cover full page
  198. \renewcommand \textfraction {0}
  199. \renewcommand \floatpagefraction{.5}
  200.  
  201. \def\ps@headings{%
  202. \def\@oddhead {}%
  203. \def\@evenhead{}%
  204. \def\@oddfoot {\hfil\thepage\hfil}%
  205. \def\@evenfoot{}%
  206. \let\@mkboth\markboth
  207. }
  208.  
  209. % MACROS FOR THE PREFATORY PAGES
  210.  
  211. \newcommand*\graduation[3]{%
  212. \newcommand*\afit@gradday{#1}%
  213. \begingroup
  214. \def\month{#2}%
  215. \def\monthMar{March}%
  216. \def\monthJun{June}%
  217. \def\monthSep{September}%
  218. \def\monthDec{December}%
  219. \ifx\month\monthMar\endgroup\newcommand*\afit@gradmonth{#2}
  220. \newcommand*\afit@sfmonth{03}
  221. \else\ifx\month\monthJun\endgroup\newcommand*\afit@gradmonth{#2}
  222. \newcommand*\afit@sfmonth{06}
  223. \else\ifx\month\monthSep\endgroup\newcommand*\afit@gradmonth{#2}
  224. \newcommand*\afit@sfmonth{09}
  225. \else\ifx\month\monthDec\endgroup\newcommand*\afit@gradmonth{#2}
  226. \newcommand*\afit@sfmonth{12}
  227. \else
  228. \ClassWarning{afit-etd}{graduation month not recognized (expecting March,%
  229. June, September, or December)}%
  230. \fi\fi\fi\fi
  231. \newcommand*\afit@gradyear{#3}%
  232. }
  233.  
  234. \global\let\afit@coauthor\@empty
  235. \global\let\afit@committeeSignedDates\@empty
  236. \global\let\afit@deanSignedDate\@empty
  237. \global\let\sf@AddlSupplementaryNotes\@empty
  238.  
  239. \newif\if@isAFITreport
  240.  
  241. \newcommand*\department[1] {\newcommand*\afit@department{#1}}
  242. \newcommand*\school[1] {\newcommand*\afit@school{#1}}
  243.  
  244. \newcommand*\dean[1] {\newcommand*\afit@dean{#1}}
  245. \newcommand*\deanSignedDate[1]{\renewcommand*\afit@deanSignedDate{#1}}
  246.  
  247. \newcommand\committee[1] {\newcommand\afit@committee{#1}}
  248. \newcommand*\committeeSignedDates[1] {\renewcommand*\afit@committeeSignedDates{#1}}
  249.  
  250. \renewcommand\title[1] {\renewcommand\@title{#1}}
  251. \renewcommand*\author[2] {\renewcommand*\@author{#1 #2}
  252. \newcommand\sf@author{#2, #1}}
  253. \newcommand*\rank[1] {\newcommand*\afit@rank{#1}}
  254. \newcommand*\previousdegrees[1]{\newcommand\afit@previousdegrees{#1}}
  255.  
  256. \newcommand*\coauthor[1] {\renewcommand*\afit@coauthor{#1}}
  257. \newcommand*\corank[1] {\newcommand*\afit@corank{#1}}
  258. \newcommand*\copreviousdegrees[1]{\newcommand\afit@coprevdegrees{#1}}
  259.  
  260. \newcommand*\afit@dissertation{DISSERTATION}
  261. %%%%%%%%%%%%
  262. \newcommand*\afit@prospectus{PROSPECTUS}
  263. %%%%%%%%%%%%
  264. \newcommand*\afit@thesis{THESIS}
  265. \newcommand*\afit@grp{GRADUATE RESEARCH PAPER}
  266. \newcommand*\afit@report{REPORT}
  267. \newcommand*\afit@PhD{Doctor of Philosophy}
  268. \newcommand*\degree[1]{\newcommand*\afit@degree{#1}}
  269. \newcommand*\doctype[1]{\newcommand*\afit@doctype{#1}
  270. \ifx\afit@doctype\afit@report\@isAFITreporttrue\fi}
  271.  
  272. \newcommand*\designator[1]{\newcommand*\afit@designator{#1}}
  273. \newcommand*\distribution[1]{\newcommand\afit@distribution{#1}}
  274.  
  275. \newcommand*\flyleafframe{\@AFITflyleafframetrue}
  276. \newcommand*\AddlSupplementaryNotes[1] {\renewcommand\sf@AddlSupplementaryNotes{#1}}
  277.  
  278. % PREFATORY PAGES
  279.  
  280. \newcommand{\afit@centeredpage}[1]{%
  281. \newpage
  282. \vbox to \textheight{%
  283. \singlespace
  284. \vfil
  285. \noindent #1 \par
  286. \vfil
  287. }
  288. }
  289.  
  290. \newcommand\makePrefatoryPages{%
  291.  
  292. % error checking
  293. \begingroup
  294. \newif\if@ferr
  295. \@ferrfalse
  296. \@ifundefined{afit@gradmonth}{%
  297. \@ferrtrue\ClassWarningNoLine{afit-etd}{missing graduation month}}{}%
  298. \@ifundefined{afit@committee}{%
  299. \@ferrtrue\ClassWarningNoLine{afit-etd}{missing committee members}}{}%
  300. \@ifundefined{afit@department}{%
  301. \@ferrtrue\ClassWarningNoLine{afit-etd}{missing department name}}{}%
  302. \@ifundefined{@author}{%
  303. \@ferrtrue\ClassWarningNoLine{afit-etd}{missing author's name}}{}%
  304. \@ifundefined{afit@doctype}{%
  305. \@ferrtrue\ClassWarningNoLine{afit-etd}{missing document type}}{%
  306. \ifx\afit@doctype\afit@dissertation\else
  307. \ifx\afit@doctype\afit@grp\else
  308. \ifx\afit@doctype\afit@thesis\else
  309. \ifx\afit@doctype\afit@report\else
  310. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  311. \ifx\afit@doctype\afit@prospectus\else
  312. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  313. \@ferrtrue\ClassWarningNoLine{afit-etd}{document type must be DISSERTATION, THESIS, GRADUATE RESEARCH PAPER, or REPORT}
  314. \fi\fi\fi\fi\fi
  315. }%
  316. \@ifundefined{@title}{%
  317. \@ferrtrue\ClassWarningNoLine{afit-etd}{missing document's title}}{}%
  318. \if@ferr%
  319. \ClassError{afit-etd}{missing required prefatory definitions}%
  320. {All prefatory macros must be defined in the preamble}%
  321. \fi
  322. \endgroup
  323.  
  324. \ifpdf
  325. \ifx\afit@coauthor\@empty
  326. \hypersetup{pdftitle={\@title},pdfauthor={\@author}}%
  327. \else
  328. \hypersetup{pdftitle={\@title},pdfauthor={\@author and \afit@coauthor}}%
  329. \fi
  330. % The following line accomodates transparency in PDF files
  331. \pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>}%
  332. \fi
  333.  
  334. % print the prefatory pages
  335. \pagenumbering{roman}%
  336. \afit@cover
  337. \if@isAFITreport\else
  338. \afit@disclaimer
  339. \afit@titlepage
  340. \afit@approvalpage
  341. \afit@abstract
  342. \afit@dedication
  343. \afit@acknowledgments
  344. \fi
  345.  
  346. \newlength\afit@headheight
  347. \newlength\afit@headsep
  348. \setlength\afit@headheight {\afit@lineskip}%
  349. \addtolength\afit@headheight {-.5\afit@partskip}% Exact positioning of header
  350. \setlength\afit@headsep {\afit@fracskip}%
  351. \addtolength\afit@headsep {.5\afit@partskip}% Exact positioning of header
  352.  
  353. \addtolength\textheight {-\afit@headheight}%
  354. \addtolength\textheight {-\afit@headsep}%
  355. \clearpage
  356. \setlength\headheight {\afit@headheight}%
  357. \setlength\headsep {\afit@headsep}%
  358. \tableofcontents
  359. \setcounter{tocdepth}{1}% Needed to print the following lists
  360. \@listoffigures
  361. \@listoftables
  362. % \@listofalgorithmes
  363. \@listofsymbols
  364. \@listofabbreviations
  365. \@makelist
  366. \addtolength\textheight {\afit@headheight}%
  367. \addtolength\textheight {\afit@headsep}%
  368.  
  369. \newpage
  370. \setlength\headheight {0pt}%
  371. \setlength\headsep {0pt}%
  372. \pagestyle{headings}%
  373. \pagenumbering{arabic}%
  374.  
  375. % free up some memory
  376. \global\let\afit@centeredpage \@empty
  377. \global\let\afit@titlepage \@empty
  378. \global\let\afit@disclaimer \@empty
  379. \global\let\afit@approvalpage \@empty
  380. \global\let\afit@abstract \@empty
  381. \global\let\afit@dedication \@empty
  382. \global\let\afit@acknowledgments \@empty
  383. \global\let\@listoftables \@empty
  384. \global\let\@listoffigures \@empty
  385. %\global\let\@listofalgorithmes \@empty
  386. \global\let\afit@gradmonth \@empty
  387. \global\let\afit@department \@empty
  388. \global\let\afit@dean \@empty
  389. \global\let\disclaimer \relax
  390. \global\let\abstract \relax
  391. \global\let\dedication \relax
  392. \global\let\acknowledgments \relax
  393. \global\let\acknowledgements \relax
  394. \global\let\tableofcontents \relax
  395. \global\let\graduation \relax
  396. \global\let\department \relax
  397. \global\let\dean \relax
  398. }
  399.  
  400. \newcommand\afit@cover{%
  401. \setcounter{page}{0}%
  402. \thispagestyle{empty}%
  403. \begingroup
  404. \singlespace
  405. \if@AFITflyleafframe\else\setlength\fboxrule{0pt}\fi
  406. \begin{center}%
  407. \addvspace{1in}%
  408. \includegraphics[width=3in]{afitlogo}\par
  409. \vfill
  410. \framebox[4in]{%
  411. \vbox to 2in{%
  412. \vspace{\fboxsep}%
  413. {\afit@doublespace\bfseries\expandafter\uppercase\expandafter{\@title}\par}%
  414. \vfill
  415. \afit@doctype
  416. \vfill
  417. \ifx\afit@coauthor\@empty
  418. \@author, \afit@rank
  419. \else
  420. \begin{minipage}[t]{2in}%
  421. \begin{center}%
  422. \@author\\%
  423. \afit@rank
  424. \end{center}%
  425. \end{minipage}%
  426. \begin{minipage}[t]{2in}%
  427. \begin{center}%
  428. \afit@coauthor\\%
  429. \afit@corank
  430. \end{center}%
  431. \end{minipage}%
  432. \fi\\[1\afit@lineskip minus 1\afit@fracskip]%
  433. \afit@designator
  434. \vspace{\fboxsep}%
  435. }% vbox
  436. }\\% framebox
  437. \vfill
  438. {\bfseries
  439. {\sffamily DEPARTMENT OF THE AIR FORCE\\AIR UNIVERSITY}\\[\afit@fracskip]%
  440. {\itshape\Large%
  441. \newlength{\@afitwidth}%
  442. \settowidth{\@afitwidth}{AIR FORCE INSTITUTE OF TECHNOLOGY }%
  443. AIR FORCE INSTITUTE OF TECHNOLOGY\par
  444. \vspace{-1.1\afit@lineskip}%
  445. \rule{\@afitwidth}{2pt}\par
  446. \vspace{-1.3\afit@lineskip}%
  447. \rule{\@afitwidth}{1pt}\\[.5\afit@lineskip]%
  448. }%
  449. {\sffamily Wright-Patterson Air Force Base, Ohio}\\[\afit@doubleskip]%
  450. }%
  451. {\singlespace\afit@distribution}%
  452. \end{center}%
  453. \endgroup
  454. \newpage\thispagestyle{empty}%
  455. }
  456.  
  457. \newcommand\afit@disclaimer{ \afit@centeredpage{The views expressed in
  458. this \expandafter\lowercase\expandafter{\afit@doctype} are those
  459. of the author\ifx\afit@coauthor\@empty\else{s}\fi{} and do
  460. not reflect the official policy or position of the United States
  461. Air Force, the Department of Defense, or the United
  462. States Government.\\[\afit@lineskip]
  463. \noindent This material is declared a work of the U.S. Government
  464. and is not subject to copyright protection in the United States.}
  465. }
  466. \newcommand\disclaimer[1]{\renewcommand\afit@disclaimer{\afit@centeredpage{#1}}}
  467.  
  468.  
  469. \newcommand\afit@titlepage{%
  470. \newpage
  471. \thispagestyle{empty}%
  472. \noindent\afit@designator
  473. \begin{center}%
  474. \vspace{3\afit@lineskip}%
  475. {\expandafter\uppercase\expandafter{\@title}}\par
  476. \vspace{\afit@doubleskip}%
  477. \afit@doctype\par
  478. \vspace{1.5\afit@doubleskip}%
  479. Presented to the Faculty\par
  480. \ifx\afit@doctype\afit@dissertation\else\afit@department\par\fi
  481. \afit@school\par
  482. Air Force Institute of Technology\par
  483. Air University\par
  484. Air Education and Training Command\par
  485. in Partial Fulfillment of the Requirements for the\par
  486. Degree of \afit@degree\par
  487. \vspace{1.5\afit@doubleskip}%
  488. \ifx\afit@coauthor\@empty
  489. \@author, \afit@previousdegrees\par
  490. \afit@rank\par
  491. \else
  492. \begin{minipage}[t]{.5\textwidth}%
  493. \begin{center}%
  494. \singlespace
  495. \@author, \afit@previousdegrees\par
  496. \afit@rank\par
  497. \end{center}%
  498. \end{minipage}%
  499. \begin{minipage}[t]{.5\textwidth}%
  500. \begin{center}%
  501. \singlespace
  502. \afit@coauthor, \afit@coprevdegrees\par
  503. \afit@corank\par
  504. \end{center}%
  505. \end{minipage}\\[\afit@lineskip]% accounts for second line in minipage
  506. \fi
  507. \vspace{\afit@doubleskip}%
  508. \afit@gradmonth\ \afit@gradyear\\[\afit@doubleskip]%
  509. \vfill
  510. {\singlespace\afit@distribution\par}%
  511. \end{center}%
  512. \setcounter{footnote}{0}%
  513. }
  514.  
  515.  
  516. % Comma delimited list of committee members is the parameter.
  517. % e.g.
  518. %\committee{{Iam N. Charge, PhD (Chairman)},
  519. % {Maj Painin Deass, PhD (Member)},
  520. % {Howcomb I. Last, PhD (Member)}}
  521. %
  522.  
  523. \newcommand\sign@lines[2]{% parameters are lists of: names, dates
  524. % Create an empty list of dates corresponding to the number of committee
  525. % members. This allows the following code to generate the blank date lines
  526. \let\afit@signdate#2%
  527. \ifx\afit@signdate\@empty
  528. \@for\@comem:=#1\do{%
  529. \ifx\afit@signdate\@empty\renewcommand\afit@signdate\relax
  530. \else\expandafter\renewcommand\expandafter\afit@signdate
  531. \expandafter{\afit@signdate,}%
  532. \fi
  533. }%
  534. \fi
  535. \begin{minipage}[t]{4.25in}%
  536. \@for\@comem:=#1\do{%
  537. \vspace{\afit@doubleskip}% add additional space for signature
  538. \ifx#2\@empty\vspace{\afit@lineskip}%
  539. \else\makebox[3.25in][c]{//signed//}\par
  540. \fi
  541. \vspace{-\afit@fracskip}% force the /signed/ mark to be on the line
  542. \rule{3.25in}{0.5pt}\par%
  543. \@comem\par
  544. }%
  545. \end{minipage}%
  546. \begin{minipage}[t]{1.25in}%
  547. \@for\@date:=\afit@signdate\do{%
  548. \vspace{\afit@doubleskip}% add additional space for signature
  549. \ifx\@date\@empty\vspace{\afit@lineskip}%
  550. \else\makebox[1.25in][c]{\@date}\par
  551. \fi
  552. \vspace{-\afit@fracskip}% force the /signed/ mark to be on the line
  553. \rule{1.25in}{0.5pt}\par%
  554. Date\par
  555. }%
  556. \end{minipage}
  557. \par
  558. }
  559.  
  560. \newcommand{\afit@approvalpage}{%
  561. \newpage
  562. \thispagestyle{empty}%
  563. \noindent\afit@designator
  564. \begin{center}%
  565. \vspace{3\afit@lineskip}%
  566. {\expandafter\uppercase\expandafter{\@title}}\par
  567. \vspace{\afit@doubleskip}%
  568.  
  569. %\afit@doctype\par
  570. \singlespace
  571. \vspace{\afit@lineskip}%
  572. %\vfill
  573. \ifx\afit@coauthor\@empty
  574. \@author, \afit@previousdegrees\par
  575. \afit@rank
  576. \else
  577. \begin{minipage}[t]{.5\textwidth}%
  578. \begin{center}%
  579. \@author, \afit@previousdegrees\par
  580. \afit@rank
  581. \end{center}%
  582. \end{minipage}%
  583. \hfill
  584. \begin{minipage}[t]{.5\textwidth}%
  585. \begin{center}%
  586. \afit@coauthor, \afit@coprevdegrees\par
  587. \afit@corank
  588. \end{center}%
  589. \end{minipage}%
  590. \fi
  591. \end{center}
  592. \vspace{2\afit@lineskip}%
  593.  
  594. \begin{center}
  595. \begingroup
  596. \singlespace
  597. Committee Membership:\\
  598.  
  599. \vspace{3\afit@lineskip}%
  600. %\noindent \par
  601. %\sign@lines
  602. \afit@committee \par%
  603. %\afit@committeeSignedDates
  604. \vspace{2\afit@lineskip}%
  605. %\addvspace{2\afit@lineskip}
  606.  
  607. \ifx\afit@doctype\afit@dissertation
  608. %\noindent \par
  609. %\sign@lines
  610. \afit@dean\\Dean{,} Graduate School of Engineering \\
  611. and Management\par
  612. %\afit@school\par
  613. %\afit@deanSignedDate\par
  614. \fi
  615. \endgroup
  616. \end{center}
  617. %
  618. }
  619.  
  620. \renewcommand\abstract[1]{\newcommand\afit@abstract{\@sabstracttoc{Abstract} #1}
  621. \newcommand\sf@abstract{#1}}
  622.  
  623. \newcommand\afit@dedication{\relax}
  624. \newcommand\dedication[1]{%
  625. \renewcommand\afit@dedication{%
  626. \clearpage
  627. \refstepcounter{schapter}%
  628. \addcontentsline{toc}{chapter}{Dedication}%
  629. \afit@centeredpage{\textit{#1\\}}%
  630. }%
  631. }
  632.  
  633. \newcommand\afit@vita{\relax}
  634. \newcommand\vita[1]{\renewcommand\afit@vita{\@schaptertoc{Vita}#1}}
  635.  
  636. \let\afit@acknowledgments\relax
  637. \newcommand\acknowledgments[1]{%
  638. \@ifundefined{@acknowledgments}%
  639. {\newcommand\afit@acknowledgments{\@schaptertoc{Acknowledgments}#1\par\addvspace{\afit@doubleskip}\hspace{.55\linewidth}\@author}}%
  640. {\ClassWarning{afit-etd}{ignoring subsequent \protect\acknowledgments}}%
  641. }
  642. \newcommand\acknowledgements[1]{%
  643. \@ifundefined{@acknowledgments}%
  644. {\newcommand\afit@acknowledgments{\@schaptertoc{Acknowledgements}#1\par\addvspace{\afit@doubleskip}\hspace{.55\linewidth}\@author}}%
  645. {\ClassWarning{afit-etd}{ignoring subsequent \protect\acknowledgements}}%
  646. }
  647.  
  648. \newcounter{listctr}
  649. \newcounter{listcnt}
  650. \renewcommand\thelistcnt{\@Alph\c@listcnt}
  651. \renewcommand\thelistctr{\@Alph\c@listctr}
  652.  
  653. \newcommand\@makelist{%
  654. \ifnum \c@listcnt>\c@listctr
  655. \refstepcounter{listctr}%
  656. \csname @listof\thelistctr \endcsname
  657. \@makelist
  658. \fi
  659. }
  660.  
  661. \newcommand\boxtowidth[2]{\settowidth\@tempdima{#1}\makebox[\@tempdima][l]{#2}}
  662.  
  663. \newcommand\addlistof[3]{%
  664. \refstepcounter{listcnt}%
  665. \expandafter\gdef\csname @listof\thelistcnt\endcsname{%
  666. \afit@listof{List of #1}{#2}{\relax}{#3}%
  667. }%
  668. }
  669.  
  670. % \@addlistof{Name in Title}{Left Header}{Right Header}{Contents}
  671. % e.g. \@addlistof{Figures}{Figure}{Page}{\@starttoc{lof}}
  672. \newcommand\afit@listof[4]{%
  673. \clearpage
  674. \def\ps@addlistof{\renewcommand\@oddhead{#2\hfill #3}}%
  675. \thispagestyle{headings}%
  676. \pagestyle{addlistof}%
  677. \global\@topnum\z@
  678. \@afterindenttrue
  679. \refstepcounter{schapter}%
  680. \addcontentsline{toc}{chapter}{#1}%
  681. \vspace*{-\afit@lineskip}% compensate for the vertical space added by the
  682. \vspace*{-\afit@fracskip}% header for these lists
  683. \@makechapterhead{#1}%
  684. \noindent#2\hfill#3\par%
  685. #4%
  686. }
  687.  
  688.  
  689.  
  690. \renewcommand\tableofcontents{\afit@listof{Table of Contents}{\relax}{Page}{\vspace{-\afit@halfskip}\@starttoc{toc}}}
  691. \newcommand\@listoffigures {\afit@listof{List of Figures} {Figure}{Page}{\@starttoc{lof}}}
  692. \newcommand\@listoftables {\afit@listof{List of Tables} {Table} {Page}{\@starttoc{lot}}}
  693.  
  694.  
  695. %\newcommand\@listofalgorithmes {\afit@listof{List of Algorithms} {Algorithm} {Page}{\@starttoc{loa}}}
  696.  
  697. \newcommand*{\noaddvspace}{\renewcommand*{\addvspace}[1]{}}
  698. \addtocontents{loa}{\protect\noaddvspace}
  699.  
  700.  
  701. \newcommand\@listofsymbols{\relax}
  702. \newcommand\listofsymbols[1][2.3em]{%
  703. \newcommand*\l@symbol{\@dottedtocline{1}{0em}{#1}}%
  704. \renewcommand\@listofsymbols{\afit@listof{List of Symbols}{Symbol}{Page}{\@starttoc{los}}}%
  705. }
  706. \newcommand\addsymbol[2]{#2\addcontentsline{los}{symbol}{\numberline{#2}{#1}}}
  707.  
  708. \newcommand\@listofabbreviations{\relax}
  709. \newcommand\listabbrevname{List of Abbreviations}
  710. \newcommand\listofabbreviations[1][2.3em]{%
  711. \newcommand*\l@abbrev{\@dottedtocline{1}{0em}{#1}}%
  712. \renewcommand\@listofabbreviations{\afit@listof{List of Abbreviations}{Abbreviation}{Page}{\@starttoc{loa}}}%
  713. }
  714. \newcommand\addabbrev[2]{#2\addcontentsline{loa}{abbrev}{\numberline{#2}{#1}}}
  715.  
  716. \newcommand\notables {\renewcommand\@listoftables{}}
  717. \newcommand\nofigures{\renewcommand\@listoffigures{}}
  718. %\newcommand\noalgorithms{\renewcommand\@listofalgorithmes{}}
  719.  
  720. % a wrapper to fix formatting while largely keeping the bibliography
  721. % environment intact to protect packages that might rely on that environment to
  722. % make modifications
  723. \newcommand\references[1]{%
  724. \begingroup
  725. \singlespace
  726. % the following lines restore the correct vertical spacing for the
  727. % chapter title, i.e. "Bibliography", in the singlespaced environment and
  728. % start the new chapter. These are implemented here rather than in the
  729. % Bibliography environment to maintain compatibility with packages such as
  730. % natbib which redefine the Bibliography environment.
  731. \clearpage
  732. \global\@topnum\z@
  733. \@afterindenttrue
  734. \refstepcounter{schapter}%
  735. \addcontentsline{toc}{chapter}{\bibname}%
  736. \let\afit@bibname\bibname
  737. \renewcommand\bibname{
  738. \vspace{\afit@fracskip}%
  739. \afit@bibname
  740. \vspace{\afit@fracskip}%
  741. }%
  742. #1%
  743. \endgroup
  744. }
  745.  
  746. \newcommand*{\bibname}{Bibliography}
  747. % The bibliography environment is largely carried over from the article class.
  748. % The change being that the bibliography is now contained in a separate chapter
  749. % rather than in a section.
  750. \renewenvironment{thebibliography}[1]{%
  751. \@schapter{\bibname}% change from article.cls where it was a section
  752. \list{ \@biblabel{\@arabic\c@enumiv}}%
  753. { \settowidth\labelwidth{\@biblabel{#1}}%
  754. \leftmargin\labelwidth
  755. \advance\leftmargin\labelsep
  756. \usecounter{enumiv}%
  757. \let\p@enumiv\@empty
  758. \renewcommand\theenumiv{\@arabic\c@enumiv}%
  759. }%
  760. \sloppy
  761. \clubpenalty4000%
  762. \@clubpenalty \clubpenalty
  763. \widowpenalty4000%
  764. \sfcode`\.\@m
  765. }
  766. {\def\@noitemerr
  767. {\@latex@warning{Empty `thebibliography' environment}}%
  768. \endlist
  769. }
  770.  
  771. \newif\if@AFITappendix
  772. \renewcommand\appendix{%
  773. \@AFITappendixtrue
  774. \setcounter{chapter}{0}%
  775. \renewcommand\thechapter {\@Alph\c@chapter}%
  776. \ifnum \c@@appcount>1%
  777. \newcommand*\@appname{Appendix\space\thechapter}%
  778. \else
  779. \newcommand*\@appname{Appendix}%
  780. \fi
  781. % restrict toc to Appendix title only (no sections within the Appedix)
  782. \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}%
  783. }
  784.  
  785. \newcounter{chapter}
  786. \newcounter{schapter}
  787. \renewcommand\thesection {\thechapter.\@arabic\c@section}
  788.  
  789. \newcommand\chapter{%
  790. \clearpage
  791. \global\@topnum\z@
  792. \@afterindenttrue
  793. \secdef\@chapter\@schapter
  794. }
  795.  
  796. \def\@schapter#1{% used by some bibliography packages
  797. \@makechapterhead{#1}%
  798. }
  799.  
  800. \newcommand\@sabstracttoc[2][schapter]{%
  801. \clearpage
  802. \global\@topnum\z@
  803. \@afterindenttrue
  804. \refstepcounter{#1}%
  805. \addcontentsline{toc}{chapter}{#2}%
  806. \noindent\afit@designator\par
  807. \@makechapterhead{#2}%
  808. }
  809.  
  810. \newcommand{\@schaptertoc}[2][schapter]{%
  811. \clearpage
  812. \global\@topnum\z@
  813. \@afterindenttrue
  814. \refstepcounter{#1}%
  815. \addcontentsline{toc}{chapter}{#2}%
  816. \@makechapterhead{#2}%
  817. }
  818.  
  819. \if@AFITnonumbers\setcounter{secnumdepth}{0}\fi
  820. \def\@chapter[#1]#2{%
  821. \refstepcounter{chapter}%
  822. \if@AFITappendix
  823. \typeout{Appendix \thechapter.}%
  824. \addcontentsline{toc}{chapter}{\@appname:\space#1}%
  825. \@makechapterhead{\@appname:\space#2}%
  826. \else
  827. \typeout{Chapter\space\@Roman\c@chapter.}%
  828. \addcontentsline{toc}{chapter}{\protect\numberline{\@Roman\c@chapter.}#1}%
  829. \@makechapterhead{\@Roman\c@chapter.\quad#2}%
  830. \fi
  831. }
  832.  
  833. \def\@makechapterhead#1{%
  834. \begingroup
  835. \ifnum\value{chapter}=1% add the title to the first chapter
  836. \if@AFITappendix
  837. \setlength\@tempdima{.25in}% chapter titles start 1.25 in from the top
  838. \addtolength\@tempdima{-\afit@doubleskip}%
  839. \addtolength\@tempdima{-\afit@partskip}%
  840. \vspace*{\@tempdima}%
  841. \else
  842. \begin{center}%
  843. \vspace*{\afit@lineskip}%
  844. {\expandafter\uppercase\expandafter{\@title}}%
  845. \vspace{\afit@doubleskip}%
  846. \end{center}%
  847. \fi
  848. \else
  849. \setlength\@tempdima{.25in}% chapter titles start 1.25 in from the top
  850. \addtolength\@tempdima{-\afit@doubleskip}%
  851. \addtolength\@tempdima{-\afit@partskip}%
  852. \vspace*{\@tempdima}%
  853. \fi
  854. \centering \bfseries #1 \par \nobreak
  855. \vspace{\afit@halfskip}%
  856. \endgroup
  857. \@afterheading
  858. }
  859.  
  860. \renewcommand\section{\@startsection {section}{1}{\z@}%
  861. {2.1ex\@plus -1ex \@minus -.2ex}{0.1ex \@plus.2ex}%
  862. {\normalfont\normalsize\bfseries}}
  863. \renewcommand\subsection{\@startsection{subsection}{2}{\parindent}%
  864. {0.1ex\@plus -1ex \@minus -.2ex}{0.1ex \@plus.2ex}%
  865. {\normalfont\normalsize\bfseries\itshape}}
  866. \renewcommand\subsubsection{\@startsection{subsubsection}{3}{2\parindent}%
  867. {0.1ex\@plus -1ex \@minus -.2ex}{0.1ex \@plus.2ex}%
  868. {\normalfont\normalsize\bfseries\itshape}}
  869. \renewcommand\paragraph{\@startsection{paragraph}{4}{\parindent}%
  870. {0ex\@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries\itshape}}
  871. \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
  872. {0ex \@plus1ex \@minus .2ex}{-1em}{\normalfont\normalsize\itshape}}
  873.  
  874. % The following is extracted directly from the LaTeX source code so that a
  875. % minor modification could be made to add a period for subsections and deeper
  876. % sections. This is a simpler change than was previously implemented.
  877. \def\@sect#1#2#3#4#5#6[#7]#8{%
  878. \ifnum #2>\c@secnumdepth
  879. \let\@svsec\@empty
  880. \else
  881. \refstepcounter{#1}%
  882. \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  883. \fi
  884. \@tempskipa #5\relax
  885. \ifdim \@tempskipa>\z@
  886. \begingroup
  887. #6{%
  888. \@hangfrom{\hskip #3\relax\@svsec}%
  889. \interlinepenalty \@M #8\ifnum#2>1.\fi\@@par}% add period if > section
  890. \endgroup
  891. \csname #1mark\endcsname{#7}%
  892. \addcontentsline{toc}{#1}{%
  893. \ifnum #2>\c@secnumdepth \else
  894. \protect\numberline{\csname the#1\endcsname}%
  895. \fi
  896. #7}%
  897. \else
  898. \def\@svsechd{%
  899. #6{\hskip #3\relax
  900. \@svsec #8.}% add period
  901. \csname #1mark\endcsname{#7}%
  902. \addcontentsline{toc}{#1}{%
  903. \ifnum #2>\c@secnumdepth \else
  904. \protect\numberline{\csname the#1\endcsname}%
  905. \fi
  906. #7}}%
  907. \fi
  908. \@xsect{#5}%
  909. }
  910. \def\@ssect#1#2#3#4#5{%
  911. \@tempskipa #3\relax
  912. \ifdim \@tempskipa>\z@
  913. \begingroup
  914. #4{%
  915. \@hangfrom{\hskip #1}%
  916. \interlinepenalty \@M #5\ifnum#2>1.\fi\@@par}% add period if > section
  917. \endgroup
  918. \else
  919. \def\@svsechd{#4{\hskip #1\relax #5.}}% add period
  920. \fi
  921. \@xsect{#3}%
  922. }
  923.  
  924. \if@AFITnonumbers
  925. \renewcommand* \thechapter {\@Roman\c@chapter}%
  926. \renewcommand* \theequation {\@arabic\c@equation}%
  927. \renewcommand* \thefigure {\@arabic\c@figure}%
  928. \renewcommand* \thetable {\@arabic\c@table}%
  929. \renewcommand* \l@figure {\@dottedtocline{1} {0em} {2.3em}}%
  930. \renewcommand* \l@table {\@dottedtocline{1} {0em} {2.3em}}%
  931. \renewcommand* \l@section {\@dottedtocline{1} {1.5em} {0em}}%
  932. \renewcommand* \l@subsection {\@dottedtocline{2} {3.0em} {0em}}%
  933. \renewcommand* \l@subsubsection {\@dottedtocline{3} {4.5em} {0em}}%
  934. \renewcommand* \l@paragraph {\@dottedtocline{4} {6.0em} {0em}}%
  935. \renewcommand* \l@subparagraph {\@dottedtocline{5} {7.5em} {0em}}%
  936. \else
  937. \@addtoreset {equation} {chapter}%
  938. \@addtoreset {figure} {chapter}%
  939. \@addtoreset {table} {chapter}%
  940. \@addtoreset {section} {chapter}%
  941. \renewcommand* \thechapter {\@arabic\c@chapter}%
  942. \renewcommand* \theequation {\thechapter.\@arabic\c@equation}%
  943. \renewcommand* \thefigure {\thechapter.\@arabic\c@figure}%
  944. \renewcommand* \thetable {\thechapter.\@arabic\c@table}%
  945. \renewcommand* \l@figure {\@dottedtocline{1} {0em} {2.3em}}%
  946. \renewcommand* \l@table {\@dottedtocline{1} {0em} {2.3em}}%
  947. \renewcommand* \l@section {\@dottedtocline{1} {1.5em} {2.3em}}%
  948. \renewcommand* \l@subsection {\@dottedtocline{2} {3.8em} {3.2em}}%
  949. \renewcommand* \l@subsubsection {\@dottedtocline{3} {7.0em} {4.1em}}%
  950. \renewcommand* \l@paragraph {\@dottedtocline{4} {10em} {5em}}%
  951. \renewcommand* \l@subparagraph {\@dottedtocline{5} {12em} {6em}}%
  952. \fi
  953.  
  954. \setcounter{tocdepth}{3}
  955.  
  956. \def\fps@figure{tbh}
  957. \def\fnum@figure{Figure\nobreakspace\thefigure}
  958. \renewenvironment{figure}{\vspace\afit@fracskip\@float{figure}}{\end@float}
  959.  
  960. \def\fps@table{tbh}
  961. \def\fnum@table{Table\nobreakspace\thetable}
  962. \renewenvironment{table}%
  963. { \if@AFITsstables \singlespace \fi
  964. \vspace\afit@fracskip \@float{table}%
  965. }%
  966. { \vspace{-\afit@lineskip}%
  967. \end@float
  968. }
  969. \renewenvironment{table*}{\if@AFITsstables\singlespace\fi\@dblfloat{table}}%
  970. {\end@dblfloat}
  971.  
  972. \setlength\floatsep {2\afit@doubleskip \@plus 1\p@ \@minus 1\p@}
  973. \setlength\textfloatsep {1\afit@doubleskip \@plus 1\p@ \@minus 1\p@}
  974. \setlength\intextsep {1\afit@doubleskip \@plus 1\p@ \@minus 1\p@}
  975. \setlength\@fptop {0\p@} % align float pages with the top of the page
  976. \addtolength\textfloatsep\afit@lineskip
  977.  
  978. \setlength\abovecaptionskip{1ex}
  979. \setlength\belowcaptionskip{1ex}
  980. \long\def\@makecaption#1#2{%
  981. \expandafter\ifx#1\fnum@table
  982. \else
  983. \vskip \abovecaptionskip
  984. \fi
  985. \sbox\@tempboxa{#1: #2}%
  986. \ifdim \wd\@tempboxa >\hsize%
  987. \begingroup
  988. \singlespace #1: #2\par
  989. \endgroup
  990. \else
  991. \global \@minipagefalse
  992. \begingroup
  993. \singlespace \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  994. \endgroup
  995. \fi
  996. \expandafter\ifx#1\fnum@table
  997. \vskip \belowcaptionskip
  998. \fi
  999. }
  1000.  
  1001. \newcommand\l@chapter[2]{%
  1002. \setlength\@tempdima{1.5em}%
  1003. \begingroup
  1004. \addvspace{\afit@lineskip}%
  1005. \addpenalty{-\@highpenalty}%
  1006. \@dottedtocline{0}{0em}{1.5em}{#1}{#2}\par%
  1007. \nobreak
  1008. \addvspace{\afit@lineskip}%
  1009. \endgroup
  1010. \singlespace
  1011. }
  1012.  
  1013. \renewcommand\@makefntext[1]{%
  1014. \noindent
  1015. \hb@xt@2em{\hss\@makefnmark}%
  1016. \singlespace\footnotesize #1%
  1017. }
  1018.  
  1019. \pagestyle{headings}
  1020. % \raggedright
  1021. \setlength\parindent{2em} % must follow the \raggedright or will be reset to 0
  1022. \pretolerance=2000
  1023. \clubpenalty =10000
  1024. \widowpenalty=10000
Advertisement
Add Comment
Please, Sign In to add comment