diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/lectureslides/README.md | 26 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf | bin | 0 -> 46715 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex | 92 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty | 74 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 3 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/lectureslides.tlpsrc | 0 |
7 files changed, 195 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/lectureslides/README.md b/Master/texmf-dist/doc/latex/lectureslides/README.md new file mode 100644 index 00000000000..e61eba13b7d --- /dev/null +++ b/Master/texmf-dist/doc/latex/lectureslides/README.md @@ -0,0 +1,26 @@ +# The `lectureslides` Package +#### Version 0.1 + +Taihao Zhang (t@taihao.de) +15 March 2021 + +This package allows for easily combining and indexing individual PDFs into one large PDF. + +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. + +____ + +Changes: + +* 2021-03-15 / 0.1 + Initial release + +____ + +This work consists of the files +* README.md (this file) +* lectureslides.sty +* lectureslides-doc.tex +* lectureslides-doc.pdf (derived from lectureslides-doc.tex) diff --git a/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf b/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf Binary files differnew file mode 100644 index 00000000000..ccc7d4e35b7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf diff --git a/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex b/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex new file mode 100644 index 00000000000..df1bc17d1d3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex @@ -0,0 +1,92 @@ +\PassOptionsToClass{a4paper, 12pt}{article} +\documentclass{ltxdoc} +\usepackage[british]{babel} +\usepackage[babel]{microtype} +\newcommand{\thispackage}{lectureslides} +\title{The \texttt{\thispackage} Package\footnote{This document corresponds to \texttt{lectureslides} version 0.1 / 2021-03-15.}} +\author{Taihao Zhang\thanks{Technische Universität Darmstadt, t@taihao.de}} +\date{15 March 2021} +\begin{document} +\maketitle + +% \section{Motivation} + When studying, there frequently occurs the situation where one uses \texttt{Ctrl\,+\,F} many times to search for a keyword in all the lecture slides. Throughout an entire semester, there can be a large number of PDFs that would need to be searched. + \par + This package allows for easily combining individual PDFs into a large one, indexing each with a title that PDF viewers can display. \verb+lectureslides+ also provides a table of contents. + +\section{Usage} +In general, usage of \texttt{\thispackage} works as follows: +\begin{verbatim} + \documentclass{article} + \usepackage{lectureslides} + \begin{document} + \course{Engineering Mechanics} + \tableofcontents + + \lecture{Introduction to EM}{intro} + \lecture{Centre of gravity}{centre} + \end{document} +\end{verbatim} + + \begin{macro}{\course} + Acts as the title on the cover page, used in the form \newline + \verb+\course[]{Engineering Mechanics}+. The optional argument specifies the person compiling the document, which will be typeset as a footnote alongside the current date. For instructions on changing that footnote, see \verb+\createdby+. + \end{macro} + + \begin{macro}{\lecture} + Inserts one set of lecture slides. This command takes two mandatory arguments in the following form: + \begin{verbatim} + \lecture{Title of this lecture}{pdf_file_name} + \end{verbatim} + An optional argument can specify the last slide that needs to be included. For example, to include slides 1~--10 of \verb+intro.pdf+: + \begin{verbatim} + \lecture{Introduction to EM}[10]{intro} + \end{verbatim} + Internally, this command calls \verb+\lecturetitle+ and \verb+\lectureslides+. + \end{macro} + + \begin{macro}{\tableofcontents} + Prints a table of contents of all lectures. Each \verb+\lecture+ and \verb+\lecturetitle+ gets its own entry here. \verb+\tocline+ customises the appearance. + \end{macro} + +\section{Option} + \DescribeMacro{landscape} + \DescribeMacro{portrait} + \verb+landscape+ is the default orientation if no option is passed, as lecture slides are most often given out in this format. \verb+portrait+ can be used instead to insert slides in portrait orientation. + +\section{Advanced} + \begin{macro}{\lecturetitle} + Declares a new set of slides, but doesn't insert any PDF pages yet. When followed by \verb+\lectureslides+, an actual entry in the table of contents gets created. + \begin{verbatim} + \lecturetitle{Title of this lecture} + \end{verbatim} + \end{macro} + + \begin{macro}{\lectureslides} + Inserts a set of slides from a given PDF. Optional argument specifies the last slide to be included. + \begin{verbatim} + \lectureslides[10]{pdf_file_name} + \end{verbatim} + Multiple \verb+\lectureslides+ can be stringed together to include slides from different PDFs which are all organised under the same \verb+\lecturetitle+. + \end{macro} + + \begin{macro}{\createdby} + Determines the sentence in the footnote, which is initiated by the optional argument of \verb+\course+. Putting the following in the preamble redefines the sentence, to fit the desired language for example. + \begin{verbatim} + \renewcommand{\createdby}[1]{% + Created by #1 on \today.% + } + \end{verbatim} + \verb+\renewcommand{\createdby}{Created in March 2021.}+ for example gets rid of the name entirely. Note that some kind of non-empty argument is still needed in \verb+\course[]{}+ so the footnote gets printed at all. + \end{macro} + + \begin{macro}{\tocline} + Determines how the lecture title appears in the ToC. Putting the following in the preambled redefines this, for example: + \begin{verbatim} + \renewcommand{\tocline}[1]{% + Semana \arabic{section}: #1% + } + \end{verbatim} + Alternatively, \verb+\renewcommand{\tocline}[1]{#1}+ omits the numbering, putting only the title in the ToC. + \end{macro} +\end{document}
\ No newline at end of file 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.% +} diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 9a5720511b3..52a16bfee1b 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -447,7 +447,8 @@ my @TLP_working = qw( latexmk latexmp latexpand latino-sine-flexione lato layaureo layouts lazylist lccaps lcd lcg lcyw leading leadsheets leaflet - lecturer lectures ledmac leftidx leftindex leipzig lengthconvert + lecturer lectures lectureslides + ledmac leftidx leftindex leipzig lengthconvert letltxmacro letterspacing letterswitharrows lettre lettrine levy lewis lexend lexikon lexref lfb lgreek lh lhcyr lhelp diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index dbc5e8570f9..83220450820 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -688,6 +688,7 @@ depend lcg depend leading depend leaflet depend lectures +depend lectureslides depend leftidx depend leftindex depend leipzig diff --git a/Master/tlpkg/tlpsrc/lectureslides.tlpsrc b/Master/tlpkg/tlpsrc/lectureslides.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/lectureslides.tlpsrc |