diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-28 21:05:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-28 21:05:14 +0000 |
commit | ccfe55fbce1b088d74d031703078e087efffa483 (patch) | |
tree | 155427bfaa0fa04fbb56f373cdcc1530c01d1d85 /Master | |
parent | 47b11301be338c7faaf09e7a692102606959db1d (diff) |
lectureslides (28feb22)
git-svn-id: svn://tug.org/texlive/trunk@62292 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/lectureslides/README.md | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf | bin | 46715 -> 48424 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex | 51 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty | 50 |
4 files changed, 59 insertions, 52 deletions
diff --git a/Master/texmf-dist/doc/latex/lectureslides/README.md b/Master/texmf-dist/doc/latex/lectureslides/README.md index e61eba13b7d..81e5a141220 100644 --- a/Master/texmf-dist/doc/latex/lectureslides/README.md +++ b/Master/texmf-dist/doc/latex/lectureslides/README.md @@ -1,8 +1,8 @@ # The `lectureslides` Package -#### Version 0.1 +#### Version 1.0 Taihao Zhang (t@taihao.de) -15 March 2021 +1 March 2022 This package allows for easily combining and indexing individual PDFs into one large PDF. @@ -13,7 +13,11 @@ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. ____ Changes: - + +* 2022-03-01 / 1.0 + * Improve page range option + * Improve documentation + * Implement `ngerman` for footnote text * 2021-03-15 / 0.1 Initial release diff --git a/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf b/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf Binary files differindex ccc7d4e35b7..934c5e1b1e2 100644 --- a/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf +++ 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 index df1bc17d1d3..10e11d48c24 100644 --- a/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex +++ b/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex @@ -3,18 +3,18 @@ \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} +\title{The \texttt{\thispackage} Package\footnote{This document corresponds to \texttt{lectureslides} version 1.0 / 2022-03-01.}} +\author{Taihao Zhang\protect\\\ttfamily t@taihao.de} +\date{1st March 2022} \begin{document} \maketitle -% \section{Motivation} +% \subsection*{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} +\subsection*{Usage} In general, usage of \texttt{\thispackage} works as follows: \begin{verbatim} \documentclass{article} @@ -30,31 +30,40 @@ In general, usage of \texttt{\thispackage} works as follows: \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+. + \verb+\course[]{Engineering Mechanics}+. The optional argument specifies the footnote text, which otherwise defaults to \textbf{Compiled \textbackslash today}. This text adapts to an \verb+ngerman+ setting in babel.\footnote{This requires that this package is loaded after babel.} \end{macro} + \newpage \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+: + Two optional arguments can specify the range of slides that need to be included. For example, to include slides 10~--35 of \verb+intro.pdf+: \begin{verbatim} - \lecture{Introduction to EM}[10]{intro} + \lecture{Introduction to EM}[10][35]{intro} + \end{verbatim} + Either optional argument can be left empty. To include slides up to slide number 35: + \begin{verbatim} + \lecture{Introduction to EM}[][35]{intro} + \end{verbatim} + To include slides from slide number 10 til the end: + \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. + Prints a table of contents of all lectures. Each \verb+\lecture+ (and consequently \verb+\lecturetitle+) gets its own entry here. \verb+\tocline+ customises the appearance. \end{macro} -\section{Option} +\subsection*{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} +\subsection*{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} @@ -63,25 +72,15 @@ In general, usage of \texttt{\thispackage} works as follows: \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. + Inserts a set of slides from a given PDF. Optional arguments specify the range of slides to be included. \begin{verbatim} - \renewcommand{\createdby}[1]{% - Created by #1 on \today.% - } + \lectureslides[10][35]{pdf_file_name} \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. + Multiple \verb+\lectureslides+ can be stringed together to include slides from different PDFs. These will then all organised under the last preceding \verb+\lecturetitle+. \end{macro} - + \begin{macro}{\tocline} - Determines how the lecture title appears in the ToC. Putting the following in the preambled redefines this, for example: + Determines how the lecture title appears in the table of contents (ToC). Putting the following in the preamble redefines this, for example: \begin{verbatim} \renewcommand{\tocline}[1]{% Semana \arabic{section}: #1% diff --git a/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty b/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty index 8c9cfc4899f..3bfff0dedb9 100644 --- a/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty +++ b/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty @@ -1,10 +1,10 @@ % % lectureslides -% version 0.1 -% 2021/03/15 +% version 1.0 +% 2022/03/01 % % Taihao Zhang (taihao.de) -% 15 March, 2021 +% 1 March, 2022 % % 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/ @@ -16,14 +16,14 @@ \newcommand{\thispackage}{lectureslides} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{\thispackage}[2021/03/14 \thispackage] +\ProvidesPackage{\thispackage}[2022/03/01 \thispackage] \RequirePackage{xparse} \RequirePackage{pdfpages - % , parskip , tocloft - % , tikz - , hyperref} + , hyperref + , babel +} \renewcommand{\cftdot}{} \renewcommand{\cftsecfont}{\mdseries} \renewcommand{\cftsecafterpnum}{\vspace{-3.25mm}} @@ -37,14 +37,23 @@ \DeclareOption*{\PackageWarning{\thispackage}{Unknown option ‘\CurrentOption’}} \ProcessOptions\relax -\newcommand{\createdby}[1]{Zusammengestellt von #1 am \today.} +\newcommand{\createdAt}[1]{Compiled \today.} \NewDocumentCommand{\course}{o m}{% {% \noindent\LARGE\bfseries\sffamily #2% - \IfNoValueTF{#1}% - {}% - {\footnote{\createdby{#1}}}% + \footnote{ + \IfNoValueTF{#1}% + { + % No optional argument passed + \iflanguage{ngerman}{ + Zusammengestellt am \today. + }{ + Compiled \today. + } + }% + {#1}% + }% \par% }% } @@ -57,18 +66,13 @@ \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}% +\NewDocumentCommand{\lectureslides}{o o m}{% + \includepdf[pages=#1-#2 \orientation]{#3} + % \IfNoValueTF{#1}% + % {\includepdf[pages=- \orientation]{#2}}% + % {\includepdf[pages=-#1 \orientation]{#2}}% } -\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.% +\NewDocumentCommand{\lecture}{m o o m}{% + \lecturetitle{#1}\lectureslides[#2][#3]{#4}% } |