Debian Codegraph @

texmf-dist/source/lualatex/semesterplanner/semesterplanner.dtx

raw
1 % \iffalse meta-comment%% Copyright (C) 2020 by Niklas Schneider
2 % -----------------------------------
3 %
4 % This file may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either version 1.3
6 % of this license or (at your option) any later version.
7 % The latest version of this license is in:
8 %
9 % http://www.latex-project.org/lppl.txt
10 %
11 % and version 1.3 or later is part of all distributions of LaTeX% version 2005/12/01 or later.
12 %
13 % \fi
14 %
15 % \iffalse
16 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
17 %<package>\ProvidesPackage{semesterplanner}
18 %<package> [2020/11/02v1.0 Creates beautiful semester timetables and more.]
19 %
20 %<*driver>\documentclass{ltxdoc}\usepackage{semesterplanner}\EnableCrossrefs\CodelineIndex\RecordChanges\begin{document}\DocInput{semesterplanner.dtx}\end{document}
21 %</driver>
22 % \fi
23 %
24 % \CheckSum{0}
25 %
26 % \CharacterTable
27 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
28 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
29 % Digits \0\1\2\3\4\5\6\7\8\9
30 % Exclamation \! Double quote \" Hash (number) \#
31 % Dollar \$ Percent \
32 % Ampersand \&
33 % Acute accent \’ Left paren \( Right paren \)
34 % Asterisk \* Plus \+ Comma \,
35 % Minus \- Point \. Solidus \/
36 % Colon \: Semicolon \; Less than \<
37 % Equals \= Greater than \> Question mark \?
38 % Commercial at \@ Left bracket \[ Backslash \\
39 % Right bracket \] Circumflex \^ Underscore \_
40 % Grave accent \‘ Left brace \{ Vertical bar \|
41 % Right brace \} Tilde \~}
42 %
43 %
44 % \changes{v1.0}{2020/11/02〉}{Initial version}
45 %
46 % \GetFileInfo{semesterplanner.sty}
47 %
48 % \DoNotIndex{}
49 %
50 % Required Packages.
51 \RequirePackage{fontawesome}
52 \RequirePackage{color}
53 \RequirePackage{schedule}
54 \RequirePackage{tikz}
55 \usetikzlibrary{shapes}
56
57 % Command to encircle the fa-icons with white, so that they are recognizable on colored ground.
58 \newcommand*{\encircle}[1]{
59 \begin{minipage}[b][1em][c]{1.5em}
60 \begin{tikzpicture}
61 \node[fill,circle,inner sep=1pt, color = white] {#1};
62 \end{tikzpicture}
63 \end{minipage}
64 }
65
66 % Color for the platform symbols.
67 \definecolor{dodgerblue}{rgb}{0.12, 0.56, 1.0}
68
69 % Colors for the course types.
70 \definecolor{seminar}{rgb}{1.0, 0.8, 0.0}
71 \definecolor{lecture}{rgb}{0.2, 0.7, 1.0}
72 \definecolor{tutorial}{rgb}{0.0, 0.8, 0.0}
73 \definecolor{meeting}{rgb}{0.8, 0.0, 0.0}
74 \definecolor{officehour}{rgb}{0.0, 0.4, 0.6}
75
76 % The different course types.
77 \NewAppointment{emeeting}{meeting}{white}
78 \NewAppointment{electure}{lecture}{white}
79 \NewAppointment{etutorial}{tutorial}{white}
80 \NewAppointment{eseminar}{seminar}{white}
81 \NewAppointment{eofficehour}{officehour}{white}
82
83 % Commands to create a new entry in the timetable using the aboev types.
84 \newcommand{\lecture}[6]{\electure{\textbf{#1}}{
85 \vspace*{-2.5em}
86 \begin{flushleft}
87 {#2}\\\vspace*{0.75em}{#6}{#3}
88 \end{flushleft}}
89 {#4}{#5}}
90 \newcommand{\tutorial}[6]{\etutorial{\textbf{#1}}{
91 \vspace*{-2.5em}
92 \begin{flushleft}
93 {#2}\\\vspace*{0.75em}{#6}{#3}
94 \end{flushleft}}
95 {#4}{#5}}
96 \newcommand{\meeting}[6]{\emeeting{\textbf{#1}}{
97 \vspace*{-2.5em}
98 \begin{flushleft}
99 {#2}\\\vspace*{0.75em}{#6}{#3}
100 \end{flushleft}}
101 {#4}{#5}}
102 \newcommand{\seminar}[6]{\eseminar{\textbf{#1}}{
103 \vspace*{-2.5em}
104 \begin{flushleft}
105 {#2}\\\vspace*{0.75em}{#6}{#3}
106 \end{flushleft}}
107 {#4}{#5}}
108 \newcommand{\officehour}[6]{\eofficehour{\textbf{#1}}{
109 \vspace*{-2.5em}
110 \begin{flushleft}
111 {#2}\\\vspace*{0.75em}{#6}{#3}
112 \end{flushleft}}
113 {#4}{#5}}
114
115 % Commands for entries in the three environments. They are a line of a table.
116 \newcommand{\appointment}[6]{\textit{#1}&{#2}&{#3}&{#4}&{#5}&{#6}\\}
117 \newcommand{\exam}[4]{\textit{#1}&{#2}&{#3}&{#4}\\}
118 \newcommand{\deadline}[4]{\textit{#1}&{#2}&{#3}&{#4}\\}
119
120 % Commands for symbols of priority
121 \newcommand{\pmandatory}{\encircle{\textcolor{red}{\faWarning}}}
122 \newcommand{\phigh}{\encircle{\textcolor{red}{\faFlag}}}
123 \newcommand{\pmid}{\encircle{\textcolor{yellow}{\faFlag}}}
124 \newcommand{\plow}{\encircle{\textcolor{green}{\faFlag}}}
125 \newcommand{\pnone}{\encircle{\textcolor{gray}{\faTimesCircle}}}
126
127 % Commands for exam types.
128 \newcommand{\oral}{\faComment}
129 \newcommand{\written}{\faPencil}
130
131 % Commands for online platforms.
132 \newcommand{\teams}{\encircle{\textcolor{dodgerblue}{\faWindows}}}
133 \newcommand{\zoom}{\encircle{\textcolor{dodgerblue}{\faCamera}}}
134 \newcommand{\youtube}{\encircle{\textcolor{red}{\faYoutubePlay}}}
135
136 % Command for "To be determined" and "To be Announced"
137 \newcommand{\tbd}{\faQuestion}
138 \newcommand{\tba}{\faBullhorn}
139
140 % Command for adding legends to timetable
141 \newcommand{\ttlegend}[2]{{\footnotesize\textcolor{#1}{\faSquare}}&{\footnotesize {#2}}\\}
142
143 % Environment for the timetable using schedule. Configuration is hardcoded.
144 \newenvironment{timetable}
145 {
146 \section*{\faClockO~Timetable}
147 \vspace*{-2em}
148 \CellHeight{1.3cm}
149 \CellWidth{1in}
150 \TimeRange{08:00-18:00}
151 \SubUnits{60}
152 \BeginOn{Monday}
153 \TextSize{\tiny}
154 \FiveDay
155 \TwentyFourHour
156
157 \begin{schedule}
158
159 }
160 {
161 \end{schedule}
162 \vspace*{-1em}
163 }
164
165 % Environment for appointment list. Use appointment command to add one.
166 % Argument is for caption of the "room" column.
167 \newenvironment{appointments}[1][Room]
168 {
169 \section*{\faCalendar~Appointments}
170 \begin{tabular}{llllll}
171 \textbf{Date}&\textbf{Time}&\textbf{Course}&\textbf{Description}&\textbf{{#1}}&\textbf{Prio.}\\
172 }
173 {\end{tabular}
174 }
175
176 % Environment for deadline list. Use dealine command to add one.
177 \newenvironment{deadlines}
178 {
179 \section*{\faBomb~Deadlines}
180 \begin{tabular}{llll}
181 \textbf{Date}&\textbf{Course}&\textbf{Description}&\textbf{Prio.}\\
182 }
183 {\end{tabular}
184 }
185
186 % Environment for exam list. Use exam command to add one.
187 \newenvironment{exams}
188 {
189 \section*{\faStickyNoteO~Exams}
190 \begin{tabular}{llll}
191 \textbf{Date}&\textbf{Time}&\textbf{Course}&\textbf{Type}\\
192 }
193 {\end{tabular}
194 }
195
196 % Environment for timetable legend. Use \ttlabel command.
197 \newenvironment{legend}
198 {
199 \begin{center}
200 \begin{tabular}{ll}
201 }
202 {
203 \end{tabular}
204 \end{center}
205 }
206 \endinput
207 % \Finale