Debian Codegraph @

texmf-dist/doc/latex/lectureslides/lectureslides-doc.tex

raw
1 \PassOptionsToClass{a4paper, 12pt}{article}
2 \documentclass{ltxdoc}
3 \usepackage[british]{babel}
4 \usepackage[babel]{microtype}
5 \newcommand{\thispackage}{lectureslides}
6 \title{The \texttt{\thispackage} Package\footnote{This document corresponds to \texttt{lectureslides} version 1.0 / 2022-03-01.}}
7 \author{Taihao Zhang\protect\\\ttfamily [email protected]}
8 \date{1st March 2022}
9 \begin{document}
10 \maketitle
11
12 % \subsection*{Motivation}
13 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.
14 \par
15 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.
16
17 \subsection*{Usage}
18 In general, usage of \texttt{\thispackage} works as follows:
19 \begin{verbatim}
20 \documentclass{article}
21 \usepackage{lectureslides}
22 \begin{document}
23 \course{Engineering Mechanics}
24 \tableofcontents
25
26 \lecture{Introduction to EM}{intro}
27 \lecture{Centre of gravity}{centre}
28 \end{document}
29 \end{verbatim}
30
31 \begin{macro}{\course}
32 Acts as the title on the cover page, used in the form \newline
33 \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.}
34 \end{macro}
35
36 \newpage
37 \begin{macro}{\lecture}
38 Inserts one set of lecture slides. This command takes two mandatory arguments in the following form:
39 \begin{verbatim}
40 \lecture{Title of this lecture}{pdf_file_name}
41 \end{verbatim}
42 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+:
43 \begin{verbatim}
44 \lecture{Introduction to EM}[10][35]{intro}
45 \end{verbatim}
46 Either optional argument can be left empty. To include slides up to slide number 35:
47 \begin{verbatim}
48 \lecture{Introduction to EM}[][35]{intro}
49 \end{verbatim}
50 To include slides from slide number 10 til the end:
51 \begin{verbatim}
52 \lecture{Introduction to EM}[10][]{intro}
53 \end{verbatim}
54 Internally, this command calls \verb+\lecturetitle+ and \verb+\lectureslides+.
55 \end{macro}
56
57 \begin{macro}{\tableofcontents}
58 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.
59 \end{macro}
60
61 \subsection*{Option}
62 \DescribeMacro{landscape}
63 \DescribeMacro{portrait}
64 \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.
65
66 \subsection*{Advanced}
67 \begin{macro}{\lecturetitle}
68 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.
69 \begin{verbatim}
70 \lecturetitle{Title of this lecture}
71 \end{verbatim}
72 \end{macro}
73
74 \begin{macro}{\lectureslides}
75 Inserts a set of slides from a given PDF. Optional arguments specify the range of slides to be included.
76 \begin{verbatim}
77 \lectureslides[10][35]{pdf_file_name}
78 \end{verbatim}
79 Multiple \verb+\lectureslides+ can be stringed together to include slides from different PDFs. These will then all organised under the last preceding \verb+\lecturetitle+.
80 \end{macro}
81
82 \begin{macro}{\tocline}
83 Determines how the lecture title appears in the table of contents (ToC). Putting the following in the preamble redefines this, for example:
84 \begin{verbatim}
85 \renewcommand{\tocline}[1]{%
86 Semana \arabic{section}: #1%
87 }
88 \end{verbatim}
89 Alternatively, \verb+\renewcommand{\tocline}[1]{#1}+ omits the numbering, putting only the title in the ToC.
90 \end{macro}
91 \end{document}