-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlecture-template.tex
149 lines (129 loc) · 5.42 KB
/
lecture-template.tex
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
% [FILENAME]
% Author: [AUTHOR]
% Created: [DATE]
% Updated: [DATE]
% Description: [DESC]
% This part is used for https://github.com/hussein-esmail7/template-maker
% templateDescription: 2 - LaTeX School Course Lecture Notes Document
% This file can be found at https://github.com/hussein-esmail7/templates
% =========================== Variables ===========================
\def\myAuthor {[AUTHOR]} % Author of the show
\def\mySubject {[SUBJ]}
\def\myKeywords {[KEYWORDS]} % Separated by comma
\def\myCourseDateCreated {[DATE]}
\def\myCourseDateUpdated {\today}
\def\myCourseCredits {[COURSE-CREDITS]}
\def\myCourseCode {[COURSE-CODE]}
\def\myCourseTitle {[COURSE-TITLE]}
\def\myCourseProf {[COURSE-PROF]} % First Last only
\def\Prof {[PROF]} % First name only
\def\myCourseSemester {[COURSE-SEMESTER]} % Ex. 2019F
\def\myCourseSchedule {[COURSE-SCHEDULE]} % Ex. MWF 9:00
\def\myCourseSection {[COURSE-SECTION]} % Single letter
\def\myCourseLocation {[COURSE-LOCATION]}
\def\myTitle{\myCourseCode{} \myCourseCredits{}: \myCourseTitle{} \\ \myCourseSemester{} - \myCourseSchedule{}}
% =========================== Variables ===========================
% =========================== Shortcuts ===========================
\def\bg{backgroundcolor}
\def\len{\setlength}
\newcommand{\image}[1]{[\textbf{IMAGE MISSING #1}]} % #1 is the descriptor about the image
\newenvironment{itemize*}{\begin{itemize}\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}{\end{itemize}}
\newenvironment{enumerate*}{\begin{enumerate}\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}{\end{enumerate}}
\newenvironment{enumalph*}{\begin{enumerate}[label=\alph*.]\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}{\end{enumerate}}
\newenvironment{enumq*}{\begin{enumerate}[label=Q{{\arabic*}}.]\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}{\end{enumerate}}
\newcommand{\TODO}[1]{\todo[backgroundcolor=none, linecolor=red]{#1}}
\newcommand{\TODOimg}[1]{\todo[inline, \bg=gray]{\textbf{IMG}: #1}}
\newcommand{\TODOcontent}[1]{\todo[\bg=red, linecolor=red]{\textbf{CON}: #1}}
\newcommand{\TODOfig}[1]{\todo[inline, \bg=orange]{\textbf{FIG}: #1}}
% =========================== Shortcuts ===========================
\documentclass{article}
\title{\vspace{-3cm} \\ \myTitle}
\author{\myAuthor}
\date{\myCourseDateUpdated}
\usepackage[colorinlistoftodos]{todonotes} % Used for "to do" notes
\usepackage{amssymb} % Used for math symbols
\usepackage{comment} % Used for the 'comment' environment (multi-line)
\usepackage{enumitem} % Used for enumalpha environment
\usepackage{float} % Used for ``H'' flag in figure environment
\usepackage{graphicx} % Used for adding images
\usepackage{listings} % Used for blocks of code
\usepackage{longtable} % Used to format longtables properly
\usepackage{multirow}
\usepackage{xcolor}
\usepackage{hyperref} % Used for adding PDF metadata
\graphicspath{{./}} % Import images that are in the same folder as this .tex file
\hypersetup{
colorlinks=true,
urlcolor=blue, % URL colors (\href{}{})
linkcolor=black, % Table of Contents text color. Used for TOC body only
pdfborder={0 0 0},
pdftitle={\myTitle},
pdfauthor={\myAuthor},
pdfsubject={\mySubject},
pdfkeywords={\myKeywords}
}
\lstset{ % Coding block configuration
basicstyle=\ttfamily,
frame=single,
breaklines=true
}
% Prevent word hyphenation
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\begin{document} % Official beginning of the document.
\pagenumbering{roman} % Use roman numbers before content
\maketitle % Make title page
\tableofcontents % Makes TOC
\newpage
\listoffigures % Makes ``List of Figures''
\todototoc % Add "Todo list" to main TOC
\listoftodos % Show all todo notes (from todonotes package) as index
\hypersetup{linkcolor=blue} % Any links to other sections are now blue
\newpage % Insert a page break
\pagenumbering{arabic} % Brings the normal numbers back
\section{Introduction}
This PDF is the collection of my lecture notes for \myCourseCode{} that took
place during the \myCourseSemester{} semester. This was taught by
\myCourseProf{} for section \myCourseSection{}. This occurs on:
\myCourseSchedule{} at \myCourseLocation{}.
At the time of writing this document, all URLs in this document are correct.
Should you have any issues, please
\underline{\href{mailto:[email protected]}{feel free to send me an
email}}.
\section{How This Guide is Formatted}
This guide is made using \LaTeX{}, a typesetting document format, mainly used
for large documents like STEM documents, theses, and research papers. To read
more about what I think about \LaTeX{}, you
\href{https://husseinesmail.xyz/articles/is-latex-better.html}{can go here}.
% TODO: Lecture notes here
\begin{comment}
% Lecture template
\section{Lecture NUM: DATE}
\begin{itemize*}
\item NOTES HERE
\end{itemize*}
\end{comment}
\begin{comment}
% Tutorial template
\section{Tutorial NUM: DATE}
\begin{itemize*}
\item NOTES HERE
\end{itemize*}
\end{comment}
\begin{comment}
% Lab template
\section{Lab NUM: DATE}
\begin{itemize*}
\item NOTES HERE
\end{itemize*}
\end{comment}
\begin{comment}
TODO commands (using the todonotes package):
\TODO{} -> Normal
\TODOimg{} -> Insert image
\TODOcontent{} -> Insert more content here
\TODOfig{} -> Insert figure
\end{comment}
\end{document} % Official end of the document.