% npsthesis.sty : LaTeX style for NPS Master's Theses % created by : % David Canright % Code MA/Ca, Naval Postgraduate School, Monterey, CA 93943 % (dcanrig@nps.navy.mil) % with additions (September 1996, ver. 2.3) by : % Tim Rohrer, LT, USN % Changes commented with 'tgrohrer' for searching ease. \typeout{Local Document Style `NPS Thesis' 2.5 <2000 May 1>.} % % This style is intended for theses here at NPS. % The output of a test file has been approved by the Thesis Processor % as satisfying all the weird, twisted style specs of the Thesis Manual. % So the student need not be concerned with those formatting details. % (It is assumed you understand basic LaTeX, though not necessarily TeX.) % [Note: for the Cover Page, see "cover.tex" & "npsseal.eps".] % [Note: for the Report Documentation Page, see "rep_doc.tex" & "sf298.tex".] % To use, your main file should look something like this (at minimum): % % \documentstyle{npsthesis} % most options have been eliminated % \title{Your Thesis Title} % these data needed for Signature Page % \author{Your Name} % \degree{Master Of Science In Applied Mathematics} % \department{Department of Mathematics} % \rankanddegrees{Captain, United States Army \\ % B.S., Loyola College, 1982 \\ % note: may have many lines like this % M.S.E., The Johns Hopkins University, 1984} % \date{June 1993} % degree date % \distribstmt{Distribution authorized to ...} % include & fill in if not "A" % % \begin{document} % \pagenumbering{roman} % \begin{signaturepage} % new environment for the Signature Page % \approval{Blaise Pascal, Advisor} % do one "\approval" for each sig. % \approval{Carl Gauss, Second Reader} % \approval{Richard Franke, Chairman, Department of Mathematics} % \end{signaturepage} % % ONLY GOOD FOR SINGLE AUTHOR % \begin{abstract} % new environment for the Abstract % \input{myabs} % assuming myabs.tex contains abstract % \end{abstract} % \tableofcontents % \listoffigures % if appropriate % \listoftables % if appropriate % % \cleardoublepage % \pagenumbering{arabic} % \input{mybody} % assuming mybody.tex contains main body of thesis % % or use several files % % AND, if have any appendices (WARNING: DIFFERS FROM STANDARD LATEX!): % % EITHER, if only have one appendix, use "\appendix*": % \appendix*{More Interesting Stuff} % \input{myapp} % assuming myapp.tex contains appendix % % OR, if have more than one, just use "\appendix" for each: % \appendix{More Interesting Stuff} % \input{myapp1} % assuming myapp1.tex contains appendix 1 % \appendix{Truly Fascinating Stuff} % \input{myapp2} % assuming myapp2.tex contains appendix 2 % \bibliographystyle{unsrt} % unsrt style is preferred (can go before apps) % \bibliography{mybib} % assuming mybib.bbl contains bibliography % % (use BibTeX, from mybib.bib, that you create) % \begin{distribution} % Initial Distribution, \item w \dotfill for each % \item Defense Technical Information Center\dotfill 2\\ % Cameron Station\\Alexandria, VA 22304-6145 % \item Library, Code 52\dotfill 2\\\nps\\Monterey, CA 93943-5101 % \end{distribution} % % \end{document} % end of file % % Several features have been included in this style % % For proper INDENTATION, first-order headings should be \chapter, % second-order should be \section, etc. % To resume former indentation, say from \paragraph to \section, use % \tosection % similarly for other levels % % In most cases, you do NOT need to worry about proper CAPITALIZATION. Just use % mixed upper and lower case in all titles, captions, etc. % % Nor should you need to worry about LINE SPACING; regular text is % one-and-a-half-spaced, % and almost everything else is singlespaced. Should you desire single spacing % for draft copies, use the option [singlespace]. % (For more info on how to alter spacing, see doublespace.sty) % % OPTIONS: (most standard options do nothing in this style) % singlespace % for single-spaced drafts, not for final version % longdist % for long distrib. statment; uses small font % doublethm % to one-and-a-half-space theorem environments % nobi % for no bold italic font (subsubsections) % psfig % to use Encapsulated PostScript figures % % (see psfig.sty for details) % ENVIRONMENTS: % signaturepage % for Signature page (use \approval for each sig) % abstract % for Abstract page % disclaimer % for Disclaimer page (optional) % acknowledgment % for Acknowledgment page (optional) % distribution % for Initial Distribution, ea. \item w \dotfill % figurepage % like figure, but for blank page to paste figure % % with page number and optional caption % MACROS: % \NPS % NAVAL POSTGRADUATE SCHOOL % \nps % Naval Postgraduate School % \startsubeqn % sub-equation numbering (see below) % \stopsubeqn % sub-equation numbering (see below) % \fixsublabel % sub-equation numbering (see below) % MACROS to allow numbering related equations ("subequations") as a b etc. % To use: % put \startsubeqn JUST BEFORE first subeqn, % INSIDE equation or eqnarray environment, % and put \stopsubeqn JUST BEFORE first main equation after subequations, % also INSIDE equation or eqnarray environment % (not necessarily the same environment as the \startsubeqn). % Then can use \label normally EXCEPT % within an eqnarray environment that contains \startsubeqn or \stopsubeqn, % then precede the \label by \fixsublabel (if necessary). % % This file was generated from 3 sources (and much hacking): % report.sty % standard report style % rep12.sty % 12pt option for report % latex.tex % mother of all LaTeX % The entire report.sty was included, and then heavily modified. This was % necessary to eliminate unwanted options. The rep12.sty was included, but much % appears in modified form afterwards. And certain low level LaTeX % commands had to be modified to implement this bizarre style, so are redefined % here. Comments starting with %%% divide material from different sources. % Also, mitthesis.sty from MIT was used as a model, though not for much. % WARNING: This style is specific to NPS Thesis Manual requirements % Does NOT support most standard options, except titlepage, which is default % HISTORY: % 12 Apr 1994: update to ver. 1.5 to eliminate uppercase Table captions % (The Thesis Manual was revised 4 Mar 1994 - this is the 1st update) % 13 May 1994: update to ver. 1.6 to add dot leaders for chapter entries % 12 Dec 1994: modify from double-spaced to one-and-a-half-spaced as default % and to start each "element" on an odd-number page % and to put chapter headings 1" from top of page % and modified indentation (one tab less, most places) % and to redesign Signature page to allow Co-Advisors, etc. % (following the revised Thesis Manual) % also eliminated \reset@font for older versions of LaTeX (below) % 25 May 1995: ver. 2.1 modified signature page for bold title, distrib. % 21 Aug 1996: ver. 2.2 changed "References" to "List of References" % and for bold italic subsubsection headings (instead of italic) % 5 Sep 1996: ver. 2.2.1 put list of figures before list of tables % 11 Nov 1996: ver. 2.3 incorporated improvements by Tim G. Rohrer, LT, USN: % specialabstract environment added for Special Abstract % distribstmt command added for other distributions than "A" % also eliminated dependence on rep12.sty & doublespace.sty % which allows a single version for both LaTeX 2.09 and LaTeX2e % 7 Mar 1997: ver. 2.3.1 some small changes for backward compatibility: % incl def of \@bibitem, for reference numbers in obsolete installations % eliminated "\input titlepag.sty", don't need no stinking "\maketitle" % modified "nobi" option to avoid "newfont" generating errors % added "%" to end of several lines in definition of specialabstract % 19 May 1997: ver. 2.3.1a small change for teTeX in ECE Dept: % removed redefinition of \@setsize from "doublespace.sty" % also removed all trailing blanks from lines (prob. unnecessary) % 28 May 1997: ver. 2.4 add dot leaders to initial distribution list % also removed extra indentation in List of Figures, List of Tables % 9 Jun 1997: ver. 2.4.1 change format of Special Abstract % also added "longdist" option to print small dist. stat. (if long) % also in citation with comment, changed comma to colon % 1 May 2000: ver. 2.5 eliminate Special Abstract (must be in MS Word!) % also change \cleardouble so that added blank pages say % THIS PAGE INTENTIONALLY LEFT BLANK \def\reset@font{} %NOTE: comment this out if necessary for newer versions % load special font for bold italic subsubsection headings % this is delayed until after options, so if nobi then avoid newfont \def\@do@bi@{\newfont{\bolditalic}{cmbxti10 scaled\magstep1} \def\subsubfont{\bolditalic}} \def\subsubfont{\it} \def\ds@nobi{\def\@do@bi@{}} % nobi for no bold italic \def\distribfont{} \def\ds@longdist{\def\distribfont{\footnotesize }} % small font for long dist. % eliminate options: \@namedef{ds@11pt}{} \@namedef{ds@12pt}{} \def\ds@twocolumn{} \def\ds@titlepage{} % default \def\ds@openbib{} \def\ds@leqno{} \def\ds@fleqn{} \def\ds@twoside{} % modify definition of \cleardoublepage from "latex.tex"; no twoside \def\cleardoublepage{\clearpage\ifodd\c@page\else \hbox{}\par\vfill\centerline% {THIS PAGE INTENTIONALLY LEFT BLANK}% \vfill\newpage\fi} % double-spacing stolen from MIT style (slightly modified): \def\mystretch{1.5} % One-and-a-half spacing hack \def\ds@doublespace{} % This is default % So we do not read this style twice \def\ds@singlespace{ % If he explicitly wants single spacing \typeout{Single spaced} \def\mystretch{1}} \def\baselinestretch{\mystretch} % Double spacing hack % new option: doublethm for double-spaced theorems \def\ds@doublethm{\def\thesisthm {\advance\@topsep \baselineskip % adjust back again (see \@trivlist) \def\baselinestretch{\mystretch}% \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi \advance\@topsep -\baselineskip}} \def\thesisthm{} % single-spaced theorems by default % Information for Signature Page (with \author, \title, and \date) \def\title#1{\gdef\@title{\uppercase{#1}}} \def\degree#1{\gdef\@regdegree{#1} \gdef\@degree{\uppercase{#1}}} \def\department#1{\gdef\@department{#1}} \def\rankanddegrees#1{\gdef\@rankanddegrees{#1}} \def\distribstmt#1{\gdef\@distribstmt{#1}} % Added by tgrohrer \gdef\@distribstmt{Approved for public release; distribution is unlimited} % Signature Page for single author, unlimited distribution % Would need to modify this for any variation % macros for signature lines below: \def\siglabel#1{\vbox to0pt{% \vspace{0.25in}\noindent\hbox to0pt{#1\hss}\vss}} \def\approval#1{\par \vspace{0.17in}\noindent\hspace{2.1in}% \parbox[t][0.6 in][t]{4.5in}{ \strut#1\strut}} \newenvironment{signaturepage}{\cleardoublepage \setcounter{page}{3} % always starts on page iii \begin{center} % tgrohrer Changed earlier distribution statement line to % the current next line. {\distribfont\bf\@distribstmt}\par\vspace{\fill} {\large\bf\@title}\\\ \\ {\@author}\\\@rankanddegrees \par\vspace{\fill} Submitted in partial fulfillment of the\\ requirements for the degree of\\\ \\ {\bf\@degree}\\\ \\ from the\\\ \\ {\bf\NPS\\\@date} \end{center} \vspace{\fill} \begin{singlespace} \siglabel{Author:}\approval{\@author} \par\siglabel{Approved by:}}% {\end{singlespace} %\vspace{\fill} \clearpage} % Thesis based on report %%% most of what follows borrowed from report.sty: % REPORT STANDARD DOCUMENT STYLE -- Released 14 January 1992 % for LaTeX version 2.09 % Copyright (C) 1992 by Leslie Lamport \def\contentsname{TABLE OF CONTENTS} \def\listfigurename{LIST OF FIGURES} \def\listtablename{LIST OF TABLES} \def\bibname{LIST OF REFERENCES} \def\indexname{INDEX} \def\figurename{Figure} \def\tablename{Table} \def\chaptername{CHAPTER} \def\appendixname{APPENDIX} \def\partname{PART} \def\abstractname{ABSTRACT} \def\distribname{INITIAL DISTRIBUTION LIST} \@options % take care of any options left \@do@bi@ % kluge for no bold italic % Here read in rep12.sty (12pt size): % \input rep12.sty\relax % now have just inserted rep12.sty below %%%%%%%%%%%%%%%%%%%%% start of rep12.sty %%%%%%%%%%%% % REPORT STANDARD DOCUMENT STYLE -- Released 14 Jan 1992 % for LaTeX version 2.09 % Copyright (C) 1992 by Leslie Lamport \lineskip 1pt \normallineskip 1pt \def\@normalsize{\@setsize\normalsize{14.5pt}\xiipt\@xiipt \abovedisplayskip 12\p@ plus3\p@ minus7\p@ \belowdisplayskip \abovedisplayskip \abovedisplayshortskip \z@ plus3\p@ \belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ \let\@listi\@listI} \def\small{\@setsize\small{13.6pt}\xipt\@xipt \abovedisplayskip 11\p@ plus3\p@ minus6\p@ \belowdisplayskip \abovedisplayskip \abovedisplayshortskip \z@ plus3\p@ \belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ \def\@listi{\leftmargin\leftmargini \parsep 4.5\p@ plus2\p@ minus\p@ \itemsep \parsep \topsep 9\p@ plus3\p@ minus5\p@}} \def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt \abovedisplayskip 10\p@ plus2\p@ minus5\p@ \belowdisplayskip \abovedisplayskip \abovedisplayshortskip \z@ plus3\p@ \belowdisplayshortskip 6\p@ plus3\p@ minus3\p@ \def\@listi{\leftmargin\leftmargini \topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@ \itemsep \parsep}} \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt} \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt} \def\large{\@setsize\large{18pt}\xivpt\@xivpt} \def\Large{\@setsize\Large{22pt}\xviipt\@xviipt} \def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt} \def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt} \let\Huge=\huge \normalsize \marginparwidth 68pt \marginparsep 10pt \columnsep 10pt \columnseprule 0pt \footnotesep 8.4pt \skip\footins 10.8pt plus 4pt minus 2pt \floatsep 14pt plus 2pt minus 4pt \textfloatsep 20pt plus 2pt minus 4pt \intextsep 14pt plus 4pt minus 4pt \@maxsep 20pt \dblfloatsep 14pt plus 2pt minus 4pt \dbltextfloatsep 20pt plus 2pt minus 4pt \@dblmaxsep 20pt \@fptop 0pt plus 1fil \@fpsep 10pt plus 2fil \@fpbot 0pt plus 1fil \@dblfptop 0pt plus 1fil \@dblfpsep 10pt plus 2fil% Space between floats on float page. \@dblfpbot 0pt plus 1fil \marginparpush 7pt \parskip 0pt plus 1pt \parindent 1.5em \partopsep 3pt plus 2pt minus 2pt \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus-1ex minus -.2ex}{2.3ex plus.2ex}{\reset@font\Large\bf}} \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\large\bf}} \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus -1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\normalsize\bf}} \def\paragraph{\@startsection {paragraph}{4}{\z@}{3.25ex plus1ex minus.2ex}{-1em}{\reset@font \normalsize\bf}} \def\subparagraph{\@startsection {subparagraph}{4}{\parindent}{3.25ex plus1ex minus .2ex}{-1em}{\reset@font\normalsize\bf}} \def\chaptermark#1{} \leftmargini 2.5em \leftmarginii 2.2em \leftmarginiii 1.87em \leftmarginiv 1.7em \leftmarginv 1em \leftmarginvi 1em \leftmargin\leftmargini \labelsep .5em \labelwidth\leftmargini\advance\labelwidth-\labelsep \def\@listI{\leftmargin\leftmargini \parsep 5\p@ plus2.5\p@ minus\p@ \topsep 10\p@ plus4\p@ minus6\p@ \itemsep 5\p@ plus2.5\p@ minus\p@} \let\@listi\@listI \@listi \def\@listii{\leftmargin\leftmarginii \labelwidth\leftmarginii\advance\labelwidth-\labelsep \topsep 5\p@ plus2.5\p@ minus\p@ \parsep 2.5\p@ plus\p@ minus\p@ \itemsep \parsep} \def\@listiii{\leftmargin\leftmarginiii \labelwidth\leftmarginiii\advance\labelwidth-\labelsep \topsep 2.5\p@ plus\p@ minus\p@ \parsep \z@ \partopsep \p@ plus\z@ minus\p@ \itemsep \topsep} \def\@listiv{\leftmargin\leftmarginiv \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} \def\@listv{\leftmargin\leftmarginv \labelwidth\leftmarginv\advance\labelwidth-\labelsep} \def\@listvi{\leftmargin\leftmarginvi \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} %%%%%%%%%%%%%%%%%%%%% end of rep12.sty %%%%%%%%%%%% %\input doublespace.sty % file (modified) inserted below %%%%%%%%%%%%%%%%%%%%% start of doublespace.sty %%%%%%%%%%%% % See original file for documentation %---New command "\setstretch" (slightly more mnemonic... and easier to type) \def\setstretch#1{\renewcommand{\baselinestretch}{#1}} %---Stretch the baseline BEFORE calculating the strut size. This improves % spacing below tabular environments etc., probably... %\def\@setsize#1#2#3#4{\@nomath#1 % \let\@currsize#1\baselineskip % #2\baselineskip\baselinestretch\baselineskip % \parskip\baselinestretch\parskip % \setbox\strutbox\hbox{\vrule height.7\baselineskip % depth.3\baselineskip width\z@} % \normalbaselineskip\baselineskip#3#4} %---Increase the space between last line of text and footnote rule. \skip\footins 20pt plus4pt minus4pt %---Reset baselinestretch within footnotes and floats. \def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner \@parmoderr\@floatpenalty\z@ \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n \@tfor \@tempa :=#2\do {\if\@tempa h\advance\@tempcnta \@ne\fi \if\@tempa t\advance\@tempcnta \tw@\fi \if\@tempa b\advance\@tempcnta 4\relax\fi \if\@tempa p\advance\@tempcnta 8\relax\fi }\global\count\@currbox\@tempcnta}\@fltovf\fi \global\setbox\@currbox\vbox\bgroup \def\baselinestretch{1}\small\normalsize \boxmaxdepth\z@ \hsize\columnwidth \@parboxrestore} \long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\columnwidth \@parboxrestore \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext {\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}} % A single spaced quote (say) is done by surrounding singlespace with quote. \def\singlespace{% \vskip\parskip% \vskip\baselineskip% \def\baselinestretch{1}% \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi% \vskip-\parskip% \vskip-\baselineskip% } \def\endsinglespace{\par} % spacing, doublespace and onehalfspace all are meant to INCREASE the % spacing (i.e. calling onehalfspace from within doublespace will not % produce a graceful transition between spacings) % Modified by D. Canright to get grouping right \def\spacing#1{\par \begingroup \def\baselinestretch{#1}% \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi} \def\endspacing{\par \vskip \parskip \vskip \baselineskip \endgroup \vskip -\parskip \vskip -\baselineskip } \def\onehalfspace{\spacing{1.5}} \let\endonehalfspace=\endspacing \def\doublespace{\spacing{2}} \let\enddoublespace=\endspacing %%%%%%%%%%%%%%%%%%%%% end of doublespace.sty %%%%%%%%%%%% %\input titlepag.sty % default is separate page \def\maketitle{} % just elimnate \maketitle instead %%% Now modify parameters set by rep12.sty: \oddsidemargin 0.25in \evensidemargin 0.25in \topmargin\z@ \headheight\z@ \headsep\z@ \topskip = 12pt \footskip 0.5in \textheight 8.5in \textwidth 6in \footnotesep 1.5\footnotesep % one-and-a-half-space between footnotes % (nearly) all indentation is based on this new unit: \newlength{\thesisindent}\setlength{\thesisindent}{0.5in} % To keep track of indentation level, use counter: \newcounter{thesislevel} % to keep track of heading level \setcounter{thesislevel}{0} \def\setthesisindent{\ifnum\value{thesislevel}>1% \addtocounter{thesislevel}{-1}% \parindent=\value{thesislevel}\thesisindent\else\parindent=\thesisindent \addtocounter{thesislevel}{1}\fi} % modify chapter for 1.0" from top, etc. % also, elim. \@makeschapterhead, so all formatting in one place \def\@makechapterhead#1{% \vspace*{-0.25in}% {\centering\def\baselinestretch{1}\Large \bf\tolerance\@m #1\par \nobreak \vskip 24pt }} % modify for indentation \def\chapter{\cleardoublepage \global\@topnum\z@ \setcounter{thesislevel}{0}\setthesisindent\@afterindenttrue \secdef\@chapter\@schapter} % modify for uppercase toc entry \def\@chapter[#1]#2{\refstepcounter{chapter}% \typeout{\chaptername\space\arabic{chapter}.}% \addcontentsline{toc}{chapter}{\protect \numberline{\labelchapter}\uppercase{#1}}% \chaptermark{\uppercase{#1}}% \@makechapterhead{\labelchapter\hskip\thesisindent\uppercase{#2}}% \@afterheading } \def\@schapter#1{\@makechapterhead{\uppercase{#1}}\@afterheading} % modify whole approach to appendices to include Appendix appropriately % NOTE: DOES NOT FOLLOW STANDARD LATEX MEANING OF \appendix! % use \appendix{title} for numbered, \appendix*{title} for single \def\appendix{\cleardoublepage \@ifundefined{ap@pen@dix}{\to@appendix}{} % check flag, for 1st app. \global\@topnum\z@ \setcounter{thesislevel}{0}\setthesisindent\@afterindenttrue \secdef\@appendix\@sappendix} % modify for uppercase toc entry \def\@appendix[#1]#2{\refstepcounter{chapter}% \typeout{\appendixname\space\thechapter.}% \addcontentsline{toc}{chapter}{\labelappendix\space\uppercase{#1}}% \chaptermark{\uppercase{#1}}% \@makechapterhead{\labelappendix\space\uppercase{#2}}% \@afterheading } % include toc entry \def\@sappendix#1{% \typeout{\appendixname.}% \addcontentsline{toc}{chapter}{\appendixname\@. \uppercase{#1}}% \@makechapterhead{\appendixname\@. \uppercase{#1}}\@afterheading} % modify numbering scheme in appendices \def\to@appendix{\global\def\ap@pen@dix{OK}% this is a flag, set at first app. \setcounter{chapter}{0}% \setcounter{section}{0}% \def\thechapter {\Alph{chapter}}% \def\thesection {\arabic{section}}% \def\thesubsection {\alph{subsection}}% \def\thesubsubsection {\roman{subsubsection}}% } % the \@ puts sentence spacing after period \def\labelappendix{\appendixname\space\thechapter\@.} % modify styles \def\section{\@startsection {section}{1}{\z@}{24pt}{0.01pt}{\reset@font\large\bf}} \def\subsection{\@startsection {subsection}{2}{\thesisindent}{12pt}{0.01pt}{\reset@font\large\bf}} \def\subsubsection{\@startsection {subsubsection}{3}{2\thesisindent}{\z@}{0.01pt}% {\reset@font\normalsize\subsubfont}} \def\paragraph{\@startsection {paragraph}{4}{3\thesisindent}{\z@}{-2em}{\reset@font\normalsize\rm}} \def\subparagraph{\@startsection {subparagraph}{5}{4\thesisindent}{\z@}{-2em}{\reset@font\normalsize\rm}} % Here is way to get back to some former level of indentation \def\tochapter{\setcounter{thesislevel}{0}\setthesisindent} \def\tosection{\setcounter{thesislevel}{1}\setthesisindent} \def\tosubsection{\setcounter{thesislevel}{2}\setthesisindent} \def\tosubsubsection{\setcounter{thesislevel}{3}\setthesisindent} \def\toparagraph{\setcounter{thesislevel}{4}\setthesisindent} \def\tosubparagraph{\setcounter{thesislevel}{5}\setthesisindent} % Modify inner workings of LaTex sectioning commands: % \@startsection, \@sect, \@ssect (from latex.tex) % startsection now sets thesislevel to track indentation \def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi \par \@tempskipa #4\relax \setcounter{thesislevel}{#2}\@afterindenttrue \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi \if@nobreak \everypar{}\else \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}} % sect indents title right, capitalizes title for section \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth \def\@svsec{\hskip\thesisindent}\else \refstepcounter{#1}\edef\@svsec {\hbox to \thesisindent{\csname label#1\endcsname\hfil}}\fi \@tempskipa #5\relax \ifdim \@tempskipa>\z@ \begingroup \def\baselinestretch{1}#6\relax \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M\tolerance\@m\ifnum #2<2 \uppercase{#8}\else#8\fi \par}\endgroup \csname #1mark\endcsname{#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname label#1\endcsname}\fi \ifnum #2<2 \uppercase{#7}\else#7\fi}\else \def\@svsechd{#6\hskip #3\relax %% \relax added 2 May 90 \@svsec #8.\csname #1mark\endcsname {#7}\addcontentsline {toc}{#1}{\ifnum #2>\c@secnumdepth \else \protect\numberline{\csname label#1\endcsname}\fi #7}}\fi \setthesisindent\@xsect{#5}} % sect indents title right, capitalizes title for section \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax \ifdim \@tempskipa>\z@ \begingroup \def\baselinestretch{1}#4\relax \@hangfrom{\hskip #1\hskip\thesisindent }{\interlinepenalty \@M\tolerance\@m \ifnum\value{thesislevel}<2 \uppercase{#5}\else#5\fi \par}\endgroup \else \def\@svsechd{#4\hskip #1\relax #5.}\fi \setthesisindent\@xsect{#3}} \setcounter{secnumdepth}{5} % deep numbering % modify list indentation \leftmargini \thesisindent \leftmarginii 0.5\thesisindent \leftmarginiii 0.5\thesisindent \leftmarginiv 0.5\thesisindent \leftmarginv 0.5\thesisindent \leftmarginvi 0.5\thesisindent %%% end of rep12.sty, now back to report.sty \def\labelenumi{\theenumi.} \def\theenumi{\arabic{enumi}} \def\labelenumii{(\theenumii)} \def\theenumii{\alph{enumii}} \def\p@enumii{\theenumi} \def\labelenumiii{\theenumiii.} \def\theenumiii{\roman{enumiii}} \def\p@enumiii{\theenumi(\theenumii)} \def\labelenumiv{\theenumiv.} \def\theenumiv{\Alph{enumiv}} \def\p@enumiv{\p@enumiii\theenumiii} \def\labelitemi{$\m@th\bullet$} \def\labelitemii{\bf --} \def\labelitemiii{$\m@th\ast$} \def\labelitemiv{$\m@th\cdot$} % modify LaTex inner workings: make ALL lists single-spaced !! % Note: this approach leaves \topsep extra vertical space before and after list \def\@trivlist{\@topsepadd\topsep \if@noskipsec \leavevmode \fi \ifvmode \advance\@topsepadd\partopsep \else \unskip\par\fi \if@inlabel \@noparitemtrue \@noparlisttrue \else \@noparlistfalse \@topsep\@topsepadd \fi \advance\@topsep \parskip \leftskip\z@\rightskip\@rightskip \parfillskip\@flushglue \@setpar{\if@newlist\else{\@@par}\fi}% \global\@newlisttrue \@outerparskip\parskip \advance\@topsep \baselineskip % adjust vertical spacing for lists \def\baselinestretch{1}% \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi% \advance\@topsep -\baselineskip } % modify LaTeX theorem environments to allow double-spaced option \def\@begintheorem#1#2{\trivlist \thesisthm \item[\hskip \labelsep{\bf #1\ #2}]\it} \def\@opargbegintheorem#1#2#3{\trivlist \thesisthm \item[\hskip \labelsep{\bf #1\ #2\ (#3)}]\it} % modify indentation of verse, quotation, quote, description \def\verse{\let\\=\@centercr \list{}{\leftmargin0.5\thesisindent \itemsep\z@ \itemindent -0.5\thesisindent \listparindent \itemindent \rightmargin\leftmargin\advance\leftmargin 0.5\thesisindent }\item[]} \def\endverse{\endlist} \def\quotation{\list{}{\leftmargin0.5\thesisindent \listparindent \thesisindent \itemindent\listparindent \rightmargin\leftmargin\parsep \z@ plus\p@ }\item[]} \def\endquotation{\endlist} \def\quote{\list{}{\leftmargin0.5\thesisindent \rightmargin\leftmargin}\item[]} \def\endquote{\endlist} \def\descriptionlabel#1{\hspace\labelsep \bf #1} \def\description{\list{}{\labelwidth\z@ \itemindent-0.5\thesisindent \rightmargin0.5\thesisindent\let\makelabel\descriptionlabel}} \let\enddescription\endlist % minor modifications: eliminate twocolumn possibility: \def\titlepage{\@restonecolfalse\thispagestyle{empty}\c@page\z@} \def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi} \arraycolsep 5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt \tabbingsep \labelsep \skip\@mpfootins = \skip\footins \fboxsep = 3pt \fboxrule = .4pt \newcounter {part} \newcounter {chapter} \newcounter {section}[chapter] \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] % modify styles: \def\thepart {\arabic{part}} \def\thechapter {\Roman{chapter}} \def\thesection {\Alph{section}} \def\thesubsection {\arabic{subsection}} \def\thesubsubsection {\alph{subsubsection}} \def\theparagraph {\arabic{paragraph}} \def\thesubparagraph {\roman{subparagraph}} % define labels to include punctuation, for toc, etc. \def\labelpart {\thepart.} \def\labelchapter {\thechapter.} \def\labelsection {\thesection.} \def\labelsubsection {\thesubsection.} \def\labelsubsubsection {\thesubsubsection.} \def\labelparagraph {(\theparagraph)} \def\labelsubparagraph {(\thesubparagraph)} % modify part similarly to chapter: \def\part{\cleardoublepage \thispagestyle{plain}% \if@twocolumn \onecolumn \@tempswatrue \else \@tempswafalse \fi \hbox{}\vfil \setcounter{thesislevel}{-1}\setthesisindent \secdef\@part\@spart} \def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% \addcontentsline{toc}{part}{\labelpart \hspace{1em}\uppercase{#1}}\else \addcontentsline{toc}{part}{\uppercase{#1}}\fi \markboth{}{}% {\centering \interlinepenalty \@M\tolerance\@m \ifnum \c@secnumdepth >-2\relax \huge\bf \partname~\labelpart \par \vskip 20\p@\fi \Huge \bf \uppercase{\uppercase{#2}}\par}\@endpart} \def\@endpart{\vfil\newpage \if@twoside \hbox{}% \thispagestyle{empty}% \newpage \fi \if@tempswa \twocolumn \fi} \def\@spart#1{{\centering \interlinepenalty \@M\tolerance\@m \Huge \bf \uppercase{#1}\par}\@endpart} \def\@pnumwidth{0.5\thesisindent} \def\@tocrmarg {\thesisindent} \def\@dotsep{4.5} \setcounter{tocdepth}{2} \def\tableofcontents{\@restonecolfalse \chapter*{\contentsname \@mkboth{\contentsname}{\contentsname}}% \@starttoc{toc}} \def\l@part#1#2{\addpenalty{-\@highpenalty}% \addvspace{2.25em plus\p@}% space above part line \begingroup \@tempdima\thesisindent \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\large \bf \leavevmode \uppercase{#1}\hfil \hbox to\@pnumwidth{\hss #2}}\par \nobreak \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}%% suggested by \endgroup} % modify for uppercase, no vskip \def\l@chapter#1#2{\addpenalty{-\@highpenalty}% % \vskip 1.0em plus\p@ \@tempdima\thesisindent \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \bf \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip % modify to put dot leaders for chapters (1 line to 3) % \uppercase{#1}\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par \uppercase{#1}\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill \nobreak\hbox to\@pnumwidth{\hss #2}\par \penalty\@highpenalty \endgroup} % modify indents \def\l@section{\@dottedtocline{1}{\thesisindent}{\thesisindent}} \def\l@subsection{\@dottedtocline{2}{2\thesisindent}{\thesisindent}} \def\l@subsubsection{\@dottedtocline{3}{3\thesisindent}{\thesisindent}} \def\l@paragraph{\@dottedtocline{4}{4\thesisindent}{\thesisindent}} \def\l@subparagraph{\@dottedtocline{5}{5\thesisindent}{\thesisindent}} \def\listoffigures{% \chapter*{\listfigurename\@mkboth{\listfigurename}% {\listfigurename}}\@starttoc{lof}} \def\l@figure{\@dottedtocline{1}{\z@}{\thesisindent}} \def\listoftables{% \chapter*{\listtablename\@mkboth{\listtablename}% {\listtablename}}\@starttoc{lot}} \def\l@table{\@dottedtocline{1}{\z@}{\thesisindent}} % modify to put entry in toc \def\thebibliography#1{\chapter*{\bibname\@mkboth {\bibname}{\bibname}}% \addcontentsline{toc}{chapter}{\bibname}% \list {\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumiv}% \let\p@enumiv\@empty \def\theenumiv{\arabic{enumiv}}}% \def\newblock{\hskip .11em plus.33em minus.07em}% \sloppy\clubpenalty4000\widowpenalty4000 \sfcode`\.=\@m} \def\endthebibliography{% \def\@noitemerr{\@warning{Empty `thebibliography' environment}}% \endlist} %%% added redundant definition, for obsolete installations \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces} \newif\if@restonecol \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35\p@\twocolumn[\@makeschapterhead{\indexname}]% \@mkboth{\indexname}{\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ plus .3\p@\relax\let\item\@idxitem} \def\@idxitem{\par\hangindent 40\p@} \def\subitem{\par\hangindent 40\p@ \hspace*{20\p@}} \def\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}} \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} \def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax} \def\footnoterule{\kern-3\p@ \hrule width .4\columnwidth \kern 2.6\p@} \@addtoreset{footnote}{chapter} \long\def\@makefntext#1{\parindent 1em\noindent \hbox to 1.8em{\hss$\m@th^{\@thefnmark}$}#1} \setcounter{topnumber}{2} \def\topfraction{.7} \setcounter{bottomnumber}{1} \def\bottomfraction{.7} \setcounter{totalnumber}{3} \def\textfraction{.1} \def\floatpagefraction{.7} \setcounter{dbltopnumber}{2} \def\dbltopfraction{.7} \def\dblfloatpagefraction{.5} % modify for period after number in List of Figures/Tables \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname ext@#1\endcsname}{#1}{\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}\begingroup \@parboxrestore \normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \endgroup} \long\def\@makecaption#1#2{% \vskip 10\p@ \setbox\@tempboxa\hbox{#1 #2}% \ifdim \wd\@tempboxa >\hsize #1 #2\par \else \hbox to\hsize{\hfil\box\@tempboxa\hfil}% \fi} \newcounter{figure} % consecutive \def\thefigure{\arabic{figure}} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure.} \def\figure{\@float{figure}} \let\endfigure\end@float \@namedef{figure*}{\@dblfloat{figure}} \@namedef{endfigure*}{\end@dblfloat} \newcounter{table} % consecutive \def\thetable{\Roman{table}} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable.} \def\table{\@float{table}} \let\endtable\end@float \@namedef{table*}{\@dblfloat{table}} \@namedef{endtable*}{\end@dblfloat} \mark{{}{}} \def\ps@headings{\let\@mkboth\markboth \def\@oddfoot{}\def\@evenfoot{}% No feet. \def\@oddhead{{\sl \rightmark}\hfil \rm\thepage}% Heading. \def\chaptermark##1{\markright {\ifnum \c@secnumdepth >\m@ne \thechapter. \ \fi ##1}}} \def\ps@myheadings{\let\@mkboth\@gobbletwo \def\@oddhead{{\sl\rightmark}\hfil \rm\thepage}% \def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\sl\leftmark}% \def\@evenfoot{}\def\chaptermark##1{}\def\sectionmark##1{}% \def\subsectionmark##1{}} % military style date \def\today{\number\day\space \ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\year} \@addtoreset{equation}{chapter} \def\theequation{\thechapter.\arabic{equation}} % for subequation numbering: \newcounter{oldeqn} % main number \newcounter{subeqn} % sub number % redefine \@eqnnum to increment subeqn, for every numbered equation \def\@eqnnum{{\reset@font\rm (\theequation)}\stepcounter{subeqn}} \def\fixsublabel{\let\@currentlabel\theequation} % to label subeqns % note: the \fixsublabel goes just before \label for a subequation in eqnarray % this is necessary because redefining \@currentlabel inside \halign is % local to column element (portion of equation) % use \startsubeqn INSIDE equation or eqnarray environment % just before first sub-equation \def\startsubeqn{% \setcounter{oldeqn}{\value{equation}}% \setcounter{subeqn}{1}% \gdef\theequation{\thechapter.\arabic{oldeqn}\alph{subeqn}}\fixsublabel} % use \stopsubeqn INSIDE equation or eqnarray environment % just before first regular equation (which could be in a later environment) \def\stopsubeqn{% \setcounter{equation}{\value{oldeqn}}% \stepcounter{equation}% \gdef\theequation{\thechapter.\arabic{equation}}\fixsublabel} \ps@plain \pagenumbering{arabic} \raggedbottom \onecolumn %%% END of report.sty % modify LaTex citation format to include Ref. % \def\@cite#1#2{[Ref. {#1\if@tempswa : #2\fi}]} % initialize indentation: \setcounter{thesislevel}{0}\setthesisindent \def\NPS{NAVAL POSTGRADUATE SCHOOL} \def\nps{Naval Postgraduate School} % adjust penalties to avoid club and widow lines: \clubpenalty5000\widowpenalty5000 % macro for blank page to paste figure: \newenvironment{figurepage}{\begin{figure} \vskip 0.95\textheight minus60pt\relax}{\end{figure}} % new environments for front matter: \def\abstract{\chapter*{Abstract}\par} \def\endabstract{\par} \def\acknowledgment{\chapter*{Acknowledgments}\par} \def\endacknowledgment{\par} \def\disclaimer{\chapter*{Disclaimer}\par} \def\enddisclaimer{\par} % new environment for Initial Distribution: \newenvironment{distribution}{% \chapter*{\distribname}\par \addcontentsline{toc}{chapter}{\distribname}% \begin{list}{\arabic{enumiv}.}{\usecounter{enumiv}% \leftmargin0.5\thesisindent\rightmargin\leftmargin}}{\end{list}} % use \item Recipient\dotfill #copies\\Address for each recipient \endinput