texlive[62292] Master/texmf-dist: lectureslides (28feb22)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 28 22:05:14 CET 2022


Revision: 62292
          http://tug.org/svn/texlive?view=revision&revision=62292
Author:   karl
Date:     2022-02-28 22:05:14 +0100 (Mon, 28 Feb 2022)
Log Message:
-----------
lectureslides (28feb22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/lectureslides/README.md
    trunk/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf
    trunk/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex
    trunk/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty

Modified: trunk/Master/texmf-dist/doc/latex/lectureslides/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lectureslides/README.md	2022-02-28 21:04:59 UTC (rev 62291)
+++ trunk/Master/texmf-dist/doc/latex/lectureslides/README.md	2022-02-28 21:05:14 UTC (rev 62292)
@@ -1,8 +1,8 @@
 # The `lectureslides` Package
-#### Version 0.1
+#### Version 1.0
 
 Taihao Zhang (t at 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 @@
 ____
 
 Changes:
-    
+
+* 2022-03-01 / 1.0 
+  * Improve page range option
+  * Improve documentation
+  * Implement `ngerman` for footnote text
 * 2021-03-15 / 0.1
     Initial release
     

Modified: trunk/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex	2022-02-28 21:04:59 UTC (rev 62291)
+++ trunk/Master/texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex	2022-02-28 21:05:14 UTC (rev 62292)
@@ -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 at 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 at 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 @@
 
     \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 @@
         \end{macro}
         
     \begin{macro}{\lectureslides}
-        Inserts a set of slides from a given PDF. Optional argument specifies the last slide to be included.
+        Inserts a set of slides from a given PDF. Optional arguments specify the range of slides to be included.
         \begin{verbatim}
-        \lectureslides[10]{pdf_file_name}
+        \lectureslides[10][35]{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+.
+        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}{\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:
+        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%

Modified: trunk/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty	2022-02-28 21:04:59 UTC (rev 62291)
+++ trunk/Master/texmf-dist/tex/latex/lectureslides/lectureslides.sty	2022-02-28 21:05:14 UTC (rev 62292)
@@ -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{\lectureslides}{o o m}{%
+    \includepdf[pages=#1-#2 \orientation]{#3}
+    % \IfNoValueTF{#1}%
+    % {\includepdf[pages=- \orientation]{#2}}%
+    % {\includepdf[pages=-#1 \orientation]{#2}}%
 }
 
-\NewDocumentCommand{\lecture}{m o m}{%
-    \lecturetitle{#1}\lectureslides[#2]{#3}%
+\NewDocumentCommand{\lecture}{m o o m}{%
+    \lecturetitle{#1}\lectureslides[#2][#3]{#4}%
 }
-
-\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.%
-}



More information about the tex-live-commits mailing list.