1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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}
|