## 6. Appendix: Internals of the nmtsrsab2012.sty file

Here is the actual nmtsrsab2012.sty file. Most people probably won't need to touch this. It is presented here in case advanced LaTeX users would like to customize it.

Style files use different rules than regular LaTeX. Kopka's book (referenced in Section 1, “LaTeX: A quality option for your SRS extended abstract”) discusses these rules.

nmtsrsab2012.sty
% nmtsrsab2012.sty:  Style file for NMIMT Student Research Symposium
%                    Extended Abstracts
% Do not edit this file directly.  It is extracted automatically
% from the documentation, here:
%   http://www.nmt.edu/tcc/help/pubs/nmtthesis/srs/
%----------------------------------------------------------------


The \ProvidesPackage command defines the name of the style and includes version information. The \typeout command sends its text to the log file whenever the LaTeX file is run through pdflatex.

nmtsrsab2012.sty
\ProvidesPackage{nmtsrsab2012}[2012/03/30 v1.1 (J. Shipman)]
\typeout{NMIMTCC SRS extended abstract format, v1.1, 2012-03-30}


Next are the packages used by this style. The mathpazo selects the Palatino typeface both for regular body type and math.

nmtsrsab2012.sty
%================================================================
% Packages used
%----------------------------------------------------------------
\usepackage{mathpazo}


The titlesec package allows us to customize running headers and footers. Refer to the documentation for titlesec, as well as the documentation for the titleps sub-package.

nmtsrsab2012.sty
\usepackage[pagestyles]{titlesec}


Next we set up the physical page dimensions. For a more thorough discussion of page layout, refer to NMT Thesis Stylesheet: Internals, from which work most of the dimensions below are taken, with a few exceptions.

• Here we are not constrained to the single-sided page format of theses, so the standard 1″ margins all around will be adequate.

• The \headsep dimension is increased to two picas; theses don't have a running head, but we do.

• We set \topskip to one line to provide a separation between the running head and the page body.

nmtsrsab2012.sty
%================================================================
% Page geometry
%----------------------------------------------------------------
\setlength{\paperwidth}{8.4in}
\setlength{\textwidth}{5.9in}
\setlength{\hoffset}{0.05in}
\setlength{\paperheight}{10.9in}
\setlength{\topmargin}{0in}
\setlength{\footskip}{24pt}
\setlength{\textheight}{622pt}
\setlength{\voffset}{0.05in}
\setlength{\topskip}{12pt}
\setlength{\parindent}{3pc}
\setlength{\parskip}{5pt plus1.5pt minus0.5pt}


The next command sets up double-spacing. Because the default leading for 12-point type is 15 points, we use a multiplier of 1.6 to get true double-spacing of 24 points.

nmtsrsab2012.sty
\renewcommand{\baselinestretch}{1.6}%  Double-spaced (15->24)


The \defaultInstitution command defines what appears as the member's institution when the \author or \correspondingAuthor command does not use the optional first argument.

nmtsrsab2012.sty
%================================================================
% Commands
%----------------------------------------------------------------
%
% - - -   \ d e f a u l t I n s t i t u t i o n
%
\newcommand{\defaultInstitution}%
{New Mexico Institute of Mining and Technology}%


In basic LaTeX, the \author command is in the preamble. Here we redefine it so that it drops the author name right where the command is invoked.

nmtsrsab2012.sty
%
% - - -   \ a u t h o r
%
\renewcommand{\author}[4][\defaultInstitution]%
{%  #1 (optional): the institutional affiliation, if not NMT.
%  #2: author's name in mixed case.
%  #3: author's department.
%  #4: author's NMT email.
\begin{center}
{#2}\\
\itshape
{#3}, {#1}, \texttt{\upshape #4}%
\end{center}%
}% End \author


The only difference between \author and \correspondingAuthor is that the latter places an asterisk after the email address.

nmtsrsab2012.sty
%
% - - -   \ c o r r e s p o n d i n g A u t h o r
%
\newcommand{\correspondingAuthor}[4][\defaultInstitution]%
{\author[#1]{#2}{#3}{#4*}}%


The \authorsEnd command inserts a line explaining what the asterisk on the corresponding author line means.

nmtsrsab2012.sty
%
% - - -   \ a u t h o r s E n d
%
\newcommand{\authorsEnd}%
{%
\vspace{-1pc}%
\begin{center}%
* Denotes corresponding author.%
\end{center}%
}% \authorsEnd


As with \author, the \title command in basic LaTeX is a preamble command.

### Note

The reason we can't use the standard LaTeX \maketitle command is that it does not work with the titleps package. In particular, Dr. Simpson stipulates that the running header must appear on the first page so that the registration number appears at the top left corner, but the \maketitle command always suppresses running heads on the first page.

nmtsrsab2012.sty
%
% - - -   \ t i t l e
%
\renewcommand{\title}[1]%
{%
\begin{center}
\large\bfseries #1%
\end{center}
}% End \title


The \date command is a preamble command in this style file. It packages the argument as the internal \the@date command, which is used below in the running footer.

nmtsrsab2012.sty
%
% - - -   \ d a t e
%
\renewcommand{\date}[1]%
{%
\newcommand{\the@date}{#1}%
}%


The \the@footer command sets up the content of the running footer.

nmtsrsab2012.sty
\newcommand\the@footer%
{% Running footer
\footnotesize
New Mexico Tech Student Research Symposium $\bullet$
\the@date
}% Running footer


The \registrationNumber command, another preamble command, packages its argument in the internal \reg@no command for later use in the running header.

nmtsrsab2012.sty
%
% - - -   \ r e g i s t r a t i o n N u m b e r
%
\newcommand{\registrationNumber}[1]%
{%
\newcommand{\reg@no}{#1}%
}% End \registrationNumber


The \newpagestyle command is part of the titleps subpackage of the titlesec package. We define two page styles: firstpage for the first page and rest for the remaining pages. The only difference between them is that \firstpage omits the page number.

nmtsrsab2012.sty
%================================================================
% Page styles
%----------------------------------------------------------------
%
% - - -   f i r s t p a g e
%
\newpagestyle{firstpage}% Style for first page, no folio
{% 'first' page style
\setfoot{}{\the@footer}{}%
}%  'first' page style
%
% - - -   r e s t
%
\newpagestyle{rest}% Style for remaining page, with folio
{% 'first' page style
\setfoot{}{\the@footer}{}%
}%  'first' page style
\pagestyle{rest}
\thispagestyle{firstpage}


The default formats of the \section and \subsection use a lot of vertical space and much larger type than the body face. Because the target size of an extended abstract is on the order of five pages, we don't need to make these headings stand out as much. The appearance as set here is fairly close to Dr. Simpson's MS-Word template. The \titleformat and \titlespacing* commands are from the titlesec package.

nmtsrsab2012.sty
%================================================================
% Formats of \section, \subsection, etc.
%
\titleformat{\section}%
[block]%  Shape: centered in a block
{\large\bfseries\filcenter}% Format: larger, boldface, centered
{}% Label: No
{0pt}% Label/text separation
{}%
\titlespacing*{\section}%
{0pt}%  Left spacing
{1pc}%  Vertical before
{0pc}%  Vertical after
\titleformat{\subsection}%
[hang]%  Shape: Left-aligned
{\itshape\bfseries}% Format: Bold italics
{}% Label: No
{0pt}% Label/text separation
{}% Vertical space before