summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty74
1 files changed, 74 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty b/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty
new file mode 100644
index 00000000000..8c9cfc4899f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty
@@ -0,0 +1,74 @@
+%
+% lectureslides
+% version 0.1
+% 2021/03/15
+%
+% Taihao Zhang (taihao.de)
+% 15 March, 2021
+%
+% This work is licensed under the Creative Commons Attribution 4.0 International License.
+% To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/
+% or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+%
+% For contribution or suggestions, please contact me at t@taihao.de
+%
+
+\newcommand{\thispackage}{lectureslides}
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{\thispackage}[2021/03/14 \thispackage]
+
+\RequirePackage{xparse}
+\RequirePackage{pdfpages
+ % , parskip
+ , tocloft
+ % , tikz
+ , hyperref}
+\renewcommand{\cftdot}{}
+\renewcommand{\cftsecfont}{\mdseries}
+\renewcommand{\cftsecafterpnum}{\vspace{-3.25mm}}
+
+% Not really a variable meant to be changed, leaving it in for now
+\newcommand*{\toclevel}{section}
+
+\newcommand{\orientation}{, landscape}
+\DeclareOption{portrait}{\renewcommand{\orientation}{}}
+\DeclareOption{landscape}{\renewcommand{\orientation}{, landscape}}
+\DeclareOption*{\PackageWarning{\thispackage}{Unknown option ‘\CurrentOption’}}
+\ProcessOptions\relax
+
+\newcommand{\createdby}[1]{Zusammengestellt von #1 am \today.}
+
+\NewDocumentCommand{\course}{o m}{%
+ {%
+ \noindent\LARGE\bfseries\sffamily #2%
+ \IfNoValueTF{#1}%
+ {}%
+ {\footnote{\createdby{#1}}}%
+ \par%
+ }%
+}
+
+\newcommand{\tocline}[1]{\arabic{\toclevel}.~#1}
+
+\newcommand*{\lecturetitle}[1]{%
+ \addtocounter{\toclevel}{1}%
+ \newpage\phantomsection%
+ \addcontentsline{toc}{\toclevel}{\tocline{#1}}%
+}
+
+\NewDocumentCommand{\lectureslides}{o m}{%
+ \IfNoValueTF{#1}%
+ {\includepdf[pages=- \orientation]{#2}}%
+ {\includepdf[pages=-#1 \orientation]{#2}}%
+}
+
+\NewDocumentCommand{\lecture}{m o m}{%
+ \lecturetitle{#1}\lectureslides[#2]{#3}%
+}
+
+\newcommand{\infotext}{%
+Diese PDF mit Inhaltsverzeichnis und PDF-Kapiteln wurde erstellt, um ein einfacheres Lernen zu ermöglichen indem alle Folien übersichtlich an einem Ort organisiert sind.%
+\par%
+In geeigneten PDF-Readern wird ein Navigationsbereich angezeigt, sodass einfach zwischen den Kapiteln gewechselt werden kann. Alternativ sind die Überschriften im Inhaltsverzeichnis auch anklickbar.%
+}