| 1 |
% !TEX root = ../thesis-sample.tex |
| 2 |
|
| 3 |
\chapter{Using this template} \label{chap:intro} |
| 4 |
|
| 5 |
This chapter is stuck among the others as a brief users' manual for this template. |
| 6 |
The approach to this template is to result in \LaTeX~source code files (\texttt{.tex} files) that are as simple as possible. |
| 7 |
It also tries to do as much as possible automatically so that the user does not have to spend a lot of effort trying to match the poorly documented ``guidelines'' provided by GWU or SEAS. |
| 8 |
This is particularly useful for the first few pages, for example the title page, dedication, and abstract page, which are difficult to make in \LaTeX~and are supposed to go in a certain order. |
| 9 |
|
| 10 |
In addition to the description in this chapter, anyone may, of course, also look at the source code for this file, \texttt{thesis-sample.tex}. |
| 11 |
That file contains all of the source for this \texttt{.pdf} in a single file, but it will work just as well with multiple input files combined with the \texttt{input} or \texttt{include} commands. |
| 12 |
Generally, it is a better idea to use \texttt{include} as this will allow for selective compiling of a specific portion of your thesis, i.e. only a single chapter at a time. |
| 13 |
|
| 14 |
The final generic comment about this template is that it has been updated to take advantage of \LaTeX's capabilities to create documents with links in them. |
| 15 |
Provided you are using a modern PDF viewer to view this document, you may have already noticed this. |
| 16 |
It creates a list of bookmarks, which can be used to quickly navigate what may be a long document. |
| 17 |
It also turns references within the text into links. |
| 18 |
The best examples in this file are the entries in the Table of Contents. |
| 19 |
Although the chapter and section names are shown in black (in accordance with the GWU guidelines), clicking on them does navigate to the start of the chapter, section, etc. |
| 20 |
|
| 21 |
|
| 22 |
\section{General Usage} |
| 23 |
The way to invoke usage of this template is to put |
| 24 |
\begin{verbatim} |
| 25 |
\documentclass{thesis-gwu.cls} |
| 26 |
\end{verbatim} |
| 27 |
at the beginning of your preamble. |
| 28 |
This can also work if the \texttt{thesis-gwu.cls} file is not in the same directory as your \texttt{.tex} file. |
| 29 |
To do so, just give the relative path. |
| 30 |
\begin{verbatim} |
| 31 |
\documentclass{./tex/thesis-gwu.cls} |
| 32 |
\end{verbatim} |
| 33 |
|
| 34 |
Much like a usual article or report in \LaTeX, the user specifies the primary information about the document in the preamble with commands like |
| 35 |
\begin{verbatim} |
| 36 |
\author{Shankar Kulumani} |
| 37 |
\chair{Taeyoung Lee} |
| 38 |
\end{verbatim} |
| 39 |
At the beginning of the document, the title page will automatically be created and inserted at the beginning of the document. |
| 40 |
If you forget to declare any of the required fields, it will generate a title page with a message such as ``Insert an author!'' |
| 41 |
|
| 42 |
However, the template does a lot more in the preamble than just create a title page. |
| 43 |
The preamble (that is, whatever comes before \texttt{begin\{document\}} in the primary \texttt{.tex} file) is also the place for the user to specify a dedication, any acknowledgments, a foreword, \textit{etc.} |
| 44 |
This is done in a manner very similar manner to declaring the author, title, and so on. Suppose that someone wants to have a simple dedication ``To Mom'', the following command is all that is needed. |
| 45 |
\begin{verbatim} |
| 46 |
\dedication{To Mom} |
| 47 |
\end{verbatim} |
| 48 |
This will cause the document to have a dedication page with the |
| 49 |
corresponding text. |
| 50 |
If the \texttt{dedication} command is not present, there will not be a dedication page. |
| 51 |
All the work of either having or not having a dedication has been compressed into a single command! |
| 52 |
Things other than simple text \emph{are} allowed in the dedication, so feel free to put equations or whatever inside there. |
| 53 |
There are a few more commands that can be used to customize the appearance of the dedication page, and also for the other preamble text pages, but that is left to~\cref{ssec:dedication}. |
| 54 |
|
| 55 |
\section{Front Matter} |
| 56 |
The \LaTeX term ``frontmatter'' refers to all of the pages that occur before the beginning of the first chapter. |
| 57 |
It is usually made clear to the reader because the pages in the front matter are numbered with lower-case Roman numerals instead of Arabic numerals. |
| 58 |
|
| 59 |
The present template, \texttt{thesis-gwu.cls} attempts to remove as much work associated with the front matter as possible. |
| 60 |
The template inserts all of the front matter pages automatically, so that there is |
| 61 |
not even a need to use a command like \verb+\maketitle+. |
| 62 |
The first thing after \verb+\begin{document}+ should be the start of the first |
| 63 |
chapter. |
| 64 |
|
| 65 |
\subsection{Identifiers} |
| 66 |
The template is not able to read minds, of course, so there needs to be some way of inputting the relevant information. |
| 67 |
This section covers how to specify the author, title, and so on. |
| 68 |
For the most part, this works just like any other \LaTeX~document, but a dissertation has a few more identifiers than most documents (How many books or reports have a |
| 69 |
committee?). |
| 70 |
So there are a few extra commands provided by this template, and they work \emph{almost} exactly like the standard commands. |
| 71 |
|
| 72 |
\begin{table} |
| 73 |
\caption{ \label{tab:identifiers} |
| 74 |
List of all identifier commands} |
| 75 |
\centering |
| 76 |
\small |
| 77 |
\begin{tabular}{l @{\hspace{16pt}} l @{\hspace{16pt}} p{6cm}} |
| 78 |
\hline \hline |
| 79 |
\textsc{Item} & \textsc{Usage} & \textsc{Comment} \\ |
| 80 |
\hline |
| 81 |
Author & \verb|\author{...}| |
| 82 |
& Works as in standard \LaTeX \\ |
| 83 |
Chair & \verb|\chair{...}| |
| 84 |
& Name of chair \emph{without} any title or affiliation. This |
| 85 |
appears only on the abstract page, and only if there is no |
| 86 |
co-chair. \\ |
| 87 |
Co-chair & \verb|\cochair{...}| |
| 88 |
& Names of all co-chairs \emph{without} any titles or |
| 89 |
affiliations. This appears only on the abstract page. Note |
| 90 |
that by convention, it is not chair \emph{and} co-chair, but |
| 91 |
just two co-chairs. \\ |
| 92 |
Committee & \verb|\committee{...}| |
| 93 |
& Formatted names of committee members \emph{with} the |
| 94 |
appropriate titles and university names. This will appear |
| 95 |
only on the title page. \\ |
| 96 |
Department & \verb|\department{...}| |
| 97 |
& Title of department of student \\ |
| 98 |
Title & \verb|\title{...}| |
| 99 |
& Works as in standard \LaTeX \\ |
| 100 |
Year & \verb|\year=2012| |
| 101 |
& Year that dissertation will be \emph{completed} \\ |
| 102 |
\hline \hline |
| 103 |
\end{tabular} |
| 104 |
\end{table} |
| 105 |
|
| 106 |
A full list of the identifiers is given in Table \cref{tab:identifiers}. |
| 107 |
You're free to adjust/delete these commands as desired. |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
\subsection{Frontispiece and Copyright} |
| 112 |
|
| 113 |
By default, the template assumes that there should be a copyright page, and the copyright holder is the author. |
| 114 |
To prevent the copyright page from appearing, use the command \verb|\hidecopyright|. |
| 115 |
To assign the copyright to someone other than the author, use the following command. |
| 116 |
\begin{verbatim} |
| 117 |
\copyrightholder{Someone Else} |
| 118 |
\end{verbatim} |
| 119 |
|
| 120 |
|
| 121 |
\subsection{Text Pages} \label{ssec:dedication} |
| 122 |
The handling of the first few pages after the title page is one of the best features of this template. |
| 123 |
The pages that occur between the copyright page and the abstract page all consist of short pieces of text that are usually a single paragraph. |
| 124 |
The text for each of these pages is set up using a command of the same name. |
| 125 |
Generally, only one of the front matter pages is used. |
| 126 |
\begin{verbatim} |
| 127 |
\foreword{This is going to be the best dissertation ever.} |
| 128 |
\end{verbatim} |
| 129 |
Usually the contents of each of these pages will be longer than a single sentence, and thus it should be noted that each of these commands allows most types of \LaTeX~input. |
| 130 |
For example, the following is perfectly acceptable input--at least as far as the template is concerned. |
| 131 |
\begin{verbatim} |
| 132 |
\foreword{This is going to be the \emph{best}. \\ |
| 133 |
\begin{center} Really, really. \end{center}} |
| 134 |
\end{verbatim} |
| 135 |
|
| 136 |
As I mentioned before, a given page will appear in the document if and only if the corresponding command is used. |
| 137 |
The order in which the pages appear does not depend on the order the commands are used in the preamble. |
| 138 |
You can also prevent the pages from appearing by using commands like \verb|\hideforeword|. |
| 139 |
|
| 140 |
The style of each page can also be set by the user. |
| 141 |
By default, each page will appear with a bold, italic heading corresponding to the name |
| 142 |
of the page. |
| 143 |
However, there are five other formats, which can be controlled using an optional argument. |
| 144 |
For example, the following command creates a dedication page with no heading (\textit{i.e.}~it does not say ``Dedication'' on the page) but with lines above and below the dedication text. |
| 145 |
\begin{verbatim} |
| 146 |
\dedication[4]{To Mom} |
| 147 |
\end{verbatim} |
| 148 |
A complete list of the available styles is given in \cref{tab:fronstyle}. |
| 149 |
The style of each page can be set independently, but it is also possible to change which style is used by default. |
| 150 |
\begin{verbatim} |
| 151 |
\frontpagestyle{6} |
| 152 |
\end{verbatim} |
| 153 |
This would make all of the commands that were called without optional |
| 154 |
inputs to create pages using style 6. |
| 155 |
|
| 156 |
\begin{table} |
| 157 |
\caption{ \label{tab:fronstyle} |
| 158 |
List of styles for frontmatter text pages} |
| 159 |
\centering |
| 160 |
\begin{tabular}{c @{\hspace{16pt}} p{8cm}} |
| 161 |
\hline \hline |
| 162 |
\textsc{Style} & \textsc{Description} \\ |
| 163 |
\hline |
| 164 |
1 & Justified text with no header or lines \\ |
| 165 |
2 & Justified text with bold italic header and no lines \\ |
| 166 |
3 & Justified text, capitalized header, no lines \\ |
| 167 |
4 & Justified text with lines and no header \\ |
| 168 |
5 & Justified text with bold italic header and lines \\ |
| 169 |
6 & Justified text with capitalized header and lines \\ |
| 170 |
other & Centered text with no header or lines \\ |
| 171 |
\hline \hline |
| 172 |
\end{tabular} |
| 173 |
\end{table} |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
\subsection{Lists of Things} \label{ssec:lists} |
| 178 |
Suffice it to say that this template handles the Table of Contents appropriately, but this section is also meant to address the List of Figures, List of Tables, \textit{etc}. According to the guidelines, a corresponding list must appear if there is more than one figure, table, map, program, illustration, or appendix. |
| 179 |
The template assumes that the dissertation will contain at least two figures and tables. |
| 180 |
If, for example, there is only one figure, |
| 181 |
\begin{verbatim} |
| 182 |
\hidelistoffigures |
| 183 |
\end{verbatim} |
| 184 |
must be put in the preamble. |
| 185 |
There are similar commands to hide/show all of the front matter pages. |
| 186 |
These can be used at will as desired. |
| 187 |
|
| 188 |
\subsection{Glossary of Terms}\label{ssec:glossary} |
| 189 |
Here is an example. |
| 190 |
\Gls{linux} is a computer operating system, and its completely free and open. |
| 191 |
|
| 192 |
A \gls{matrix}, denoted \gls{M}. |
| 193 |
Lots of \glspl{matrix}. |
| 194 |
\Glspl{matrix} are a rectangular array of quantities. |
| 195 |
No indexing, linking, or formatting: \glsentrytext{matrix}. |
| 196 |
The identity \gls{matrix}['s] diagonal consists of ones. |
| 197 |
|
| 198 |
First use: \gls{filo}. |
| 199 |
Next use: \gls{filo}. |
| 200 |
Full form: \acrfull{filo}. |
| 201 |
|
| 202 |
|
| 203 |
\subsection{Acronymns and Symbols}\label{ssec:acronymns} |
| 204 |
The other type of list that can occur is for abbreviations of various types. |
| 205 |
This is a somewhat convenient feature, particularly there are a lot of acronyms in the dissertation. |
| 206 |
This template utilizes the \texttt{acronym} or \texttt{glossaries} packages, but eventually I would like to migrate to the use of \texttt{glossaries} which is continuing to be supported and deprecate the use of \texttt{acronym}, for now both are supported. |
| 207 |
|
| 208 |
\subsubsection{\texttt{acronymn} usage - try to avoid using this as it's not the best} |
| 209 |
In the preamble put a command like the following. |
| 210 |
\begin{verbatim} |
| 211 |
\abbreviations{ |
| 212 |
\acro{CFD}{Computational Fluid Dynamics} |
| 213 |
\acro{LOA}{List of Abbreviations} |
| 214 |
\acro{H2O}[$\mathrm{H_2O}$]{water}} |
| 215 |
\end{verbatim} |
| 216 |
This will define a bunch of abbreviations that can be used. |
| 217 |
When you want to use one of the acronyms within the text, simply use the \verb|\ac| command to refer to the abbreviation you want. |
| 218 |
This will automatically spell out what the abbreviation stands for on the first use and only print out the abbreviation on subsequent uses. |
| 219 |
|
| 220 |
\subsubsection{\texttt{glossaries} usage - much improved and more powerful} |
| 221 |
In addition, you can utilize the much more powerful \texttt{glossaries} package. |
| 222 |
You can define symbols, acronymns, or full glossary entries as desired. |
| 223 |
Each acronymn is defined using the following: |
| 224 |
\begin{verbatim} |
| 225 |
\newacronym{crtb}{CRTBP}{Circular Restricted Three Body Problem} |
| 226 |
\end{verbatim} |
| 227 |
Here we can use an acronym, such as \gls{crtbp}. |
| 228 |
Or display the full name, \gls{crtbp}. |
| 229 |
|
| 230 |
Here's an \verb|\ac| acronym \ac{CRTBP}, followed by some random text, but \ac{HIDEME} |
| 231 |
|
| 232 |
|
| 233 |
Let's use an acronym from the \texttt{glossaries} package, \acrfull{crtbp} and \gls{F} but \acrfull{hideme}. |
| 234 |
|
| 235 |
\section{Float environments} |
| 236 |
There are many possible float enviornments, and this section will serve as an introduction and demonstration of some of them. |
| 237 |
In addition, it offers the ability to ensure that this template actually follows the guidelines. |
| 238 |
|
| 239 |
\subsection{Figures}\label{ssec:figures} |
| 240 |
|
| 241 |
Here is a figure as shown in~\cref{fig:picard}. |
| 242 |
Notice how we're using the fancy referencing offered by the \verb+cleveref+ package. |
| 243 |
Instead of using the normal~\verb+\ref+ command we instead use~\verb+\cref+. |
| 244 |
The magic of \LaTeX automatically figures out that the previous reference points to a figure while~\cref{ssec:figures} points to a section. |
| 245 |
|
| 246 |
\begin{figure} |
| 247 |
\centering |
| 248 |
\includegraphics[width=0.5\textwidth]{figures/picard_yes.jpg} |
| 249 |
\caption[Damage report!]{Glad to have a thesis class\label{fig:picard}} |
| 250 |
\end{figure} |
| 251 |
|
| 252 |
Here's another figure that demonstrates the use of \texttt{tikz} and the externalization library. |
| 253 |
\begin{figure} |
| 254 |
\centering |
| 255 |
\begin{tikzpicture} |
| 256 |
\begin{axis}[ |
| 257 |
xlabel={$x$}, |
| 258 |
ylabel={$y$}, |
| 259 |
] |
| 260 |
\addplot {x^2}; |
| 261 |
\end{axis} |
| 262 |
\end{tikzpicture} |
| 263 |
\caption{Externalized\label{fig:tikz}} |
| 264 |
\end{figure} |
| 265 |
|
| 266 |
\subsection{Tables}\label{ssec:tables} |
| 267 |
|
| 268 |
Here's a table in~\cref{tab:table} |
| 269 |
|
| 270 |
\begin{table} |
| 271 |
\centering |
| 272 |
%\resizebox{\textwidth}{!}{ |
| 273 |
\begin{tabular}{ | l | l | l | p{5cm} |} |
| 274 |
\hline |
| 275 |
Day & Min Temp & Max Temp & Summary \\ |
| 276 |
\hline |
| 277 |
Monday & 11C & 22C & A clear day with lots of sunshine. |
| 278 |
However, the strong breeze will bring down the temperatures. \\ |
| 279 |
\hline |
| 280 |
Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells |
| 281 |
across most of Scotland and Northern Ireland, |
| 282 |
but rain reaching the far northwest. \hfill \\ |
| 283 |
\hline |
| 284 |
Wednesday & 10C & 21C & Rain will still linger for the morning. \hfill |
| 285 |
Conditions will improve by early afternoon and continue |
| 286 |
throughout the evening.\\ |
| 287 |
\hline |
| 288 |
\end{tabular} |
| 289 |
\caption[Short caption for table]{Long caption for text \label{tab:table}} |
| 290 |
\end{table} |
| 291 |
|
| 292 |
\section{References and Citation} |
| 293 |
Finally, we'll add a subfigure to demonstrate it's proper use. |
| 294 |
Many people use the package~\verb+subfigure+ but this is in fact, quite wrong. |
| 295 |
To begin, the~\verb+subfigure+ package has been deprecated, which one can check by going to \url{https://www.ctan.org/pkg/subfigure}{CTAN}. |
| 296 |
Instead, everyone should be using~\verb+subcaption+, just as this class file is already doing. |
| 297 |
Here, in~\cref{fig:xkcd}, we see two subfigures encapsulated in a larger figure environment. |
| 298 |
Luckily, with our fancy referencing we have access to both~\cref{fig:ext,fig:ksp} using the same commands. |
| 299 |
The key thing to note from~\cref{fig:ext} is that trustworthiness reaches a maximum for those using~\verb+.tex+. |
| 300 |
\begin{figure}[htbp] |
| 301 |
\centering |
| 302 |
\begin{subfigure}[htbp]{0.4\textwidth} |
| 303 |
\includegraphics[width=\textwidth]{figures/file_extensions.png} |
| 304 |
\caption{File Extensions} \label{fig:ext} |
| 305 |
\end{subfigure}~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc. %(or a blank line to force the subfigure onto a new line) |
| 306 |
\begin{subfigure}[htbp]{0.5\textwidth} |
| 307 |
\includegraphics[width=\textwidth]{figures/orbital_mechanics.png} |
| 308 |
\caption{Kerbal Space Program} \label{fig:ksp} |
| 309 |
\end{subfigure} |
| 310 |
\caption[XKCD]{Some words of wisdom from Randall Munroe} |
| 311 |
\label{fig:xkcd} |
| 312 |
\end{figure} |
| 313 |
|
| 314 |
\subsection{References} |
| 315 |
|
| 316 |
Lots of famous people tend to write famous papers~\cite{newton1999}. |
| 317 |
Were they famous because or in-spite of their papers? |
| 318 |
Regardless, they're famous now and we all should read them. |
| 319 |
Certain people are so famous and do such great work that they invent a whole new field of study with a single paper~\cite{kalman1960,shannon1949} |
| 320 |
|
| 321 |
\section{Math} |
| 322 |
|
| 323 |
Here are some nice equations~\cref{prob_def,prob_def_constrained} |
| 324 |
\begin{align} |
| 325 |
\label{prob_def} |
| 326 |
&\min_{s\subset W}\ J(s) = \sum_{i=1}^{l-1} H(s_j, s_{j+1}) \\ |
| 327 |
&\max_{s\subset W}\ P_{tr}(s) = \prod_{i=1}^{l-1} P_{tr}(s_j, s_{j+1}) \nonumber |
| 328 |
\end{align} |
| 329 |
|
| 330 |
Here's another equation. |
| 331 |
\begin{align} |
| 332 |
\label{prob_def_constrained} |
| 333 |
&\min_{s\subset W}\ J(s) = \sum_{i=1}^{l-1} H(s_j, s_{j+1}) \\ |
| 334 |
&\text{subject to} \ P_{tr}(s)>\epsilon_{tr} \nonumber |
| 335 |
\end{align} |
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|