-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajhlabreport.cls
126 lines (98 loc) · 3.44 KB
/
ajhlabreport.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ajhlabreport}[2012/10/10 Alex's lab report]
\LoadClass[article,letterpaper]{memoir}
\RequirePackage{booktabs}
\RequirePackage[margin=1in]{geometry}
\RequirePackage{commath,amsmath,cancel}
\RequirePackage[free-standing-units]{siunitx}
\RequirePackage{float}
\RequirePackage{tikz}
\RequirePackage{type1cm,microtype}
\RequirePackage{pdfpages,listings}
\RequirePackage{lastpage}
\RequirePackage[hidelinks]{hyperref}
\newif\ifuse@dsp
\DeclareOption{dsp}{\use@dsptrue}
\ProcessOptions\relax
\ifuse@dsp\RequirePackage{ajhdsp}\fi
\lstset{basicstyle={\ttfamily\footnotesize},
breakatwhitespace=true,
breaklines=true,
columns=fullflexible,
frame=single,
numbers=left,
stepnumber=5,
showstringspaces=false,
keepspaces=true,
firstnumber=1,
numberfirstline=false,
lineskip={-1.5pt},
}
\lstdefinestyle{MATLABcode}{
commentstyle={\color[rgb]{0.133,0.545,0.133}},
keywordstyle={\color[rgb]{0,0,1}},
stringstyle={\color[rgb]{0.627,0.126,0.941}},
language=Matlab}
% FANCY HEADERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\makehead}[4]{\makeevenhead{#1}{#2}{#3}{#4}\makeoddhead{#1}{#2}{#3}{#4}}
\newcommand{\makefoot}[4]{\makeevenfoot{#1}{#2}{#3}{#4}\makeoddfoot{#1}{#2}{#3}{#4}}
% title page
\makehead{plain}{}{}{}
\makefoot{plain}{}{}{}
% default pages
\makepagestyle{default}
\makehead{default}{\textsl{\@class{}}}{\textsl{\@pretitle{}: \@title{}}}{\textsl{\@author}}
\makefoot{default}{}{\textsl{Page \thepage{} of \pageref*{LastPage}}}{}
% FANCY TITLE PAGE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\@class}{}
\newcommand{\class}[1]{\renewcommand{\@class}{#1}}
\newcommand{\@pretitle}{}
\renewcommand{\pretitle}[1]{\renewcommand{\@pretitle}{#1}}
\newcommand{\@datedue}{}
\newcommand{\datedue}[1]{\renewcommand{\@datedue}{#1}}
\newcommand{\@authorphoto}{}
\newcommand{\authorphoto}[1]{\renewcommand{\@authorphoto}{#1}}
\newcommand{\@teaminfo}{}
\newcommand{\teaminfo}[1]{\renewcommand{\@teaminfo}{#1}}
\newcommand{\@submittedto}{}
\newcommand{\submittedto}[1]{\renewcommand{\@submittedto}{#1}}
\newcommand{\@school}{\href{http://mtu.edu/}{Michigan Technological University}}
\newcommand{\school}[1]{\renewcommand{\@school}{#1}}
\renewcommand{\maketitle}{
\thispagestyle{plain}
\begingroup
{\noindent\LARGE\@pretitle} \par
\vspace{0.25in}
{\noindent\Huge\@title} \par
\vspace{0.5in}
{\noindent\@authorphoto} \par
\vspace{0.25in}
{\noindent\@author\@teaminfo} \par
\vspace{1in}
\noindent{}Submitted to \@submittedto{} for \@class{} \par
\vspace{1em}
\noindent{}Due \@datedue\par
\vfill
%\renewcommand{\contentsname}{Contents:}\tableofcontents*
\vfill
\centering\noindent\@school\par
\endgroup
\cleardoublepage
\pagenumbering{arabic}
}
\setsecnumdepth{book}
% If the new pagestyle isn't set in this way (also, if we redefine \@maketitle
% instead of \maketitle), the page style doesn't apply to the first page after
% the title page.
\AtBeginDocument{
% Subfigure support in memoir
% http://tex.stackexchange.com/questions/48837/subcaption-package-incompatible-with-memoir-class
% http://tex.stackexchange.com/questions/1215/is-it-possible-to-use-hyperref-subfigure-and-memoir-together
\newsubfloat{figure}
\providecommand*{\subfigureautorefname}{Figure}
\pagestyle{default}
\pagenumbering{roman}
}
% vim: filetype=tex