logicalhacking-latex/lh-lecture/lh-lecture-presentation.sty

80 lines
2.0 KiB
TeX

%% Copyright (C) 2017 Achim D. Brucker, https://www.brucker.ch
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your opinion) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\RequirePackage{etoolbox}
\RequirePackage{graphicx}
\ProvidesPackage{lh-lecture-presentation}
[2017/02/08 v0.0 LaTeX style for lectures (add-on to lh-presentation)]
\newcommand{\lecturedate}[1]{\date{#1}}
\def\lh@lecture@length{}
\newcommand{\lecturelength}[1]{\gdef\lh@lecture@length{#1}}
\def\lh@lecture@description{}
\newcommand{\lecturedescription}[1]{\gdef\lh@lecture@description{#1}}
\newboolean{lh@lecture@bib}
\setboolean{lh@lecture@bib}{false}
\newboolean{lh@lecture@cloze}
\setboolean{lh@lecture@cloze}{false}
\newenvironment{lecturedesc}[7]{%
\lecturedate{#3}%
\lecture{#1}{#2}%
\lecturelength{#4}%
\part{#1}
\subtitle{#1}%
\ifx#5\@empty%
\else%
\titlevisual{#5}%
\fi
\setboolean{lh@lecture@bib}{#6}
\setboolean{lh@lecture@cloze}{#7}
\begin{frame}[plain]\maketitle\end{frame}
\begin{bibunit}[alpha]
}{
\section{Appendix}
\ThanksFrame
\ifthenelse{\boolean{lh@lecture@bib}}{%
\begin{frame}[allowframebreaks]
\frametitle{Bibliography}
\footnotesize
\putbib[adb-long,brucker,fmde]
\end{frame}}{}
\ifthenelse{\boolean{lh@lecture@cloze}}{%
\begin{frame}
\frametitle{Cloze Solutions}
\printendnotes
\end{frame}}{}
\end{bibunit}
}
\newcommand\appendtographicspath[1]{%
\gappto\Ginput@path{{#1}}%
}
\newcommand\prependtographicspath[1]{%
\gpreto\Ginput@path{{#1}}%
}
\newcommand{\includelecture}[2]{
\prependtographicspath{#1-#2/figures/}
\include{#1-#2/#2}
}
\endinput