-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagd-syllabus.sty
102 lines (81 loc) · 3.38 KB
/
agd-syllabus.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
\ProvidesPackage{agd-syllabus}
% Copyright (C) 2013 Andrew Gainer-Dewar <[email protected]>
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.2 of this license or (at your option) any later
% version. The latest version of this license is in:
% http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of
% LaTeX version 1999/12/01 or later.
\usepackage[american]{babel}
\usepackage[babel]{csquotes}
\usepackage{hyperref}
\usepackage[margin=1in,letterpaper]{geometry}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[libertine]{newtxmath}
\usepackage{microtype}
\usepackage{booktabs}
\usepackage[compact]{titlesec}
%\usepackage{etoolbox}
% Set up \theinstructor to access parameters of \instructor
\newcommand{\theinstructor}[1]{\csname instructor@#1\endcsname}
\newcommand{\instructorname}[1]{\gdef\instructor@name{#1}} %Instructor name
\newcommand{\instructoremail}[1]{\gdef\instructor@email{#1}} %Instructor email
\newcommand{\instructoroffice}[1]{\gdef\instructor@office{#1}} %Instructor office location
\newcommand{\instructorofficehours}[1]{\gdef\instructor@officehours{#1}} %Instructor office hours
\newcommand{\instructorphone}[1]{\gdef\instructor@phone{#1}} %Instructor phone number
% Set up \thecourse to access parameters of \course
\newcommand{\thecourse}[1]{\csname course@#1\endcsname}
\newcommand{\coursename}[1]{\gdef\course@name{#1}} %Course title
\newcommand{\coursenum}[1]{\gdef\course@num{#1}} %Course number
\newcommand{\courseinst}[1]{\gdef\course@inst{#1}} %Course institution
\newcommand{\courseterm}[1]{\gdef\course@term{#1}} %Course term
\newcommand{\coursetime}[1]{\gdef\course@time{#1}} %Course meeting time
\newcommand{\courseroom}[1]{\gdef\course@room{#1}} %Course meeting room
% Set up \thequote to access parameters of \quote
\newcommand{\thequote}[1]{\csname quote@#1\endcsname}
\providetoggle{quote}
\newcommand{\quotebody}[1]{\toggletrue{quote} \gdef\quote@body{#1}} %Text of quote (optional!
\newcommand{\quoteattrib}[1]{\gdef\quote@attrib{#1}} %Attribution of quote
% Set up hyperref
%\hypersetup{pdfauthor=\theinstructor{name},pdftitle={\thecourse{name} syllabus},pdfpagelabels}
% Define section styling
\makechapterstyle{syllabus}{
\setsecheadstyle{\LARGE\scshape}
\setsubsecheadstyle{\Large\scshape\itshape}
}
\chapterstyle{syllabus}
\setlength{\droptitle}{-10eX}
% Define title header
\renewcommand{\@maketitle}{%
\newpage
\null
\vspace{\droptitle}
\begin{flushleft}
\textsc{\normalsize \thecourse{inst}} \\[\baselineskip]
\textbf{\Huge \thecourse{num}: \thecourse{name}} \\[\baselineskip]
{\large \theinstructor{name}} \\
{\footnotesize \url{\theinstructor{email}}} \\
{\footnotesize \theinstructor{phone}} \\
{\footnotesize Office: \theinstructor{office}. Office hours: \theinstructor{officehours}}. \\[\baselineskip]
{\footnotesize \thecourse{term}. \thecourse{room}.} \\
{\footnotesize \thecourse{time}.}
\end{flushleft}
\iftoggle{quote}{
\vskip .75in
\hfill
\begin{minipage}{.7\linewidth}
\footnotesize \itshape
\thequote{body} \\
\hfill ---\thequote{attrib} \\ \hrule
\end{minipage}
}{}
\vskip 0.3in
}
% Make \emph use boldface
\makeatletter
\DeclareRobustCommand{\em}{%
\@nomath\em \if b\expandafter\@car\f@series\@nil
\itshape \else \bfseries \fi}
\makeatother