Debian Codegraph @

texmf-dist/doc/latex/pdfannotations/3.1.README.tex

raw
1 \documentclass{article}
2 \usepackage{hyperref}
3 \usepackage{geometry}
4 \usepackage{enumitem}
5 \geometry{margin=1in}
6
7 \title{README FOR pdfannotations PACKAGE}
8 \date{Version: 3.1\\Date: 2023-11-22}
9 \author{}
10
11 \begin{document}
12 \maketitle
13
14 \section*{Overview}
15 pdfannotations is a \LaTeX{} package designed for annotating PDF slides with \LaTeX{} elements, adding interludes, and including code snippets. In its latest version, the package has been enhanced with improved error handling and debug logging for more robust and informative user interaction. It offers a flexible way to enhance PDF presentation slides with additional \LaTeX{} content. The package utilizes \LaTeX3 syntax and requires the pdf\LaTeX{} compiler.
16
17 \section*{Features and Usage}
18 The pdfannotations package includes the following commands and environments:
19 \begin{enumerate}
20 \item \textbf{slideannotate:}
21 \begin{itemize}
22 \item Syntax: \texttt{\textbackslash begin\{slideannotate\}\{PDF Number-Slide Number\} ... \textbackslash end\{slideannotate\}}
23 \item Allows annotations directly onto PDF slides.
24 \item Supports math and \LaTeX{} markup.
25 \item Limitation: Content does not extend to multiple pages.
26 \end{itemize}
27 \item \textbf{slideinterlude:}
28 \begin{itemize}
29 \item Syntax: \texttt{\textbackslash begin\{slideinterlude\}\{PDF Number-Slide Number\} ... \textbackslash end\{slideinterlude\}}
30 \item Inserts interludes between slides for additional content.
31 \item Supports math, \LaTeX{} markup, and programming code.
32 \item For short code snippets, \texttt{\{verbatim\}} can be used.
33 \end{itemize}
34 \item \textbf{\textbackslash annotatepdf:}
35 \begin{itemize}
36 \item Syntax: \texttt{\textbackslash annotatepdf\{PDF Number\}}
37 \item Invokes the annotation process for a specified PDF.
38 \end{itemize}
39 \item \textbf{\textbackslash labelgraphics:}
40 \begin{itemize}
41 \item Syntax: \texttt{\textbackslash labelgraphics[options]\{filename\}}
42 \item Includes graphics with filename labels.
43 \end{itemize}
44 \item \textbf{\textbackslash suppressslide:}
45 \begin{itemize}
46 \item Syntax: \texttt{\textbackslash suppressslide\{PDF Number-Slide Number\}}
47 \item Suppresses specific slides.
48 \end{itemize}
49 \item \textbf{\textbackslash includecode:}
50 \begin{itemize}
51 \item Syntax: \texttt{\textbackslash includecode[options]\{filename\}}
52 \item Includes external code with syntax highlighting.
53 \item Auto-detects language formatting by file extension.
54 \item \texttt{\{verbatim\}} recommended for short snippets within \texttt{\{slideinterlude\}}.
55 \end{itemize}
56 \item \textbf{\textbackslash listpdfs:}
57 \begin{itemize}
58 \item Lists all PDFs and their index numbers as specified in the user configuration.
59 \end{itemize}
60 \end{enumerate}
61
62 \section*{User Configuration}
63 Customize document metadata and settings by modifying the variables in the user configuration section at the top of the package code.
64
65 Here are the descriptions for each part of the user configuration section of your script:
66 \begin{itemize}
67 \item \texttt{\textbackslash newcommand\{\textbackslash MyTitle\}\{...\}}: Defines the document's title.
68 \item \texttt{\textbackslash newcommand\{\textbackslash MyAuthor\}\{...\}}: Sets the author's name for the document.
69 \item \texttt{\textbackslash newcommand\{\textbackslash MyDate\}\{...\}}: Defines the date associated with the document.
70 \item \texttt{\textbackslash newcommand\{\textbackslash FirstSectionName\}\{...\}}: Sets the name of the first section or chapter.
71 \item \texttt{\textbackslash newcommand\{\textbackslash PDFMaxWidth\}\{0.80\textbackslash textwidth\}}: Specifies the maximum width for included PDF pages.
72 \item \texttt{\textbackslash newcommand\{\textbackslash MaxInterludes\}\{20\}}
73
74 : Sets the maximum number of interludes allowed in the document.
75 \item \texttt{\textbackslash newcommand\{\textbackslash PDFList\}\{"Career.pdf"\}}: Creates a list of PDF files to be used in the document.
76 \end{itemize}
77
78 \section*{System Requirements}
79 \begin{itemize}
80 \item \LaTeX3 syntax.
81 \item pdf\LaTeX{} compiler.
82 \end{itemize}
83
84 \section*{Successfully Tested With Packages}
85 \begin{itemize}
86 \item \texttt{mathtools} - Enhances mathematical content presentation and formatting.
87 \item \texttt{cancel} - Allows simple cancellation lines in math formulas.
88 \item \texttt{booktabs} - For professional-looking tables.
89 \item \texttt{array} - Extends options for table column formats.
90 \item \texttt{longtable} - For creating multi-page tables.
91 \item \texttt{mathrsfs} - Provides mathematical script font.
92 \item \texttt{scrlayer-scrpage} - For creating and managing headers and footers.
93 \item \texttt{xcolor} - For driver-independent use of color.
94 \item \texttt{listings} - For formatting source code listings.
95 \item \texttt{seqsplit} - For splitting long sequences of characters.
96 \item \texttt{enumitem} - For customizing layout of lists.
97 \item \texttt{adjustbox} - For dynamic sizing of content.
98 \end{itemize}
99
100 \section*{Minimal Example}
101 \begin{verbatim}
102 \documentclass{article}
103 \usepackage{pdfannotations}
104
105 % Start of User configuration section
106 % -----------------------------------
107
108 % Document metadata
109 \newcommand{\MyTitle}{UCSanDiegoX Probability and Statistics in Data Science using Python: Topic 3: Counting}
110 \newcommand{\MyAuthor}{Chevan Nanayakkara}
111 \newcommand{\MyDate}{November 2023}
112 \newcommand{\FirstSectionName}{Lecture Notes: Topic 3 Counting}
113
114 % User variables
115 \newcommand{\PDFMaxWidth}{0.80\textwidth}
116 \newcommand{\MaxInterludes}{20}
117 \newcommand{\PDFList}{"Career.pdf"}
118
119 % Variable Documentation:
120 % PDFMaxWidth: a user-configurable command in LaTeX that sets a global
121 % PDFMaxWidth: maximum width for included PDF documents, ensuring they are scaled
122 % PDFMaxWidth: appropriately to fit within the specified width of the text area.
123 % PDFMaxWidth: This command is particularly useful for consistently resizing
124 % PDFMaxWidth: larger PDF pages to maintain a uniform and visually appealing
125 % PDFMaxWidth: layout in the document.
126
127 % MaxInterludes: Define the maximum number of interludes
128
129 % PDFList: User-defined list of PDFs
130 % PDFList: Ensure there are no spaces between the commas and each filename
131 % PDFList: Ensure each filename ends in .pdf
132 % PDFList: An empty string {""} is not supported and the document will not compile
133 % PDFList: No string is supported {}
134
135 % Define expandable commands for title, author, and date to use in headers/footers
136 \NewExpandableDocumentCommand{\thetitle}{}{\MyTitle}
137 \NewExpandableDocumentCommand{\theauthor}{}{\MyAuthor}
138 \NewExpandableDocumentCommand{\thedate}{}{\MyDate}
139
140 % --------------------------
141 % End of User configuration section
142
143 \begin{document}
144
145 \begin{slideannotate}{1-2}
146 Annotation for slide 2 of the first PDF.
147 \end{slideannotate}
148
149 \begin{slideinterlude}{1-3}
150 Interlude with \LaTeX{} markup and math like \( E = mc^2 \).
151 \includecode{example.py}
152 \end{slideinterlude}
153
154 \annotatepdf{1}
155 \listpdfs
156
157 \end{document}
158 \end{verbatim}
159 (Replace "example.py" with a real file path.)
160
161 \subsection*{GitHub Repository}
162 \url{https://github.com/chevannanayakkara/pdfannotations}
163
164 \subsection*{License}
165 Free with no warranty under the LaTeX Project Public License (LPPL) version 1.3c.
166
167 \section*{Changelog}
168
169 \begin{itemize}
170 \item \textbf{Version 3.1 (2023-11-22):}
171 \begin{itemize}
172 \item Introduced `PDFMaxWidth` for dynamic scaling of included PDF documents.
173 \end{itemize}
174
175 \item \textbf{Version 3.0 (2023-11-21):}
176 \begin{itemize}
177 \item Improved error trapping and messages for empty or malformed PDF List.
178 \item Provided verbose messages in the document for out of bounds indexes for \texttt{\textbackslash annotatepdf} and \texttt{\textbackslash listpdfs}.
179 \item Added detailed debug log information, search for "PDFAnnotations".
180 \end{itemize}
181
182 \item \textbf{Version 2.4.1 (2023-11-15):}
183 \begin{itemize}
184 \item Added new command \texttt{\textbackslash listpdfs} that shows all PDFs and their index number for use with the \texttt{\textbackslash annotatepdf} command.
185 \end{itemize}
186
187 \item \textbf{Version 2.3 (2023-11-10):}
188 \begin{itemize}
189 \item Brought all user-specified variables to the top of the preamble for easier customization.
190 \item Added \texttt{\textbackslash listpdfs} command to list all PDFs and their index numbers.
191 \end{itemize}
192
193 \item \textbf{Version 2.2.3 (2023-11-08):}
194 \begin{itemize}
195 \item Added packages booktabs and longtable for table environment support.
196 \item Reformatted the entire document for improved readability and structure.
197 \end{itemize}
198
199 \item \textbf{Version 2.2.2 (2023-11-07):}
200 \begin{itemize}
201 \item Removed the changelog from the code to be included in the README file instead.
202 \end{itemize}
203
204 \item \textbf{Version 2.2.1 (2023-11-06):}
205 \begin{itemize}
206 \item Modified when \texttt{\textbackslash clearpage} is invoked to make slide transitions more natural.
207 \end{itemize}
208
209 \item \textbf{Version 2.2:}
210 \begin{itemize}
211 \item Moved title, author, and date to user-specified variables.
212 \item Ensured that full text is used without stripping spaces.
213 \item Reorganized the code and added comments to sections for clarity.
214 \end{itemize}
215
216 \item \textbf{Version 2.1:}
217 \begin{itemize}
218 \item Added syntax highlighting and line numbers for included Python code blocks.
219 \item Language formatting is auto-detected by the included file's extension.
220 \end{itemize}
221
222 \item \textbf{Version 2.0:}
223 \begin{itemize}
224 \item Added functionality to include multi-line code from an external file into the \{slideinterlude\} environment.
225 \end{itemize}
226
227 \item \textbf{Version 1.9.1:}
228 \begin{itemize}
229 \item Fixed a bug in \texttt{\textbackslash labelgraphics} where the interlude format was not preserved.
230 \end{itemize}
231
232 \item \textbf{Version 1.9:}
233 \begin{itemize}
234 \item Introduced \texttt{\textbackslash suppressslide\{x-y\}} command to exclude specific slides from being displayed.
235 \end{itemize}
236
237 \item \textbf{Version 1.8:}
238 \begin{itemize}
239 \item Introduced \texttt{\textbackslash labelgraphics} to auto-display image filename below the image.
240 \end{itemize}
241
242 \item \textbf{Version 1.7.1:}
243 \begin{itemize}
244 \item Changed interlude slide labels to: "Slide Interlude".
245 \end{itemize}
246
247 \item \textbf{Version 1.7:}
248 \begin{itemize}
249 \item Added auto-detection of the number of pages in PDFs.
250 \end{itemize}
251
252 \item \textbf{Version 1.6:}
253 \begin{itemize}
254 \item Grouped user-specified variables.
255 \item Cleaned up code and eliminated redundant elements.
256 \end{itemize}
257
258 \item \textbf{Version 1.5:}
259 \begin{itemize}
260 \item Converted \texttt{\textbackslash begin\{slideannotate\}} command to slideannotate environment.
261 \end{itemize}
262 \end{itemize}
263
264
265 Note: This README complements the full documentation available on GitHub.
266
267 \end{document}