-
Notifications
You must be signed in to change notification settings - Fork 0
/
oxycomps.sty
102 lines (91 loc) · 2.94 KB
/
oxycomps.sty
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
% A simple two-column LaTeX style for Occidental College's CS senior projects.
% Based on latex8.sty by [email protected]
\usepackage{times} % use Times as the default font
% define bold 11pt Times font for second-order headings
\font\elvbf = ptmb scaled 1100
\usepackage[style=numeric,sorting=nyt]{biblatex} % format the bibliography nicely
\usepackage{xpatch} % used to patch \textcite
% change \textcite to do family-name (year)
\xpatchbibmacro{textcite}
{\printnames{labelname}}
{\printnames{labelname} (\printfield{year})}
{}
{}
% sort bibliography by last name
\DeclareNameAlias{default}{family-given}
\usepackage{amsfonts} % provides many math symbols/fonts
\usepackage{amsmath} % provides many math environments
\usepackage{amssymb} % provides many math symbols/fonts
\usepackage{caption} % fixes caption spacing issues
\usepackage[usenames,dvipsnames]{color} % allows for colored text
\usepackage{enumitem} % allows adjustment of list spacing
\usepackage{graphicx} % allows insertion of graphics
\usepackage{hyperref} % creates links within the page and to URLs
\usepackage{listings} % provides the lstlisting environment
\usepackage{url} % formats URLs properly
\usepackage{verbatim} % provides the comment environment
% set dimensions of columns, gap between columns, and paragraph indent
\setlength{\textheight}{8.875in}
\setlength{\textwidth}{6.875in}
\setlength{\columnsep}{0.3125in}
\setlength{\topmargin}{0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\parindent}{1em}
\setlength{\oddsidemargin}{-.304in}
\setlength{\evensidemargin}{-.304in}
% remove the space between list items
\setlist{noitemsep}
% style code listings
\lstset{
basicstyle=\ttfamily\footnotesize,
breaklines=true,
showstringspaces=false
}
% style the title
\def\@maketitle{
\newpage
\begin{center}
{\Large \bf \@title \par}
% add two empty lines at the end of the title
\vspace*{2\baselineskip}
{
\large
\begin{tabular}[t]{c}
\@author
\end{tabular}
\par
}
% add small space at the end of the author name
\vspace*{.5em}
{
\ifx \@empty \@email
\else
\texttt{\@email}
\par
\vspace*{.25em}
\fi
\ifx \@empty \@affiliation
\else
\@affiliation
\fi
}
% add empty line at the end of the title block
\vspace*{\baselineskip}
\end{center}
}
% style the abstract
\def\abstract{%
\centerline{\large\bf Abstract}%
\vspace*{\baselineskip}%
}
% define email and affiliation
\def\email#1{\gdef\@email{#1}}
\gdef\@email{}
\def\affiliation#1{\gdef\@affiliation{#1}}
\gdef\@affiliation{}
% correct heading spacing and type
\def\section{\@startsection {section}{1}{\z@}
{14pt plus 2pt minus 2pt}{14pt plus 2pt minus 2pt} {\large\bf}}
\def\subsection{\@startsection {subsection}{2}{\z@}
{13pt plus 2pt minus 2pt}{13pt plus 2pt minus 2pt} {\elvbf}}