diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-15 22:14:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-15 22:14:11 +0000 |
commit | f0a1290fd778107825a2e6fb9efb37ffcc824f1e (patch) | |
tree | 5df3db52978a043b87bf9bfbc86c5e1d87322099 /Master/texmf-dist/tex | |
parent | 761416b406bc9791be798bf1808637ef6bb739f9 (diff) |
lectureslides (15mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58406 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty | 74 |
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.% +} |