├── demo.png ├── main.pdf ├── Figures ├── Electron.pdf └── bits-logo.pdf ├── Pictures └── bits_logo.png ├── Primitives └── Electron.doc ├── Appendices ├── AppendixA.tex └── AppendixTemplate.tex ├── LICENSE ├── .gitignore ├── Bibliography.bib ├── Makefile ├── README.md ├── vector.sty ├── Chapters ├── ChapterTemplate.tex └── Chapter1.tex ├── Missing Packages ├── rotating.sty ├── booktabs.sty ├── subfigure.sty ├── vmargin.sty ├── fancyhdr.sty ├── setspace.sty └── caption.sty ├── variables.tex ├── main.tex ├── lstpatch.sty └── Thesis.cls /demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sidcode/bits-pilani-thesis-template-latex/HEAD/demo.png -------------------------------------------------------------------------------- /main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sidcode/bits-pilani-thesis-template-latex/HEAD/main.pdf -------------------------------------------------------------------------------- /Figures/Electron.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sidcode/bits-pilani-thesis-template-latex/HEAD/Figures/Electron.pdf -------------------------------------------------------------------------------- /Figures/bits-logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sidcode/bits-pilani-thesis-template-latex/HEAD/Figures/bits-logo.pdf -------------------------------------------------------------------------------- /Pictures/bits_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sidcode/bits-pilani-thesis-template-latex/HEAD/Pictures/bits_logo.png -------------------------------------------------------------------------------- /Primitives/Electron.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sidcode/bits-pilani-thesis-template-latex/HEAD/Primitives/Electron.doc -------------------------------------------------------------------------------- /Appendices/AppendixA.tex: -------------------------------------------------------------------------------- 1 | % Appendix A 2 | 3 | \chapter{Appendix Title Here} % Main appendix title 4 | 5 | \label{AppendixA} % For referencing this appendix elsewhere, use \ref{AppendixA} 6 | 7 | \lhead{Appendix A. \emph{Appendix Title Here}} % This is for the header on each page - perhaps a shortened title 8 | 9 | Write your Appendix content here. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. 2 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to: 3 | Creative Commons, 4 | 444 Castro Street, 5 | Suite 900, 6 | Mountain View, 7 | California, 8 | 94041, 9 | USA 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.acn 2 | *.acr 3 | *.alg 4 | *.aux 5 | *.bbl 6 | *.blg 7 | *.dvi 8 | *.fdb_latexmk 9 | *.fls 10 | *.glg 11 | *.glo 12 | *.gls 13 | *.idx 14 | *.ilg 15 | *.ind 16 | *.ist 17 | *.lof 18 | *.log 19 | *.lot 20 | *.maf 21 | *.mtc 22 | *.mtc0 23 | *.nav 24 | *.nlo 25 | *.out 26 | *.pdfsync 27 | *.ps 28 | *.snm 29 | *.swp 30 | *.synctex.gz 31 | *.toc 32 | *.vrb 33 | *.xdy 34 | *.tdo 35 | .refresh 36 | -------------------------------------------------------------------------------- /Appendices/AppendixTemplate.tex: -------------------------------------------------------------------------------- 1 | % Appendix Template 2 | 3 | \chapter{Appendix Title Here} % Main appendix title 4 | 5 | \label{AppendixX} % Change X to a consecutive letter; for referencing this appendix elsewhere, use \ref{AppendixX} 6 | 7 | \lhead{Appendix X. \emph{Appendix Title Here}} % Change X to a consecutive letter; this is for the header on each page - perhaps a shortened title 8 | 9 | Write your Appendix content here. -------------------------------------------------------------------------------- /Bibliography.bib: -------------------------------------------------------------------------------- 1 | @misc{ Nobody06, 2 | author = "Nobody Jr", 3 | title = "My Article", 4 | year = "2006" 5 | } 6 | 7 | @inproceedings{kendall2007practical, 8 | title={Practical malware analysis}, 9 | author={Kendall, Kris and McMillan, Chad}, 10 | booktitle={Black Hat Conference, USA}, 11 | pages={10}, 12 | year={2007} 13 | } 14 | 15 | @article{cmu-malware, 16 | title={Malware Capability Development Patterns Respond To Defenses: Two Case Studies}, 17 | author={O’Meara, Kyle and Shick, Deana and Spring, Jonathan and Stoner, Edward}, 18 | year={2016} 19 | } 20 | 21 | @online{cyber-killchain, 22 | title = {Cyber Kill Chain}, 23 | url = {http://cyber.lockheedmartin.com/solutions/cyber-kill-chain 24 | }, 25 | titleaddon = {{Lockheed Martin}}, 26 | urldate = {2016-03-20} 27 | } -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for BPHC Latex Report Class 2 | 3 | LATEXMK=latexmk 4 | LATEXOPT=-jobname="Thesis" -file-line-error 5 | MAIN=main 6 | THESIS=$(MAIN).tex 7 | SOURCES=$(THESIS) Makefile 8 | 9 | .PHONY: clean FORCE all 10 | 11 | all: $(MAIN).pdf 12 | 13 | cont: FORCE 14 | $(LATEXMK) -f -pdf -pvc $(LATEXOPT) $(THESIS) 15 | 16 | $(thesis): FORCE 17 | latexmk -pdf -f $(thesis) 18 | 19 | $(MAIN).pdf: .refresh $(SOURCES) 20 | $(LATEXMK) -f -pdf $(LATEXOPT) $(THESIS) 21 | 22 | clean: 23 | $(LATEXMK) -c $(MAIN).tex 24 | find . \( -name "*.toc" -o -name "*.fdb_latexmk" \ 25 | -o -name "*.pdfsync" \ 26 | -o -name "*.log" \ 27 | -o -name "*.fls" \ 28 | -o -name "*.aux" \ 29 | -o -name "*.bbl" \ 30 | -o -name "*.blg" \ 31 | -o -name "*.glo" \ 32 | -o -name "*.ist" \ 33 | -o -name "*.lof" \ 34 | -o -name "*.lot" \ 35 | -o -name "*.out" \ 36 | -o -name "*.toc" \ 37 | \) -print0 | xargs -0 rm -f 38 | 39 | FORCE: 40 | touch .refresh 41 | $(MAKE) $(MAIN).pdf 42 | 43 | .refresh: 44 | touch .refresh 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BITS Pilani Reports LaTeX Template 2 | ======================= 3 | 4 | A template and style file for generating reports in LaTeX. It is designed keeping a BITSian's thesis in mind but can be extended by anyone to adapt to the needs of the respective university reports (project reports, PhD Thesis, etc). 5 | 6 | The title page looks like this - 7 | 8 | ![BITS Pilani Thesis](demo.png "Thesis Title Page") 9 | 10 | 11 | Improvements - 12 | 13 | - The BITS Logo is now vectorized (taken from the BITS Branding Styleguide) 14 | - The template design (configured in ```Thesis.cls```) adheres to the required thesis design for 2016 (according to the official handout) 15 | - Support for ```biblatex``` instead of the existing ```natbib``` for added functionality 16 | 17 | BITS Pilani, Pilani Campus Thesis template 18 | By - Siddhant Shrivastava 19 | 20 | This thesis builds upon the BITS Pilani Thesis Class from Darshit Shah - 21 | https://github.com/darnir/BPHC-LaTeX-Report-Class 22 | 23 | This template is heavily based on the work of Steven Gunn and Sunil Patel 24 | 25 | Steven Gunn - http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/ 26 | 27 | Sunil Patel - http://www.sunilpatel.co.uk/thesis-template/ 28 | 29 | 30 | Creative Commons License
LaTeX Thesis Class File by Darshit Shah is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at http://www.latextemplates.com/template/masters-doctoral-thesis. 31 | -------------------------------------------------------------------------------- /vector.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `vector.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% vector.dtx (with options: `package') 8 | %% 9 | %% Copyright (C) 1994 by Nick Efford 10 | %% 11 | %% This file is distributed in the hope that it will be useful, 12 | %% but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | %% 15 | \NeedsTeXFormat{LaTeX2e} 16 | \ProvidesPackage{vector}[1994/09/16 v1.0 vector macros for LaTeX2e (nde)] 17 | \RequirePackage{ifthen} 18 | \RequirePackage{calc} 19 | \newboolean{@wavy} 20 | \DeclareOption{wavy}{\setboolean{@wavy}{true}} 21 | \ProcessOptions 22 | \newcommand{\bvec}[1]{\ensuremath{\mathbf{#1}}} 23 | \newcommand{\buvec}[1]{\ensuremath{\mathbf{\hat{#1}}}} 24 | \newcommand{\svec}[1]{\ensuremath{\mathsf{#1}}} 25 | \newcommand{\suvec}[1]{\ensuremath{\mathsf{\hat{#1}}}} 26 | \ifthenelse{\boolean{@wavy}}{% 27 | \PackageInfo{vector}{wavy underlining selected} 28 | \newcommand{\undertilde}[1]{\mathord{\vtop{\ialign{##\crcr 29 | $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern1.5pt\nointerlineskip} 30 | $\hfil\tilde{}\hfil$\crcr\noalign{\kern1.5pt}}}}} 31 | \newcommand{\uvec}[1]{\ensuremath{\undertilde{#1}}} 32 | \newcommand{\uuvec}[1]{\ensuremath{\hat{\undertilde{#1}}}}}{% 33 | \newcommand{\uvec}[1]{\ensuremath{\underline{#1}}} 34 | \newcommand{\uuvec}[1]{\ensuremath{\hat{\underline{#1}}}}} 35 | \def\first@element{1} 36 | \newcommand{\firstelement}[1]{\def\first@element{#1}} 37 | \newcommand{\irvec}[2][n]{\ensuremath{{#2}_{\first@element},\ldots,{#2}_{#1}}} 38 | \newcommand{\icvec}[2][n]{% 39 | \begin{array}{c} 40 | {#2}_{\first@element}\\ \vdots\\ {#2}_{#1} 41 | \end{array}} 42 | \newcounter{vec@elem} 43 | \newcommand{\rvec}[3]{% 44 | \ensuremath{% 45 | \ifthenelse{#3 > #2}{% 46 | \setcounter{vec@elem}{#2} 47 | \whiledo{\value{vec@elem} < #3}% 48 | {{#1}_{\thevec@elem}, \stepcounter{vec@elem}}% 49 | {#1}_{#3}}{{#1}_{#2}}}} 50 | \newcommand{\cvec}[3]{% 51 | \ifthenelse{#3 > #2}{% 52 | \setcounter{vec@elem}{#2} 53 | \begin{array}{c} 54 | \whiledo{\value{vec@elem} < #3}% 55 | {{#1}_{\thevec@elem} \\ \stepcounter{vec@elem}}% 56 | {#1}_{#3} 57 | \end{array}}{{#1}_{#2}}} 58 | \endinput 59 | %% 60 | %% End of file `vector.sty'. 61 | -------------------------------------------------------------------------------- /Chapters/ChapterTemplate.tex: -------------------------------------------------------------------------------- 1 | % Chapter Template 2 | 3 | \chapter{Chapter Title Here} % Main chapter title 4 | 5 | \label{ChapterX} % Change X to a consecutive number; for referencing this chapter elsewhere, use \ref{ChapterX} 6 | 7 | \lhead{Chapter X. \emph{Chapter Title Here}} % Change X to a consecutive number; this is for the header on each page - perhaps a shortened title 8 | 9 | %---------------------------------------------------------------------------------------- 10 | % SECTION 1 11 | %---------------------------------------------------------------------------------------- 12 | 13 | \section{Main Section 1} 14 | 15 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ultricies lacinia euismod. Nam tempus risus in dolor rhoncus in interdum enim tincidunt. Donec vel nunc neque. In condimentum ullamcorper quam non consequat. Fusce sagittis tempor feugiat. Fusce magna erat, molestie eu convallis ut, tempus sed arcu. Quisque molestie, ante a tincidunt ullamcorper, sapien enim dignissim lacus, in semper nibh erat lobortis purus. Integer dapibus ligula ac risus convallis pellentesque. 16 | 17 | %----------------------------------- 18 | % SUBSECTION 1 19 | %----------------------------------- 20 | \subsection{Subsection 1} 21 | 22 | Nunc posuere quam at lectus tristique eu ultrices augue venenatis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam erat volutpat. Vivamus sodales tortor eget quam adipiscing in vulputate ante ullamcorper. Sed eros ante, lacinia et sollicitudin et, aliquam sit amet augue. In hac habitasse platea dictumst. 23 | 24 | %----------------------------------- 25 | % SUBSECTION 2 26 | %----------------------------------- 27 | 28 | \subsection{Subsection 2} 29 | Morbi rutrum odio eget arcu adipiscing sodales. Aenean et purus a est pulvinar pellentesque. Cras in elit neque, quis varius elit. Phasellus fringilla, nibh eu tempus venenatis, dolor elit posuere quam, quis adipiscing urna leo nec orci. Sed nec nulla auctor odio aliquet consequat. Ut nec nulla in ante ullamcorper aliquam at sed dolor. Phasellus fermentum magna in augue gravida cursus. Cras sed pretium lorem. Pellentesque eget ornare odio. Proin accumsan, massa viverra cursus pharetra, ipsum nisi lobortis velit, a malesuada dolor lorem eu neque. 30 | 31 | %---------------------------------------------------------------------------------------- 32 | % SECTION 2 33 | %---------------------------------------------------------------------------------------- 34 | 35 | \section{Main Section 2} 36 | 37 | Sed ullamcorper quam eu nisl interdum at interdum enim egestas. Aliquam placerat justo sed lectus lobortis ut porta nisl porttitor. Vestibulum mi dolor, lacinia molestie gravida at, tempus vitae ligula. Donec eget quam sapien, in viverra eros. Donec pellentesque justo a massa fringilla non vestibulum metus vestibulum. Vestibulum in orci quis felis tempor lacinia. Vivamus ornare ultrices facilisis. Ut hendrerit volutpat vulputate. Morbi condimentum venenatis augue, id porta ipsum vulputate in. Curabitur luctus tempus justo. Vestibulum risus lectus, adipiscing nec condimentum quis, condimentum nec nisl. Aliquam dictum sagittis velit sed iaculis. Morbi tristique augue sit amet nulla pulvinar id facilisis ligula mollis. Nam elit libero, tincidunt ut aliquam at, molestie in quam. Aenean rhoncus vehicula hendrerit. -------------------------------------------------------------------------------- /Missing Packages/rotating.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `rotating.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% rotating.dtx (with options: `package') 8 | %% Copyright (C) 1994 Sebastian Rahtz and Leonor Barroca. All 9 | %% rights reserved. Permission is granted to to customize the 10 | %% declarations in this file to serve the needs of your installation. 11 | %% However, no permission is granted to distribute a modified version of 12 | %% this file under its original name. 13 | %% 14 | \def\fileversion{2.10} 15 | \def\filedate{1995/08/22} 16 | \def\docdate {1995/01/06} 17 | %% File: rotating.dtx Copyright (C) 1995 Sebastian Rahtz and Leonor Barroca 18 | \ProvidesPackage{rotating}[\filedate\space\fileversion\space Rotation package] 19 | \NeedsTeXFormat{LaTeX2e} 20 | \newif\if@rot@twoside 21 | \DeclareOption{clockwise}{% this is for compatibility 22 | \AtBeginDocument{\setkeys{Grot}{units=360}}% 23 | } 24 | \DeclareOption{counterclockwise}{% 25 | \AtBeginDocument{\setkeys{Grot}{units=-360}}% 26 | } 27 | \DeclareOption{figuresleft}{% 28 | \@rot@twosidefalse 29 | \def\rot@LR{0}% 30 | } 31 | \DeclareOption{figuresright}{% 32 | \@rot@twosidefalse 33 | \def\rot@LR{-1}% 34 | } 35 | \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphics}} 36 | \PassOptionsToPackage{dvips}{graphics} 37 | \ExecuteOptions{clockwise} 38 | \if@twoside 39 | \@rot@twosidetrue 40 | \else 41 | \@rot@twosidefalse 42 | \fi 43 | \def\rot@LR{-1} 44 | \ProcessOptions 45 | \RequirePackage{graphicx} 46 | \RequirePackage{ifthen} 47 | \def\rotdriver#1{\makeatletter\input{#1.def}\makeatother} 48 | \newcount\r@tfl@t 49 | \r@tfl@t0 50 | \def\sideways{% 51 | \Grot@setangle{90}% 52 | \setbox\z@\hbox\bgroup\ignorespaces} 53 | \def\endsideways{% 54 | \unskip\egroup 55 | \Grot@x\z@ 56 | \Grot@y\z@ 57 | \Grot@box 58 | } 59 | \def\turn#1{% 60 | \Grot@setangle{#1}% 61 | \setbox\z@\hbox\bgroup\ignorespaces} 62 | \def\endturn{% 63 | \unskip\egroup 64 | \Grot@x\z@ 65 | \Grot@y\z@ 66 | \Grot@box 67 | } 68 | \def\rotate#1{% 69 | \Grot@setangle{#1}% 70 | \setbox\z@\hbox\bgroup\ignorespaces} 71 | \def\endrotate{% 72 | \unskip\egroup 73 | \Grot@x\z@ 74 | \Grot@y\z@ 75 | \wd0\z@\dp0\z@\ht0\z@ 76 | \Grot@box 77 | } 78 | \def\turnbox#1#2{% 79 | \Grot@setangle{#1}% 80 | \setbox\z@\hbox{{#2}}% 81 | \Grot@x\z@\Grot@y\z@ 82 | \wd0\z@\dp0\z@\ht0\z@ 83 | \Grot@box 84 | } 85 | \newsavebox\rot@float@box 86 | \def\@rotfloat#1{% 87 | \@ifnextchar[% 88 | {\@xrotfloat{#1}}% 89 | {\edef\@tempa{\noexpand\@xrotfloat{#1}[\csname fps@#1\endcsname]}\@tempa}% 90 | } 91 | \def\@xrotfloat#1[#2]{% 92 | \@float{#1}[#2]% 93 | \begin{lrbox}\rot@float@box 94 | \begin{minipage}\textheight 95 | } 96 | \def\end@rotfloat{% 97 | \end{minipage}\end{lrbox}% 98 | \global\advance\r@tfl@t by 1 99 | \label{RF\the\r@tfl@t}% 100 | \message{Adding sideways figure on }% 101 | \def\R@@page{\pageref{RF\the\r@tfl@t}}% 102 | \wd\rot@float@box\z@ 103 | \ht\rot@float@box\z@ 104 | \dp\rot@float@box\z@ 105 | \vbox to \textheight{% 106 | \setkeys{Grot}{units=360}% 107 | \if@rot@twoside 108 | \def\R@@page{\pageref{RF\the\r@tfl@t}}% 109 | \else 110 | \let\R@@page\rot@LR 111 | \fi 112 | \ifthenelse{\isodd{\R@@page}}{% 113 | \message{right hand page}% 114 | \vfill 115 | \centerline{\rotatebox{90}{\box\rot@float@box}}% 116 | }{% 117 | \message{left hand page}% 118 | \centerline{\rotatebox{-90}{\box\rot@float@box}}% 119 | \vfill 120 | }% 121 | }% 122 | \end@float 123 | } 124 | \def\sidewaysfigure{\@rotfloat{figure}} 125 | \let\endsidewaysfigure\end@rotfloat 126 | \def\sidewaystable{\@rotfloat{table}} 127 | \let\endsidewaystable\end@rotfloat 128 | \def\@rotdblfloat{% 129 | \if@twocolumn\let\reserved@a\@rotdbflt\else\let\reserved@a\@rotfloat\fi 130 | \reserved@a} 131 | \def\@rotdbflt#1{\@ifnextchar[{\@rotxdblfloat{#1}}{\@rotxdblfloat{#1}[tp]}} 132 | \def\@rotxdblfloat#1[#2]{% 133 | \hsize\textwidth\linewidth\textwidth 134 | \@float{#1}[#2]% 135 | \begin{lrbox}\rot@float@box 136 | \begin{minipage}\textheight 137 | } 138 | \def\end@rotdblfloat{% 139 | \end{minipage}\end{lrbox}% 140 | \global\advance\r@tfl@t by 1 141 | \label{RF\the\r@tfl@t}% 142 | \message{Adding sideways figure on }% 143 | \def\R@@page{\pageref{RF\the\r@tfl@t}}% 144 | \@tempdima\ht\rot@float@box 145 | \advance\@tempdima by \dp\rot@float@box 146 | \typeout{BOX wd: \the\wd\rot@float@box, ht: \the\ht\rot@float@box, dp: \the\dp\rot@float@box: so shift by .5 of \the\@tempdima}% 147 | \wd\rot@float@box\z@ 148 | \ht\rot@float@box\z@ 149 | \dp\rot@float@box\z@ 150 | \vbox to \textheight{% 151 | \setkeys{Grot}{units=360}% 152 | \if@rot@twoside 153 | \def\R@@page{\pageref{RF\the\r@tfl@t}}% 154 | \else 155 | \let\R@@page\rot@LR 156 | \fi 157 | \ifthenelse{\isodd{\R@@page}}{% 158 | \message{right hand page}% 159 | \vfill 160 | \hbox to\textwidth{\hfill\rotatebox{90}{\box\rot@float@box}\hfill}% 161 | }{% 162 | \message{left hand page}% 163 | \hbox to \textwidth{\hfill\rotatebox{-90}{\box\rot@float@box}\hfill}% 164 | \vfill 165 | }% 166 | }% 167 | \end@dblfloat 168 | } 169 | \newenvironment{sidewaystable*} 170 | {\@rotdblfloat{table}} 171 | {\end@rotdblfloat} 172 | \newenvironment{sidewaysfigure*} 173 | {\@rotdblfloat{figure}} 174 | {\end@rotdblfloat} 175 | 176 | \def\rotcaption{\refstepcounter\@captype\@dblarg{\@rotcaption\@captype}} 177 | \long\def\@rotcaption#1[#2]#3{% 178 | \addcontentsline{\csname ext@#1\endcsname}{#1}{% 179 | \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% 180 | \par 181 | \begingroup 182 | \@parboxrestore 183 | \normalsize 184 | \@makerotcaption{\csname fnum@#1\endcsname}{#3}% 185 | \endgroup} 186 | \long\def\@makerotcaption#1#2{% 187 | \setbox\@tempboxa\hbox{#1: #2}% 188 | \ifdim \wd\@tempboxa > .8\vsize 189 | \rotatebox{90}{% 190 | \begin{minipage}{.8\textheight}#1: #2\end{minipage}% 191 | }\par 192 | \else% 193 | \rotatebox{90}{\box\@tempboxa}% 194 | \fi 195 | \hspace{12pt}% 196 | } 197 | \endinput 198 | %% 199 | %% End of file `rotating.sty'. 200 | -------------------------------------------------------------------------------- /variables.tex: -------------------------------------------------------------------------------- 1 | %------------------------------------------------------------------------------- 2 | % DOCUMENT VARIABLES 3 | % 4 | % Fill in the lines below to set the various variables for the document 5 | %------------------------------------------------------------------------------- 6 | 7 | %------------------------------------------------------------------------------- 8 | % Your thesis title - this is used in the title and abstract 9 | % Command: \ttitle 10 | \thesistitle{Thesis / Report Title} 11 | %------------------------------------------------------------------------------- 12 | % The document type: Thesis / report, etc. 13 | % Command: \doctype 14 | \documenttype{Undergraduate Thesis} 15 | %------------------------------------------------------------------------------- 16 | % Your supervisor's name - this is used in the title page 17 | % Command: \supname 18 | \supervisor{Dr. FirstName \textsc{LastName}} 19 | %------------------------------------------------------------------------------- 20 | % The supervisor's position - Used on Certificate 21 | % Command: \suppos 22 | \supervisorposition{Faculty} 23 | %------------------------------------------------------------------------------- 24 | % Supervisor's institute 25 | % Command: \supinst 26 | \supervisorinstitute{BITS-Pilani Pilani Campus} 27 | %------------------------------------------------------------------------------- 28 | % Your Co-Supervisor's name 29 | % Command: \cosupname 30 | \cosupervisor{Dr. FirstName \textsc{SecondName}} 31 | %------------------------------------------------------------------------------- 32 | % Co-Supervisor's Position - Used on Certificate 33 | % Command: \cosuppos 34 | \cosupervisorposition{Asst. Professor} 35 | %------------------------------------------------------------------------------- 36 | % Co-Supervisor's Institute 37 | % Command: \cosupinst 38 | \cosupervisorinstitute{BITS-Pilani Hyderabad Campus} 39 | %------------------------------------------------------------------------------- 40 | % Your Examiner's name. Not currently used anywhere. 41 | % Command: \examname 42 | \examiner{} 43 | %------------------------------------------------------------------------------- 44 | % Name of your degree 45 | % Command: \degreename 46 | \degree{Bachelor of Engineering (Hons.)} 47 | %------------------------------------------------------------------------------- 48 | % The BITS Course Code for which this report is written 49 | % COmmand: \ccode 50 | \coursecode{BITS F421T} 51 | %------------------------------------------------------------------------------- 52 | % The name of the Course 53 | % Command: \cname 54 | \coursename{Thesis} 55 | %------------------------------------------------------------------------------- 56 | % Your name. Extend manually in case of multiple authors 57 | % Command: \authornames 58 | \authors{YourFirstName \textsc{YourSecondName}} 59 | %------------------------------------------------------------------------------- 60 | % Your ID Number - used on the Title page and abstract 61 | % Command: \idnum 62 | \IDNumber{2012A0TS000P} 63 | %------------------------------------------------------------------------------- 64 | % Your address 65 | % Command: \addressnames 66 | \addresses{} 67 | %------------------------------------------------------------------------------- 68 | % Your subject area 69 | % Command: \subjectname 70 | \subject{} 71 | %------------------------------------------------------------------------------- 72 | % Keywords for this report. 73 | % Command: \keywordnames 74 | \keywords{} 75 | %------------------------------------------------------------------------------- 76 | % University details 77 | % Command: \univname 78 | \university{\texorpdfstring{\href{http://www.bits-pilani.ac.in/} % URL 79 | {Birla Institute of Technology and Science Pilani}} % University name 80 | {Birla Institute of Technology and Science Pilani}} 81 | %------------------------------------------------------------------------------- 82 | % University details, in Capitals 83 | % Command: \UNIVNAME 84 | \UNIVERSITY{\texorpdfstring{\href{http://www.bits-pilani.ac.in/} % URL 85 | {BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI}} % name in capitals 86 | {BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI}} 87 | 88 | %------------------------------------------------------------------------------- 89 | % Campus Name 90 | % Command: \campusname 91 | \campus{Pilani Campus} 92 | 93 | %------------------------------------------------------------------------------- 94 | % Campus Name, in capitals 95 | % Command: \CAMPUSNAME 96 | \CAMPUS{PILANI CAMPUS} 97 | 98 | 99 | %------------------------------------------------------------------------------- 100 | % Department Details 101 | % Command: \deptname 102 | \department{\texorpdfstring{\href{http://www.bits-pilani.ac.in/pilani/computerscience/ComputerScience} % Your department's URL 103 | {Computer Science \& Information Systems}} % Your department's name 104 | {Computer Science}} 105 | %------------------------------------------------------------------------------- 106 | % Department details, in Capitals 107 | % Command: \DEPTNAME 108 | \DEPARTMENT{\texorpdfstring{\href{http://www.bits-pilani.ac.in/pilani/computerscience/ComputerScience} % Your department's URL 109 | {COMPUTER SCIENCE \& INFORMATION SYSTEMS}} % Your department's name in capitals 110 | {COMPUTER SCIENCE \& INFORMATION SYSTEMS}} 111 | %------------------------------------------------------------------------------- 112 | % Research Group Details 113 | % Command: \groupname 114 | \group{\texorpdfstring{\href{Research Group Web Site URL Here (include http://)} 115 | {Research Group Name}} % Your research group's name 116 | {Research Group Name}} 117 | %------------------------------------------------------------------------------- 118 | % Research Group Details, in Capitals 119 | % Command: \GROUPNAME 120 | \GROUP{\texorpdfstring{\href{Research Group Web Site URL Here (include http://)} 121 | {RESEARCH GROUP NAME (IN BLOCK CAPITALS)}} 122 | {RESEARCH GROUP NAME (IN BLOCK CAPITALS)}} 123 | %------------------------------------------------------------------------------- 124 | % Faculty details 125 | % Command: \facname 126 | \faculty{\texorpdfstring{\href{Faculty Web Site URL Here (include http://)} 127 | {Faculty Name}} 128 | {Faculty Name}} 129 | %------------------------------------------------------------------------------- 130 | % Faculty details, in Capitals 131 | % Command: \FACNAME 132 | \FACULTY{\texorpdfstring{\href{Faculty Web Site URL Here (include http://)} 133 | {FACULTY NAME (IN BLOCK CAPITALS)}} 134 | {FACULTY NAME (IN BLOCK CAPITALS)}} 135 | %------------------------------------------------------------------------------- 136 | 137 | -------------------------------------------------------------------------------- /Missing Packages/booktabs.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `booktabs.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% booktabs.dtx (with options: `package') 8 | %% 9 | %% ----------------------------------------------------------------- 10 | %% Author: Simon Fear 11 | %% Maintainer: Danie Els (dnjels@sun.ac.za) 12 | %% 13 | %% This file is part of the booktabs package for publication 14 | %% quality tables for LaTeX 15 | %% 16 | %% Copyright (C) 1995--2005 Simon Fear 17 | %% 18 | %% This program is free software; you can redistribute it and/or 19 | %% modify it under the terms of the GNU General Public License as 20 | %% published by the Free Software Foundation; either version 2 of 21 | %% the License, or (at your option) any later version. 22 | %% 23 | %% This program is distributed in the hope that it will be useful, 24 | %% but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | %% GNU General Public License for more details. 27 | %% 28 | %% You should have received a copy of the GNU General Public 29 | %% License along with this program; if not, write to the Free 30 | %% Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 31 | %% MA 02111-1307 USA 32 | %% ----------------------------------------------------------------- 33 | \NeedsTeXFormat{LaTeX2e}[1999/12/01] 34 | \ProvidesPackage{booktabs} 35 | [2005/04/14 v1.61803 publication quality tables] 36 | \newdimen\heavyrulewidth 37 | \newdimen\lightrulewidth 38 | \newdimen\cmidrulewidth 39 | \newdimen\belowrulesep 40 | \newdimen\belowbottomsep 41 | \newdimen\aboverulesep 42 | \newdimen\abovetopsep 43 | \newdimen\cmidrulesep 44 | \newdimen\cmidrulekern 45 | \newdimen\defaultaddspace 46 | \heavyrulewidth=.08em 47 | \lightrulewidth=.05em 48 | \cmidrulewidth=.03em 49 | \belowrulesep=.65ex 50 | \belowbottomsep=0pt 51 | \aboverulesep=.4ex 52 | \abovetopsep=0pt 53 | \cmidrulesep=\doublerulesep 54 | \cmidrulekern=.5em 55 | \defaultaddspace=.5em 56 | \newcount\@cmidla 57 | \newcount\@cmidlb 58 | \newdimen\@aboverulesep 59 | \newdimen\@belowrulesep 60 | \newcount\@thisruleclass 61 | \newcount\@lastruleclass 62 | \@lastruleclass=0 63 | \newdimen\@thisrulewidth 64 | \def\futurenonspacelet#1{\def\@BTcs{#1}% 65 | \afterassignment\@BTfnslone\let\nexttoken= } 66 | \def\@BTfnslone{\expandafter\futurelet\@BTcs\@BTfnsltwo} 67 | \def\@BTfnsltwo{\expandafter\ifx\@BTcs\@sptoken\let\next=\@BTfnslthree 68 | \else\let\next=\nexttoken\fi \next} 69 | \def\@BTfnslthree{\afterassignment\@BTfnslone\let\next= } 70 | \def\toprule{\noalign{\ifnum0=`}\fi 71 | \@aboverulesep=\abovetopsep 72 | \global\@belowrulesep=\belowrulesep %global cos for use in the next noalign 73 | \global\@thisruleclass=\@ne 74 | \@ifnextchar[{\@BTrule}{\@BTrule[\heavyrulewidth]}} 75 | \def\midrule{\noalign{\ifnum0=`}\fi 76 | \@aboverulesep=\aboverulesep 77 | \global\@belowrulesep=\belowrulesep 78 | \global\@thisruleclass=\@ne 79 | \@ifnextchar[{\@BTrule}{\@BTrule[\lightrulewidth]}} 80 | \def\bottomrule{\noalign{\ifnum0=`}\fi 81 | \@aboverulesep=\aboverulesep 82 | \global\@belowrulesep=\belowbottomsep 83 | \global\@thisruleclass=\@ne 84 | \@ifnextchar[{\@BTrule}{\@BTrule[\heavyrulewidth]}} 85 | \def\specialrule#1#2#3{\noalign{\ifnum0=`}\fi 86 | \@aboverulesep=#2\global\@belowrulesep=#3\global\@thisruleclass=\tw@ 87 | \@BTrule[#1]} 88 | \def\addlinespace{\noalign{\ifnum0=`}\fi 89 | \@ifnextchar[{\@addspace}{\@addspace[\defaultaddspace]}} 90 | \def\@addspace[#1]{\global\@belowrulesep=#1\global\@thisruleclass=\tw@ 91 | \futurelet\@tempa\@BTendrule} 92 | \def\@BTrule[#1]{% 93 | \global\@thisrulewidth=#1\relax 94 | \ifnum\@thisruleclass=\tw@\vskip\@aboverulesep\else 95 | \ifnum\@lastruleclass=\z@\vskip\@aboverulesep\else 96 | \ifnum\@lastruleclass=\@ne\vskip\doublerulesep\fi\fi\fi 97 | \ifx\longtable\undefined 98 | \let\@BTswitch\@BTnormal 99 | \else\ifx\hline\LT@hline 100 | \let\@BTswitch\@BLTrule 101 | \else 102 | \let\@BTswitch\@BTnormal 103 | \fi\fi 104 | \@BTswitch} 105 | \AtBeginDocument{% 106 | \providecommand*\CT@arc@{}}%% colortbl support 107 | \def\@BTnormal{% 108 | {\CT@arc@\hrule\@height\@thisrulewidth}% 109 | \futurenonspacelet\@tempa\@BTendrule} 110 | \def\@BLTrule{\@ifnextchar({\@@BLTrule}{\@@BLTrule()}} 111 | \def\@@BLTrule(#1){\@setrulekerning{#1}% 112 | \global\@cmidlb\LT@cols 113 | \ifnum0=`{\fi}% 114 | \@cmidruleb 115 | \noalign{\ifnum0=`}\fi 116 | \futurenonspacelet\@tempa\@BTendrule} 117 | \def\@BTendrule{\ifx\@tempa\toprule\global\@lastruleclass=\@thisruleclass 118 | \else\ifx\@tempa\midrule\global\@lastruleclass=\@thisruleclass 119 | \else\ifx\@tempa\bottomrule\global\@lastruleclass=\@thisruleclass 120 | \else\ifx\@tempa\cmidrule\global\@lastruleclass=\@thisruleclass 121 | \else\ifx\@tempa\specialrule\global\@lastruleclass=\@thisruleclass 122 | \else\ifx\@tempa\addlinespace\global\@lastruleclass=\@thisruleclass 123 | \else\global\@lastruleclass=\z@\fi\fi\fi\fi\fi\fi 124 | \ifnum\@lastruleclass=\@ne\relax\else\vskip\@belowrulesep\fi 125 | \ifnum0=`{\fi}} 126 | \def\@setrulekerning#1{% 127 | \global\let\cmrkern@l\z@ 128 | \global\let\cmrkern@r\z@ 129 | \@tfor\@tempa :=#1\do 130 | {\def\@tempb{r}% 131 | \ifx\@tempa\@tempb 132 | \global\let\cmrkern@r\cmidrulekern 133 | \def\cmrsideswitch{\cmrkern@r}% 134 | \else 135 | \def\@tempb{l}% 136 | \ifx\@tempa\@tempb 137 | \global\let\cmrkern@l\cmidrulekern 138 | \def\cmrsideswitch{\cmrkern@l}% 139 | \else 140 | \global\expandafter\let\cmrsideswitch\@tempa 141 | \fi 142 | \fi}} 143 | \def\cmidrule{\noalign{\ifnum0=`}\fi 144 | \@ifnextchar[{\@cmidrule}{\@cmidrule[\cmidrulewidth]}} 145 | \def\@cmidrule[#1]{\@ifnextchar({\@@cmidrule[#1]}{\@@cmidrule[#1]()}} 146 | \def\@@cmidrule[#1](#2)#3{\@@@cmidrule[#3]{#1}{#2}} 147 | \def\@@@cmidrule[#1-#2]#3#4{\global\@cmidla#1\relax 148 | \global\advance\@cmidla\m@ne 149 | \ifnum\@cmidla>0\global\let\@gtempa\@cmidrulea\else 150 | \global\let\@gtempa\@cmidruleb\fi 151 | \global\@cmidlb#2\relax 152 | \global\advance\@cmidlb-\@cmidla 153 | \global\@thisrulewidth=#3 154 | \@setrulekerning{#4} 155 | \ifnum\@lastruleclass=\z@\vskip \aboverulesep\fi 156 | \ifnum0=`{\fi}\@gtempa 157 | \noalign{\ifnum0=`}\fi\futurenonspacelet\@tempa\@xcmidrule} 158 | \def\@xcmidrule{% 159 | \ifx\@tempa\cmidrule 160 | \vskip-\@thisrulewidth 161 | \global\@lastruleclass=\@ne 162 | \else \ifx\@tempa\morecmidrules 163 | \vskip \cmidrulesep 164 | \global\@lastruleclass=\@ne\else 165 | \vskip \belowrulesep 166 | \global\@lastruleclass=\z@ 167 | \fi\fi 168 | \ifnum0=`{\fi}} 169 | \def\@cmidrulea{% 170 | \multispan\@cmidla&\multispan\@cmidlb 171 | \unskip\hskip\cmrkern@l% 172 | {\CT@arc@\leaders\hrule \@height\@thisrulewidth\hfill}% 173 | \hskip\cmrkern@r\cr}% 174 | \def\@cmidruleb{% 175 | \multispan\@cmidlb 176 | \unskip\hskip \cmrkern@l% 177 | {\CT@arc@\leaders\hrule \@height\@thisrulewidth\hfill}% 178 | \hskip\cmrkern@r\cr}% 179 | \def\morecmidrules{\noalign{\relax}} 180 | \endinput 181 | %% 182 | %% End of file `booktabs.sty'. 183 | -------------------------------------------------------------------------------- /main.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % Thesis / Project Report 3 | % LaTeX Template 4 | % Version 2.0 (08/04/16) 5 | % 6 | % Author: 7 | % Siddhant Shrivastava 8 | % https://github.com/sidcode/bits-pilani-thesis-template-latex 9 | % 10 | % This template is heavily based on the work of Darshit Shah, Steven Gunn and Sunil Patel 11 | % Darshit Shah 12 | % https://github.com/darnir/BPHC-LaTeX-Report-Class 13 | % Steven Gunn 14 | % http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/ 15 | % and 16 | % Sunil Patel 17 | % http://www.sunilpatel.co.uk/thesis-template/ 18 | % 19 | % License: 20 | % CC BY-NC-SA 4.0 (http://creativecommons.org/licenses/by-nc-sa/4.0/) 21 | % 22 | % Note: 23 | % Make sure to edit document variables in the Thesis.cls file 24 | % 25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 26 | 27 | %------------------------------------------------------------------------------- 28 | % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS 29 | %------------------------------------------------------------------------------- 30 | 31 | \documentclass[11pt, a4paper, oneside]{Thesis} % Paper size, default font size 32 | % and one-sided paper 33 | 34 | \graphicspath{{Pictures/}} % Specifies the directory where pictures are stored 35 | 36 | \usepackage[backend=bibtex]{biblatex} 37 | \bibliography{Bibliography.bib} 38 | 39 | \title{\ttitle} % Defines the thesis title - don't touch this 40 | 41 | \begin{document} 42 | 43 | \frontmatter % Use roman numbering style (i, ii...) for the pre-content pages 44 | 45 | \setstretch{1.3} % Line spacing of 1.3 46 | 47 | % Define page headers using FancyHdr package and set up for one-sided printing 48 | \fancyhead{} % Clears all page headers and footers 49 | \rhead{\thepage} % Sets the right side header to show the page number 50 | \lhead{} % Clears the left side page header 51 | 52 | \pagestyle{fancy} % Finally, use the "fancy" page style to implement the 53 | %FancyHdr headers 54 | 55 | % Input all the variables used in the document. Please fill out the 56 | % variables.tex file with all your details. 57 | \input{variables} 58 | %------------------------------------------------------------------------------- 59 | % NON-CONTENT PAGES 60 | %------------------------------------------------------------------------------- 61 | \maketitle 62 | \Declaration 63 | \Certificate 64 | \Quotation{Insert Random Quote here. Publish like a boss.}{Your Name} 65 | 66 | \begin{abstract} 67 | The Thesis Abstract is written here (and usually kept to just this page). 68 | The page is kept centered vertically so can expand into the blank space above 69 | the title too\ldots 70 | \end{abstract} 71 | 72 | \begin{acknowledgements} 73 | The acknowledgements and the people to thank go here, don't forget to include 74 | your project advisor\ldots 75 | \end{acknowledgements} 76 | 77 | %------------------------------------------------------------------------------- 78 | % LIST OF CONTENTS/FIGURES/TABLES PAGES 79 | %------------------------------------------------------------------------------- 80 | 81 | % The page style headers have been "empty" all this time, now use the "fancy" 82 | % headers as defined before to bring them back 83 | \pagestyle{fancy} 84 | 85 | \lhead{\emph{Contents}} % Set the left side page header to "Contents" 86 | \tableofcontents % Write out the Table of Contents 87 | 88 | % Set the left side page header to "List of Figures" 89 | \lhead{\emph{List of Figures}} 90 | \listoffigures % Write out the List of Figures 91 | 92 | % Set the left side page header to "List of Tables" 93 | \lhead{\emph{List of Tables}} 94 | \listoftables % Write out the List of Tables 95 | 96 | %------------------------------------------------------------------------------- 97 | % ABBREVIATIONS 98 | %------------------------------------------------------------------------------- 99 | 100 | \clearpage % Start a new page 101 | 102 | % Set the line spacing to 1.5, this makes the following tables easier to read 103 | \setstretch{1.5} 104 | 105 | \lhead{\emph{Abbreviations}} % Set the left side page header to "Abbreviations" 106 | \listofsymbols{ll} % Include a list of Abbreviations (a table of two columns) 107 | { 108 | \textbf{LAH} & \textbf{L}ist \textbf{A}bbreviations \textbf{H}ere \\ 109 | %\textbf{Acronym} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or \\ 110 | } 111 | 112 | %------------------------------------------------------------------------------- 113 | % PHYSICAL CONSTANTS/OTHER DEFINITIONS 114 | %------------------------------------------------------------------------------- 115 | 116 | \clearpage % Start a new page 117 | 118 | % Set the left side page header to "Physical Constants" 119 | \lhead{\emph{Physical Constants}} 120 | 121 | % Include a list of Physical Constants (a four column table) 122 | \listofconstants{lrcl} 123 | { 124 | Speed of Light & $c$ & $=$ & $2.997\ 924\ 58\times10^{8}\ \mbox{ms}^{-\mbox{s}}$ (exact)\\ 125 | % Constant Name & Symbol & = & Constant Value (with units) \\ 126 | } 127 | 128 | %------------------------------------------------------------------------------- 129 | % SYMBOLS 130 | %------------------------------------------------------------------------------- 131 | 132 | \clearpage % Start a new page 133 | 134 | \lhead{\emph{Glossary}} % Set the left side page header to "Symbols" 135 | 136 | \listofnomenclature % List the nomenclature. (We use the glossaries package) 137 | 138 | %------------------------------------------------------------------------------- 139 | % DEDICATION 140 | %------------------------------------------------------------------------------- 141 | 142 | \setstretch{1.3} % Return the line spacing back to 1.3 143 | 144 | \pagestyle{empty} % Page style needs to be empty for this page 145 | 146 | % Dedication text 147 | \Dedicatory{Dedicate this to someone, anyone.} 148 | 149 | \addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics 150 | 151 | %------------------------------------------------------------------------------- 152 | % THESIS CONTENT - CHAPTERS 153 | %------------------------------------------------------------------------------- 154 | 155 | \mainmatter % Begin numeric (1,2,3...) page numbering 156 | 157 | \pagestyle{fancy} % Return the page headers back to the "fancy" style 158 | 159 | % Include the chapters of the thesis as separate files from the Chapters folder 160 | % Uncomment the lines as you write the chapters 161 | 162 | \input{Chapters/Chapter1} 163 | %\input{Chapters/Chapter2} 164 | %\input{Chapters/Chapter3} 165 | %\input{Chapters/Chapter4} 166 | %\input{Chapters/Chapter5} 167 | %\input{Chapters/Chapter6} 168 | %\input{Chapters/Chapter7} 169 | 170 | %------------------------------------------------------------------------------- 171 | % THESIS CONTENT - APPENDICES 172 | %------------------------------------------------------------------------------- 173 | 174 | \addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics 175 | 176 | \appendix % Cue to tell LaTeX that the following 'chapters' are Appendices 177 | 178 | % Include the appendices of the thesis as separate files from the Appendices 179 | % folder 180 | % Uncomment the lines as you write the Appendices 181 | 182 | \input{Appendices/AppendixA} 183 | %\input{Appendices/AppendixB} 184 | %\input{Appendices/AppendixC} 185 | 186 | \addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics 187 | 188 | \backmatter 189 | 190 | %------------------------------------------------------------------------------- 191 | % BIBLIOGRAPHY 192 | %------------------------------------------------------------------------------- 193 | 194 | \label{Bibliography} 195 | 196 | \lhead{\emph{Bibliography}} % Change the page header to say "Bibliography" 197 | 198 | \printbibliography 199 | 200 | \end{document} 201 | -------------------------------------------------------------------------------- /Missing Packages/subfigure.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `subfigure.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% subfigure.dtx (with options: `package') 8 | %% 9 | %% Copyright (C) 1988-1995 Steven Douglas Cochran. 10 | %% 11 | %% This file is NOT the source for subfigure, because almost all comments 12 | %% have been stripped from it. It is NOT the preferred form of subfigure 13 | %% for making modifications to it. 14 | %% 15 | %% Therefore you can NOT redistribute and/or modify THIS file. You can 16 | %% however redistribute the complete source (subfigure.dtx and 17 | %% subfigure.ins) and/or modify it under the terms of the GNU General 18 | %% Public License as published by the Free Software Foundation; either 19 | %% version 2, or (at your option) any later version. 20 | %% 21 | %% The subfigure package is distributed in the hope that it will be 22 | %% useful, but WITHOUT ANY WARRANTY; without even the implied warranty 23 | %% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | %% GNU General Public License for more details. 25 | %% 26 | %% You should have received a copy of the GNU General Public License 27 | %% along with this program; if not, write to the Free Software 28 | %% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 29 | %% 30 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 31 | %% @LaTeX-style-file{ 32 | %% Author = "Steven Douglas Cochran", 33 | %% Version = "2.0", 34 | %% Date = "1995/03/06", 35 | %% Time = "14:43:14", 36 | %% Filename = "subfigure.sty", 37 | %% Address = "Digital Mapping Laboratory, School of Computer Science 38 | %% Carnegie-Mellon University, 5000 Forbes Avenue 39 | %% Pittsburgh, PA 15213-3891, USA", 40 | %% Telephone = "(412) 268-5654", 41 | %% FAX = "(412) 268-5576", 42 | %% Email = "sdc+@CS.CMU.EDU (Internet)", 43 | %% CodeTable = "ISO/ASCII", 44 | %% Keywords = "LaTeX2e, float, figure, table", 45 | %% Supported = "yes", 46 | %% Abstract = "LaTeX package for providing support for the 47 | %% inclusion of small, `sub,' figures and tables. It 48 | %% simplifies the positioning, captioning and 49 | %% labeling of them within a single figure or table 50 | %% environment. In addition, this package allows 51 | %% such sub-captions to be written to the List of 52 | %% Figures or List of Tables if desired." 53 | %% } 54 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 55 | \ifx\if@compatibility\undefined\else 56 | \NeedsTeXFormat{LaTeX2e} 57 | \ProvidesPackage{subfigure}[1995/03/06 v2.0 subfigure package] 58 | \typeout{Package: subfigure 1995/03/06 v2.0} 59 | \fi 60 | \newif\ifsubcaphang 61 | \newif\ifsubcapcenter 62 | \newif\ifsubcapcenterlast 63 | \newif\ifsubcapnooneline 64 | \newcommand{\subfigtopskip}{10pt} 65 | \newcommand{\subfigbottomskip}{10pt} 66 | \newcommand{\subfigcapskip}{10pt} 67 | \newcommand{\subfigcapmargin}{10pt} 68 | \newcommand{\subcapsize}{} 69 | \newcommand{\subcaplabelfont}{} 70 | \newcounter{subfigure}[figure] 71 | \def\thesubfigure{(\alph{subfigure})} 72 | \newcommand{\@thesubfigure}{{\subcaplabelfont\thesubfigure}\space} 73 | \let\p@subfigure\thefigure 74 | \let\ext@subfigure\ext@figure 75 | \newcommand{\l@subfigure}{% 76 | \@dottedxxxline{\ext@subfigure}{2}{3.9em}{2.3em}} 77 | \newcounter{lofdepth} 78 | \setcounter{lofdepth}{1} 79 | \newcounter{subtable}[table] 80 | \def\thesubtable{(\alph{subtable})} 81 | \newcommand{\@thesubtable}{{\subcaplabelfont\thesubtable}\space} 82 | \let\p@subtable\thetable 83 | \let\ext@subtable\ext@table 84 | \newcommand{\l@subtable}{% 85 | \@dottedxxxline{\ext@subtable}{2}{3.9em}{2.3em}} 86 | \newcounter{lotdepth} 87 | \setcounter{lotdepth}{1} 88 | \ifx\if@compatibility\undefined 89 | \subcaphangfalse 90 | \subcapcenterfalse 91 | \subcapcenterlastfalse 92 | \def\subcapsize{\footnotesize} 93 | \else 94 | \DeclareOption{normal}{% 95 | \subcaphangfalse 96 | \subcapcenterfalse 97 | \subcapcenterlastfalse 98 | \subcapnoonelinefalse} 99 | \DeclareOption{hang}{\subcaphangtrue} 100 | \DeclareOption{center}{\subcapcentertrue} 101 | \DeclareOption{centerlast}{\subcapcenterlasttrue} 102 | \DeclareOption{nooneline}{\subcapnoonelinetrue} 103 | \DeclareOption{isu}{\ExecuteOption{hang}} 104 | \DeclareOption{anne}{\ExecuteOption{centerlast}} 105 | \DeclareOption{scriptsize}{\renewcommand{\subcapsize}{\scriptsize}} 106 | \DeclareOption{footnotesize}{\renewcommand{\subcapsize}{\footnotesize}} 107 | \DeclareOption{small}{\renewcommand{\subcapsize}{\small}} 108 | \DeclareOption{normalsize}{\renewcommand{\subcapsize}{\normalsize}} 109 | \DeclareOption{large}{\renewcommand{\subcapsize}{\large}} 110 | \DeclareOption{Large}{\renewcommand{\subcapsize}{\Large}} 111 | \DeclareOption{up}{\renewcommand{\subcaplabelfont}{\upshape}} 112 | \DeclareOption{it}{\renewcommand{\subcaplabelfont}{\itshape}} 113 | \DeclareOption{sl}{\renewcommand{\subcaplabelfont}{\slshape}} 114 | \DeclareOption{sc}{\renewcommand{\subcaplabelfont}{\scshape}} 115 | \DeclareOption{md}{\renewcommand{\subcaplabelfont}{\mdseries}} 116 | \DeclareOption{bf}{\renewcommand{\subcaplabelfont}{\bfseries}} 117 | \DeclareOption{rm}{\renewcommand{\subcaplabelfont}{\rmfamily}} 118 | \DeclareOption{sf}{\renewcommand{\subcaplabelfont}{\sffamily}} 119 | \DeclareOption{tt}{\renewcommand{\subcaplabelfont}{\ttfamily}} 120 | \ExecuteOptions{normal,footnotesize} 121 | \ProcessOptions 122 | \fi 123 | \newcommand{\subfigure}{% 124 | \bgroup 125 | \advance\csname c@\@captype\endcsname\@ne 126 | \refstepcounter{sub\@captype}% 127 | \leavevmode 128 | \@ifnextchar [% 129 | {\@subfloat{sub\@captype}}% 130 | {\@subfloat{sub\@captype}[\@empty]}} 131 | \let\subtable\subfigure 132 | \def\@subfloat#1[#2]#3{% 133 | \setbox\@tempboxa \hbox{#3}% 134 | \@tempdima=\wd\@tempboxa 135 | \vtop{% 136 | \vbox{ 137 | \vskip\subfigtopskip 138 | \box\@tempboxa}% 139 | \ifx \@empty#2\relax \else 140 | \vskip\subfigcapskip 141 | \@subcaption{#1}{#2}% 142 | \fi 143 | \vskip\subfigbottomskip}% 144 | \egroup} 145 | \newcommand{\@subfigcaptionlist}{} 146 | \newcommand{\@subcaption}[2]{% 147 | \begingroup 148 | \let\label\@gobble 149 | \def\protect{\string\string\string}% 150 | \xdef\@subfigcaptionlist{% 151 | \@subfigcaptionlist,% 152 | {\protect\numberline {\@currentlabel}% 153 | \noexpand{\ignorespaces #2}}}% 154 | \endgroup 155 | \@nameuse{@make#1caption}{\@nameuse{@the#1}}{#2}} 156 | \newcommand{\@makesubfigurecaption}[2]{% 157 | \setbox\@tempboxa \hbox{% 158 | \subcapsize 159 | \ignorespaces #1% 160 | \ignorespaces #2}% 161 | \@tempdimb=-\subfigcapmargin 162 | \multiply\@tempdimb\tw@ 163 | \advance\@tempdimb\@tempdima 164 | \hbox to\@tempdima{% 165 | \hfil 166 | \ifdim \wd\@tempboxa >\@tempdimb 167 | \subfig@caption{#1}{#2}% 168 | \else\ifsubcapnooneline 169 | \subfig@caption{#1}{#2}% 170 | \else 171 | \box\@tempboxa 172 | \fi\fi 173 | \hfil}} 174 | \let\@makesubtablecaption\@makesubfigurecaption 175 | \newcommand{\subfig@caption}[2]{% 176 | \ifsubcaphang 177 | \sbox{\@tempboxa}{% 178 | \subcapsize 179 | \ignorespaces #1}% 180 | \addtolength{\@tempdimb}{-\wd\@tempboxa}% 181 | \usebox{\@tempboxa}% 182 | \subfig@captionpar{\@tempdimb}{#2}% 183 | \else 184 | \subfig@captionpar{\@tempdimb}{#1#2}% 185 | \fi} 186 | \newcommand{\subfig@captionpar}[2]{% 187 | \parbox[t]{#1}{% 188 | \strut 189 | \ifsubcapcenter 190 | \setlength{\leftskip}{\@flushglue}% 191 | \setlength{\rightskip}{\@flushglue}% 192 | \setlength{\parfillskip}{\z@skip}% 193 | \else\ifsubcapcenterlast 194 | \addtolength{\leftskip}{0pt plus 1fil}% 195 | \addtolength{\rightskip}{0pt plus -1fil}% 196 | \setlength{\parfillskip}{0pt plus 2fil}% 197 | \fi\fi 198 | \subcapsize 199 | \ignorespaces #2% 200 | \par}} 201 | \newcommand{\@dottedxxxline}[6]{% 202 | \ifnum #2>\@nameuse{c@#1depth}\else 203 | \@dottedtocline{0}{#3}{#4}{#5}{#6} 204 | \fi} 205 | \let\subfig@oldcaption\@caption 206 | \long\def\@caption#1[#2]#3{% 207 | \subfig@oldcaption{#1}[{#2}]{#3}% 208 | \@for \@tempa:=\@subfigcaptionlist \do {% 209 | \ifx\@empty\@tempa\relax \else 210 | \addcontentsline 211 | {\@nameuse{ext@sub#1}}% 212 | {sub#1}% 213 | {\@tempa}% 214 | \fi}% 215 | \gdef\@subfigcaptionlist{}} 216 | \endinput 217 | %% 218 | %% End of file `subfigure.sty'. 219 | -------------------------------------------------------------------------------- /lstpatch.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `lstpatch.sty', generated manually. 3 | %% 4 | %% (w)(c) 2004 Carsten Heinz 5 | %% 6 | %% This file may be distributed under the terms of the LaTeX Project Public 7 | %% License from CTAN archives in directory macros/latex/base/lppl.txt. 8 | %% Either version 1.0 or, at your option, any later version. 9 | %% 10 | %% Send comments and ideas on the package, error reports and additional 11 | %% programming languages to . 12 | %% 13 | %% This patch file will remove the following bugs from the listings package. 14 | %% Each item contains the bug finder with date of report and first bug fix 15 | %% version, a short description of the problem, and the reason for the bug 16 | %% in parenthesis. 17 | %% 18 | %% 1) Frank Atanassow, 2004/10/07, 1.3b 19 | %% 20 | %% space after mathescape is not preserved 21 | %% (\lst@newlines>0) 22 | %% 23 | %% 2) Benjamin Lings, 2004/10/15, 1.3b (2004/10/17) 24 | %% 25 | %% \usepackage{xy,listings} yields: 26 | %% "Forbidden control sequence found while scanning use of \lst@lExtend" 27 | %% (xy-pic correctly resets catcode of ^^L (to active), which is \outer) 28 | %% 29 | %% 30 | %% The following features are added to the base package. 31 | %% 32 | %% 1.3a (2004/09/07) 33 | %% 34 | %% a) H I G H L Y E X P E R I M E N T A L 35 | %% 36 | %% Use the options 37 | %% rangeprefix= 38 | %% rangesuffix= 39 | %% 40 | %% rangebeginprefix= 41 | %% rangebeginsuffix= 42 | %% 43 | %% rangeendprefix= 44 | %% rangeendsuffix= 45 | %% 46 | %% includerangemarker=true|false 47 | %% together with 48 | %% firstline= 49 | %% lastline= 50 | %% or 51 | %% linerange={-, 52 | %% -, ...} 53 | %% The according markers in the source code are 54 | %% 55 | %% for begin respectively end of range. Moreover, one can use 56 | %% includerangemarker=true|false 57 | %% to show or hide the range markers in the output. 58 | %% 59 | %% 1.3b (2004/10/17) 60 | %% 61 | %% b) multicols= (requires loaded multicol package) 62 | %% 63 | %% 64 | \lst@CheckVersion{1.3} 65 | {\typeout{^^J% 66 | ***^^J% 67 | *** This is a patch for listings 1.3, but you're using^^J% 68 | *** version \lst@version.^^J% 69 | ***^^J 70 | *** Patch file not loaded.^^J% 71 | ***^^J}% 72 | \endinput 73 | } 74 | \def\fileversion{1.3b} 75 | \def\filedate{2004/10/17} 76 | \ProvidesFile{lstpatch.sty}[\filedate\space\fileversion\space (Carsten Heinz)] 77 | % 78 | % 0) Insert % after #1. 79 | \def\@@xbitor #1{\@tempcntb \count#1% 80 | \ifnum \@tempcnta =\z@ 81 | \else 82 | \divide\@tempcntb\@tempcnta 83 | \ifodd\@tempcntb \@testtrue\fi 84 | \fi} 85 | % 86 | % 1) Reset \lst@newlines at end of escape. 87 | \def\lstpatch@escape{% 88 | \gdef\lst@Escape##1##2##3##4{% 89 | \lst@CArgX ##1\relax\lst@CDefX 90 | {}% 91 | {\lst@ifdropinput\else 92 | \lst@TrackNewLines\lst@OutputLostSpace \lst@XPrintToken 93 | \lst@InterruptModes 94 | \lst@EnterMode{\lst@TeXmode}{\lst@modetrue}% 95 | \ifx\^^M##2% 96 | \lst@CArg ##2\relax\lst@ActiveCDefX 97 | {}% 98 | {\lst@escapeend ##4\lst@LeaveAllModes\lst@ReenterModes}% 99 | {\lst@MProcessListing}% 100 | \else 101 | \lst@CArg ##2\relax\lst@ActiveCDefX 102 | {}% 103 | {\lst@escapeend ##4\lst@LeaveAllModes\lst@ReenterModes 104 | \lst@newlines\z@ \lst@whitespacefalse}% 105 | {}% 106 | \fi 107 | ##3\lst@escapebegin 108 | \fi}% 109 | {}}% 110 | } 111 | % 112 | % 2) Deactivate \outer definition of ^^L temporarily (inside and outside 113 | % of \lst@ScanChars) and restore \catcode at end of package. 114 | \begingroup \catcode12=\active\let^^L\@empty 115 | \gdef\lst@ScanChars{% 116 | \let\lsts@ssL^^L% 117 | \def^^L{\par}% 118 | \lst@GetChars\lst@RestoreOrigCatcodes\@ne {128}% 119 | \let^^L\lsts@ssL 120 | \lst@GetChars\lst@RestoreOrigExtendedCatcodes{128}{256}} 121 | \endgroup 122 | \lst@lAddTo\lst@RestoreCatcodes{\catcode12\active} 123 | % 124 | % a) Let's start with the options: 125 | \lst@Key{rangeprefix}\relax{\def\lst@rangebeginprefix{#1}% 126 | \def\lst@rangeendprefix{#1}} 127 | \lst@Key{rangesuffix}\relax{\def\lst@rangebeginsuffix{#1}% 128 | \def\lst@rangeendsuffix{#1}} 129 | \lst@Key{rangebeginprefix}{}{\def\lst@rangebeginprefix{#1}} 130 | \lst@Key{rangebeginsuffix}{}{\def\lst@rangebeginsuffix{#1}} 131 | \lst@Key{rangeendprefix}{}{\def\lst@rangeendprefix{#1}} 132 | \lst@Key{rangeendsuffix}{}{\def\lst@rangeendsuffix{#1}} 133 | \lst@Key{includerangemarker}{true}[t]{\lstKV@SetIf{#1}\lst@ifincluderangemarker} 134 | % 135 | % The key is a redefinition of \lst@GLI@ checking for numbers. 136 | \def\lst@GLI@#1-#2-#3\@nil{% 137 | \lst@IfNumber{#1}% 138 | {\ifx\@empty#1\@empty 139 | \let\lst@firstline\@ne 140 | \else 141 | \def\lst@firstline{#1\relax}% 142 | \fi 143 | \ifx\@empty#3\@empty 144 | \def\lst@lastline{9999999\relax}% 145 | \else 146 | \ifx\@empty#2\@empty 147 | \let\lst@lastline\lst@firstline 148 | \else 149 | \def\lst@lastline{#2\relax}% 150 | \fi 151 | \fi}% 152 | % 153 | % If we've found a general marker, we set firstline and lastline to 9999999. 154 | % This prevents (almost) anything to be printed for now. 155 | {\def\lst@firstline{9999999\relax}% 156 | \let\lst@lastline\lst@firstline 157 | % 158 | % We add the prefixes and suffixes to the markers. 159 | \let\lst@rangebegin\lst@rangebeginprefix 160 | \lst@AddTo\lst@rangebegin{#1}\lst@Extend\lst@rangebegin\lst@rangebeginsuffix 161 | \ifx\@empty#3\@empty 162 | \let\lst@rangeend\lst@rangeendprefix 163 | \lst@AddTo\lst@rangeend{#1}\lst@Extend\lst@rangeend\lst@rangeendsuffix 164 | \else 165 | \ifx\@empty#2\@empty 166 | \let\lst@rangeend\@empty 167 | \else 168 | \let\lst@rangeend\lst@rangeendprefix 169 | \lst@AddTo\lst@rangeend{#2}\lst@Extend\lst@rangeend\lst@rangeendsuffix 170 | \fi 171 | \fi 172 | % The following definition will be executed in the SelectCharTable hook 173 | % and here right now if we are already processing a listing. 174 | \global\def\lst@DefRange{\expandafter\lst@CArgX\lst@rangebegin\relax\lst@DefRangeB}% 175 | \ifnum\lst@mode=\lst@Pmode \expandafter\lst@DefRange \fi}} 176 | % \lst@DefRange is not inserted via a hook anymore. Instead it is now called 177 | % directly from \lst@SelectCharTable. This was necessary to get rid of an 178 | % interference with the escape-to-LaTeX-feature. The bug was reported by 179 | % \lsthelper{Michael~Bachmann}{2004/07/21}{Keine label-Referenzierung 180 | % m\"oglich...}. Another chance is due to the same bug: \lst@DefRange is 181 | % redefined globally when the begin of code is found, see below. The bug was 182 | % reported by \lsthelper{Tobias~Rapp}{2004/04/06}{undetected end of range if 183 | % listing crosses page break} \lsthelper{Markus~Luisser}{2004/08/13}{Bug mit 184 | % 'linerangemarker' in umgebrochenen listings} 185 | %\lst@AddToHook{SelectCharTable}{\lst@DefRange} 186 | \lst@AddToHookExe{DeInit}{\global\let\lst@DefRange\@empty} 187 | % 188 | % Actually defining the marker (via \lst@GLI@, \lst@DefRange, \lst@CArgX as 189 | % seen above) is similar to \lst@DefDelimB---except that we unfold the first 190 | % parameter and use different ,
, and  statements.
191 | \def\lst@DefRangeB#1#2{\lst@DefRangeB@#1#2}
192 | \def\lst@DefRangeB@#1#2#3#4{%
193 |     \lst@CDef{#1{#2}{#3}}#4{}%
194 |     {\lst@ifincluderangemarker
195 |          \lst@LeaveMode
196 |          \let#1#4%
197 |          \lst@DefRangeEnd
198 |          \lst@InitLstNumber
199 |      \else
200 |          \@tempcnta\lst@lineno \advance\@tempcnta\@ne
201 |          \edef\lst@firstline{\the\@tempcnta\relax}%
202 |          \gdef\lst@OnceAtEOL{\let#1#4\lst@DefRangeEnd}%
203 |          \lst@InitLstNumber
204 |      \fi
205 | 	 \global\let\lst@DefRange\lst@DefRangeEnd
206 |      \lst@CArgEmpty}%
207 |     \@empty}
208 | %
209 | % Modify labels and define |\lst@InitLstNumber| used above.
210 | % \lsthelper{Omair-Inam~Abdul-Matin}{2004/05/10}{experimental linerange
211 | % feature does not work with firstnumber}
212 | \def\lstpatch@labels{%
213 | \gdef\lst@SetFirstNumber{%
214 |     \ifx\lst@firstnumber\@undefined
215 |         \@tempcnta 0\csname\@lst no@\lst@intname\endcsname\relax
216 |         \ifnum\@tempcnta=\z@ \else
217 |             \lst@nololtrue
218 |             \advance\@tempcnta\lst@advancenumber
219 |             \edef\lst@firstnumber{\the\@tempcnta\relax}%
220 |         \fi
221 |     \fi}%
222 | }
223 | \lst@AddToAtTop\lsthk@PreInit
224 |     {\ifx\lst@firstnumber\@undefined
225 |          \def\lst@firstnumber{\lst@lineno}%
226 |      \fi}
227 | \def\lst@InitLstNumber{%
228 |      \global\c@lstnumber\lst@firstnumber
229 |      \global\advance\c@lstnumber\lst@advancenumber
230 |      \global\advance\c@lstnumber-\lst@advancelstnum
231 |      \ifx \lst@firstnumber\c@lstnumber
232 |          \global\advance\c@lstnumber-\lst@advancelstnum
233 |      \fi}
234 | %
235 | %    The end-marker is defined if and only if it's not empty. The definition is
236 | %    similar to \lst@DefDelimE---with the above exceptions and except that we
237 | %    define the re-entry point \lst@DefRangeE@@ as it is defined in the new
238 | %    version of \lst@MProcessListing above.
239 | \def\lst@DefRangeEnd{%
240 |     \ifx\lst@rangeend\@empty\else
241 |         \expandafter\lst@CArgX\lst@rangeend\relax\lst@DefRangeE
242 |     \fi}
243 | \def\lst@DefRangeE#1#2{\lst@DefRangeE@#1#2}
244 | \def\lst@DefRangeE@#1#2#3#4{%
245 |     \lst@CDef{#1#2{#3}}#4{}%
246 |     {\let#1#4%
247 |      \edef\lst@lastline{\the\lst@lineno\relax}%
248 |      \lst@DefRangeE@@}%
249 |     \@empty}
250 | \def\lst@DefRangeE@@#1\@empty{%
251 |     \lst@ifincluderangemarker
252 |         #1\lst@XPrintToken
253 |     \fi
254 |     \lst@LeaveModeToPmode
255 |     \lst@BeginDropInput{\lst@Pmode}}
256 | %
257 | \def\lst@LeaveModeToPmode{%
258 |     \ifnum\lst@mode=\lst@Pmode
259 |         \expandafter\lsthk@EndGroup
260 |     \else
261 |         \expandafter\egroup\expandafter\lst@LeaveModeToPmode
262 |     \fi}
263 | %
264 | %    Eventually we shouldn't forget to install \lst@OnceAtEOL, which must
265 | %    also be called in \lst@MSkipToFirst.
266 | \lst@AddToHook{EOL}{\lst@OnceAtEOL\global\let\lst@OnceAtEOL\@empty}
267 | \gdef\lst@OnceAtEOL{}% Init
268 | \def\lst@MSkipToFirst{%
269 |     \global\advance\lst@lineno\@ne
270 |     \ifnum \lst@lineno=\lst@firstline
271 |         \def\lst@next{\lst@LeaveMode \global\lst@newlines\z@
272 |         \lst@OnceAtEOL \global\let\lst@OnceAtEOL\@empty
273 |         \lst@InitLstNumber % Added to work with modified \lsthk@PreInit.
274 |         \lsthk@InitVarsBOL
275 |         \lst@BOLGobble}%
276 |         \expandafter\lst@next
277 |     \fi}
278 | \def\lst@SkipToFirst{%
279 |     \ifnum \lst@lineno<\lst@firstline
280 |         \def\lst@next{\lst@BeginDropInput\lst@Pmode
281 |         \lst@Let{13}\lst@MSkipToFirst
282 |         \lst@Let{10}\lst@MSkipToFirst}%
283 |         \expandafter\lst@next
284 |     \else
285 |         \expandafter\lst@BOLGobble
286 |     \fi}
287 | %
288 | %    Finally the service macro \lst@IfNumber:
289 | \def\lst@IfNumber#1{%
290 |     \ifx\@empty#1\@empty
291 |         \let\lst@next\@firstoftwo
292 |     \else
293 |         \lst@IfNumber@#1\@nil
294 |     \fi
295 |     \lst@next}
296 | \def\lst@IfNumber@#1#2\@nil{%
297 |     \let\lst@next\@secondoftwo
298 |     \ifnum`#1>47\relax \ifnum`#1>57\relax\else
299 |         \let\lst@next\@firstoftwo
300 |     \fi\fi}
301 | %
302 | % b) The following is known to fail with some keys.
303 | \lst@Key{multicols}{}{\@tempcnta=0#1\relax\def\lst@multicols{#1}}
304 | \def\lst@Init#1{%
305 |     \begingroup
306 |     \ifx\lst@float\relax\else
307 |         \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}%
308 |         \expandafter\@tempa
309 |     \fi
310 | % chmod begin
311 |     \ifx\lst@multicols\@empty\else
312 |         \edef\lst@next{\noexpand\multicols{\lst@multicols}}
313 |         \expandafter\lst@next
314 |     \fi
315 | % chmod end
316 |     \ifhmode\ifinner \lst@boxtrue \fi\fi
317 |     \lst@ifbox
318 |         \lsthk@BoxUnsafe
319 |         \hbox to\z@\bgroup
320 |              $\if t\lst@boxpos \vtop
321 |         \else \if b\lst@boxpos \vbox
322 |         \else \vcenter \fi\fi
323 |         \bgroup \par\noindent
324 |     \else
325 |         \lst@ifdisplaystyle
326 |             \lst@EveryDisplay
327 |             \par\penalty-50\relax
328 |             \vspace\lst@aboveskip
329 |         \fi
330 |     \fi
331 |     \normalbaselines
332 |     \abovecaptionskip\lst@abovecaption\relax
333 |     \belowcaptionskip\lst@belowcaption\relax
334 |     \lst@MakeCaption t%
335 |     \lsthk@PreInit \lsthk@Init
336 |     \lst@ifdisplaystyle
337 |         \global\let\lst@ltxlabel\@empty
338 |         \if@inlabel
339 |             \lst@ifresetmargins
340 |                 \leavevmode
341 |             \else
342 |                 \xdef\lst@ltxlabel{\the\everypar}%
343 |                 \lst@AddTo\lst@ltxlabel{%
344 |                     \global\let\lst@ltxlabel\@empty
345 |                     \everypar{\lsthk@EveryLine\lsthk@EveryPar}}%
346 |             \fi
347 |         \fi
348 |         \everypar\expandafter{\lst@ltxlabel
349 |                               \lsthk@EveryLine\lsthk@EveryPar}%
350 |     \else
351 |         \everypar{}\let\lst@NewLine\@empty
352 |     \fi
353 |     \lsthk@InitVars \lsthk@InitVarsBOL
354 |     \lst@Let{13}\lst@MProcessListing
355 |     \let\lst@Backslash#1%
356 |     \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}%
357 |     \lst@InitFinalize}
358 | \def\lst@DeInit{%
359 |     \lst@XPrintToken \lst@EOLUpdate
360 |     \global\advance\lst@newlines\m@ne
361 |     \lst@ifshowlines
362 |         \lst@DoNewLines
363 |     \else
364 |         \setbox\@tempboxa\vbox{\lst@DoNewLines}%
365 |     \fi
366 |     \lst@ifdisplaystyle \par\removelastskip \fi
367 |     \lsthk@ExitVars\everypar{}\lsthk@DeInit\normalbaselines\normalcolor
368 |     \lst@MakeCaption b%
369 |     \lst@ifbox
370 |         \egroup $\hss \egroup
371 |         \vrule\@width\lst@maxwidth\@height\z@\@depth\z@
372 |     \else
373 |         \lst@ifdisplaystyle
374 |             \par\penalty-50\vspace\lst@belowskip
375 |         \fi
376 |     \fi
377 | % chmod begin
378 |     \ifx\lst@multicols\@empty\else
379 |         \def\lst@next{\global\let\@checkend\@gobble
380 |                       \endmulticols
381 |                       \global\let\@checkend\lst@@checkend}
382 |         \expandafter\lst@next
383 |     \fi
384 | % chmod end
385 |     \ifx\lst@float\relax\else
386 |         \expandafter\lst@endfloat
387 |     \fi
388 |     \endgroup}
389 | \let\lst@@checkend\@checkend
390 | %%
391 | \endinput
392 | %%
393 | %% End of file `lstpatch.sty'.
394 | 
395 | 


--------------------------------------------------------------------------------
/Missing Packages/vmargin.sty:
--------------------------------------------------------------------------------
  1 | %%----------------------------------------------------------------------
  2 | %% vmargin.sty
  3 | %
  4 | % LaTeX package which introduces paper sizes and provides macros for
  5 | % setting document margins.
  6 | % This package supersedes package vpage.
  7 | %
  8 | % This file can be made part of a format by typing \input vmargin.sty
  9 | % before dumping the format.
 10 | %
 11 | % Documentation & history after (last) \endinput.
 12 | %
 13 | % Still works with LaTeX 2.09.
 14 | % Supported = yes.
 15 | %
 16 | %
 17 | % Copyright (C) 1993, 1994, 1995, 1996, 1999 by:
 18 | %
 19 | % Volker Kuhlmann
 20 | % c/o University of Canterbury
 21 | % ELEC Dept
 22 | % Creyke Road
 23 | % Christchurch, New Zealand
 24 | % E-Mail: v.kuhlmann@elec.canterbury.ac.nz
 25 | %
 26 | % This program can be redistributed and/or modified under the terms
 27 | % of the LaTeX Project Public License, distributed from CTAN
 28 | % archives as macros/latex/base/lppl.txt; either
 29 | % version 1 of the License, or (at your option) any later version.
 30 | %
 31 | %%----------------------------------------------------------------------
 32 | 
 33 | %\def\filename{Vmargin}
 34 | \def\filename{vmargin}
 35 | \def\fileversion{V2.2}
 36 | \def\filedate{1999/06/01}
 37 | 
 38 | \@ifundefined{Vmargin}{}{\endinput}
 39 | 
 40 | \@ifundefined{documentclass}{
 41 |  \edef\Vmargin{Style `\filename', \fileversion, \filedate}
 42 |  \expandafter\everyjob\expandafter{\the\everyjob\typeout{\Vmargin}}
 43 |  \typeout{\Vmargin}
 44 | }{
 45 |  \NeedsTeXFormat{LaTeX2e}[1994/06/01]
 46 |  \ProvidesPackage{\filename}[\filedate]
 47 |  \edef\Vmargin{Package `\filename', \fileversion, <\filedate>}
 48 |  \expandafter\everyjob\expandafter{\the\everyjob\typeout{\Vmargin}}
 49 |  \typeout{\Vmargin}
 50 | }
 51 | 
 52 | 
 53 | % new lengths:	\PaperWidth, \PaperHeight
 54 | % new if:	\ifLandscape
 55 | %
 56 | \newdimen\PaperWidth
 57 | \newdimen\PaperHeight
 58 | %
 59 | \newif\ifLandscape
 60 | 
 61 | 
 62 | % \setpapersize
 63 | %
 64 | \def\setpapersize{\@ifnextchar[{\@@setps}{\@@setps[portrait]}}
 65 | \def\@@setps[#1]{%
 66 |   \@ifundefined{po@#1}{\@name@err{#1}}{\@nameuse{po@#1}}%
 67 |   \@@@setps}
 68 | \def\@@@setps#1{%
 69 |   \@ifundefined{paper@#1}{\@name@err{#1}}{}%
 70 |   \csname paper@#1\endcsname}
 71 | 	% \usename{paper@#1} inside arg to \@ifundefined does not work
 72 | 	% with papersize "custom".
 73 | \def\po@portrait{\Landscapefalse}
 74 | \def\po@landscape{\Landscapetrue}
 75 | \def\@po@{\ifLandscape\dimen0\PaperWidth
 76 |   \PaperWidth\PaperHeight\PaperHeight\dimen0\fi
 77 |   \@ifundefined{paperwidth}{}{\paperwidth\PaperWidth}%
 78 |   \@ifundefined{paperheight}{}{\paperheight\PaperHeight}}
 79 | \@ifundefined{PackageError}{
 80 |  \def\@name@err#1{%
 81 |    \typeout{*****> \string\setpapersize: illegal parameter: #1}}
 82 | }{
 83 |  \def\@name@err#1{\PackageError{\filename}%
 84 |  			{Paper size or orientation unknown: #1}{}}
 85 | }
 86 | 
 87 | 
 88 | % pre-defined paper/envelope sizes
 89 | %
 90 | % A0, A1, A2, ..., A9, B0, B1, ..., B9, C0, C1, ..., C9
 91 | % USletter, USlegal, USexecutive
 92 | % custom
 93 | %
 94 | \def\@defmetricpaper#1#2#3{%
 95 |   \begingroup
 96 |   \count0=0
 97 |   \def\w{\dimen1 }\def\h{\dimen2 }\def\s{\dimen3 }%
 98 |   \w#2\h#3
 99 |   \def\l{11}
100 |   \loop
101 |     \begingroup
102 |     \def\t{\the\count0}
103 |     \catcode`\t=11	% letter
104 |     \expandafter\xdef\csname paper@#1\the\count0\endcsname{%
105 |       \PaperWidth\the\w\PaperHeight\the\h\noexpand\@po@}
106 |     \endgroup
107 |     \s\w\w.5\h\h\s
108 |   \ifnum\the\count0<9
109 |     \advance\count0 by 1
110 |   \repeat
111 |   \endgroup
112 | }
113 | %
114 | \@defmetricpaper{A}{840.9mm}{1189.2mm}
115 | \@defmetricpaper{B}{1000mm}{1414mm}
116 | \@defmetricpaper{C}{917mm}{1297mm}
117 | %
118 | \let\@defmetricpaper=\relax	% delete definition to save memory
119 | %
120 | \def\paper@USletter{\PaperWidth 8.5in \PaperHeight 11in \@po@}
121 | \def\paper@USlegal{\PaperWidth 8.5in \PaperHeight 14in \@po@}
122 | \def\paper@USexecutive{\PaperWidth 7.25in\PaperHeight 10.5in \@po@}
123 | %
124 | \def\paper@custom#1#2{\PaperWidth#1\PaperHeight#2\@po@}
125 | 
126 | 
127 | % margin@offset
128 | %
129 | % Compensates for the +1in/+1in top/left corner
130 | % by either reducing the margins or \hoffset, \voffset by 1in.
131 | % This macro is only defined here if it is not already defined!
132 | % (see documentation at the end)
133 | %
134 | \newif\if@shiftmargins
135 | \@shiftmarginsfalse	% this MUST be default (pageframe.sty)
136 | %
137 | \@ifundefined{margin@offset}{
138 | \def\margin@offset{
139 |   \if@shiftmargins
140 | 	\oddsidemargin -1in\evensidemargin -1in\topmargin -1in
141 | 	\hoffset 0in\voffset 0in\relax
142 |   \else
143 | 	\oddsidemargin 0in\evensidemargin 0in\topmargin 0in
144 | 	\hoffset -1in\voffset -1in\relax
145 |   \fi
146 | }}{}
147 | %
148 | \def\shiftmargins{\@shiftmarginstrue}
149 | 
150 | 
151 | % Setting margins
152 | %
153 | % \setmargins{leftmargin}{topmargin}{textwidth}{textheight}% 
154 | %    {headheight}{headsep}{footheight}{footskip}
155 | %
156 | \newcommand\setmargins[8]{%
157 | 	\margin@offset
158 | 	\advance\oddsidemargin	#1
159 | 	\advance\evensidemargin	\PaperWidth	% = paperwidth - left
160 | 	\advance\evensidemargin	-#1		%	- width
161 | 	\advance\evensidemargin	-#3
162 | 	\advance\topmargin	#2
163 | 	\textwidth	#3
164 | 	\textheight	#4
165 | 	\headheight	#5
166 | 	\headsep	#6
167 | 	\@ifundefined{footheight}{}{\footheight=#7}%
168 | 	\footskip	#8
169 | 	\chk@dimen{#1}{#2}{#3}{#4}%
170 | }
171 | %
172 | % \setmarginsrb{leftmargin}{topmargin}{rightmargin}{bottommargin}% 
173 | %    {headheight}{headsep}{footheight}{footskip}
174 | %
175 | \newcommand\setmarginsrb[8]{%
176 | 	\margin@offset
177 | 	\textwidth		\PaperWidth	% = paperwidth
178 | 	\advance\textwidth	-#1		%  - left - right
179 | 	\advance\textwidth	-#3
180 | 	\textheight		\PaperHeight	% = paperheight - top
181 | 	\advance\textheight	-#2		%  - headheight
182 | 	\advance\textheight	-#5		%  - headsep
183 | 	\advance\textheight	-#6		%  - footskip - bottom
184 | 	\advance\textheight	-#8
185 | 	\advance\textheight	-#4
186 | 	\advance\oddsidemargin	#1
187 | 	\advance\evensidemargin	\PaperWidth	% = paperwidth
188 | 	\advance\evensidemargin	-#1		%  - left - width
189 | 	\advance\evensidemargin	-\textwidth
190 | 	\advance\topmargin	#2
191 | 	\headheight	#5
192 | 	\headsep	#6
193 | 	\@ifundefined{footheight}{}{\footheight=#7}%
194 | 	\footskip	#8
195 | 	\chk@dimen{#1}{#2}{#3}{#4}%
196 | }
197 | %
198 | % \setmargnohf{leftmargin}{topmargin}{textwidth}{textheight}
199 | % headheight, headsep, footheight, footskip set to 0pt
200 | \newcommand\setmargnohf[4]{%
201 | 	\setmargins{#1}{#2}{#3}{#4}\z@\z@\z@\z@
202 | 	\pagestyle{empty}}
203 | %
204 | % \setmargnohfrb{leftmargin}{topmargin}{rightmargin}{bottommargin}
205 | % headheight, headsep, footheight, footskip set to 0pt
206 | \newcommand\setmargnohfrb[4]{%
207 | 	\setmarginsrb{#1}{#2}{#3}{#4}\z@\z@\z@\z@
208 | 	\pagestyle{empty}}
209 | %
210 | % \setmarg{leftmargin}{topmargin}{textwidth}{textheight}
211 | % headheight, headsep, footheight, footskip unchanged
212 | \newcommand\setmarg[4]{%
213 | 	\setmargins{#1}{#2}{#3}{#4}%
214 | 	\headheight\headsep\footheight\footskip}
215 | %
216 | % \setmargrb{leftmargin}{topmargin}{rightmargin}{bottommargin}
217 | % headheight, headsep, footheight, footskip unchanged
218 | \newcommand\setmargrb[4]{%
219 | 	\setmarginsrb{#1}{#2}{#3}{#4}%
220 | 	\headheight\headsep\footheight\footskip}
221 | %
222 | % h-warning if [leftmarg + textwidth > paperwidth] resp.
223 | %	    if [leftmarg + rightmarg > paperwidth].
224 | % v-warning if [topmarg + textheight > paperheight] resp.
225 | %	    if [topmarg + bottommarg > paperheight].
226 | \def\chk@dimen#1#2#3#4{%
227 | 	\dimen0=	#1
228 | 	\advance\dimen0 by#3
229 | 	\advance\dimen0 -\PaperWidth
230 | 	\dimen1=	#2
231 | 	\advance\dimen1 by#4
232 | 	\advance\dimen1 \headheight
233 | 	\advance\dimen1 \headsep
234 | 	\advance\dimen1 \footskip
235 | 	\advance\dimen1 -\PaperHeight
236 | 	\chk@dimen@err
237 | }
238 | \@ifundefined{PackageError}{
239 |  \def\chk@dimen@err{
240 | 	\ifnum\dimen0>\z@\typeout{vmargin Warning: Horizontal dimensions
241 | 	  exceed paper width by \the\dimen0}\fi
242 | 	\ifnum\dimen1>\z@\typeout{vmargin Warning: Vertical dimensions
243 | 	  exceed paper height by \the\dimen1}\fi
244 |  }
245 | }{
246 |  \def\chk@dimen@err{
247 | 	\ifnum\dimen0>\z@\PackageError{\filename}{%
248 | 	  Horizontal dimensions exceed paper width by \the\dimen0}{}\fi
249 | 	\ifnum\dimen1>\z@\PackageError{\filename}{%
250 | 	  Vertical dimensions exceed paper height by \the\dimen1}{}\fi
251 |  }
252 | }
253 | 
254 | 
255 | %
256 | % DEFAULTS:
257 | %
258 | \setpapersize{A4}
259 | \def\@hf@dflt{}
260 | \@ifundefined{DeclareOption}{
261 | }{
262 |  \DeclareOption{shiftmargins}{\shiftmargins}
263 |  \DeclareOption{portrait}{\Landscapefalse}
264 |  \DeclareOption{landscape}{\Landscapetrue}
265 |  \DeclareOption{nohf}{\def\@hf@dflt{y}}
266 |  \DeclareOption*{\@@@setps{\CurrentOption}}
267 |  \ProcessOptions\relax  % process options in order of declaration!
268 | }
269 | \if y\@hf@dflt
270 |   \setmargnohfrb{35mm}{20mm}{25mm}{15mm}%
271 | \else
272 |   \setmarginsrb{35mm}{20mm}{25mm}{15mm}{12pt}{11mm}{0pt}{11mm}%
273 | \fi
274 | 
275 | 
276 | \endinput
277 | 
278 | %%----------------------------------------------------------------------
279 | 
280 | Page Size and Margins
281 | =====================
282 | 
283 | These macros make it easy to set page margins for a chosen paper size.
284 | Actual dimensions of the most common paper sizes are stored and need
285 | not be remembered.
286 | 
287 | Two sided printing is supported, meaning that if on odd pages the left
288 | margin is, say, 30mm and the right margin is 20mm, it will be vice
289 | versa on even pages. This gives equal margins on the outer and equal
290 | margins on the inner edge of the paper, as expected e.g. for a book.
291 | 
292 | vmargin is designed to be reasonably restricted in both memory usage
293 | and processing time, so that the common task of setting margins is not
294 | too distracting. If you are looking for something fancier try the
295 | geometry package.
296 | 
297 | The basic procedure of using vmargin is to first set a paper size, and
298 | then to set the margins. The margin setting functions depend on the
299 | paper size. Setting the paper size and margins are two independent
300 | operations, i.e. setting the paper size does not directly affect the
301 | margins but will affect the next margin setting command.
302 | 
303 | The size of the paper can be set with 
304 | 
305 | 	\setpapersize{}
306 | 
307 |  can be A0, A1, ..., A9, B0, B1, ..., B9, C0, ..., C9, USletter,
308 | USlegal, and USexecutive. The metric paper sizes are not stored but
309 | calculated. \setpapersize by default sets the orientation to portrait.
310 | 
311 | Landscape format is selected by using the optional argument
312 | 
313 | 	\setpapersize[landscape]{}
314 | 
315 | which swaps the width and height dimensions of the paper.
316 | \setpapersize[portrait]{} is allowed but is the default.
317 | 
318 | If you have a size which is not pre-defined use
319 | 
320 | 	\setpapersize{custom}{}{}
321 | 
322 | For  and  insert the respective dimensions of your
323 | paper.
324 | 
325 | \setpapersize stores the actual dimensions of the paper in the length
326 | variables
327 | 
328 | 	\PaperWidth
329 | 	\PaperHeight
330 | 
331 | which can be used further, if desired.
332 | 
333 | 	\ifLandscape
334 | 
335 | yields true if a landscape format is selected. Do not write to
336 | \PaperWidth, \PaperHeight, or call \Landscapetrue or \Landscapefalse,
337 | it will not work!!
338 | 
339 | The margins can be set with
340 | 
341 | 	\setmargins{leftmargin}{topmargin}{textwidth}{textheight}%
342 |   		   {headheight}{headsep}{footheight}{footskip}
343 | 
344 | or with
345 | 
346 | 	\setmarginsrb{leftmargin}{topmargin}{rightmargin}{bottommargin}%
347 | 		     {headheight}{headsep}{footheight}{footskip}
348 | 
349 | In the latter case \textwidth and \textheight are calculated using the
350 | width and height of the selected paper. The first four parameters of
351 | the above two commands are used to set \oddsidemargin, \evensidemargin,
352 | \textwidth, \topmargin, and \textheight.
353 | 
354 | 	\setmargnohf, \setmargnohfrb
355 | 
356 | Provide a page with no header and footer. They work the same as
357 | \setmargins, \setmarginsrb except that they only need the first 4
358 | parameters. The last 4 parameters are set to 0pt. These 2 commands set
359 | the pagestyle to empty (\pagestyle{empty}) as there is no space for
360 | headers or footers.
361 | 
362 | 	\setmarg, \setmargrb
363 | 
364 | are the same as \setmargnohf, \setmargnohfrb except that the last 4
365 | parameters to \setmargins, \setmarginsrb are unchanged.
366 | 
367 | Example:
368 | 
369 | 	A4 paper, left margin 30mm, top, right, and bottom margin 20mm
370 | 	each, no headers or footers:
371 | 
372 | 	\setpapersize{A4}
373 | 	\setmarginsrb{30mm}{20mm}{20mm}{20mm}{0pt}{0mm}{0pt}{0mm}
374 | 	\pagestyle{empty}
375 | 
376 | The same settings would result with:
377 | 
378 | 	\setpapersize{A4}
379 | 	\setmargnohfrb{30mm}{20mm}{20mm}{20mm}
380 | 
381 | For the default settings please see the part after "DEFAULTS:" (last
382 | part before \endinput). 
383 | 
384 | The default top and left margins of TeX are +1in. \setmargXXX call
385 | 
386 | 	\margin@offset
387 | 
388 | which initialises \hoffset, \voffset to -1in and \oddsidemargin,
389 | \evensidemargin, \topmargin to 0in. \setmargXXX then add the given
390 | dimensions to \topmargin, \oddsidemargin, \evensidemargin. In some
391 | cases it might be desired to use \XXXmargin instead of \Xoffset for
392 | compensation. This can be achieved by telling \margin@offset to
393 | initialise \Xoffset to 0in and \XXXmargin to -1in. This is done by
394 | %
395 | 	\shiftmargins.
396 | %
397 | If \margin@offset is already defined at the time vmargin is loaded it
398 | is NOT redefined! Therefore if \margin@offset is defined before vmargin
399 | is loaded the above mentioned compensation can be replaced by a
400 | different mechanism. In any case \setmargXXX call \margin@offset and
401 | then expect that \XXXmargin are set to useful values. \Xoffset are not
402 | touched by \setmargXXX.  \margin@offset should be defined in a separate
403 | file which is included BEFORE vmargin, i.e. appears in the list of
404 | document-substyles of the \documentstyle command before vmargin.
405 | %
406 | Any better way of doing this? (grumble)
407 | 
408 | Example:  \documentstyle[...,margins,vmargin,...]{...} 
409 | 	  if \margin@offset is defined in a file called margins.sty.
410 | 
411 | LaTeX2e:  \documentclass[...]{...}
412 | 	  \usepackage{...,margins,vmargin,...}
413 | 
414 | 
415 | LaTeX2e
416 | -------
417 | 
418 | This package now uses some of the new LaTeX2e features for package
419 | programming. It will still work with LaTeX 2.09 (in which case the new
420 | features are not used, resp. are inaccessible).
421 | 
422 | LaTeX2e (unless in compatibility mode) does not know \footheight any
423 | more. vmargin does not set this variable if it does not exist, and sets
424 | it if it does. As \footheight was not used by LaTeX 2.09 all this has
425 | little significance.
426 | 
427 | LaTeX2e now has the dimensions \paperwidth, \paperheight which hold the
428 | size of the paper. \PaperWidth, \PaperHeight are copied into
429 | \paperwidth, \paperheight if the latter exist. This makes vmargin work
430 | correctly with anything that expects \paperwidth, \paperheight to be
431 | set properly. The names \PaperWidth, \PaperHeight had been chosen in
432 | the first place to avoid clashes with style files that also use these
433 | names (namely pageframe.sty).
434 | 
435 | The following package options are available under LaTeX2e:
436 | 
437 | shiftmargins	same as \shiftmargins
438 | portrait
439 | landscape
440 | A4, etc.	same as using \setpapersize[...]{...}
441 | 		Note: \setpapersize always sets the orientation to
442 | 		portrait unless landscape is given. Using \setpapersize
443 | 		after \usepackage causes package option landscape to be
444 | 		ignored.
445 | nohf		do not make space for header and footer lines; this also
446 | 		sets the pagestyle to empty
447 | 
448 | All unknown options are treated as a paper size, if necessary
449 | generating an error that the requested paper size is not defined.
450 | 
451 | 
452 | Inclusion in TeX formats
453 | ------------------------
454 | 
455 | This file may be loaded in initex before dumping the format, by typing
456 | 	\makeatletter
457 | 	\input vmargin.sty
458 | 	\makeatother
459 | Note: this produces a non-standard format.
460 | 
461 | 
462 | Hints for using pageframe.sty
463 | -----------------------------
464 | 
465 | vmargin.sty and pageframe.sty can be used together if the following
466 | points are considered:
467 | 
468 | vmargin uses \hoffset and \voffset and writes negative values into it,
469 | pageframe expects them to be zero to give a 1in space on the left and
470 | the top where it prints additional information. Initially, set both to
471 | 0mm (in the pre-amble of your text) and adjust them later on.
472 | 
473 | pageframe needs to know the trimmed height of the paper (= the height
474 | of the "page frame"). Unless the trimmed(!) size of the paper is
475 | equivalent to one of the standard paper sizes (unlikely...) the size
476 | should be specified with
477 | 
478 | 	\setpapersize{custom}{}{}
479 | 
480 | The correct height of the trimmed page can then be given to pageframe
481 | using
482 | 
483 | 	\paperheight{\PaperHeight}
484 | 
485 | and the margins of the final product (inside the page frame) can be
486 | specified using \setmargXXX.
487 | 
488 | Warning: if \setmargXXXrb is used the 3rd parameter (right margin) is
489 | ignored. Instead, the dimension of the right margin has to be assigned
490 | to \evensidemargin. This is because pageframe.sty re-defines the meaning
491 | of \evensidemargin to be the right margin of your text, on all pages.
492 | 
493 | Remember: all these assignments and macro calls have to be in the
494 | pre-amble of the document.
495 | 
496 | 
497 | Bugs:
498 | -----
499 | 
500 | I have not tested this with older versions of LaTeX2e because I don't
501 | have any. If there are any problems pleease do let me know and I'll do
502 | something about it.
503 | 
504 | 
505 | To do:
506 | ------
507 | 
508 | * The way the metric paper sizes are stored takes up a lot of space. A
509 |   metric size could be computed by \setpapersize.
510 | 
511 | 
512 | SUMMARY:
513 | ========
514 | 
515 | new lengths:
516 |   \PaperWidth
517 |   \PaperHeight
518 | 
519 | new ifs:
520 |   \ifLandscape
521 | 
522 | new macros:
523 |   \setpapersize[]{}, 
524 |   \setpapersize[]{custom}{}{}
525 | 	 (optional) = landscape or portrait (default)
526 | 	 = A4, B5, ...
527 | 	,  = actual dimensions of the paper
528 |   \setmargins{leftmargin}{topmargin}{textwidth}{textheight}%
529 |   	     {headheight}{headsep}{footheight}{footskip}
530 |   \setmarginsrb{leftmargin}{topmargin}{rightmargin}{bottommargin}%
531 |   	       {headheight}{headsep}{footheight}{footskip}
532 |   \setmargnohf{leftmargin}{topmargin}{textwidth}{textheight}
533 |   \setmargnohfrb{leftmargin}{topmargin}{rightmargin}{bottommargin}
534 |   \setmarg{leftmargin}{topmargin}{textwidth}{textheight}
535 |   \setmargrb{leftmargin}{topmargin}{rightmargin}{bottommargin}
536 | %
537 |   \margin@offset
538 |   \shiftmargins
539 | 
540 | LaTeX2e package options:
541 |   shiftmargins
542 |   portrait
543 |   landscape
544 |   nohf
545 |   all other options are treated as paper sizes
546 | 
547 | 
548 | If you have any comments (positive or negative) please let me know!
549 | 
550 | 
551 | 
552 | HISTORY:
553 | ========
554 | 
555 | 	.
556 | 	.		Created out of Vpage.sty.
557 | 	.
558 | V1.7	  21 May 1994	Changed file header.
559 | V1.72	  21 May 1994	Fixed bug in \setpapersize{custom}
560 | V1.8	  28 May 94	Commented \chk@dimen; reduced load on TeX's
561 | 			parameter stack (changed \chk@dimen).
562 | 			Put a conditional around references 
563 | 			to \footheight.
564 | V1.9	  22 Jun 94	Corrected spelling in comment.
565 | V2.0      28 Jun 94     Added support for LaTeX2e \paperwidth,
566 | 			\paperheight.
567 | V2.1	  20 Sep 94	\@defmetricpaper now defines \w, \h, \s locally.
568 | 			Thanks to branderhorst@fgg.eur.nl!
569 | V2.12	  28 Mar 95	Fixed documentation for \setmargrb.
570 | V2.13	  26 Jun 96	Fixed comment for \setmarginsrb.
571 | V2.2	  31 May 99	Released under LPPL.
572 | 			Changed references to Vmargin to vmargin.
573 | 			LaTeX2e package options introduced.
574 | %
575 | %% EOF vmargin.sty
576 | %%----------------------------------------------------------------------
577 | 


--------------------------------------------------------------------------------
/Thesis.cls:
--------------------------------------------------------------------------------
  1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2 | % Thesis LaTeX Template - THESIS CLASS FILE
  3 | %
  4 | % The original template was downloaded from:
  5 | % http://www.latextemplates.com
  6 | %
  7 | % The current version of the class file borrows heavily from the one available
  8 | % on latextemplates.com but has been modified to meet the needs of those trying
  9 | % to create a report for presentation in BITS Pilani.
 10 | %
 11 | % This class file defines the structure and design of the template.
 12 | %
 13 | % There is one part that needs to be filled out - the variables
 14 | % dictating the document particulars such as the author name, university
 15 | % name, etc. You will find these in the variables.tex file.
 16 | %
 17 | % The other two easily-editable sections are the margin sizes and abstract.
 18 | % These have both been commented for easy editing. Advanced LaTeX
 19 | % users will have no trouble editing the rest of the document to their liking.
 20 | %
 21 | % Original header:
 22 | %% This is file `Thesis.cls', based on 'ECSthesis.cls', by Steve R. Gunn
 23 | %% generated with the docstrip utility.
 24 | %%
 25 | %% Created by Steve R. Gunn, modified by Sunil Patel: www.sunilpatel.co.uk
 26 | %% Further modified by www.latextemplates.com. Later modified by Darshit Shah
 27 | %
 28 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 29 | 
 30 | %-------------------------------------------------------------------------------
 31 | % Base Class Definition
 32 | %-------------------------------------------------------------------------------
 33 | \NeedsTeXFormat{LaTeX2e}[1996/12/01]
 34 | \ProvidesClass{Thesis}
 35 |               [2007/22/02 v1.0
 36 |    LaTeX document class]
 37 | \def\baseclass{book}
 38 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
 39 | \def\@checkoptions#1#2{
 40 |   \edef\@curroptions{\@ptionlist{\@currname.\@currext}}
 41 |   \@tempswafalse
 42 |   \@tfor\@this:=#2\do{
 43 |     \@expandtwoargs\in@{,\@this,}{,\@curroptions,}
 44 |     \ifin@ \@tempswatrue \@break@tfor \fi}
 45 |   \let\@this\@empty
 46 |   \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
 47 | }
 48 | \@checkoptions{11pt}{{10pt}{11pt}{12pt}}
 49 | \PassOptionsToClass{a4paper}{\baseclass}
 50 | \ProcessOptions\relax
 51 | \LoadClass{\baseclass}
 52 | %-------------------------------------------------------------------------------
 53 | 
 54 | \RequirePackage[utf8]{inputenc} % Allows the use of international characters (e.g. Umlauts)
 55 | 
 56 | \newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}
 57 | \newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
 58 | \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % New command to make the lines in the title page
 59 | 
 60 | \def\today{\ifcase\month\or
 61 |   January\or February\or March\or April\or May\or June\or
 62 |   July\or August\or September\or October\or November\or December\fi
 63 |   \space \number\year}
 64 | 
 65 | %-------------------------------------------------------------------------------
 66 | % SPACING RULES
 67 | %-------------------------------------------------------------------------------
 68 | \usepackage{setspace}
 69 | \onehalfspacing
 70 | \setlength{\parindent}{0pt}
 71 | \setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
 72 | %-------------------------------------------------------------------------------
 73 | 
 74 | %-------------------------------------------------------------------------------
 75 | % MARGINS
 76 | %-------------------------------------------------------------------------------
 77 | \usepackage{vmargin}
 78 | \setmarginsrb  { 1.0in}  % left margin
 79 |                { 0.6in}  % top margin
 80 |                { 1.0in}  % right margin
 81 |                { 0.8in}  % bottom margin
 82 |                {  20pt}  % head height
 83 |                {0.25in}  % head sep
 84 |                {   9pt}  % foot height
 85 |                { 0.3in}  % foot sep
 86 | %-------------------------------------------------------------------------------
 87 | 
 88 | %-------------------------------------------------------------------------------
 89 | % DECLARATION OF AUTHORSHIP
 90 | %
 91 | % Use the \Declaration command to print the Declaration of Authorship page
 92 | %-------------------------------------------------------------------------------
 93 | \newcommand\Declaration{
 94 |     \btypeout{Declaration of Authorship}
 95 |     \addtotoc{Declaration of Authorship}
 96 |     \addtocontents{toc}{\vspace{1em}} % Add gap in the Contents, for aesthetics
 97 |     \thispagestyle{plain}
 98 |     \null\vfil
 99 |     \begin{center}{\huge\bf Declaration of Authorship\par}\end{center}
100 |     {\normalsize
101 | I, \authornames, declare that this \doctype{} titled, `\ttitle' and the work
102 | presented in it are my own. I confirm that:
103 | 
104 | \begin{itemize}
105 |     \item[\tiny{$\blacksquare$}] This work was done wholly or mainly while in
106 |         candidature for a research degree at this University.
107 |     \item[\tiny{$\blacksquare$}] Where any part of this thesis has previously
108 |         been submitted for a degree or any other qualification at this
109 |         University or any other institution, this has been clearly stated.
110 |     \item[\tiny{$\blacksquare$}] Where I have consulted the published work of
111 |         others, this is always clearly attributed.
112 |     \item[\tiny{$\blacksquare$}] Where I have quoted from the work of others,
113 |         the source is always given. With the exception of such quotations, this
114 |         thesis is entirely my own work.
115 |     \item[\tiny{$\blacksquare$}] I have acknowledged all main sources of help.
116 |     \item[\tiny{$\blacksquare$}] Where the thesis is based on work done by
117 |         myself jointly with others, I have made clear exactly what was done by
118 |         others and what I have contributed myself.\\
119 | \end{itemize}
120 | 
121 | Signed:\\
122 | \rule[1em]{25em}{0.5pt} % This prints a line for the signature
123 | 
124 | Date:\\
125 | \rule[1em]{25em}{0.5pt} % This prints a line to write the date
126 |     }
127 | 
128 |     \vfil\vfil\null
129 |     \clearpage % Start a new page
130 | }
131 | %-------------------------------------------------------------------------------
132 | 
133 | %-------------------------------------------------------------------------------
134 | % CERTIFICATE PAGE
135 | %
136 | % Use the \Certificate command to print the Certificate in the document
137 | %-------------------------------------------------------------------------------
138 | \newcommand\Certificate{
139 |     \btypeout{Certificate}
140 |     \addtotoc{Certificate}
141 |     \addtocontents{toc}{\vspace{1em}}
142 |     \thispagestyle{plain}
143 |     \null\vfil
144 |     \begin{center}{\huge\bf Certificate\par}\end{center}
145 |     {\normalsize
146 | This is to certify that the thesis entitled, ``\emph{\ttitle}'' and submitted by
147 | \underline{\authornames} ID No. \underline{\idnum} in partial fulfillment of the
148 | requirements of \ccode{} \cname{} embodies the work done by him under my
149 | supervision.\\[2.5cm]
150 | \begin{minipage}{0.5\textwidth}
151 |     \begin{flushleft} \large
152 |         \vspace{2cm}
153 |         \rule[0.5em]{13em}{0.5pt}\\
154 |         \emph{Supervisor}\\
155 |         \supname\\
156 |         \suppos,\\
157 |         \supinst\\
158 |         Date:\\
159 |     \end{flushleft}
160 | \end{minipage}
161 | \begin{minipage}{0.5\textwidth}
162 |     \begin{flushleft} \large
163 |         \vspace{2cm}
164 |         \rule[0.5em]{13em}{0.5pt}\\
165 |         \emph{Co-Supervisor} \\
166 |         \cosupname\\
167 |         \cosuppos,\\
168 |         \cosupinst\\
169 |         Date:\\
170 |     \end{flushleft}
171 | \end{minipage}\\[3cm]
172 |     }
173 | 
174 |     \vfil\vfil\null
175 |     \clearpage
176 | }
177 | %-------------------------------------------------------------------------------
178 | 
179 | %-------------------------------------------------------------------------------
180 | % QUOTATION PAGE
181 | %
182 | % Use the command \Quotation{Quote}{Author} to create a single page with a
183 | % quotation in the document.
184 | %-------------------------------------------------------------------------------
185 | \newcommand\Quotation[2]{
186 |     \btypeout{Quotation}
187 |     \pagestyle{empty} % No headers or footers for the following pages
188 | 
189 |     \null\vfill % Add some space to move the quote down the page a bit
190 | 
191 |     \textit{``#1''}
192 | 
193 |     \begin{flushright}
194 |         #2
195 |     \end{flushright}
196 | 
197 |     % Add some space at the bottom to position the quote just right
198 |     \vfill\vfill\vfill\vfill\vfill\vfill\null
199 | 
200 |     \clearpage % Start a new page
201 | }
202 | %-------------------------------------------------------------------------------
203 | 
204 | \raggedbottom
205 | \setlength{\topskip}{1\topskip \@plus 5\p@}
206 | \doublehyphendemerits=10000       % No consecutive line hyphens.
207 | \brokenpenalty=10000              % No broken words across columns/pages.
208 | \widowpenalty=9999                % Almost no widows at bottom of page.
209 | \clubpenalty=9999                 % Almost no orphans at top of page.
210 | \interfootnotelinepenalty=9999    % Almost never break footnotes.
211 | \usepackage{fancyhdr}
212 | \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
213 | \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
214 | \chead{}\lfoot{}\rfoot{}\cfoot{}
215 | \pagestyle{fancy}
216 | \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}
217 | \renewcommand{\sectionmark}[1]{}
218 | \renewcommand{\subsectionmark}[1]{}
219 | \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
220 | \hbox{}
221 | \thispagestyle{empty}
222 | \newpage
223 | \if@twocolumn\hbox{}\newpage\fi\fi\fi}
224 | \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace,mathtools}
225 | \theoremstyle{plain}
226 | \newtheorem{example}{Example}[chapter]
227 | \newtheorem{theorem}{Theorem}[chapter]
228 | \newtheorem{corollary}[theorem]{Corollary}
229 | \newtheorem{lemma}[theorem]{Lemma}
230 | \newtheorem{proposition}[theorem]{Proposition}
231 | \newtheorem{axiom}[theorem]{Axiom}
232 | \theoremstyle{definition}
233 | \newtheorem{definition}[theorem]{Definition}
234 | \theoremstyle{remark}
235 | \newtheorem{remark}[theorem]{Remark}
236 | \usepackage[centerlast,small,sc]{caption}
237 | \setlength{\captionmargin}{20pt}
238 | \newcommand{\fref}[1]{Figure~\ref{#1}}
239 | \newcommand{\tref}[1]{Table~\ref{#1}}
240 | \newcommand{\eref}[1]{Equation~\ref{#1}}
241 | \newcommand{\cref}[1]{Chapter~\ref{#1}}
242 | \newcommand{\sref}[1]{Section~\ref{#1}}
243 | \newcommand{\aref}[1]{Appendix~\ref{#1}}
244 | \renewcommand{\topfraction}{0.85}
245 | \renewcommand{\bottomfraction}{.85}
246 | \renewcommand{\textfraction}{0.1}
247 | \renewcommand{\dbltopfraction}{.85}
248 | \renewcommand{\floatpagefraction}{0.75}
249 | \renewcommand{\dblfloatpagefraction}{.75}
250 | \setcounter{topnumber}{9}
251 | \setcounter{bottomnumber}{9}
252 | \setcounter{totalnumber}{20}
253 | \setcounter{dbltopnumber}{9}
254 | \usepackage{graphicx}
255 | \usepackage{epstopdf}
256 | \usepackage{booktabs}
257 | \usepackage{rotating}
258 | \usepackage{enumitem}
259 | \usepackage{listings}
260 | \usepackage{lstpatch}
261 | \usepackage{microtype}
262 | \lstset{captionpos=b,
263 |         frame=tb,
264 |         basicstyle=\scriptsize\ttfamily,
265 |         showstringspaces=false,
266 |         keepspaces=true}
267 | \lstdefinestyle{matlab} {
268 |         language=Matlab,
269 |         keywordstyle=\color{blue},
270 |         commentstyle=\color[rgb]{0.13,0.55,0.13}\em,
271 |         stringstyle=\color[rgb]{0.7,0,0} }
272 | \usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
273 |    bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
274 |    colorlinks,linkcolor={blue},citecolor={red},urlcolor={black},
275 |    pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
276 | 
277 | \usepackage[toc]{glossaries}
278 | \glossarystyle{long}
279 | \makeglossaries
280 | \DeclarePairedDelimiter\ceil{\lceil}{\rceil}
281 | \DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
282 | \pdfstringdefDisableCommands{
283 |    \let\\\space
284 | }
285 | 
286 | \newcommand*{\thesistitle}[1]{\def\ttitle{#1}}
287 | \newcommand*{\supervisor}[1]{\def\supname{#1}}
288 | \newcommand*{\cosupervisor}[1]{\def\cosupname{#1}}
289 | \newcommand*{\documenttype}[1]{\def\doctype{#1}}
290 | \newcommand*{\coursecode}[1]{\def\ccode{#1}}
291 | \newcommand*{\coursename}[1]{\def\cname{#1}}
292 | \newcommand*{\examiner}[1]{\def\examname{#1}}
293 | \newcommand*{\degree}[1]{\def\degreename{#1}}
294 | \newcommand*{\authors}[1]{\def\authornames{#1}}
295 | \newcommand*{\IDNumber}[1]{\def\idnum{#1}}
296 | \newcommand*{\addresses}[1]{\def\addressnames{#1}}
297 | \newcommand*{\university}[1]{\def\univname{#1}}
298 | \newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}
299 | 
300 | %adding campus option
301 | \newcommand*{\campus}[1]{\def\campusname{#1}}
302 | \newcommand*{\CAMPUS}[1]{\def\CAMPUSNAME{#1}}
303 | 
304 | \newcommand*{\department}[1]{\def\deptname{#1}}
305 | \newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}
306 | \newcommand*{\group}[1]{\def\groupname{#1}}
307 | \newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}
308 | \newcommand*{\faculty}[1]{\def\facname{#1}}
309 | \newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}
310 | \newcommand*{\supervisorposition}[1]{\def\suppos{#1}}
311 | \newcommand*{\supervisorinstitute}[1]{\def\supinst{#1}}
312 | \newcommand*{\cosupervisorposition}[1]{\def\cosuppos{#1}}
313 | \newcommand*{\cosupervisorinstitute}[1]{\def\cosupinst{#1}}
314 | \newcommand*{\subject}[1]{\def\subjectname{#1}}
315 | \newcommand*{\keywords}[1]{\def\keywordnames{#1}}
316 | 
317 | 
318 | %-------------------------------------------------------------------------------
319 | % TITLE PAGE
320 | %
321 | % Redefine the \maketitle command to create a custom title page
322 | % ------------------------------------------------------------------------------
323 | \renewcommand\maketitle{
324 |     \btypeout{Title Page}
325 | 
326 |     % PDF meta-data
327 |     \hypersetup{pdftitle={\ttitle}}
328 |     \hypersetup{pdfsubject=\subjectname}
329 |     \hypersetup{pdfauthor=\authornames}
330 |     \hypersetup{pdfkeywords=\keywordnames}
331 | 
332 |     \begin{titlepage}
333 |         \begin{center}
334 | 
335 |         %\textsc{\LARGE \univname}\\[1.5cm] % University name
336 |         %\textsc{\Large \doctype}\\[0.5cm] % Thesis type
337 | 
338 |        \HRule \\[0.4cm] % Horizontal line
339 |         {\huge \bfseries \ttitle}\\[0.4cm] % Thesis title
340 |         \HRule \\[1.5cm] % Horizontal line
341 | 
342 | 		\textsc{\Large \doctype}\\[0.5cm] % Thesis type
343 | 		
344 | 		\large \textit{Submitted in partial fulfillment of the
345 |         requirements of\\\ccode{} \cname}\\[1cm] % University requirement text
346 |         
347 |         \begin{center}
348 |             \emph{By}\\[0.3cm]
349 |             \authornames\\
350 |             ID No. \idnum\\
351 |             \vspace{1cm}
352 |             \emph{Under the supervision of:} \\[0.3cm]
353 |             \supname \\ % The supervisor's name
354 |             \& \\
355 |             \cosupname\\[1cm] % The co-supervisor's name
356 |         \end{center}
357 | 
358 |         \includegraphics{Figures/bits-logo.pdf} % University/department logo
359 |        \\[1cm]
360 |         \UNIVNAME, \CAMPUSNAME\\
361 |         {\large \today}\\[4cm] % Date
362 |         \vfill
363 |     \end{center}
364 | 
365 | \end{titlepage}
366 | }
367 | % ------------------------------------------------------------------------------
368 | 
369 | %-------------------------------------------------------------------------------
370 | % ABSTRACT PAGE DESIGN
371 | %-------------------------------------------------------------------------------
372 | \newenvironment{abstract}
373 | {
374 |   \btypeout{Abstract Page}
375 |   \addtotoc{Abstract}
376 |   \addtocontents{toc}{\vspace{1em}}
377 |   \thispagestyle{empty}
378 |   \null\vfil
379 |   \begin{center}
380 |     \setlength{\parskip}{0pt}
381 |     {\normalsize \UNIVNAME, \CAMPUSNAME \par} % University name in capitals
382 |     \bigskip
383 |     {\huge{\textit{Abstract}} \par}
384 |     \bigskip
385 |     {\normalsize \degreename\par} % Degree name
386 |     \bigskip
387 |     {\normalsize\bf \@title \par} % Thesis title
388 |     \medskip
389 |     {\normalsize by \authornames \par} % Author name
390 |     \bigskip
391 |   \end{center}
392 | }
393 | {\clearpage}
394 | %-------------------------------------------------------------------------------
395 | 
396 | %-------------------------------------------------------------------------------
397 | % ACKNOWLEDGEMENTS
398 | %-------------------------------------------------------------------------------
399 | \newenvironment{acknowledgements}
400 | {
401 |     \btypeout{Acknowledgements}
402 |     \addtotoc{Acknowledgements}
403 |     \addtocontents{toc}{\vspace{1em}}
404 |     \setstretch{1.3}
405 |     \thispagestyle{plain}
406 |     \begin{center}{\huge{\textit{Acknowledgements}} \par}\end{center}
407 |     \normalsize
408 | }
409 | {
410 |     \vfil\vfil\null
411 |     \clearpage
412 | }
413 | %-------------------------------------------------------------------------------
414 | 
415 | %-------------------------------------------------------------------------------
416 | % DEDICATORY
417 | %-------------------------------------------------------------------------------
418 | \newcommand\Dedicatory[1]{
419 | \btypeout{Dedicatory}
420 | \thispagestyle{plain}
421 | \null\vfil
422 | \vskip 60\p@
423 | \begin{center}{\Large \sl #1}\end{center}
424 | \vfil\null
425 | \cleardoublepage
426 | }
427 | %-------------------------------------------------------------------------------
428 | 
429 | \addtocounter{secnumdepth}{1}
430 | \setcounter{tocdepth}{3}
431 | \newcounter{dummy}
432 | \newcommand\addtotoc[1]{
433 | \refstepcounter{dummy}
434 | \addcontentsline{toc}{chapter}{#1}}
435 | \renewcommand\tableofcontents{
436 | \btypeout{Table of Contents}
437 | \addtotoc{Contents}
438 | \begin{spacing}{1}{
439 |     \setlength{\parskip}{1pt}
440 |     \if@twocolumn
441 |       \@restonecoltrue\onecolumn
442 |     \else
443 |       \@restonecolfalse
444 |     \fi
445 |     \chapter*{\contentsname
446 |         \@mkboth{
447 |            \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
448 |     \@starttoc{toc}
449 |     \if@restonecol\twocolumn\fi
450 |    \cleardoublepage
451 | }\end{spacing}
452 | }
453 | \renewcommand\listoffigures{
454 | \btypeout{List of Figures}
455 | \addtotoc{List of Figures}
456 | \begin{spacing}{1}{
457 |     \setlength{\parskip}{1pt}
458 |     \if@twocolumn
459 |       \@restonecoltrue\onecolumn
460 |     \else
461 |       \@restonecolfalse
462 |     \fi
463 |     \chapter*{\listfigurename
464 |       \@mkboth{\MakeUppercase\listfigurename}
465 |               {\MakeUppercase\listfigurename}}
466 |     \@starttoc{lof}
467 |     \if@restonecol\twocolumn\fi
468 |     \cleardoublepage
469 | }\end{spacing}
470 | }
471 | \renewcommand\listoftables{
472 | \btypeout{List of Tables}
473 | \addtotoc{List of Tables}
474 | \begin{spacing}{1}{
475 |     \setlength{\parskip}{1pt}
476 |     \if@twocolumn
477 |       \@restonecoltrue\onecolumn
478 |     \else
479 |       \@restonecolfalse
480 |     \fi
481 |     \chapter*{\listtablename
482 |       \@mkboth{
483 |           \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
484 |     \@starttoc{lot}
485 |     \if@restonecol\twocolumn\fi
486 |     \cleardoublepage
487 | }\end{spacing}
488 | }
489 | \newcommand\listsymbolname{Abbreviations}
490 | \usepackage{longtable}
491 | \newcommand\listofsymbols[2]{
492 | \btypeout{\listsymbolname}
493 | \addtotoc{\listsymbolname}
494 |     \chapter*{\listsymbolname
495 |       \@mkboth{
496 |           \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
497 | \begin{longtable}[c]{#1}#2\end{longtable}\par
498 |     \cleardoublepage
499 | }
500 | \newcommand\listconstants{Physical Constants}
501 | \usepackage{longtable}
502 | \newcommand\listofconstants[2]{
503 | \btypeout{\listconstants}
504 | \addtotoc{\listconstants}
505 |     \chapter*{\listconstants
506 |       \@mkboth{
507 |           \MakeUppercase\listconstants}{\MakeUppercase\listconstants}}
508 | \begin{longtable}[c]{#1}#2\end{longtable}\par
509 |     \cleardoublepage
510 | }
511 | \newcommand\listnomenclature{Nomenclature}
512 | \newcommand\listofnomenclature[0]{
513 | \printglossaries
514 |     \cleardoublepage
515 | }
516 | \renewcommand\backmatter{
517 |   \if@openright
518 |     \cleardoublepage
519 |   \else
520 |     \clearpage
521 |   \fi
522 |   \addtotoc{\bibname}
523 |   \btypeout{\bibname}
524 |   \@mainmatterfalse}
525 | \endinput
526 | 


--------------------------------------------------------------------------------
/Missing Packages/fancyhdr.sty:
--------------------------------------------------------------------------------
  1 | % fancyhdr.sty version 3.2
  2 | % Fancy headers and footers for LaTeX.
  3 | % Piet van Oostrum, 
  4 | % Dept of Computer and Information Sciences, University of Utrecht,
  5 | % Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
  6 | % Telephone: +31 30 2532180. Email: piet@cs.uu.nl
  7 | % ========================================================================
  8 | % LICENCE:
  9 | % This file may be distributed under the terms of the LaTeX Project Public
 10 | % License, as described in lppl.txt in the base LaTeX distribution.
 11 | % Either version 1 or, at your option, any later version.
 12 | % ========================================================================
 13 | % MODIFICATION HISTORY:
 14 | % Sep 16, 1994
 15 | % version 1.4: Correction for use with \reversemargin
 16 | % Sep 29, 1994:
 17 | % version 1.5: Added the \iftopfloat, \ifbotfloat and \iffloatpage commands
 18 | % Oct 4, 1994:
 19 | % version 1.6: Reset single spacing in headers/footers for use with
 20 | % setspace.sty or doublespace.sty
 21 | % Oct 4, 1994:
 22 | % version 1.7: changed \let\@mkboth\markboth to
 23 | % \def\@mkboth{\protect\markboth} to make it more robust
 24 | % Dec 5, 1994:
 25 | % version 1.8: corrections for amsbook/amsart: define \@chapapp and (more
 26 | % importantly) use the \chapter/sectionmark definitions from ps@headings if
 27 | % they exist (which should be true for all standard classes).
 28 | % May 31, 1995:
 29 | % version 1.9: The proposed \renewcommand{\headrulewidth}{\iffloatpage...
 30 | % construction in the doc did not work properly with the fancyplain style. 
 31 | % June 1, 1995:
 32 | % version 1.91: The definition of \@mkboth wasn't restored on subsequent
 33 | % \pagestyle{fancy}'s.
 34 | % June 1, 1995:
 35 | % version 1.92: The sequence \pagestyle{fancyplain} \pagestyle{plain}
 36 | % \pagestyle{fancy} would erroneously select the plain version.
 37 | % June 1, 1995:
 38 | % version 1.93: \fancypagestyle command added.
 39 | % Dec 11, 1995:
 40 | % version 1.94: suggested by Conrad Hughes 
 41 | % CJCH, Dec 11, 1995: added \footruleskip to allow control over footrule
 42 | % position (old hardcoded value of .3\normalbaselineskip is far too high
 43 | % when used with very small footer fonts).
 44 | % Jan 31, 1996:
 45 | % version 1.95: call \@normalsize in the reset code if that is defined,
 46 | % otherwise \normalsize.
 47 | % this is to solve a problem with ucthesis.cls, as this doesn't
 48 | % define \@currsize. Unfortunately for latex209 calling \normalsize doesn't
 49 | % work as this is optimized to do very little, so there \@normalsize should
 50 | % be called. Hopefully this code works for all versions of LaTeX known to
 51 | % mankind.  
 52 | % April 25, 1996:
 53 | % version 1.96: initialize \headwidth to a magic (negative) value to catch
 54 | % most common cases that people change it before calling \pagestyle{fancy}.
 55 | % Note it can't be initialized when reading in this file, because
 56 | % \textwidth could be changed afterwards. This is quite probable.
 57 | % We also switch to \MakeUppercase rather than \uppercase and introduce a
 58 | % \nouppercase command for use in headers. and footers.
 59 | % May 3, 1996:
 60 | % version 1.97: Two changes:
 61 | % 1. Undo the change in version 1.8 (using the pagestyle{headings} defaults
 62 | % for the chapter and section marks. The current version of amsbook and
 63 | % amsart classes don't seem to need them anymore. Moreover the standard
 64 | % latex classes don't use \markboth if twoside isn't selected, and this is
 65 | % confusing as \leftmark doesn't work as expected.
 66 | % 2. include a call to \ps@empty in ps@@fancy. This is to solve a problem
 67 | % in the amsbook and amsart classes, that make global changes to \topskip,
 68 | % which are reset in \ps@empty. Hopefully this doesn't break other things.
 69 | % May 7, 1996:
 70 | % version 1.98:
 71 | % Added % after the line  \def\nouppercase
 72 | % May 7, 1996:
 73 | % version 1.99: This is the alpha version of fancyhdr 2.0
 74 | % Introduced the new commands \fancyhead, \fancyfoot, and \fancyhf.
 75 | % Changed \headrulewidth, \footrulewidth, \footruleskip to
 76 | % macros rather than length parameters, In this way they can be
 77 | % conditionalized and they don't consume length registers. There is no need
 78 | % to have them as length registers unless you want to do calculations with
 79 | % them, which is unlikely. Note that this may make some uses of them
 80 | % incompatible (i.e. if you have a file that uses \setlength or \xxxx=)
 81 | % May 10, 1996:
 82 | % version 1.99a:
 83 | % Added a few more % signs
 84 | % May 10, 1996:
 85 | % version 1.99b:
 86 | % Changed the syntax of \f@nfor to be resistent to catcode changes of :=
 87 | % Removed the [1] from the defs of \lhead etc. because the parameter is
 88 | % consumed by the \@[xy]lhead etc. macros.
 89 | % June 24, 1997:
 90 | % version 1.99c:
 91 | % corrected \nouppercase to also include the protected form of \MakeUppercase
 92 | % \global added to manipulation of \headwidth.
 93 | % \iffootnote command added.
 94 | % Some comments added about \@fancyhead and \@fancyfoot.
 95 | % Aug 24, 1998
 96 | % version 1.99d
 97 | % Changed the default \ps@empty to \ps@@empty in order to allow
 98 | % \fancypagestyle{empty} redefinition.
 99 | % Oct 11, 2000
100 | % version 2.0
101 | % Added LPPL license clause.
102 | %
103 | % A check for \headheight is added. An errormessage is given (once) if the
104 | % header is too large. Empty headers don't generate the error even if
105 | % \headheight is very small or even 0pt. 
106 | % Warning added for the use of 'E' option when twoside option is not used.
107 | % In this case the 'E' fields will never be used.
108 | %
109 | % Mar 10, 2002
110 | % version 2.1beta
111 | % New command: \fancyhfoffset[place]{length}
112 | % defines offsets to be applied to the header/footer to let it stick into
113 | % the margins (if length > 0).
114 | % place is like in fancyhead, except that only E,O,L,R can be used.
115 | % This replaces the old calculation based on \headwidth and the marginpar
116 | % area.
117 | % \headwidth will be dynamically calculated in the headers/footers when
118 | % this is used.
119 | %
120 | % Mar 26, 2002
121 | % version 2.1beta2
122 | % \fancyhfoffset now also takes h,f as possible letters in the argument to
123 | % allow the header and footer widths to be different.
124 | % New commands \fancyheadoffset and \fancyfootoffset added comparable to
125 | % \fancyhead and \fancyfoot.
126 | % Errormessages and warnings have been made more informative.
127 | %
128 | % Dec 9, 2002
129 | % version 2.1
130 | % The defaults for \footrulewidth, \plainheadrulewidth and
131 | % \plainfootrulewidth are changed from \z@skip to 0pt. In this way when
132 | % someone inadvertantly uses \setlength to change any of these, the value
133 | % of \z@skip will not be changed, rather an errormessage will be given.
134 | 
135 | % March 3, 2004
136 | % Release of version 3.0
137 | 
138 | % Oct 7, 2004
139 | % version 3.1
140 | % Added '\endlinechar=13' to \fancy@reset to prevent problems with
141 | % includegraphics in header when verbatiminput is active.
142 | 
143 | % March 22, 2005
144 | % version 3.2
145 | % reset \everypar (the real one) in \fancy@reset because spanish.ldf does
146 | % strange things with \everypar between << and >>.
147 | 
148 | \def\ifancy@mpty#1{\def\temp@a{#1}\ifx\temp@a\@empty}
149 | 
150 | \def\fancy@def#1#2{\ifancy@mpty{#2}\fancy@gbl\def#1{\leavevmode}\else
151 |                                    \fancy@gbl\def#1{#2\strut}\fi}
152 | 
153 | \let\fancy@gbl\global
154 | 
155 | \def\@fancyerrmsg#1{%
156 |         \ifx\PackageError\undefined
157 |         \errmessage{#1}\else
158 |         \PackageError{Fancyhdr}{#1}{}\fi}
159 | \def\@fancywarning#1{%
160 |         \ifx\PackageWarning\undefined
161 |         \errmessage{#1}\else
162 |         \PackageWarning{Fancyhdr}{#1}{}\fi}
163 | 
164 | % Usage: \@forc \var{charstring}{command to be executed for each char}
165 | % This is similar to LaTeX's \@tfor, but expands the charstring.
166 | 
167 | \def\@forc#1#2#3{\expandafter\f@rc\expandafter#1\expandafter{#2}{#3}}
168 | \def\f@rc#1#2#3{\def\temp@ty{#2}\ifx\@empty\temp@ty\else
169 |                                     \f@@rc#1#2\f@@rc{#3}\fi}
170 | \def\f@@rc#1#2#3\f@@rc#4{\def#1{#2}#4\f@rc#1{#3}{#4}}
171 | 
172 | % Usage: \f@nfor\name:=list\do{body}
173 | % Like LaTeX's \@for but an empty list is treated as a list with an empty
174 | % element
175 | 
176 | \newcommand{\f@nfor}[3]{\edef\@fortmp{#2}%
177 |     \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}}
178 | 
179 | % Usage: \def@ult \cs{defaults}{argument}
180 | % sets \cs to the characters from defaults appearing in argument
181 | % or defaults if it would be empty. All characters are lowercased.
182 | 
183 | \newcommand\def@ult[3]{%
184 |     \edef\temp@a{\lowercase{\edef\noexpand\temp@a{#3}}}\temp@a
185 |     \def#1{}%
186 |     \@forc\tmpf@ra{#2}%
187 |         {\expandafter\if@in\tmpf@ra\temp@a{\edef#1{#1\tmpf@ra}}{}}%
188 |     \ifx\@empty#1\def#1{#2}\fi}
189 | % 
190 | % \if@in 
191 | %
192 | \newcommand{\if@in}[4]{%
193 |     \edef\temp@a{#2}\def\temp@b##1#1##2\temp@b{\def\temp@b{##1}}%
194 |     \expandafter\temp@b#2#1\temp@b\ifx\temp@a\temp@b #4\else #3\fi}
195 | 
196 | \newcommand{\fancyhead}{\@ifnextchar[{\f@ncyhf\fancyhead h}%
197 |                                      {\f@ncyhf\fancyhead h[]}}
198 | \newcommand{\fancyfoot}{\@ifnextchar[{\f@ncyhf\fancyfoot f}%
199 |                                      {\f@ncyhf\fancyfoot f[]}}
200 | \newcommand{\fancyhf}{\@ifnextchar[{\f@ncyhf\fancyhf{}}%
201 |                                    {\f@ncyhf\fancyhf{}[]}}
202 | 
203 | % New commands for offsets added
204 | 
205 | \newcommand{\fancyheadoffset}{\@ifnextchar[{\f@ncyhfoffs\fancyheadoffset h}%
206 |                                            {\f@ncyhfoffs\fancyheadoffset h[]}}
207 | \newcommand{\fancyfootoffset}{\@ifnextchar[{\f@ncyhfoffs\fancyfootoffset f}%
208 |                                            {\f@ncyhfoffs\fancyfootoffset f[]}}
209 | \newcommand{\fancyhfoffset}{\@ifnextchar[{\f@ncyhfoffs\fancyhfoffset{}}%
210 |                                          {\f@ncyhfoffs\fancyhfoffset{}[]}}
211 | 
212 | % The header and footer fields are stored in command sequences with
213 | % names of the form: \f@ncy with  for [eo],  from [lcr]
214 | % and  from [hf].
215 | 
216 | \def\f@ncyhf#1#2[#3]#4{%
217 |     \def\temp@c{}%
218 |     \@forc\tmpf@ra{#3}%
219 |         {\expandafter\if@in\tmpf@ra{eolcrhf,EOLCRHF}%
220 |             {}{\edef\temp@c{\temp@c\tmpf@ra}}}%
221 |     \ifx\@empty\temp@c\else
222 |         \@fancyerrmsg{Illegal char `\temp@c' in \string#1 argument:
223 |           [#3]}%
224 |     \fi
225 |     \f@nfor\temp@c{#3}%
226 |         {\def@ult\f@@@eo{eo}\temp@c
227 |          \if@twoside\else
228 |            \if\f@@@eo e\@fancywarning
229 |              {\string#1's `E' option without twoside option is useless}\fi\fi
230 |          \def@ult\f@@@lcr{lcr}\temp@c
231 |          \def@ult\f@@@hf{hf}{#2\temp@c}%
232 |          \@forc\f@@eo\f@@@eo
233 |              {\@forc\f@@lcr\f@@@lcr
234 |                  {\@forc\f@@hf\f@@@hf
235 |                      {\expandafter\fancy@def\csname
236 |                       f@ncy\f@@eo\f@@lcr\f@@hf\endcsname
237 |                       {#4}}}}}}
238 | 
239 | \def\f@ncyhfoffs#1#2[#3]#4{%
240 |     \def\temp@c{}%
241 |     \@forc\tmpf@ra{#3}%
242 |         {\expandafter\if@in\tmpf@ra{eolrhf,EOLRHF}%
243 |             {}{\edef\temp@c{\temp@c\tmpf@ra}}}%
244 |     \ifx\@empty\temp@c\else
245 |         \@fancyerrmsg{Illegal char `\temp@c' in \string#1 argument:
246 |           [#3]}%
247 |     \fi
248 |     \f@nfor\temp@c{#3}%
249 |         {\def@ult\f@@@eo{eo}\temp@c
250 |          \if@twoside\else
251 |            \if\f@@@eo e\@fancywarning
252 |              {\string#1's `E' option without twoside option is useless}\fi\fi
253 |          \def@ult\f@@@lcr{lr}\temp@c
254 |          \def@ult\f@@@hf{hf}{#2\temp@c}%
255 |          \@forc\f@@eo\f@@@eo
256 |              {\@forc\f@@lcr\f@@@lcr
257 |                  {\@forc\f@@hf\f@@@hf
258 |                      {\expandafter\setlength\csname
259 |                       f@ncyO@\f@@eo\f@@lcr\f@@hf\endcsname
260 |                       {#4}}}}}%
261 |      \fancy@setoffs}
262 | 
263 | % Fancyheadings version 1 commands. These are more or less deprecated,
264 | % but they continue to work.
265 | 
266 | \newcommand{\lhead}{\@ifnextchar[{\@xlhead}{\@ylhead}}
267 | \def\@xlhead[#1]#2{\fancy@def\f@ncyelh{#1}\fancy@def\f@ncyolh{#2}}
268 | \def\@ylhead#1{\fancy@def\f@ncyelh{#1}\fancy@def\f@ncyolh{#1}}
269 | 
270 | \newcommand{\chead}{\@ifnextchar[{\@xchead}{\@ychead}}
271 | \def\@xchead[#1]#2{\fancy@def\f@ncyech{#1}\fancy@def\f@ncyoch{#2}}
272 | \def\@ychead#1{\fancy@def\f@ncyech{#1}\fancy@def\f@ncyoch{#1}}
273 | 
274 | \newcommand{\rhead}{\@ifnextchar[{\@xrhead}{\@yrhead}}
275 | \def\@xrhead[#1]#2{\fancy@def\f@ncyerh{#1}\fancy@def\f@ncyorh{#2}}
276 | \def\@yrhead#1{\fancy@def\f@ncyerh{#1}\fancy@def\f@ncyorh{#1}}
277 | 
278 | \newcommand{\lfoot}{\@ifnextchar[{\@xlfoot}{\@ylfoot}}
279 | \def\@xlfoot[#1]#2{\fancy@def\f@ncyelf{#1}\fancy@def\f@ncyolf{#2}}
280 | \def\@ylfoot#1{\fancy@def\f@ncyelf{#1}\fancy@def\f@ncyolf{#1}}
281 | 
282 | \newcommand{\cfoot}{\@ifnextchar[{\@xcfoot}{\@ycfoot}}
283 | \def\@xcfoot[#1]#2{\fancy@def\f@ncyecf{#1}\fancy@def\f@ncyocf{#2}}
284 | \def\@ycfoot#1{\fancy@def\f@ncyecf{#1}\fancy@def\f@ncyocf{#1}}
285 | 
286 | \newcommand{\rfoot}{\@ifnextchar[{\@xrfoot}{\@yrfoot}}
287 | \def\@xrfoot[#1]#2{\fancy@def\f@ncyerf{#1}\fancy@def\f@ncyorf{#2}}
288 | \def\@yrfoot#1{\fancy@def\f@ncyerf{#1}\fancy@def\f@ncyorf{#1}}
289 | 
290 | \newlength{\fancy@headwidth}
291 | \let\headwidth\fancy@headwidth
292 | \newlength{\f@ncyO@elh}
293 | \newlength{\f@ncyO@erh}
294 | \newlength{\f@ncyO@olh}
295 | \newlength{\f@ncyO@orh}
296 | \newlength{\f@ncyO@elf}
297 | \newlength{\f@ncyO@erf}
298 | \newlength{\f@ncyO@olf}
299 | \newlength{\f@ncyO@orf}
300 | \newcommand{\headrulewidth}{0.4pt}
301 | \newcommand{\footrulewidth}{0pt}
302 | \newcommand{\footruleskip}{.3\normalbaselineskip}
303 | 
304 | % Fancyplain stuff shouldn't be used anymore (rather
305 | % \fancypagestyle{plain} should be used), but it must be present for
306 | % compatibility reasons.
307 | 
308 | \newcommand{\plainheadrulewidth}{0pt}
309 | \newcommand{\plainfootrulewidth}{0pt}
310 | \newif\if@fancyplain \@fancyplainfalse
311 | \def\fancyplain#1#2{\if@fancyplain#1\else#2\fi}
312 | 
313 | \headwidth=-123456789sp %magic constant
314 | 
315 | % Command to reset various things in the headers:
316 | % a.o.  single spacing (taken from setspace.sty)
317 | % and the catcode of ^^M (so that epsf files in the header work if a
318 | % verbatim crosses a page boundary)
319 | % It also defines a \nouppercase command that disables \uppercase and
320 | % \Makeuppercase. It can only be used in the headers and footers.
321 | \let\fnch@everypar\everypar% save real \everypar because of spanish.ldf
322 | \def\fancy@reset{\fnch@everypar{}\restorecr\endlinechar=13
323 |  \def\baselinestretch{1}%
324 |  \def\nouppercase##1{{\let\uppercase\relax\let\MakeUppercase\relax
325 |      \expandafter\let\csname MakeUppercase \endcsname\relax##1}}%
326 |  \ifx\undefined\@newbaseline% NFSS not present; 2.09 or 2e
327 |    \ifx\@normalsize\undefined \normalsize % for ucthesis.cls
328 |    \else \@normalsize \fi
329 |  \else% NFSS (2.09) present
330 |   \@newbaseline%
331 |  \fi}
332 | 
333 | % Initialization of the head and foot text.
334 | 
335 | % The default values still contain \fancyplain for compatibility.
336 | \fancyhf{} % clear all
337 | % lefthead empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages
338 | % evenhead empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages
339 | \if@twoside
340 |   \fancyhead[el,or]{\fancyplain{}{\sl\rightmark}}
341 |   \fancyhead[er,ol]{\fancyplain{}{\sl\leftmark}}
342 | \else
343 |   \fancyhead[l]{\fancyplain{}{\sl\rightmark}}
344 |   \fancyhead[r]{\fancyplain{}{\sl\leftmark}}
345 | \fi
346 | \fancyfoot[c]{\rm\thepage} % page number
347 | 
348 | % Use box 0 as a temp box and dimen 0 as temp dimen. 
349 | % This can be done, because this code will always
350 | % be used inside another box, and therefore the changes are local.
351 | 
352 | \def\@fancyvbox#1#2{\setbox0\vbox{#2}\ifdim\ht0>#1\@fancywarning
353 |   {\string#1 is too small (\the#1): ^^J Make it at least \the\ht0.^^J
354 |     We now make it that large for the rest of the document.^^J
355 |     This may cause the page layout to be inconsistent, however\@gobble}%
356 |   \dimen0=#1\global\setlength{#1}{\ht0}\ht0=\dimen0\fi
357 |   \box0}
358 | 
359 | % Put together a header or footer given the left, center and
360 | % right text, fillers at left and right and a rule.
361 | % The \lap commands put the text into an hbox of zero size,
362 | % so overlapping text does not generate an errormessage.
363 | % These macros have 5 parameters:
364 | % 1. LEFTSIDE BEARING % This determines at which side the header will stick
365 | %    out. When \fancyhfoffset is used this calculates \headwidth, otherwise
366 | %    it is \hss or \relax (after expansion).
367 | % 2. \f@ncyolh, \f@ncyelh, \f@ncyolf or \f@ncyelf. This is the left component.
368 | % 3. \f@ncyoch, \f@ncyech, \f@ncyocf or \f@ncyecf. This is the middle comp.
369 | % 4. \f@ncyorh, \f@ncyerh, \f@ncyorf or \f@ncyerf. This is the right component.
370 | % 5. RIGHTSIDE BEARING. This is always \relax or \hss (after expansion).
371 | 
372 | \def\@fancyhead#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset
373 |   \@fancyvbox\headheight{\hbox
374 |     {\rlap{\parbox[b]{\headwidth}{\raggedright#2}}\hfill
375 |       \parbox[b]{\headwidth}{\centering#3}\hfill
376 |       \llap{\parbox[b]{\headwidth}{\raggedleft#4}}}\headrule}}#5}
377 | 
378 | \def\@fancyfoot#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset
379 |     \@fancyvbox\footskip{\footrule
380 |       \hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2}}\hfill
381 |         \parbox[t]{\headwidth}{\centering#3}\hfill
382 |         \llap{\parbox[t]{\headwidth}{\raggedleft#4}}}}}#5}
383 | 
384 | \def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi
385 |     \hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}}
386 | 
387 | \def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi
388 |     \vskip-\footruleskip\vskip-\footrulewidth
389 |     \hrule\@width\headwidth\@height\footrulewidth\vskip\footruleskip}}
390 | 
391 | \def\ps@fancy{%
392 | \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
393 | %
394 | % Define \MakeUppercase for old LaTeXen.
395 | % Note: we used \def rather than \let, so that \let\uppercase\relax (from
396 | % the version 1 documentation) will still work.
397 | %
398 | \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
399 | \@ifundefined{chapter}{\def\sectionmark##1{\markboth
400 | {\MakeUppercase{\ifnum \c@secnumdepth>\z@
401 |  \thesection\hskip 1em\relax \fi ##1}}{}}%
402 | \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
403 |  \thesubsection\hskip 1em\relax \fi ##1}}}%
404 | {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne
405 |  \@chapapp\ \thechapter. \ \fi ##1}}{}}%
406 | \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@
407 |  \thesection. \ \fi ##1}}}}%
408 | %\csname ps@headings\endcsname % use \ps@headings defaults if they exist
409 | \ps@@fancy
410 | \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
411 | % Initialize \headwidth if the user didn't
412 | %
413 | \ifdim\headwidth<0sp
414 | %
415 | % This catches the case that \headwidth hasn't been initialized and the
416 | % case that the user added something to \headwidth in the expectation that
417 | % it was initialized to \textwidth. We compensate this now. This loses if
418 | % the user intended to multiply it by a factor. But that case is more
419 | % likely done by saying something like \headwidth=1.2\textwidth. 
420 | % The doc says you have to change \headwidth after the first call to
421 | % \pagestyle{fancy}. This code is just to catch the most common cases were
422 | % that requirement is violated.
423 | %
424 |     \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
425 | \fi}
426 | \def\ps@fancyplain{\ps@fancy \let\ps@plain\ps@plain@fancy}
427 | \def\ps@plain@fancy{\@fancyplaintrue\ps@@fancy}
428 | \let\ps@@empty\ps@empty
429 | \def\ps@@fancy{%
430 | \ps@@empty % This is for amsbook/amsart, which do strange things with \topskip
431 | \def\@mkboth{\protect\markboth}%
432 | \def\@oddhead{\@fancyhead\fancy@Oolh\f@ncyolh\f@ncyoch\f@ncyorh\fancy@Oorh}%
433 | \def\@oddfoot{\@fancyfoot\fancy@Oolf\f@ncyolf\f@ncyocf\f@ncyorf\fancy@Oorf}%
434 | \def\@evenhead{\@fancyhead\fancy@Oelh\f@ncyelh\f@ncyech\f@ncyerh\fancy@Oerh}%
435 | \def\@evenfoot{\@fancyfoot\fancy@Oelf\f@ncyelf\f@ncyecf\f@ncyerf\fancy@Oerf}%
436 | }
437 | % Default definitions for compatibility mode:
438 | % These cause the header/footer to take the defined \headwidth as width
439 | % And to shift in the direction of the marginpar area
440 | 
441 | \def\fancy@Oolh{\if@reversemargin\hss\else\relax\fi}
442 | \def\fancy@Oorh{\if@reversemargin\relax\else\hss\fi}
443 | \let\fancy@Oelh\fancy@Oorh
444 | \let\fancy@Oerh\fancy@Oolh
445 | 
446 | \let\fancy@Oolf\fancy@Oolh
447 | \let\fancy@Oorf\fancy@Oorh
448 | \let\fancy@Oelf\fancy@Oelh
449 | \let\fancy@Oerf\fancy@Oerh
450 | 
451 | % New definitions for the use of \fancyhfoffset
452 | % These calculate the \headwidth from \textwidth and the specified offsets.
453 | 
454 | \def\fancy@offsolh{\headwidth=\textwidth\advance\headwidth\f@ncyO@olh
455 |                    \advance\headwidth\f@ncyO@orh\hskip-\f@ncyO@olh}
456 | \def\fancy@offselh{\headwidth=\textwidth\advance\headwidth\f@ncyO@elh
457 |                    \advance\headwidth\f@ncyO@erh\hskip-\f@ncyO@elh}
458 | 
459 | \def\fancy@offsolf{\headwidth=\textwidth\advance\headwidth\f@ncyO@olf
460 |                    \advance\headwidth\f@ncyO@orf\hskip-\f@ncyO@olf}
461 | \def\fancy@offself{\headwidth=\textwidth\advance\headwidth\f@ncyO@elf
462 |                    \advance\headwidth\f@ncyO@erf\hskip-\f@ncyO@elf}
463 | 
464 | \def\fancy@setoffs{%
465 | % Just in case \let\headwidth\textwidth was used
466 |   \fancy@gbl\let\headwidth\fancy@headwidth
467 |   \fancy@gbl\let\fancy@Oolh\fancy@offsolh
468 |   \fancy@gbl\let\fancy@Oelh\fancy@offselh
469 |   \fancy@gbl\let\fancy@Oorh\hss
470 |   \fancy@gbl\let\fancy@Oerh\hss
471 |   \fancy@gbl\let\fancy@Oolf\fancy@offsolf
472 |   \fancy@gbl\let\fancy@Oelf\fancy@offself
473 |   \fancy@gbl\let\fancy@Oorf\hss
474 |   \fancy@gbl\let\fancy@Oerf\hss}
475 | 
476 | \newif\iffootnote
477 | \let\latex@makecol\@makecol
478 | \def\@makecol{\ifvoid\footins\footnotetrue\else\footnotefalse\fi
479 | \let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol}
480 | \def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi}
481 | \def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi}
482 | \def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi}
483 | 
484 | \newcommand{\fancypagestyle}[2]{%
485 |   \@namedef{ps@#1}{\let\fancy@gbl\relax#2\relax\ps@fancy}}
486 | 


--------------------------------------------------------------------------------
/Missing Packages/setspace.sty:
--------------------------------------------------------------------------------
  1 | %%% ======================================================================
  2 | %%%  @LaTeX-style-file{
  3 | %%%     filename        = "setspace.sty",
  4 | %%%     version         = "6.7",
  5 | %%%     date            = "Fri 1 December 2000",
  6 | %%%     time            = "17:49 UT+11",
  7 | %%%     author          = "Geoffrey Tobin",
  8 | %%%     address         = "Department of Electronic Engineering
  9 | %%%                        Faculty of Science and Technology
 10 | %%%                        La Trobe University
 11 | %%%                        Bundoora VIC 3086
 12 | %%%                        Australia",
 13 | %%%     email           = "G.Tobin@latrobe.edu.au (Internet)",
 14 | %%%     telephone       = "(+ 613) 9479-3736",
 15 | %%%     FAX             = "(+ 613) 9479-3025",
 16 | %%%     supported       = "yes",
 17 | %%%     archived        = "CTAN",
 18 | %%%     distribution    = "freely redistributable",
 19 | %%%     keywords        = "LaTeX package, line spacing",
 20 | %%%     codetable       = "ISO/ASCII",
 21 | %%%     checksum        = "11793 546 2608 21972",
 22 | %%%     docstring       = "setspace.sty is a LaTeX (2e) package.
 23 | %%%                        Comments and bug reports welcome!
 24 | %%%                        
 25 | %%%                        This includes GDG's modification to Erica Harris'
 26 | %%%                        setspace.sty.  The main aspects of this
 27 | %%%                        modification deal with the definitions of
 28 | %%%                        \singlespacing \onehalfspacing, and
 29 | %%%                        \doublespacing, (these are near the beginning of
 30 | %%%                        the file).  Primarily, these deal with adding
 31 | %%%                        fontsize changes to guarantee that the new
 32 | %%%                        baseline is properly defined and placed into
 33 | %%%                        action.  The extra \vskip in the definition of
 34 | %%%                        \singlespacing seems to  make for a cleaner
 35 | %%%                        transition from multiple spacing back to single
 36 | %%%                        spacing.  These did not appear warrranted for
 37 | %%%                        other size changes.
 38 | %%%
 39 | %%%                        Modified by GDG on November 1, 1992, to allow
 40 | %%%                        for use of New Font Selection Scheme.
 41 | %%%
 42 | %%%                        Modified by GDG on June 4, 1993, to correct
 43 | %%%                        for spacing tokens in definition of \@setsize
 44 | %%%                        Thanks to Kaja P. Christiansen 
 45 | %%%                        for the fix!!
 46 | %%%
 47 | %%%                        Modified by GDG on May 24, 1994, to change toggle
 48 | %%%                        definition from \selectfont to \@newbaseline.
 49 | %%%
 50 | %%%                        Modified by GDG on May 25, 1994, to add
 51 | %%%                        definition of \everydisplay -- this part of
 52 | %%%                        the code was apparently written by Geoffrey
 53 | %%%                        Tobin on Thu 23 Jan 1992 and was provided by
 54 | %%%                        stanton@haas.berkeley.edu (Richard Stanton). 
 55 | %%%                        This should help with some of the awkward math
 56 | %%%                        placements in changing spacings.
 57 | %%%
 58 | %%%                        Modified by GT on 23 Jan 1996, to correct
 59 | %%%                        \everymath bug, first reported by Mario
 60 | %%%                        Wolczko  on 9 June 1992.
 61 | %%%                        
 62 | %%%                        Modified by GT on 23 Jan 1996, to correct
 63 | %%%                        usage of comment characters in macro
 64 | %%%                        definitions.
 65 | %%%
 66 | %%%                        Modified by GT on 23 Jan 1996, to update
 67 | %%%                        (adjusted) \@xfloat definition for LaTeX2e.
 68 | %%%                        Bug report was courtesy of Kay Nettle.
 69 | %%%
 70 | %%%                        Modified by GT on 24 Jan 1996, to update
 71 | %%%                        (adjusted) \@footnotetext definition for
 72 | %%%                        LaTeX2e, and to add an adjusted LaTeX2e
 73 | %%%                        \@mpfootnotext definition for minipages.
 74 | %%%                        Bug report was courtesy Kay Nettle.
 75 | %%%
 76 | %%%                        Changed by GT on 6 Feb 1996, into a LaTeX2e
 77 | %%%                        package.
 78 | %%%
 79 | %%%			   Made more package-like by GT on 14 Feb 1996,
 80 | %%%			   by adding standard messages.
 81 | %%%
 82 | %%%			   GT replaced \@normalsize by \normalsize on 28
 83 | %%%			   Sep 1996.  This change was successively
 84 | %%%			   advised by:
 85 | %%%
 86 | %%%			     Rowland J.~Bartlett
 87 | %%%			     
 88 | %%%			     on Tue 6 Aug 96,
 89 | %%%
 90 | %%%			     Ted Stern
 91 | %%%			     
 92 | %%%			     on Wed 7 Aug 96,
 93 | %%%
 94 | %%%			     Michal Jaegermann
 95 | %%%			     
 96 | %%%			     on Fri 27 Sep 96.
 97 | %%%
 98 | %%%                        GT:  Sat 28 Sep 1996:  Added call to
 99 | %%%                        \setspace@size in \setstretch, as suggested
100 | %%%                        by David Hull 
101 | %%%                        on Wed 24 July 1996.
102 | %%%
103 | %%%                        GT:  Sat 28 Sep 1996:  Pared \setspace@size
104 | %%%                        mercilessly down to \@currsize, following
105 | %%%                        advice given on Fri 27 Sep 1996 by Michal
106 | %%%                        Jaegermann .
107 | %%%                        Retained this macro for flexibility.
108 | %%%
109 | %%%			   Code rearranged by GT, Sat 28 Sep 1996, to give
110 | %%%			   greater prominence to \setstretch.
111 | %%%
112 | %%%			   Also, GT changed (Sat 28 Sep 1996) many
113 | %%%			   occurrences of \def to \newcommand,
114 | %%%			   \renewcommand, or \newenvironment,
115 | %%%			   as seemed appropriate.
116 | %%%
117 | %%%                        GT, Tue 10 Dec 1996:  Following a suggestion
118 | %%%                        by Ted Stern, the `single' spacing is now
119 | %%%                        settable by the user.  This is for slightly
120 | %%%                        large fonts such as Lucida Bright.
121 | %%%
122 | %%%                        GT, Wed 11 Dec 1996:  For simplicity and
123 | %%%                        maintainability, call \onehalfspacing in
124 | %%%                        the onehalfspace environment, and
125 | %%%                        \doublespacing in the doublespace
126 | %%%                        environment.
127 | %%%
128 | %%%                        GT, Wed 11 Dec 1996:  Also deleted
129 | %%%                        \setspace@size from \setstretch,
130 | %%%                        as \@currsize suffices.
131 | %%%
132 | %%%                        Modified by Brett Presnell (BP)
133 | %%%                         on 21 Mar 1998
134 | %%%                        to add nodisplayskipstretch option, which
135 | %%%                        turns off the stretching of the space
136 | %%%                        before and after displays, which is often
137 | %%%                        excessive, particularly with doublespaced
138 | %%%                        documents.  Also added the
139 | %%%                        setdisplayskipstretch command, which allows
140 | %%%                        the user to choose by how much to stretch
141 | %%%                        the space before and after displays
142 | %%%                        independently from the setting of
143 | %%%                        baselinestretch.  This works regardless of
144 | %%%                        whether the nodisplayskipstretch option is
145 | %%%                        in effect.
146 | %%%
147 | %%%                        GT, Wed 15 Apr 1998:  Added the singlespace*
148 | %%%                        environment requested by
149 | %%%                        Mark Olesen 
150 | %%%                        on Sat 24 May 1997 and Wed 18 June 1997.
151 | %%%                        This is reported to give improved vertical
152 | %%%                        spacing around itemize and quote environments.
153 | %%%
154 | %%%                        GT, Wed 15 Apr 1998:  David Hull pointed out on
155 | %%%                        Fri 12 Dec 1997 that the \belowdisplayskip line
156 | %%%                        in the \everydisplay was mistyped.  Now fixed.
157 | %%%
158 | %%%                        GT, Thu 26 Nov 1998:  Finally got round to
159 | %%%                        fixing the absence of \begingroup from
160 | %%%                        onehalfspace and doublespace environments.
161 | %%%                        Thanks to:  Bernd Schandl, Ron Smith,
162 | %%%                        Himanshu Gohel, and Kevin Ruland, for bringing
163 | %%%                        it to my long overdue attention.
164 | %%%
165 | %%%                        GT, Tue 27 July 1999:  On Saturday 24 July
166 | %%%                        1999, Alexander L. Wolf 
167 | %%%                        informed me that the \doublespace and
168 | %%%                        \onehalfspace _macros_ are still at fault.
169 | %%%
170 | %%%                        GT, Fri 3 March 2000:  Today Stefano
171 | %%%                        Lacaprara of Italy brought my attention to
172 | %%%                        the need to extend the commands and macros
173 | %%%                        to point sizes other than 10, 11 and 12.
174 | %%%                        Since there's no general formula for the
175 | %%%                        line stretch values in terms of point size,
176 | %%%                        and they vary only slightly between 10, 11
177 | %%%                        and 12 pt, and furthermore the values were
178 | %%%                        presumably optimised specifically for the
179 | %%%                        Computer Modern fonts, i've chosen to use
180 | %%%                        the 10 pt values as the generic defaults.
181 | %%%
182 | %%%                        GT, Fri 1 December 2000:  George Pearson
183 | %%%                        requested package options for the three
184 | %%%                        common spacings.
185 | %%%
186 | %%%                        The checksum field above contains a CRC-16
187 | %%%                        checksum as the first value, followed by the
188 | %%%                        equivalent of the standard UNIX wc (word
189 | %%%                        count) utility output of lines, words, and
190 | %%%                        characters.  This is produced by Robert
191 | %%%                        Solovay's checksum utility."
192 | %%% }
193 | %%% ======================================================================
194 | %% FILE:   setspace.sty in SYS2.TEX.PUB.ISULATEX.STYLES
195 | %% AUTHOR: Erica M. S. Harris
196 | %% DATE:   April 1990
197 | %% MOD:    March 1991
198 | %%%
199 | %%% Update to LaTeX (2e) :  6 Feb 1996.
200 | %%% Description:  LaTeX Document Package "setspace"
201 | %%%
202 | %%% Usage:
203 | %%%                \documentclass[...]{...}
204 | %%%                \usepackage{setspace}
205 | %%%
206 | %%         Based on the doublespace option created by Stephen Page.
207 | %%
208 | %%         This style option provides commands and environments for doing
209 | %%         double and  one-and-a-half spacing based on pt size.
210 | %%
211 | %%         Single spacing is the default.
212 | %%
213 | %%         Three commands, \singlespacing, \onehalfspacing, and
214 | %%         \doublespacing, are for use in the preamble to set the overall
215 | %%         spacing for the document.  If a different spacing is required then
216 | %%         the \setstretch{baselinestretch} command can be used in the
217 | %%         preamble to set the baselinestretch appropriately.  The default
218 | %%         spacing with this style option is single spacing.
219 | %%
220 | %%         Three environments, singlespace, onehalfspace, and doublespace,
221 | %%         allow the spacing to be changed within the document.  Both the
222 | %%         onehalfspace and doublespace environments are intended to increase
223 | %%         the spacing, so the onehalfspace environment should not be used in
224 | %%         a double spaced document.  If an increased spacing different from
225 | %%         one-and-a-half or double spacing is required then the spacing
226 | %%         environment can be used.  The spacing environment takes one
227 | %%         argument which is the larger baselinestretch to use,
228 | %%         e.g., \begin{spacing}{2.5}.
229 | %%
230 | %%         \footins is adjusted the same as \parskip - appears to work. Lose
231 | %%         stretch parts but don't consider that to be crucial
232 | %%
233 | %%         Removed code for altering spacing before and after displayed
234 | %%         equations - just looked too much.
235 | %%
236 | %% MODS:
237 | %%         Redefinition of \spacing and \endspacing for consistency with
238 | %%         TeX 3.x inserted by George Greenwade.  Modification provided by
239 | %%         Philip Ross (ROSS@UK.AC.ABDN.BIOMED) and John Byrne via INFO-TeX.
240 | %%
241 | %% PLEASE REPORT ANY BUGS
242 | %%
243 | %%   Old Documentation follows:
244 | %%         1. A new environment "singlespace" is provided, within which single
245 | %%            spacing will apply.
246 | %%            JFL - changed so that it works in regular text and so that
247 | %%            vertical space before and after is correctly computed
248 | %%         2. Double spacing is turned off within footnotes and floats (figures
249 | %%            and tables).
250 | %%         3. Proper double spacing happens below tabular environments and in
251 | %%            other places where LaTeX uses a strut.
252 | %%         4. Slightly more space is inserted before footnotes.
253 | %%         5. JFL - fixes spacing before and after displayed math
254 | %%
255 | %%
256 | %%    mods:   Jean-Francois Lamy
257 | %%            lamy@ai.toronto.edu
258 | %%            lamy@utai.uucp
259 | %%
260 | %% POSSIBLE BUGS:
261 | %%    . Increasing struts may possibly cause some other obscure part of
262 | %%      formatting to fall over.
263 | %%    . \begin{singlespace}\begin{quote} produces the wrong spacing before
264 | %%      the quote (extra glue is inserted).
265 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266 | 
267 | \NeedsTeXFormat {LaTeX2e}[1994/12/01]
268 | \def \filename {setspace.sty}
269 | \def \filedate {2000/12/01}
270 | \def \fileversion {6.7}
271 | \ProvidesPackage {setspace}[\filedate\space\fileversion\space
272 |   Contributed and Supported LaTeX2e package]
273 | \typeout {Package: `setspace' \fileversion\space <\filedate>}
274 | 
275 | % BP: add nodisplayskipstretch option and \setdisplayskipstretch command.
276 | 
277 | \newcommand{\displayskipstretch}{\baselinestretch}
278 | \newcommand{\setdisplayskipstretch}[1]{\renewcommand{\displayskipstretch}{#1}}
279 | \DeclareOption{nodisplayskipstretch}{\setdisplayskipstretch{1.0}}
280 | 
281 | % GT: add George Pearsons' suggested options.
282 | 
283 | \DeclareOption{singlespacing}{\AtEndOfPackage{\singlespacing}}
284 | \DeclareOption{onehalfspacing}{\AtEndOfPackage{\onehalfspacing}}
285 | \DeclareOption{doublespacing}{\AtEndOfPackage{\doublespacing}}
286 | 
287 | \ProcessOptions
288 | 
289 | % GT:  Sat 28 Sep 1996:  Widely using \newcommand, \renewcommand, and
290 | % \newenvironment, instead of \def.
291 | 
292 | % ** Line space commands.
293 | 
294 | \newcommand{\setstretch}[1]{%
295 |   \def\baselinestretch{#1}%
296 |   \@currsize
297 | }
298 | 
299 | % GT:  Sat 28 Sep 1996:  spacing commands and environments modified to
300 | % use \setstretch instead of \baselinestretch.
301 | %
302 | % GT:  Sat 28 Sep 1996:  No, I don't know understand the line spacing
303 | % algorithms!  If someone (LaTeX team) can enlighten me as to the
304 | % general rule, please do!  It would be very pleasant if setspace.sty
305 | % were suited for document font sizes other than 10, 11 and 12 pt.
306 | %
307 | % GT:  Tue 10 Dec 1996:  Instead of fixing singlespacing to exact unity,
308 | % allow user to redefine it (only slightly, please!) from its initial
309 | % value of unity, in the case when a particular font is slightly larger
310 | % or slightly smaller than its point size would indicate.  This change
311 | % affects setspace's single spacing commands, and LaTeX's footnote and
312 | % float environments.  The one and a half, double, and arbitrary
313 | % spacing commands are unaltered.
314 | 
315 | \newcommand{\SetSinglespace}[1]{%
316 |   \def\setspace@singlespace{#1}%
317 | }
318 | 
319 | % Here's the default single line spacing value.
320 | \SetSinglespace{1}
321 | 
322 | \newcommand{\singlespacing}{%
323 |   \setstretch {\setspace@singlespace}%  normally 1
324 |   \vskip \baselineskip  % Correction for coming into singlespace
325 | }
326 | 
327 | \newcommand{\onehalfspacing}{%
328 |   \setstretch{1.25}%  default
329 |   \ifcase \@ptsize \relax % 10pt
330 |     \setstretch {1.25}%
331 |   \or % 11pt
332 |     \setstretch {1.213}%
333 |   \or % 12pt
334 |     \setstretch {1.241}%
335 |   \fi
336 | }
337 | 
338 | \newcommand{\doublespacing}{%
339 |   \setstretch {1.667}%  default
340 |   \ifcase \@ptsize \relax % 10pt
341 |     \setstretch {1.667}%
342 |   \or % 11pt
343 |     \setstretch {1.618}%
344 |   \or % 12pt
345 |     \setstretch {1.655}%
346 |   \fi
347 | }
348 | 
349 | % ** Modification of the LaTeX command \@setsize.
350 | 
351 | %---Stretch the baseline BEFORE calculating the strut size. This improves
352 | %   spacing below tabular environments etc., probably...
353 | %   Comments are welcomed.
354 | 
355 | % GT:  Sun 29 Sep 1996:  Question:  Is this code anywhere near correct
356 | % since this part of LaTeX (in, eg, latex.ltx) has been greatly changed?
357 | 
358 | % GT:  Sun 29 Sep 1996:  The meanings of the arguments to \@setsize
359 | % appear to be (whatever these may signify) :
360 | % current size; font baselineskip; ignored (!); and font size.
361 | 
362 | % GT:  Sun 29 Sep 1996:  Note that \@setsize (in latest LaTeX,
363 | % \@setfontsize, which is called by \@setsize) seems to be the only
364 | % place in purely modern LaTeX where \@currsize is set, and ltxguide.cls
365 | % seems to be the only file in the LaTeX base distribution that uses it!
366 | 
367 | \def\@setsize#1#2#3#4{%
368 |   % Modified 1993.04.07--GDG per KPC
369 |   \@nomath#1%
370 |   \let\@currsize#1%
371 |   \baselineskip #2%
372 |   \baselineskip \baselinestretch\baselineskip
373 |   \parskip \baselinestretch\parskip
374 |   \setbox\strutbox \hbox{%
375 |     \vrule height.7\baselineskip
376 |            depth.3\baselineskip
377 |            width\z@}%
378 |   \skip\footins \baselinestretch\skip\footins
379 |   \normalbaselineskip\baselineskip#3#4}
380 | 
381 | % ** Float and footnote adjustments to compensate for a change in the
382 | % ** main text's line spacing.
383 | 
384 | %---Increase the space between last line of text and footnote rule.
385 | %\skip\footins 20pt plus4pt minus4pt
386 | 
387 | %---Reset baselinestretch within floats and footnotes.
388 | 
389 | % GT:  Tue 23 Jan 1996:  This is where the conflict with the combination
390 | % of the color package and the figure environment used to occur.
391 | 
392 | % Floats.
393 | 
394 | % GT:  Sat 28 Sep 1996:  \@xfloat is the only place where \normalsize
395 | % is still used in setspace.sty !
396 | 
397 | \let\latex@xfloat=\@xfloat
398 | \def\@xfloat #1[#2]{%
399 |   \latex@xfloat #1[#2]%
400 |   \def\baselinestretch{\setspace@singlespace}%
401 |   \normalsize
402 | }
403 | 
404 | % GT:  Wed 24 Jan 1996:  This footnote code was copied from LaTeX and
405 | % modified rather naively.  It had to be brought up to date, not only
406 | % because of LaTeX's new color ability, but also because ther had
407 | % been major changes to this code in LaTeX at least as far back as
408 | % March 1992.
409 | 
410 | % Normal, bottom of the page, footnotes.
411 | %
412 | % GT:  Based HEAVILY on original LaTeX (2e) code.  A standard hook would
413 | % be MUCH preferred, so that LaTeX's footnote implementation needn't be
414 | % copied each time it changes.
415 | %
416 | % GT:  The \protected@edef requires at least the December 1994 LaTeX.
417 | % This is precisely the kind of VERSION DEPENDENCY situation that
418 | % cannot (AFAIK) be avoided, because LaTeX (2e) LACKS appropriate
419 | % standard hooks and/or context markers.
420 | 
421 | \long\def\@footnotetext#1{%
422 |   \insert\footins{%
423 | % GT:  Next line added.  Hook desired here!
424 |     \def\baselinestretch {\setspace@singlespace}%
425 |     \reset@font\footnotesize
426 |     \interlinepenalty\interfootnotelinepenalty
427 |     \splittopskip\footnotesep
428 |     \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
429 |     \hsize\columnwidth
430 |     \@parboxrestore
431 |     \protected@edef\@currentlabel{%
432 |       \csname p@footnote\endcsname\@thefnmark
433 |     }%
434 |     \color@begingroup
435 |       \@makefntext{%
436 |         \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
437 |     \color@endgroup}}
438 | 
439 | % Minipage footnotes.
440 | 
441 | \long\def\@mpfootnotetext#1{%
442 |   \global\setbox\@mpfootins\vbox{%
443 |     \unvbox \@mpfootins
444 | %  GT:  Next line added.  Hook desired here!
445 |     \def\baselinestretch {\setspace@singlespace}%
446 |     \reset@font\footnotesize
447 |     \hsize\columnwidth
448 |     \@parboxrestore
449 |     \protected@edef\@currentlabel{%
450 |       \csname p@mpfootnote\endcsname\@thefnmark}%
451 |     \color@begingroup
452 |       \@makefntext{%
453 |        \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
454 |    \color@endgroup}}
455 | 
456 | % ** Line space environments.
457 | 
458 | % A single spaced quote (say) is done by surrounding singlespace with quote.
459 | 
460 | \newenvironment{singlespace}{%
461 |   \vskip \baselineskip
462 |   \setstretch {\setspace@singlespace}%
463 |   \vskip -\baselineskip
464 | }{%
465 |   \par
466 | }
467 | 
468 | % GT (c/o Mark Olesen), Wed 15 April 1998.
469 | 
470 | \newenvironment{singlespace*}{%
471 |   \setstretch {\setspace@singlespace}%
472 |   \vskip -\baselineskip
473 | }{%
474 |   \vskip -0.5\baselineskip
475 | }
476 | 
477 | %  spacing, doublespace and onehalfspace all are meant to INCREASE the
478 | %  spacing (i.e. calling onehalfspace from within doublespace will not
479 | %  produce a graceful transition between spacings)
480 | %
481 | % Next two definitions fixed for consistency with TeX 3.x
482 | 
483 | % In order to use \newenvironment, while easily using same code for
484 | % end of each environment, the code that used to be in \endspacing has
485 | % been moved into a new (but internal) macro, \restore@spacing.
486 | 
487 | \newcommand{\restore@spacing}{%
488 |     \par
489 |     \vskip \parskip
490 |     \vskip \baselineskip
491 |   \endgroup
492 |   \vskip -\parskip
493 |   \vskip -\baselineskip
494 | }
495 | 
496 | \newenvironment{spacing}[1]{%
497 |   \par
498 |   \begingroup             % moved from \endspacing by PGBR 29-1-91
499 |     \setstretch {#1}%
500 | }{%
501 |   \restore@spacing
502 | }
503 | 
504 | % one and a half spacing is 1.5 x pt size
505 | \newenvironment{onehalfspace}{%
506 |   \begingroup
507 |     \onehalfspacing
508 | }{%
509 |   \restore@spacing
510 | }
511 | 
512 | % double spacing is 2 x pt size
513 | \newenvironment{doublespace}{%
514 |   \begingroup
515 |     \doublespacing
516 | }{%
517 |   \restore@spacing
518 | }
519 | 
520 | % GT:  EMSH chose to omit display math part that follows.
521 | % She wrote (see above) that the "altered spacing before and after displayed
522 | % equations ... just looked too much".
523 | %
524 | % Fix up spacing before and after displayed math
525 | % (arraystretch seems to do a fine job for inside LaTeX displayed math,
526 | % since array and eqnarray seem to be affected as expected).
527 | % Changing \baselinestretch and doing a font change also works if done here,
528 | % but then you have to change @setsize to remove the call to @nomath)
529 | %
530 | % GT:  The \belowdisplayskip line was mistyped; now fixed, courtesy of
531 | % David Hull.
532 | %
533 | % GT:  Brett Parnell has addressed EMSH's concern by replacing
534 | % \baselinestretch by \displayskipstretch in displays, as follows.
535 | 
536 | \everydisplay\expandafter{%
537 |   \the\everydisplay
538 |   \abovedisplayskip \displayskipstretch\abovedisplayskip
539 |   \belowdisplayskip \displayskipstretch\belowdisplayskip
540 |   \abovedisplayshortskip \displayskipstretch\abovedisplayshortskip
541 |   \belowdisplayshortskip \displayskipstretch\belowdisplayshortskip
542 | }
543 | 
544 | \endinput
545 | 
546 | %%% EOF.
547 | 


--------------------------------------------------------------------------------
/Chapters/Chapter1.tex:
--------------------------------------------------------------------------------
  1 | % Chapter 1
  2 | 
  3 | \chapter{Chapter Title Here} % Main chapter title
  4 | 
  5 | \label{Chapter1} % For referencing the chapter elsewhere, use \ref{Chapter1} 
  6 | 
  7 | \lhead{Chapter 1. \emph{Chapter Title Here}} % This is for the header on each page - perhaps a shortened title
  8 | 
  9 | %----------------------------------------------------------------------------------------
 10 | 
 11 | \section{Welcome and Thank You}
 12 | Welcome to this \LaTeX{} Thesis Template, a beautiful and easy to use template for writing a thesis using the \LaTeX{} typesetting system.
 13 | 
 14 | If you are writing a thesis (or will be in the future) and its subject is technical or mathematical (though it doesn't have to be), then creating it in \LaTeX{} is highly recommended as a way to make sure you can just get down to the essential writing without having to worry over formatting or wasting time arguing with your word processor.
 15 | 
 16 | \LaTeX{} is easily able to professionally typeset documents that run to hundreds or thousands of pages long. With simple mark-up commands, it automatically sets out the table of contents, margins, page headers and footers and keeps the formatting consistent and beautiful. One of its main strengths is the way it can easily typeset mathematics, even \emph{heavy} mathematics. Even if those equations are the most horribly twisted and most difficult mathematical problems that can only be solved on a super-computer, you can at least count on \LaTeX{} to make them look stunning.
 17 | 
 18 | %----------------------------------------------------------------------------------------
 19 | 
 20 | \section{Learning \LaTeX{}}
 21 | 
 22 | \LaTeX{} is not a WYSIWYG (What You See is What You Get) program, unlike word processors such as Microsoft Word or Apple's Pages. Instead, a document written for \LaTeX{} is actually a simple, plain text file that contains \emph{no formatting}. You tell \LaTeX{} how you want the formatting in the finished document by writing in simple commands amongst the text, for example, if I want to use \textit{italic text for emphasis}, I write the `$\backslash$\texttt{textit}\{\}' command and put the text I want in italics in between the curly braces. This means that \LaTeX{} is a ``mark-up'' language, very much like HTML.
 23 | 
 24 | \subsection{A (not so short) Introduction to \LaTeX{}}
 25 | 
 26 | If you are new to \LaTeX{}, there is a very good eBook -- freely available online as a PDF file -- called, ``The Not So Short Introduction to \LaTeX{}''. The book's title is typically shortened to just ``lshort''. You can download the latest version (as it is occasionally updated) from here:\\
 27 | \href{http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}{\texttt{http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}}
 28 | 
 29 | It is also available in several other languages. Find yours from the list on this page:\\
 30 | \href{http://www.ctan.org/tex-archive/info/lshort/}{\texttt{http://www.ctan.org/tex-archive/info/lshort/}}
 31 | 
 32 | It is recommended to take a little time out to learn how to use \LaTeX{} by creating several, small `test' documents. Making the effort now means you're not stuck learning the system when what you \emph{really} need to be doing is writing your thesis.
 33 | 
 34 | \subsection{A Short Math Guide for \LaTeX{}}
 35 | 
 36 | If you are writing a technical or mathematical thesis, then you may want to read the document by the AMS (American Mathematical Society) called, ``A Short Math Guide for \LaTeX{}''. It can be found online here:\\
 37 | \href{http://www.ams.org/tex/amslatex.html}{\texttt{http://www.ams.org/tex/amslatex.html}}\\
 38 | under the ``Additional Documentation'' section towards the bottom of the page.
 39 | 
 40 | \subsection{Common \LaTeX{} Math Symbols}
 41 | There are a multitude of mathematical symbols available for \LaTeX{} and it would take a great effort to learn the commands for them all. The most common ones you are likely to use are shown on this page:\\
 42 | \href{http://www.sunilpatel.co.uk/latexsymbols.html}{\texttt{http://www.sunilpatel.co.uk/latexsymbols.html}}
 43 | 
 44 | You can use this page as a reference or crib sheet, the symbols are rendered as large, high quality images so you can quickly find the \LaTeX{} command for the symbol you need.
 45 | 
 46 | \subsection{\LaTeX{} on a Mac}
 47 |  
 48 | The \LaTeX{} package is available for many systems including Windows, Linux and Mac OS X. The package for OS X is called MacTeX and it contains all the applications you need -- bundled together and pre-customised -- for a fully working \LaTeX{} environment and workflow.
 49 |  
 50 | MacTeX includes a dedicated \LaTeX{} IDE (Integrated Development Environment) called ``TeXShop'' for writing your `\texttt{.tex}' files and ``BibDesk'': a program to manage your references and create your bibliography section just as easily as managing songs and creating playlists in iTunes.
 51 | 
 52 | %----------------------------------------------------------------------------------------
 53 | 
 54 | \section{Getting Started with this Template}
 55 | 
 56 | If you are familiar with \LaTeX{}, then you can familiarise yourself with the contents of the Zip file and the directory structure and then place your own information into the `\texttt{Thesis.cls}' file. Section \ref{FillingFile} on page \pageref{FillingFile} tells you how to do this. Make sure you read section \ref{ThesisConventions} about thesis conventions to get the most out of this template and then get started with the `\texttt{Thesis.tex}' file straightaway.
 57 | 
 58 | If you are new to \LaTeX{} it is recommended that you carry on reading through the rest of the information in this document.
 59 | 
 60 | \subsection{About this Template}
 61 | 
 62 | This \LaTeX{} Thesis Template is originally based and created around a \LaTeX{} style file created by Steve R.\ Gunn from the University of Southampton (UK), department of Electronics and Computer Science. You can find his original thesis style file at his site, here:\\
 63 | \href{http://www.ecs.soton.ac.uk/~srg/softwaretools/document/templates/}{\texttt{http://www.ecs.soton.ac.uk/$\sim$srg/softwaretools/document/templates/}}
 64 | 
 65 | My thesis originally used the `\texttt{ecsthesis.cls}' from his list of styles. However, I knew \LaTeX{} could still format better. To get the look I wanted, I modified his style and also created a skeleton framework and folder structure to place the thesis files in.
 66 | 
 67 | This Thesis Template consists of that modified style, the framework and the folder structure. All the work that has gone into the preparation and groundwork means that all you have to bother about is the writing.
 68 | 
 69 | Before you begin using this template you should ensure that its style complies with the thesis style guidelines imposed by your institution. In most cases this template style and layout will be suitable. If it is not, it may only require a small change to bring the template in line with your institution's recommendations.
 70 | 
 71 | %----------------------------------------------------------------------------------------
 72 | 
 73 | \section{What this Template Includes}
 74 | 
 75 | \subsection{Folders}
 76 | 
 77 | This template comes as a single Zip file that expands out to many files and folders. The folder names are mostly self-explanatory:
 78 | 
 79 | \textbf{Appendices} -- this is the folder where you put the appendices. Each appendix should go into its own separate `\texttt{.tex}' file. A template is included in the directory.
 80 | 
 81 | \textbf{Chapters} -- this is the folder where you put the thesis chapters. A thesis usually has about seven chapters, though there is no hard rule on this. Each chapter should go in its own separate `\texttt{.tex}' file and they usually are split as:
 82 | \begin{itemize}
 83 | \item Chapter 1: Introduction to the thesis topic
 84 | \item Chapter 2: Background information and theory
 85 | \item Chapter 3: (Laboratory) experimental setup
 86 | \item Chapter 4: Details of experiment 1
 87 | \item Chapter 5: Details of experiment 2
 88 | \item Chapter 6: Discussion of the experimental results
 89 | \item Chapter 7: Conclusion and future directions
 90 | \end{itemize}
 91 | This chapter layout is specialised for the experimental sciences.
 92 | 
 93 | \textbf{Figures} -- this folder contains all figures for the thesis. These are the final images that will go into the thesis document.
 94 | 
 95 | \textbf{Primitives} -- this is the folder that contains scraps, particularly because one final image in the `Figures' folder may be made from many separate images and photos, these source images go here. This keeps the intermediate files separate from the final thesis figures.
 96 | 
 97 | \subsection{Files}
 98 | 
 99 | Included are also several files, most of them are plain text and you can see their contents in a text editor. Luckily, many of them are auxiliary files created by \LaTeX{} or BibTeX and which you don't need to bother about:
100 | 
101 | \textbf{Bibliography.bib} -- this is an important file that contains all the bibliographic information and references that you will be citing in the thesis for use with BibTeX. You can write it manually, but there are reference manager programs available that will create and manage it for you. Bibliographies in \LaTeX{} are a large subject and you may need to read about BibTeX before starting with this.
102 | 
103 | \textbf{Thesis.cls} -- this is an important file. It is the style file that tells \LaTeX{} how to format the thesis. You will also need to open this file in a text editor and fill in your own information (such as name, department, institution). Luckily, this is not too difficult and is explained in section \ref{FillingFile} on page \pageref{FillingFile}.
104 | 
105 | \textbf{Thesis.pdf} -- this is your beautifully typeset thesis (in the PDF file format) created by \LaTeX{}.
106 | 
107 | \textbf{Thesis.tex} -- this is an important file. This is the file that you tell \LaTeX{} to compile to produce your thesis as a PDF file. It contains the framework and constructs that tell \LaTeX{} how to layout the thesis. It is heavily commented so you can read exactly what each line of code does and why it is there. After you put your own information into the `\texttt{Thesis.cls}' file, go to this file and begin filling it in -- you have now started your thesis!
108 | 
109 | \textbf{vector.sty} -- this is a \LaTeX{} package, it tells \LaTeX{} how to typeset mathematical vectors. Using this package is very easy and you can read the documentation on the site (you just need to look at the `\texttt{vector.pdf}' file):\\
110 | \href{http://www.ctan.org/tex-archive/macros/latex/contrib/vector/}{\texttt{http://www.ctan.org/tex-archive/macros/latex/contrib/vector/}}
111 | 
112 | \textbf{lstpatch.sty} -- this is a \LaTeX{} package required by this LaTeX template and is included as not all \TeX{} distributions have it installed by default. You do not need to modify this file.
113 | 
114 | Files that are \emph{not} included, but are created by \LaTeX{} as auxiliary files include:
115 | 
116 | \textbf{Thesis.aux} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main `\texttt{.tex}' file.
117 | 
118 | \textbf{Thesis.bbl} -- this is an auxiliary file generated by BibTeX, if it is deleted, BibTeX simply regenerates it when you run the main tex file. Whereas the `\texttt{.bib}' file contains all the references you have, this `\texttt{.bbl}' file contains the references you have actually cited in the thesis and is used to build the bibliography section of the thesis.
119 | 
120 | \textbf{Thesis.blg} -- this is an auxiliary file generated by BibTeX, if it is deleted BibTeX simply regenerates it when you run the main `\texttt{.tex}' file.
121 | 
122 | \textbf{Thesis.lof} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main `\texttt{.tex}' file. It tells \LaTeX{} how to build the `List of Figures' section.
123 | 
124 | \textbf{Thesis.log} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main `\texttt{.tex}' file. It contains messages from \LaTeX{}, if you receive errors and warnings from \LaTeX{}, they will be in this `\texttt{.log}' file.
125 | 
126 | \textbf{Thesis.lot} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main `\texttt{.tex}' file. It tells \LaTeX{} how to build the `List of Tables' section.
127 | 
128 | \textbf{Thesis.out} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main `\texttt{.tex}' file.
129 | 
130 | 
131 | So from this long list, only the files with the `\texttt{.sty}', `\texttt{.bib}', `\texttt{.cls}' and `\texttt{.tex}' extensions are the most important ones. The other auxiliary files can be ignored or deleted as \LaTeX{} and BibTeX will regenerate them.
132 | 
133 | %----------------------------------------------------------------------------------------
134 | 
135 | \section{Filling in the `\texttt{Thesis.cls}' File}\label{FillingFile}
136 | 
137 | You will need to personalise the thesis template and make it your own by filling in your own information. This is done by editing the `\texttt{Thesis.cls}' file in a text editor.
138 | 
139 | Open the file and scroll down, past all the `$\backslash$\texttt{newcommand}\ldots' items until you see the entries for `\texttt{University Name}', `\texttt{Department Name}', etc\ldots.
140 | 
141 | Fill out the information about your group and institution and ensure you keep to block capitals where it asks you to. You can also insert web links, if you do, make sure you use the full URL, including the `\texttt{http://}' for this.
142 | 
143 | The last item you should need to fill in is the Faculty Name (in block capitals). When you have done this, save the file and recompile `\texttt{Thesis.tex}'. All the information you filled in should now be in the PDF, complete with web links. You can now begin your thesis proper!
144 | 
145 | %----------------------------------------------------------------------------------------
146 | 
147 | \section{The `\texttt{Thesis.tex}' File Explained}
148 | 
149 | The \texttt{Thesis.tex} file contains the structure of the thesis. There are plenty of written comments that explain what pages, sections and formatting the \LaTeX{} code is creating. Initially there seems to be a lot of \LaTeX{} code, but this is all formatting, and it has all been taken care of so you don't have to do it.
150 | 
151 | Begin by checking that your information on the title page is correct. For the thesis declaration, your institution may insist on something different than the text given. If this is the case, just replace what you see with what is required.
152 | 
153 | Then comes a page which contains a funny quote. You can put your own, or quote your favourite scientist, author, person, etc\ldots Make sure to put the name of the person who you took the quote from.
154 | 
155 | Next comes the acknowledgements. On this page, write about all the people who you wish to thank (not forgetting parents, partners and your advisor/supervisor).
156 | 
157 | The contents pages, list of figures and tables are all taken care of for you and do not need to be manually created or edited. The next set of pages are optional and can be deleted since they are for a more technical thesis: insert a list of abbreviations you have used in the thesis, then a list of the physical constants and numbers you refer to and finally, a list of mathematical symbols used in any formulae. Making the effort to fill these tables means the reader has a one-stop place to refer to instead of searching the internet and references to try and find out what you meant by certain abbreviations or symbols.
158 | 
159 | The list of symbols is split into the Roman and Greek alphabets. Whereas the abbreviations and symbols ought to be listed in alphabetical order (and this is \emph{not} done automatically for you) the list of physical constants should be grouped into similar themes.
160 | 
161 | The next page contains a one line dedication. Who will you dedicate your thesis to?
162 | 
163 | Finally, there is the section where the chapters are included. Uncomment the lines (delete the `\texttt{\%}' character) as you write the chapters. Each chapter should be written in its own file and put into the `Chapters' folder and named `\texttt{Chapter1}', `\texttt{Chapter2}, etc\ldots Similarly for the appendices, uncomment the lines as you need them. Each appendix should go into its own file and placed in the `Appendices' folder.
164 | 
165 | After the preamble, chapters and appendices finally comes the bibliography. The bibliography style (called `\texttt{unsrtnat}') is used for the bibliography and is a fully featured style that will even include links to where the referenced paper can be found online. Do not under estimate how grateful you reader will be to find that a reference to a paper is just a click away. Of course, this relies on you putting the URL information into the BibTeX file in the first place.
166 | 
167 | %----------------------------------------------------------------------------------------
168 | 
169 | \section{Thesis Features and Conventions}\label{ThesisConventions}
170 | 
171 | To get the best out of this template, there are a few conventions that you may want to follow.
172 | 
173 | One of the most important (and most difficult) things to keep track of in such a long document as a thesis is consistency. Using certain conventions and ways of doing things (such as using a Todo list) makes the job easier. Of course, all of these are optional and you can adopt your own method.
174 | 
175 | \subsection{Printing Format}
176 | 
177 | This thesis template is designed for single sided printing as most theses are printed and bound this way. This means that the left margin is always wider than the right (for binding). Four out of five people will now judge the margins by eye and think, ``I never 
178 | noticed that before.''.
179 | 
180 | The headers for the pages contain the page number on the right side (so it is easy to flick through to the page you want) and the chapter name on the left side.
181 | 
182 | The text is set to 11 point and a line spacing of 1.3. Generally, it is much more readable to have a smaller text size and wider gap between the lines than it is to have a larger text size and smaller gap. Again, you can tune the text size and spacing should you want or need to. The text size can be set in the options for the `$\backslash$\texttt{documentclass}' command at the top of the `\texttt{Thesis.tex}' file and the spacing can be changed by setting a different value in the `$\backslash$\texttt{setstretch}' commands (scattered throughout the `\texttt{Thesis.tex}' file).
183 | 
184 | \subsection{Using US Letter Paper}
185 | 
186 | The paper size used in the template is A4, which is a common -- if not standard -- size in Europe. If you are using this thesis template elsewhere and particularly in the United States, then you may have to change the A4 paper size to the US Letter size. Unfortunately, this is not as simple as replacing instances of `\texttt{a4paper}' with `\texttt{letterpaper}'.
187 | 
188 | This is because the final PDF file is created directly from the \LaTeX{} source using a program called `\texttt{pdfTeX}' and in certain conditions, paper size commands are ignored and all documents are created with the paper size set to the size stated in the configuration file for pdfTeX (called `\texttt{pdftex.cfg}').
189 | 
190 | What needs to be done is to change the paper size in the configuration file for \texttt{pdfTeX} to reflect the letter size. There is an excellent tutorial on how to do this here: \\
191 | \href{http://www.physics.wm.edu/~norman/latexhints/pdf_papersize.html}{\texttt{http://www.physics.wm.edu/$\sim$norman/latexhints/pdf\_papersize.html}}
192 | 
193 | It may be sufficient just to replace the dimensions of the A4 paper size with the US Letter size in the \texttt{pdftex.cfg} file. Due to the differences in the paper size, the resulting margins may be different to what you like or require (as it is common for Institutions to dictate certain margin sizes). If this is the case, then the margin sizes can be tweaked by opening up the \texttt{Thesis.cls} file and searching for the line beginning with, `$\backslash$\texttt{setmarginsrb}' (not very far down from the top), there you will see the margins specified. Simply change those values to what you need (or what looks good) and save. Now your document should be set up for US Letter paper size with suitable margins.
194 | 
195 | \subsection{References}
196 | 
197 | The `\texttt{natbib}' package is used to format the bibliography and inserts references such as this one \cite{cmu-malware}. The options used in the `\texttt{Thesis.tex}' file mean that the references are listed in numerical order as they appear in the text. Multiple references are rearranged in numerical order (e.g. \cite{kendall2007practical}). This is done automatically for you. To see how you use references, have a look at the `\texttt{Chapter1.tex}' source file. Many reference managers allow you to simply drag the reference into the document as you type.
198 | 
199 | Scientific references should come \emph{before} the punctuation mark if there is one (such as a comma or period). The same goes for footnotes\footnote{Such as this footnote, here down at the bottom of the page.}. You can change this but the most important thing is to keep the convention consistent throughout the thesis. Footnotes themselves should be full, descriptive sentences (beginning with a capital letter and ending with a full stop).
200 | 
201 | To see how \LaTeX{} typesets the bibliography, have a look at the very end of this document (or just click on the reference number links).
202 | 
203 | \subsection{Figures}
204 | 
205 | There will hopefully be many figures in your thesis (that should be placed in the `Figures' folder). The way to insert figures into your thesis is to use a code template like this:
206 | \begin{verbatim}
207 | \begin{figure}[htbp]
208 |   \centering
209 |     \includegraphics{Figures/Electron.pdf}
210 |     \rule{35em}{0.5pt}
211 |   \caption[An Electron]{An electron (artist's impression).}
212 |   \label{fig:Electron}
213 | \end{figure}
214 | \end{verbatim}
215 | Also look in the source file. Putting this code into the source file produces the picture of the electron that you can see in the figure below.
216 | 
217 | \begin{figure}[htbp]
218 | 	\centering
219 | 		\includegraphics{Figures/Electron.pdf}
220 | 		\rule{35em}{0.5pt}
221 | 	\caption[An Electron]{An electron (artist's impression).}
222 | 	\label{fig:Electron}
223 | \end{figure}
224 | 
225 | Sometimes figures don't always appear where you write them in the source. The placement depends on how much space there is on the page for the figure. Sometimes there is not enough room to fit a figure directly where it should go (in relation to the text) and so \LaTeX{} puts it at the top of the next page. Positioning figures is the job of \LaTeX{} and so you should only worry about making them look good!
226 | 
227 | Figures usually should have labels just in case you need to refer to them (such as in Figure \ref{fig:Electron}). The `$\backslash$\texttt{caption}' command contains two parts, the first part, inside the square brackets is the title that will appear in the `List of Figures', and so should be short. The second part in the curly brackets should contain the longer and more descriptive caption text.
228 | 
229 | The `$\backslash$\texttt{rule}' command is optional and simply puts an aesthetic horizontal line below the image. If you do this for one image, do it for all of them.
230 | 
231 | The \LaTeX{} Thesis Template is able to use figures that are either in the PDF or JPEG file format.
232 | 
233 | \subsection{Typesetting mathematics}
234 | 
235 | If your thesis is going to contain heavy mathematical content, be sure that \LaTeX{} will make it look beautiful, even though it won't be able to solve the equations for you.
236 | 
237 | The ``Not So Short Introduction to \LaTeX{}'' (available \href{http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}{here}) should tell you everything you need to know for most cases of typesetting mathematics. If you need more information, a much more thorough mathematical guide is available from the AMS called, ``A Short Math Guide to \LaTeX{}'' and can be downloaded from:\\
238 | \href{ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf}{\texttt{ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf}}
239 | 
240 | There are many different \LaTeX{} symbols to remember, luckily you can find the most common symbols \href{http://www.sunilpatel.co.uk/latexsymbols.html}{here}. You can use the web page as a quick reference or crib sheet and because the symbols are grouped and rendered as high quality images (each with a downloadable PDF), finding the symbol you need is quick and easy.
241 | 
242 | You can write an equation, which is automatically given an equation number by \LaTeX{} like this:
243 | \begin{verbatim}
244 | \begin{equation}
245 | E = mc^{2}
246 |   \label{eqn:Einstein}
247 | \end{equation}
248 | \end{verbatim}
249 | 
250 | This will produce Einstein's famous energy-matter equivalence equation:
251 | \begin{equation}
252 | E = mc^{2}
253 | \label{eqn:Einstein}
254 | \end{equation}
255 | 
256 | All equations you write (which are not in the middle of paragraph text) are automatically given equation numbers by \LaTeX{}. If you don't want a particular equation numbered, just put the command, `$\backslash$\texttt{nonumber}' immediately after the equation.
257 | 
258 | %----------------------------------------------------------------------------------------
259 | 
260 | \section{Sectioning and Subsectioning}
261 | 
262 | You should break your thesis up into nice, bite-sized sections and subsections. \LaTeX{} automatically builds a table of Contents by looking at all the `$\backslash$\texttt{chapter}$\{\}$', `$\backslash$\texttt{section}$\{\}$' and `$\backslash$\texttt{subsection}$\{\}$' commands you write in the source.
263 | 
264 | The table of Contents should only list the sections to three (3) levels. A `$\backslash$\texttt{chapter}$\{\}$' is level one (1). A `$\backslash$\texttt{section}$\{\}$' is level two (2) and so a `$\backslash$\texttt{subsection}$\{\}$' is level three (3). In your thesis it is likely that you will even use a `$\backslash$\texttt{subsubsection}$\{\}$', which is level four (4). Adding all these will create an unnecessarily cluttered table of Contents and so you should use the `$\backslash$\texttt{subsubsection$^{*}\{\}$}' command instead (note the asterisk). The asterisk ($^{*}$) tells \LaTeX{} to omit listing the subsubsection in the Contents, keeping it clean and tidy.
265 | 
266 | %----------------------------------------------------------------------------------------
267 | 
268 | \section{In Closing}
269 | 
270 | You have reached the end of this mini-guide. You can now rename or overwrite this pdf file and begin writing your own `\texttt{Chapter1.tex}' and the rest of your thesis. The easy work of setting up the structure and framework has been taken care of for you. It's now your job to fill it out!
271 | 
272 | Good luck and have lots of fun!
273 | 
274 | \begin{flushright}
275 | Guide written by ---\\
276 | Sunil Patel: \href{http://www.sunilpatel.co.uk}{www.sunilpatel.co.uk}
277 | \end{flushright}
278 | 


--------------------------------------------------------------------------------
/Missing Packages/caption.sty:
--------------------------------------------------------------------------------
  1 | %%
  2 | %% This is file `caption.sty',
  3 | %% generated with the docstrip utility.
  4 | %%
  5 | %% The original source files were:
  6 | %%
  7 | %% caption.dtx  (with options: `package')
  8 | %% 
  9 | %% Copyright (C) 1994-2004 Axel Sommerfeldt (caption@sommerfeldt.net)
 10 | %% 
 11 | %% --------------------------------------------------------------------------
 12 | %% 
 13 | %% This work may be distributed and/or modified under the
 14 | %% conditions of the LaTeX Project Public License, either version 1.3
 15 | %% of this license or (at your option) any later version.
 16 | %% The latest version of this license is in
 17 | %%   http://www.latex-project.org/lppl.txt
 18 | %% and version 1.3 or later is part of all distributions of LaTeX
 19 | %% version 2003/12/01 or later.
 20 | %% 
 21 | %% This work has the LPPL maintenance status "maintained".
 22 | %% 
 23 | %% This Current Maintainer of this work is Axel Sommerfeldt.
 24 | %% 
 25 | %% This work consists of the files caption.ins, caption.dtx,
 26 | %% caption2.dtx, caption.xml, and anleitung.tex and the derived files
 27 | %% caption.sty, caption2.sty, and manual.tex.
 28 | %% 
 29 | \NeedsTeXFormat{LaTeX2e}[1994/12/01]
 30 | \ProvidesPackage{caption}[2004/05/16 v3.0b Customising captions (AS)]
 31 | \providecommand*\@nameundef[1]{%
 32 |   \expandafter\let\csname #1\endcsname\@undefined}
 33 | \providecommand\l@addto@macro[2]{%
 34 |   \begingroup
 35 |     \toks@\expandafter{#1#2}%
 36 |     \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}%
 37 |   \@tempa}
 38 | \def\bothIfFirst#1#2{%
 39 |   \protected@edef\caption@tempa{#1}%
 40 |   \ifx\caption@tempa\@empty\else
 41 |     #1#2%
 42 |   \fi}
 43 | \def\bothIfSecond#1#2{%
 44 |   \protected@edef\caption@tempa{#2}%
 45 |   \ifx\caption@tempa\@empty\else
 46 |     #1#2%
 47 |   \fi}
 48 | \def\caption@ifinlist#1#2{%
 49 |   \let\next\@secondoftwo
 50 |   \edef\caption@tempa{#1}%
 51 |   \@for\caption@tempb:={#2}\do{%
 52 |     \ifx\caption@tempa\caption@tempb
 53 |       \let\next\@firstoftwo
 54 |     \fi}%
 55 |   \next}
 56 | \def\caption@setbool#1#2{%
 57 |   \caption@ifinlist{#2}{1,true,yes,on}{%
 58 |     \expandafter\let\csname caption@if#1\endcsname\@firstoftwo
 59 |   }{\caption@ifinlist{#2}{0,false,no,off}{%
 60 |     \expandafter\let\csname caption@if#1\endcsname\@secondoftwo
 61 |   }{%
 62 |     \PackageError{caption}{Undefined boolean value `#2'}{\caption@eh}%
 63 |   }}}
 64 | \def\caption@ifbool#1{\@nameuse{caption@if#1}}
 65 | \newcommand\captionsize{}%  changed v3.0a
 66 | \newdimen\captionmargin
 67 | \newdimen\captionwidth
 68 | \newif\ifcaption@width
 69 | \newcommand\caption@setmargin{%
 70 |   \caption@widthfalse
 71 |   \setlength\captionmargin}
 72 | \newcommand\caption@setwidth{%
 73 |   \caption@widthtrue
 74 |   \setlength\captionwidth}
 75 | \newdimen\captionindent
 76 | \newdimen\captionparindent
 77 | \newdimen\captionhangindent
 78 | \newif\ifcaption@star
 79 | \@ifundefined{abovecaptionskip}{%
 80 |   \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{}
 81 | \@ifundefined{belowcaptionskip}{%
 82 |   \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{}
 83 | \newcommand\caption@eh{%
 84 |   If you do not understand this error, please take a closer look\MessageBreak
 85 |   at the documentation of the `caption' package.\MessageBreak
 86 |   \@ehc}
 87 | \RequirePackage{keyval}[1997/11/10]
 88 | \providecommand*\undefine@key[2]{%
 89 |   \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}}
 90 | \newcommand\caption@setdefault{\captionsetup{%
 91 |   format=default,labelformat=default,labelsep=default,justification=default,%
 92 |   font=default,labelfont=default,textfont=default,%
 93 |   margin=0pt,indention=0pt,parindent=0pt,hangindent=0pt,singlelinecheck}}
 94 | \newcommand*\DeclareCaptionStyle[1]{%
 95 |   \@ifnextchar[{\caption@declarestyle{#1}}{\caption@declarestyle{#1}[]}}
 96 | \def\caption@declarestyle#1[#2]#3{%  bugfixed v3.0a
 97 |   \global\@namedef{caption@sls@#1}{#2}%
 98 |   \global\@namedef{caption@sty@#1}{#3}}
 99 | \@onlypreamble\DeclareCaptionStyle
100 | \@onlypreamble\caption@declarestyle
101 | \newcommand*\caption@setstyle[1]{%
102 |   \@ifundefined{caption@sty@#1}%
103 |     {\PackageError{caption}{Undefined caption style `#1'}{\caption@eh}}%
104 |     {\expandafter\let\expandafter\caption@sls\csname caption@sls@#1\endcsname
105 |      \caption@setdefault\caption@esetup{\csname caption@sty@#1\endcsname}}}
106 | \DeclareCaptionStyle{default}[justification=centering]{}
107 | \newcommand\DeclareCaptionFormat[2]{%  bugfixed v3.0a
108 |   \global\long\expandafter\def\csname caption@fmt@#1\endcsname##1##2##3{#2}}
109 | \@onlypreamble\DeclareCaptionFormat
110 | \newcommand*\caption@setformat[1]{%
111 |   \@ifundefined{caption@fmt@#1}%
112 |     {\PackageError{caption}{Undefined caption format `#1'}{\caption@eh}}%
113 |     {\expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}}
114 | \DeclareCaptionFormat{normal}{#1#2#3\par}
115 | \DeclareCaptionFormat{hang}{%
116 |   \@hangfrom{#1#2}%
117 |   \advance\captionparindent\hangindent
118 |   \advance\captionhangindent\hangindent
119 |   \caption@@par
120 |   #3\par}
121 | \def\caption@fmt@default{\caption@fmt@normal}
122 | \newcommand*\DeclareCaptionLabelFormat[2]{%  bugfixed v3.0a
123 |   \global\expandafter\def\csname caption@lfmt@#1\endcsname##1##2{#2}}
124 | \@onlypreamble\DeclareCaptionLabelFormat
125 | \newcommand*\caption@setlabelformat[1]{%
126 |   \@ifundefined{caption@lfmt@#1}%
127 |     {\PackageError{caption}{Undefined caption label format `#1'}{\caption@eh}}%
128 |     {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}}
129 | \DeclareCaptionLabelFormat{empty}{}
130 | \DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2}
131 | \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)}
132 | \def\caption@lfmt@default{\caption@lfmt@simple}
133 | \newcommand\DeclareCaptionLabelSeparator[2]{%  bugfixed v3.0a
134 |   \global\long\@namedef{caption@lsep@#1}{#2}}
135 | \@onlypreamble\DeclareCaptionLabelSeparator
136 | \newcommand*\caption@setlabelseparator[1]{%
137 |   \@ifundefined{caption@lsep@#1}%
138 |     {\PackageError{caption}{Undefined caption label separator `#1'}{\caption@eh}}%
139 |     {\expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}}
140 | \DeclareCaptionLabelSeparator{none}{}
141 | \DeclareCaptionLabelSeparator{colon}{: }
142 | \DeclareCaptionLabelSeparator{period}{. }
143 | \DeclareCaptionLabelSeparator{space}{ }
144 | \DeclareCaptionLabelSeparator{quad}{\quad}
145 | \DeclareCaptionLabelSeparator{newline}{\newline}
146 | \DeclareCaptionLabelSeparator{widespace}{\hspace{1em plus .3em}}%  obsolete, do not use!
147 | \def\caption@lsep@default{\caption@lsep@colon}
148 | \newcommand*\DeclareCaptionJustification[2]{%  bugfixed v3.0a
149 |   \global\@namedef{caption@hj@#1}{#2}}
150 | \@onlypreamble\DeclareCaptionJustification
151 | \newcommand*\caption@setjustification[1]{%
152 |   \@ifundefined{caption@hj@#1}%
153 |     {\PackageError{caption}{Undefined caption justification `#1'}{\caption@eh}}%
154 |     {\expandafter\let\expandafter\caption@hj\csname caption@hj@#1\endcsname}}
155 | \newcommand\caption@centerfirst{%
156 |   \edef\caption@normaladjust{%
157 |     \leftskip\the\leftskip
158 |     \rightskip\the\rightskip
159 |     \parfillskip\the\parfillskip\relax}%
160 |   \leftskip\z@\@plus -1fil%
161 |   \rightskip\z@\@plus 1fil%
162 |   \parfillskip\z@skip
163 |   \noindent\hskip\z@\@plus 2fil%
164 |   \@setpar{\@@par\@restorepar\caption@normaladjust}}
165 | \newcommand\caption@centerlast{%
166 |   \leftskip\z@\@plus 1fil%
167 |   \rightskip\z@\@plus -1fil%
168 |   \parfillskip\z@\@plus 2fil\relax}
169 | \DeclareCaptionJustification{justified}{}
170 | \DeclareCaptionJustification{centering}{\centering}
171 | \DeclareCaptionJustification{centerfirst}{\caption@centerfirst}
172 | \DeclareCaptionJustification{centerlast}{\caption@centerlast}
173 | \DeclareCaptionJustification{raggedleft}{\raggedleft}
174 | \DeclareCaptionJustification{raggedright}{\raggedright}
175 | \def\caption@hj@default{\caption@hj@justified}
176 | \DeclareCaptionJustification{Centering}{%
177 |   \caption@ragged\Centering\centering}
178 | \DeclareCaptionJustification{RaggedLeft}{%
179 |   \caption@ragged\RaggedLeft\raggedleft}
180 | \DeclareCaptionJustification{RaggedRight}{%
181 |   \caption@ragged\RaggedRight\raggedright}
182 | \newcommand*\caption@ragged[2]{%
183 |   \@ifundefined{caption\string#1}{%
184 |     \PackageWarning{caption}{%
185 |       Cannot locate the `ragged2e' package, therefore\MessageBreak
186 |       substituting \string#2 for \string#1\MessageBreak}%
187 |     \global\@namedef{caption\string#1}}{}%
188 |   #2}
189 | \AtBeginDocument{\IfFileExists{ragged2e.sty}{%
190 |   \RequirePackage{ragged2e}\let\caption@ragged\@firstoftwo}{}}
191 | \newcommand\DeclareCaptionFont[2]{%  bugfixed v3.0a
192 |   \define@key{caption@fnt}{#1}[]{\g@addto@macro\caption@tempa{#2}}}
193 | \@onlypreamble\DeclareCaptionFont
194 | \newcommand*\caption@setfont[2]{%
195 |   \let\caption@tempa\@empty
196 |   \begingroup
197 |     \setkeys{caption@fnt}{#2}%
198 |   \endgroup
199 |   \expandafter\let\csname caption#1\endcsname\caption@tempa}
200 | \DeclareCaptionFont{default}{}
201 | \DeclareCaptionFont{scriptsize}{\scriptsize}
202 | \DeclareCaptionFont{footnotesize}{\footnotesize}
203 | \DeclareCaptionFont{small}{\small}
204 | \DeclareCaptionFont{normalsize}{\normalsize}
205 | \DeclareCaptionFont{large}{\large}
206 | \DeclareCaptionFont{Large}{\Large}
207 | \DeclareCaptionFont{up}{\upshape}
208 | \DeclareCaptionFont{it}{\itshape}
209 | \DeclareCaptionFont{sl}{\slshape}
210 | \DeclareCaptionFont{sc}{\scshape}
211 | \DeclareCaptionFont{md}{\mdseries}
212 | \DeclareCaptionFont{bf}{\bfseries}
213 | \DeclareCaptionFont{rm}{\rmfamily}
214 | \DeclareCaptionFont{sf}{\sffamily}
215 | \DeclareCaptionFont{tt}{\ttfamily}
216 | \newcommand*\caption@setposition[1]{%  improved v3.0a
217 |   \caption@ifinlist{#1}{t,top,above}{%
218 |     \let\caption@position\@firstoftwo
219 |   }{\caption@ifinlist{#1}{b,bottom,below,default}{%
220 |     \let\caption@position\@secondoftwo
221 |   }{\caption@ifinlist{#1}{a,auto}{%
222 |     \let\caption@position\@undefined
223 |   }{%
224 |     \PackageError{caption}{Undefined caption position `#1'}{\caption@eh}%
225 |   }}}}
226 | \def\captionsetup{\@ifnextchar[\caption@setuptype\caption@setup}
227 | \def\caption@setuptype[#1]#2{%  bugfixed v3.0a
228 |   \@ifundefined{caption@typ@#1}%
229 |     {\@namedef{caption@typ@#1}{#2}}%
230 |     {\expandafter\l@addto@macro\csname caption@typ@#1\endcsname{,#2}}}
231 | \def\caption@setup{\setkeys{caption}}
232 | \def\caption@esetup#1{%
233 |   \edef\caption@tempa{\noexpand\caption@setup{#1}}%
234 |   \caption@tempa}
235 | \def\caption@settype#1{%
236 |   \@ifundefined{caption@typ@#1}{}{%
237 |     \caption@esetup{\csname caption@typ@#1\endcsname}}}%
238 | \let\caption@setfloattype\caption@settype%  new v3.0a
239 | \newcommand*\clearcaptionsetup[1]{\@nameundef{caption@typ@#1}}
240 | \newcommand*\showcaptionsetup[2][]{%
241 |   \def\caption@tempa{#1}%
242 |   \ifx\caption@tempa\@empty
243 |     \def\caption@tempa{Caption\space}%
244 |   \else
245 |     \def\caption@tempa{#1 Caption\space}%
246 |   \fi
247 |   \GenericWarning{\caption@tempa}{%
248 |     \caption@tempa Info: KV list on `#2'\MessageBreak
249 |     Data: (%
250 |     \@ifundefined{caption@typ@#2}{%
251 |       % Empty -- print nothing.
252 |     }{%
253 |       \@nameuse{caption@typ@#2}%
254 |     }%
255 |     )}}
256 | \newcommand\caption@beginhook{}
257 | \newcommand\caption@endhook{}
258 | \newcommand\AtBeginCaption{\l@addto@macro\caption@beginhook}
259 | \newcommand\AtEndCaption{\l@addto@macro\caption@endhook}
260 | \newcommand\DeclareCaptionOption{%
261 |   \@ifstar{\caption@declareoption\AtEndOfPackage}{\caption@declareoption\@gobble}}
262 | \newcommand*\caption@declareoption[2]{%
263 |   #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}}
264 | \@onlypreamble\DeclareCaptionOption
265 | \@onlypreamble\caption@declareoption
266 | \DeclareCaptionOption{default}[]{%
267 |   \caption@setup{style=default,position=default,aboveskip=10pt,belowskip=0pt}}
268 | \DeclareCaptionOption{style}{\caption@setstyle{#1}}
269 | \DeclareCaptionOption{format}{\caption@setformat{#1}}
270 | \DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}}
271 | \DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}}
272 | \DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}}
273 | \DeclareCaptionOption{justification}{\caption@setjustification{#1}}
274 | \DeclareCaptionOption{size}{\caption@setfont{size}{#1}}% changed v3.0a
275 | \DeclareCaptionOption{font}{\caption@setfont{font}{#1}}
276 | \DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}}
277 | \DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}}
278 | \DeclareCaptionOption{margin}{\caption@setmargin{#1}}
279 | \DeclareCaptionOption{width}{\caption@setwidth{#1}}
280 | \DeclareCaptionOption{indent}[\leftmargini]{\setlength\captionindent{#1}}
281 | \DeclareCaptionOption{indention}[\leftmargini]{\setlength\captionindent{#1}}
282 | \DeclareCaptionOption{parindent}[\parindent]{\setlength\captionparindent{#1}}% changed v3.0b
283 | \DeclareCaptionOption{hangindent}[0pt]{\setlength\captionhangindent{#1}}% changed v3.0b
284 | \DeclareCaptionOption{parskip}[5pt]{\AtBeginCaption{\setlength\parskip{#1}}}
285 | \DeclareCaptionOption{singlelinecheck}[1]{\caption@setbool{slc}{#1}}
286 | \DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}}
287 | \DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}}
288 | \DeclareCaptionOption{position}{\caption@setposition{#1}}
289 | \DeclareCaptionOption{listof}{\caption@setbool{lof}{#1}}% new v3.0b
290 | \DeclareCaptionOption{debug}{\def\caption@debug{#1}}
291 | \captionsetup{style=default,position=default,listof=1,debug=0}
292 | \newcommand\caption@fixposition{%
293 |   \ifx\caption@position\@undefined
294 |     \caption@autoposition
295 |   \fi}
296 | \newcommand\caption@autoposition{% bugfixed v3.0a
297 |   \ifvmode
298 |     \ifodd\caption@debug\relax
299 |       \edef\caption@tempa{\the\prevdepth}%
300 |       \PackageInfo{caption}{\protect\prevdepth=\caption@tempa}%
301 |     \fi
302 |     \ifdim\prevdepth>-\p@
303 |       \let\caption@position\@secondoftwo
304 |     \else
305 |       \let\caption@position\@firstoftwo
306 |     \fi
307 |   \else
308 |     \ifodd\caption@debug\relax
309 |       \PackageInfo{caption}{no \protect\prevdepth}%
310 |     \fi
311 |     \let\caption@position\@secondoftwo
312 |   \fi}
313 | \newcommand\caption@iftop{% bugfixed v3.0a
314 |   \ifx\caption@position\@firstoftwo
315 |     \expandafter\@firstoftwo
316 |   \else
317 |     \expandafter\@secondoftwo
318 |   \fi}
319 | \newcommand\caption@make[2]{%
320 |   \caption@@make{\caption@lfmt{#1}{#2}}}
321 | \newcommand\caption@@make[2]{%
322 |   \caption@beginhook
323 |   \caption@calcmargin
324 |   \advance\captionmargin by \captionindent
325 |   \advance\captionwidth by -\captionindent
326 |   \hskip\captionmargin
327 |   \vbox{\hsize=\captionwidth
328 |     \ifdim\captionindent=\z@\else
329 |       \hskip-\captionindent
330 |     \fi
331 |     \caption@ifslc{%
332 |       \ifx\caption@sls\@empty\else
333 |         \caption@beginslc
334 |         \sbox\@tempboxa{\caption@@@make{#1}{#2}}%
335 |         \ifdim\wd\@tempboxa >\hsize
336 |           \caption@endslc
337 |         \else
338 |           \caption@endslc
339 |           \caption@esetup\caption@sls
340 |         \fi
341 |       \fi}{}%
342 |     \captionsize\captionfont\strut
343 |     \caption@@@make{#1}{#2}}%
344 |   \caption@endhook
345 |   \global\caption@starfalse}
346 | \newcommand\caption@calcmargin{%
347 |   \ifcaption@width
348 |     \captionmargin\hsize
349 |     \advance\captionmargin by -\captionwidth
350 |     \divide\captionmargin by 2
351 |   \else
352 |     \captionwidth\hsize
353 |     \advance\captionwidth by -2\captionmargin
354 |   \fi
355 |   \ifodd\caption@debug\relax
356 |     \PackageInfo{caption}{\protect\hsize=\the\hsize,
357 |       \protect\margin=\the\captionmargin,
358 |       \protect\width=\the\captionwidth}%
359 |   \fi}
360 | \newcommand\caption@beginslc{%
361 |   \begingroup
362 |   \let\label\@gobble\let\@footnotetext\@gobble
363 |   \def\stepcounter##1{\advance\csname c@##1\endcsname\@ne\relax}}
364 | \newcommand\caption@endslc{%
365 |   \endgroup}
366 | \newcommand\caption@@@make[2]{%
367 |   \ifcaption@star
368 |     \let\caption@lfmt\@gobbletwo
369 |     \let\caption@lsep\relax
370 |   \fi
371 |   \def\caption@tempa{#2}%
372 |   \def\caption@tempb{\ignorespaces}%
373 |   \ifx\caption@tempa\caption@tempb
374 |     \let\caption@tempa\@empty
375 |   \fi
376 |   \ifx\caption@tempa\@empty
377 |     \let\caption@lsep\relax
378 |   \fi
379 |   \def\caption@@par{%
380 |     \parindent\captionparindent\hangindent\captionhangindent}%
381 |   \@setpar{\@@par\caption@@par}\caption@@par
382 |   \caption@hj\captionsize\captionfont
383 |   \caption@fmt{{\captionlabelfont#1}}%
384 |               {{\captionlabelfont\caption@lsep}}%
385 |               {{\captiontextfont\nobreak\hskip\z@skip#2\par}}}
386 | \DeclareCaptionOption{config}[caption]{%
387 |    \InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file
388 |                                        #1.cfg used ***}}%
389 |                              {\PackageWarning{caption}{Configuration
390 |                                file #1.cfg not found}}}
391 | \DeclareCaptionOption*{figureposition}{\captionsetup[figure]{position=#1}}%  new v3.0a
392 | \DeclareCaptionOption*{tableposition}{\captionsetup[table]{position=#1}}%    new v3.0a
393 | \DeclareCaptionOption*{normal}[]{\caption@setformat{normal}}
394 | \DeclareCaptionOption*{isu}[]{\caption@setformat{hang}}
395 | \DeclareCaptionOption*{hang}[]{\caption@setformat{hang}}
396 | \DeclareCaptionOption*{center}[]{\caption@setjustification{centering}}
397 | \DeclareCaptionOption*{anne}[]{\caption@setjustification{centerlast}}
398 | \DeclareCaptionOption*{centerlast}[]{\caption@setjustification{centerlast}}
399 | \DeclareCaptionOption*{nooneline}[]{\caption@setbool{slc}{0}}
400 | \DeclareCaptionOption*{scriptsize}[]{\def\captionfont{\scriptsize}}
401 | \DeclareCaptionOption*{footnotesize}[]{\def\captionfont{\footnotesize}}
402 | \DeclareCaptionOption*{small}[]{\def\captionfont{\small}}
403 | \DeclareCaptionOption*{normalsize}[]{\def\captionfont{\normalsize}}
404 | \DeclareCaptionOption*{large}[]{\def\captionfont{\large}}
405 | \DeclareCaptionOption*{Large}[]{\def\captionfont{\Large}}
406 | \DeclareCaptionOption*{up}[]{\l@addto@macro\captionlabelfont\upshape}
407 | \DeclareCaptionOption*{it}[]{\l@addto@macro\captionlabelfont\itshape}
408 | \DeclareCaptionOption*{sl}[]{\l@addto@macro\captionlabelfont\slshape}
409 | \DeclareCaptionOption*{sc}[]{\l@addto@macro\captionlabelfont\scshape}
410 | \DeclareCaptionOption*{md}[]{\l@addto@macro\captionlabelfont\mdseries}
411 | \DeclareCaptionOption*{bf}[]{\l@addto@macro\captionlabelfont\bfseries}
412 | \DeclareCaptionOption*{rm}[]{\l@addto@macro\captionlabelfont\rmfamily}
413 | \DeclareCaptionOption*{sf}[]{\l@addto@macro\captionlabelfont\sffamily}
414 | \DeclareCaptionOption*{tt}[]{\l@addto@macro\captionlabelfont\ttfamily}
415 | \caption@setbool{ruled}{0}
416 | \DeclareCaptionOption*{ruled}[]{\caption@setbool{ruled}{1}}
417 | \newcommand*\DeclareCaptionPackage[1]{%
418 |   \caption@setbool{pkt@#1}{1}%
419 |   \DeclareCaptionOption*{#1}{\caption@setbool{pkt@#1}{##1}}}
420 | \DeclareCaptionPackage{caption}
421 | \DeclareCaptionPackage{float}
422 | \DeclareCaptionPackage{listings}
423 | \DeclareCaptionPackage{longtable}
424 | \DeclareCaptionPackage{rotating}
425 | \DeclareCaptionPackage{sidecap}
426 | \DeclareCaptionPackage{supertabular}
427 | \let\DeclareCaptionPackage\@undefined
428 | \def\ProcessOptionsWithKV#1{% bugfixed v3.0a
429 |   \let\@tempc\relax
430 |   \let\caption@tempa\@empty
431 |   \@for\CurrentOption:=\@classoptionslist\do{%
432 |     \@ifundefined{KV@#1@\CurrentOption}%
433 |     {}%
434 |     {%
435 |       \edef\caption@tempa{\caption@tempa,\CurrentOption,}%
436 |       \@expandtwoargs\@removeelement\CurrentOption
437 |         \@unusedoptionlist\@unusedoptionlist
438 |     }%
439 |   }%
440 |   \edef\caption@tempa{%
441 |     \noexpand\setkeys{#1}{%
442 |       \caption@tempa\@ptionlist{\@currname.\@currext}%
443 |     }%
444 |   }%
445 |   \caption@tempa
446 |   \let\CurrentOption\@empty
447 |   \AtEndOfPackage{\let\@unprocessedoptions\relax}}
448 | \ProcessOptionsWithKV{caption}
449 | \let\ProcessOptionsWithKV\@undefined
450 | \def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}}
451 | \newcommand*\caption@of[2]{\def\@captype{#2}#1}
452 | \providecommand\ContinuedFloat{%
453 |   \ifx\@captype\@undefined
454 |     \@latex@error{\noexpand\ContinuedFloat outside float}\@ehd
455 |   \else
456 |     \addtocounter{\@captype}{\m@ne}%
457 |   \fi}%
458 | \newcommand*\caption@floatname[1]{\@nameuse{#1name}}
459 | \newcommand*\caption@thefloat[1]{\@nameuse{the#1}}
460 | \def\caption@letfloattype#1{%
461 |   \def\caption@setfloattype##1{%
462 |     \caption@settype{##1}\caption@settype{#1}}}
463 | \newcommand*\caption@begin[1]{%
464 |   \begingroup
465 |   \caption@setfloattype{#1}%
466 |   \@namedef{fnum@#1}{%
467 |     \caption@lfmt{\caption@floatname{#1}}{\caption@thefloat{#1}}}%
468 |   \caption@fixposition
469 |   \global\let\caption@fixedposition\caption@position
470 |   \caption@@begin{#1}}
471 | \newcommand*\caption@beginex[1]{%
472 |   \caption@begin{#1}%
473 |   \caption@preparelof}
474 | \newcommand*\caption@end{%
475 |   \caption@@end
476 |   \endgroup
477 |   \let\caption@position\caption@fixedposition}
478 | \let\caption@@begin\@gobble%  new v3.0a
479 | \let\caption@@end\@empty%     new v3.0a
480 | \newcommand*\caption@preparelof[1]{% changed v3.0b
481 |   \caption@ifbool{lof}%
482 |     {\def\caption@tempa{#1}}%
483 |     {\let\caption@tempa\@empty}%
484 |   \ifx\caption@tempa\@empty
485 |     \def\addcontentsline##1##2##3{}%
486 |   \fi}
487 | \caption@ifpkt@caption{
488 |   \renewcommand\@makecaption[2]{%
489 |     \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
490 |     \ifnum\caption@debug>1 %
491 |       \llap{$\caption@iftop\downarrow\uparrow$ }%
492 |     \fi
493 |     \caption@@make{#1}{#2}%
494 |     \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}}
495 |   \AtBeginDocument{%
496 |     \let\caption@@old\@caption
497 |     \long\def\@caption#1[#2]#3{%
498 |       \caption@beginex{#1}{#2}%
499 |         \caption@@old{#1}[{#2}]{#3}%
500 |       \caption@end}%
501 |     \@ifundefined{cc@caption}{%
502 |       \def\caption@caption#1{%
503 |         \@ifstar{\global\caption@startrue\@ifnextchar[{#1}{#1[]}}{#1}}%
504 |       \let\caption@old\caption
505 |       \def\caption{\caption@caption\caption@old}%
506 |     }{%
507 |       \let\caption@@captcont\cc@scaption
508 |       \long\def\cc@scaption#1[#2]#3{%
509 |         \caption@beginex{#1}{#2}%
510 |           \caption@@captcont{#1}[{#2}]{#3}%
511 |         \caption@end}%
512 |     }%
513 |   }}{}
514 | \AtEndOfPackage{\let\caption@ifpkt@caption\@undefined}%  bugfixed v3.0a
515 | \newcommand*\caption@ifpackage[2]{%
516 |   \let\next\@gobble
517 |   \caption@ifpkt@caption{%
518 |     \caption@ifbool{pkt@#1}{%
519 |       \@ifundefined{#2}%
520 |         {\let\next\AtBeginDocument}%
521 |         {\let\next\@firstofone}}{}%
522 |     \ifodd\caption@debug\relax
523 |       \edef\caption@tempa{%
524 |         \caption@ifbool{pkt@#1}{%
525 |           \@ifundefined{#2}{AtBeginDocument}{firstofone}%
526 |         }{gobble}}%
527 |       \PackageInfo{caption}{#1 = \caption@ifbool{pkt@#1}{1}{0} %
528 |            (\@ifundefined{#2}{not }{}loaded -> \caption@tempa)}%
529 |     \fi
530 |   }{}%
531 |   \@nameundef{caption@ifpkt@#1}%  bugfixed v3.0a
532 |   \next}
533 | \AtEndOfPackage{\let\caption@ifpackage\@undefined}
534 | \def\caption@setfloatposition{%
535 |   \caption@setposition{\@fs@iftopcapt t\else b\fi}}
536 | \caption@ifpackage{float}{float@caption}{%
537 |   \ifx\float@caption\relax
538 |   \else
539 |     \PackageInfo{caption}{float package v1.2 (or newer) detected}%
540 |     \let\caption@of@float\@gobble
541 |     \renewcommand*\caption@of[2]{%
542 |       \@ifundefined{fst@#2}{}{%
543 |         \let\caption@of@float\@firstofone
544 |         \@nameuse{fst@#2}\@float@setevery{#2}}%
545 |       \def\@captype{#2}#1}%
546 |     \renewcommand*\caption@floatname[1]{%
547 |       \@nameuse{\@ifundefined{fname@#1}{#1name}{fname@#1}}}%
548 |     \let\caption@@float\float@caption
549 |     \long\def\float@caption#1[#2]#3{%
550 |       \caption@beginex{#1}{#2}%
551 |         \let\@fs@capt\caption@@make
552 |         \caption@@float{#1}[{#2}]{#3}%
553 |         \caption@of@float{%
554 |           \def\caption@@make##1##2{\unvbox\@floatcapt}%
555 |           \@makecaption{}{}}%
556 |       \caption@end}%
557 |     \renewcommand*\caption@setfloattype[1]{%  improved v3.0a
558 |       \caption@fixfloat@c{#1}%
559 |       \expandafter\ifx\csname @float@c@#1\endcsname\float@caption
560 |         \expandafter\let\expandafter\caption@fst\csname fst@#1\endcsname
561 |         \edef\caption@fst{\noexpand\string\expandafter\noexpand\caption@fst}%
562 |         \edef\caption@fst{\noexpand\@gobblefour\caption@fst}%
563 |         \@ifundefined{caption@sty@\caption@fst}{}{\caption@setstyle\caption@fst}%
564 |         \caption@setfloatposition%  changed v3.0b
565 |       \fi
566 |       \caption@settype{#1}}%
567 |     \let\caption@float\caption
568 |     \def\caption{%
569 |       \ifx\@captype\@undefined
570 |         \@latex@error{\noexpand\caption outside float}\@ehd
571 |         \expandafter\@gobble
572 |       \else
573 |         \caption@fixfloat@c\@captype
574 |       \fi
575 |       \caption@float}%
576 |     \def\caption@fixfloat@c#1{%
577 |       \expandafter\let\expandafter\caption@tempa\csname @float@c@#1\endcsname
578 |       \ifx\caption@tempa\relax
579 |       \else\ifx\caption@tempa\float@caption
580 |       \else\ifx\caption@tempa\@caption
581 |       \else\ifx\caption@tempa\caption@@float
582 |         \ifodd\caption@debug\relax
583 |           \PackageInfo{caption}{\protect\@float@c@#1\space := \protect\float@caption}%
584 |         \fi
585 |         \expandafter\let\csname @float@c@#1\endcsname\float@caption
586 |       \else
587 |         \ifodd\caption@debug\relax
588 |           \PackageInfo{caption}{\protect\@float@c@#1\space := \protect\@caption}%
589 |         \fi
590 |         \expandafter\let\csname @float@c@#1\endcsname\@caption
591 |       \fi\fi\fi\fi}%
592 |   \fi}
593 | \caption@ifbool{ruled}{}{%
594 |   \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space}}
595 | \let\caption@ifruled\@undefined
596 | \caption@ifpackage{listings}{lst@MakeCaption}{%
597 |   \ifx\lst@MakeCaption\relax
598 |   \else
599 |     \PackageInfo{caption}{listings package v1.2 (or newer) detected}%
600 |     \let\caption@lst@MakeCaption\lst@MakeCaption
601 |     \def\lst@MakeCaption#1{%
602 |       \let\caption@setfloattype\caption@settype
603 |       \def\caption@autoposition{\caption@setposition{#1}}%
604 |       \caption@begin{lstlisting}%
605 |         \caption@lst@MakeCaption{#1}%
606 |       \caption@end}%
607 |   \fi}
608 | \caption@ifpackage{longtable}{LT@makecaption}{%
609 |   \ifx\LT@makecaption\relax
610 |   \else
611 |     \PackageInfo{caption}{longtable package v3.15 (or newer) detected}%
612 |     \def\LT@makecaption#1#2#3{%
613 |        \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\linewidth{%
614 |          \caption@letfloattype{longtable}%
615 |          \caption@begin{table}%
616 |            \ifdim\LTcapwidth=4in \else
617 |              \caption@setwidth\LTcapwidth
618 |            \fi
619 |            \caption@startrue#1\caption@starfalse
620 |            \caption@@make{#2}{#3}%
621 |          \caption@end
622 |          \endgraf\vskip\baselineskip}%
623 |        \hss}}}%
624 |   \fi}
625 | \caption@ifpackage{rotating}{@rotcaption}{%
626 |   \ifx\@rotcaption\relax
627 |   \else
628 |     \PackageInfo{caption}{rotating package v2.0 (or newer) detected}%
629 |     \@ifundefined{caption@caption}{}{%
630 |       \let\caption@rot\rotcaption
631 |       \def\rotcaption{\caption@caption\caption@rot}}%
632 |     \let\caption@@rot\@rotcaption
633 |     \long\def\@rotcaption#1[#2]#3{%
634 |       \caption@beginex{#1}{#2}%
635 |         \caption@@rot{#1}[{#2}]{#3}%
636 |       \caption@end}%
637 |     \long\def\@makerotcaption#1#2{%
638 |       \rotatebox{90}{%
639 |         \begin{minipage}{.8\textheight}%
640 |           \caption@@make{#1}{#2}%
641 |         \end{minipage}%
642 |       }\par
643 |       \hspace{12pt}}%
644 |   \fi}
645 | \caption@ifpackage{sidecap}{endSC@FLOAT}{%
646 |   \ifx\endSC@FLOAT\relax
647 |   \else
648 |     \PackageInfo{caption}{sidecap package v1.4d (or newer) detected}%
649 |     \let\SC@caption=\caption
650 |     \@ifundefined{caption@caption}{}{%
651 |       \let\caption@SC@zfloat\SC@zfloat
652 |       \def\SC@zfloat#1#2#3[#4]{%
653 |         \caption@SC@zfloat{#1}{#2}{#3}[#4]%
654 |         \global\let\SC@CAPsetup\@empty
655 |         \renewcommand\captionsetup[1]{\g@addto@macro\SC@CAPsetup{,##1}}%
656 |         \let\caption@old\caption
657 |         \def\caption{\caption@caption\caption@old}%
658 |       }}%
659 |     \let\caption@endSC@FLOAT\endSC@FLOAT
660 |     \def\endSC@FLOAT{%
661 |       \caption@setmargin\z@
662 |       \@ifundefined{SC@justify}{}{%
663 |         \ifx\SC@justify\@empty\else
664 |           \let\caption@hj\SC@justify
665 |           \let\SC@justify\@empty
666 |         \fi}%
667 |       \caption@esetup\SC@CAPsetup
668 |       \caption@letfloattype{SC\@captype}%
669 |       \caption@endSC@FLOAT}%
670 |   \fi}
671 | \def\caption@setSTposition{%
672 |   \caption@setposition{\if@topcaption t\else b\fi}}
673 | \caption@ifpackage{supertabular}{ST@caption}{%
674 |   \ifx\ST@caption\relax
675 |   \else
676 |     \PackageInfo{caption}{supertabular package detected}%
677 |   \let\caption@ST\ST@caption
678 |   \long\def\ST@caption#1[#2]#3{\par%  bugfixed v3.0a
679 |     \caption@letfloattype{supertabular}%
680 |     \let\caption@fixposition\caption@setSTposition
681 |     \caption@beginex{#1}{#2}%
682 |       \addcontentsline{\csname ext@#1\endcsname}{#1}%
683 |                       {\protect\numberline{%
684 |                           \csname the#1\endcsname}{\ignorespaces #2}}%
685 |       \@parboxrestore
686 |       \normalsize
687 |       \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
688 |     \caption@end}%
689 |   \fi}
690 | \AtBeginDocument{\let\scr@caption\caption}
691 | \endinput
692 | %%
693 | %% End of file `caption.sty'.
694 | 


--------------------------------------------------------------------------------