I'm making a template for my university for Master's/Doctorate theses, and I'm building off of what I've learned from the Thesis template in sharelatex. I'm encountering an error, though, which prevents me from compiling. I had made some changes which caused it to stop compiling, removed the errors, but it still won't do...so, can anyone tell me what I'm doing wrong? I'm pasting what I feel is relevant from the .cls and the .tex documents.
The target format is page 16 and 17 of the UML style guide PDF at the link referred to here
In the UMLThesis.cls (below) there's an issue using \committeemembers. Commenting out the lines allows it to compile, but I still get the error with a 'missing $' somewhere, and another error saying 'there's no line to end'. An extra pair of files (blank) are required to compile, called "lstpatch.sty" and "vector.sty". I have no idea why they're required.
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{UMLThesis}
[2007/22/02 v1.0
LaTeX document class]
\def\baseclass{book}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
\def\@checkoptions#1#2{
\edef\@curroptions{\@ptionlist{\@currname.\@currext}}
\@tempswafalse
\@tfor\@this:=#2\do{
\@expandtwoargs\in@{,\@this,}{,\@curroptions,}
\ifin@ \@tempswatrue \@break@tfor \fi}
\let\@this\@empty
\if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
}
\@checkoptions{11pt}{{10pt}{11pt}{12pt}}
%\PassOptionsToClass{a4paper}{\baseclass}
\ProcessOptions\relax
\LoadClass{\baseclass}
\newcommand{\supervisorSig}[1]{%
\justifying
Signature of Thesis Supervisor: \xleaders\hbox{\underline{ }}\hfill\kern0pt \\
\newlength{\remaining}
\setlength{\remaining}{\textwidth-\widthof{Name Typed:\quad\quad\quad\quad#1}}
Name Typed:\quad\quad\quad\quad\underline{#1\hspace{\remaining}}\par \\
\vspace{\baselineskip}
Signatures of Other Thesis Committee Members: \\}
\newcommand{\committeeMember}[1]{%
\justifying
Committee Member Signature: \xleaders\hbox{\underline{ }}\hfill\kern0pt \\
%\newlength{\remaining}
%\setlength{\remaining}{\textwidth-\widthof{Name Typed:\quad\quad\quad\quad#1}}
%Name Typed:\quad\quad\quad\quad\underline{#1\hspace{\remaining}}
#1}
\newcommand{\prevDegree}[3]{%
#1 \uppercase{#2} \left( #3 \right)}
\newcommand\SignaturePage[6]{%
\thispagestyle{empty}
\singlespacing
\vspace*{1 in}
\uppercase{%
\centering
% Title of thesis
\large{#1} \\
\vspace{2\baselineskip} \\
%Author section, and previous degrees
\normalsize{BY \vspace{2\baselineskip} \\ \MakeUppercase{\authornames} \\ #2 \vspace{3\baselineskip} \\
submitted in partial fulfillment of the requirements \\
% degree title
for the degree of \MakeUppercase{\degreeName} \\
% department name
\MakeUppercase{\deptName} \\
\MakeUppercase{\univName}}}
\vfill
\small{%
\newlength{\authline}
\setlength{\authline}{3.75 in-\widthof{\small{Author: }}}
\newlength{\autharea}
\setlength{\autharea}{\widthof{\small{Author: }}+\authline}
\newlength{\dateline}
\setlength{\dateline}{5.75 in-\autharea-\widthof{\small{Date: }}}
%\underline{#1\hspace*{\remaining}}\par
\justifying
Signature of \\
Author: \underline{\hspace{\authline}}Date: \underline{\hspace{\dateline}}
\\
#3
\committeeMember{#4}
\committeeMember{#5}
\committeeMember{#6}}
\cleardoublepage}
\newcommand*{\authors}[1]{\newcommand{\authornames}{#1}}
\newcommand*{\faculty}[2]{\newcommand{\facName}{#1}\newcommand{\facTitle} {#2}}
\newcommand*{\degree}[2]{\newcommand{\degreeNameShort}{#1}\newcommand{\degreeName}{#2}}
\newcommand*{\department}[1]{\newcommand{\deptName}{#1}}
\newcommand*{\university}[1]{\newcommand{\univName}{#1}}
\usepackage{setspace}
\usepackage{vmargin}
\doublespacing
\setlength{\parindent}{0pt}
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
\setmarginsrb { 1.5in} % left margin
{ 0.6in} % top margin
{ 1.0in} % right margin
{ 1.0in} % bottom margin
{ 20pt} % head height
{0.25in} % head sep
{ 9pt} % foot height
{ 0.3in} % foot sep
\raggedbottom
\usepackage{setspace}
\usepackage{fancyhdr}
\usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace,bm}
\usepackage[centerlast,small,sc]{caption}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[scriptsize]{subfigure}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{listings}
\usepackage{lstpatch}
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
\usepackage{longtable}
\usepackage{tikz}
\usepackage[square, numbers, comma, sort&compress]{natbib} % Use the "Natbib" style for the references in the Bibliography
\usepackage{verbatim} % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector} % Allows "\bvec{}" and "\buvec{}" for "blackboard" style bold vectors in maths
\hypersetup{urlcolor=blue, colorlinks=true} % Colours hyperlinks in blue, but this can be distracting if there are many links.
\usepackage{titlesec}
\usepackage{lipsum,calc,xcolor}
\usepackage{array, makecell} % <--- changed
\setcellgapes{5pt}
\usepackage{tikz}
\usepackage{xfrac}
\newcolumntype{M}{>{$}c<{$}}
\usepackage{algorithm2e}
\renewcommand*{\algorithmautorefname}{Algorithm}
\usepackage{ragged2e}
Below is the UMLThesis.tex, error is attributed to the 4th input option to \SignaturePage
\documentclass[letterpaper, 12pt, oneside]{UMLThesis}
\begin{document}
\frontmatter % Begin Roman style (i, ii, iii, iv...) page numbering
% Set up the Title Page
\title {This is a formattable \\ thesis title, and seems to \\ work without error}
\authors {My name} %call with \authorNames
\faculty {My PI}{King professor guy} %call with \facName and \facTitle
\department {Department within College} %call with \depName
\degree {M.S.}{Masters of Science} %call with \degreeNameShort and \degreeName
\university {University of Massachusetts Lowell} %call with \univName
\setstretch{1.3} % It is better to have smaller font and larger line spacing than the other way round
% Define the page headers using the FancyHdr package and set up for one-sided printing
\fancyhead{} % Clears all page headers and footers
\rhead{\thepage} % Sets the right side header to show the page number
\lhead{} % Clears the left side page header
\pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers
\SignaturePage{
% Input the name of the title, using '\\' as a manual linebreak
Manually labeling the \\ manually spaced \\ title page
}{
% Input your previous degrees from least to most prestigious using the \prevdegree{abbreviation}{university}{year} function as show, and '\\' as manual line breaks between each degree
\prevDegree{B.S.}{University of Massachusetts Lowell}{2014}
}{
% Create the signatures
\supervisorSig{\facName, Ph.D.} % Use this for a master's thesis
%\dissertationSig{\facName, Ph.D.} % Use this for a doctorate thesis
}{
% First committee member
\facName, Ph.D.
}{
% Second committee member
Committee member 2, Ph.D.
}{
% Third committee member
Committee member 3, Ph.D.
}
\clearpage % Declaration ended, now start a new page
\end{document}
Ancillary questions:
Do I need to do that whole "\def\baseclass{book}" through "\LoadClass{\baseclass}" deal?
How do I make this first page not listed as "i" in the front-matter? This page is like a cover, rather than an actual first page.
Why does changing the '\' to '\newline' inside of the \newcommand{\SignaturePage} mess up the centering? The document has a left margin of 1.5" if that matters
! Undefined control sequence. l.13 \setstretch
\small{Author: }
for example I assume that\vspace{2\baselineskip} \\
generates a no line her to end error as you can't end a line in vertical modeAuthor:
has a larger length than\small{Author: }
this will be captured to make the line extend to the margin correctly? As for the the `\vspace{2\baselineskip} \` I was just trying to make it create more than one space. I don't understand all of the technical bits of the language, but it worked and looked accurate once I typed it out.\usepackage{}
commands to make sure we're on the same page, just in case