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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
|
\documentclass[a4paper]{ltxdoc}%
\usepackage[english]{babel}%
\usepackage[latin1]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage{textcomp}%
\usepackage{lmodern}%
\usepackage{bera}%
\usepackage{microtype}%
\usepackage{attachfile}%
\usepackage{ltxdocext}%
\usepackage{marginnote}%
\usepackage[svgnames,rgb]{xcolor}%
\usepackage{amsmath,array}%
\usepackage{jkdoc}%
\usepackage{pdfcomment}%
%
\def\LinkExMath{\href{http://mirror.ctan.org/macros/latex/contrib/pdfcomment/doc/example_math_markup.pdf}{\texttt{example\_math\_markup.pdf}}}
\def\LinkEx{\href{http://mirror.ctan.org/macros/latex/contrib/pdfcomment/doc/example.pdf}{\texttt{example.pdf}}}
\def\filename{pdfcomment.sty}%
\def\XeLaTeX{Xe\LaTeX}%
%
\makeatletter%
\renewcommand\tableofcontents%
{%
%\section*{\contentsname}%
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
\@starttoc{toc}%
}%
%
\newcommand\styleoption{\name@idx{style option}}%
\newcommand\stylename{\name@idx{document style}}%
\def\name@idx#1#2{%
{\ttfamily#2}%
\index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}%
}%
\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}%
\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}%
\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}%
%
\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.3em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}}
\makeatother
%
\setlength\parindent{0pt}%
\hypersetup{pdfauthor={Josef Kleber},pdftitle={A user-friendly interface to PDF annotations},pdfsubject={Documentation for LaTeX style \filename}}%
%
\begin{document}
\bibliographystyle{alphadin}
\title{\filename}%
\Subtitle{A user-friendly interface to PDF annotations}%
\author{Josef Kleber}
\Fileversion{v1.6}
\Refline{\href{mailto:pdfcomment.sty@pdfcomment.josef-kleber.de}{\texttt{pdfcomment.sty@pdfcomment.josef-kleber.de}}\\\href{http://pdfcomment.josef-kleber.de/en_index.htm}{\texttt{http://pdfcomment.josef-kleber.de/en\_index.htm}}}%
\maketitle
\Headline{Abstract}
\begin{abstract}
For a long time \texttt{pdflatex} has offered the command \cmd\pdfannot{} for inserting arbitrary PDF annotations. However, the command is presented in a form where additional knowledge of the definition of the PDF format is indispensable. This package is an answer to the -- occasional -- questions in newsgroups, about how one could use the comment function of \texttt{Adobe Reader}. At least for the writer of \LaTeX{} code, the package offers a convenient and user-friendly means of using \cmd\pdfannot{} to provide comments in PDF files. Since version v1.1, \texttt{\filename{}} also supports:
\medskip
\noindent\hfill\texttt{\LaTeX{} $\rightarrow$ \texttt{dvips} $\rightarrow$ \texttt{ps2pdf}, \LaTeX{} $\rightarrow$ \texttt{dvipdfmx}\footnote{only with style option \texttt{dvipdfmx}} and \XeLaTeX}.\hfill
\medskip
Unfortunately, support of PDF annotations by PDF viewers is sparse to nonexistent. The reference viewer for the development of this package is \texttt{Adobe Reader}.
If you can't see this annotation \pdfcomment[author={Josef Kleber},subject={Test annotation},color=lime,hspace=20pt]{This is an annotation} you are definitely using the wrong PDF viewer!
\end{abstract}
\vfill
\begin{center}
\subsubsection*{Required packages for using \substyle{\filename}}
\fbox{\parbox[t]{.8\linewidth}{\small \package{hyperref} (v6.76a [2007/04/09]), \package{zref} (v1.8 [2007/04/22]), \package{xkeyval}, \package{ifpdf}, \package{ifthen}, \package{calc}, \package{marginnote} and the packages loaded by them.}}
\end{center}
\vfill
\clearpage
\begin{multicols}{2}
[\section*{\contentsname}
\setlength{\columnseprule}{.5pt}
\setlength{\columnsep}{30pt}\small]
\tableofcontents
\end{multicols}
\clearpage
\Headline{Acknowledgment}
\section*{Acknowledgment}
I want to thank the following persons for contributions to the development of this package:
\begin{itemize}
\item \textbf{Alexander Grahn} for contributing a patch for other drivers
\medskip
\noindent\hfill\texttt{\LaTeX{} $\rightarrow$ \texttt{dvips} $\rightarrow$ \texttt{ps2pdf}, \LaTeX{} $\rightarrow$ \texttt{dvipdfmx} and \XeLaTeX}.\hfill
\medskip
\item \textbf{Ulrike Fischer} for answering my stupid questions on d.c.t.t. for making possible the avatar and style system and much more.
\item \textbf{Christian Feuersänger} for contributing new ideas in form of his package \package{pdfmarginpar.sty} and for solving the printing problem\footnote{see section \ref{sec:print}} of PDF annotations and popups.
\item \textbf{Ross Moore} for contributing ideas and code for his own feature request to support \texttt{\string\pdfmarkupcomment} in math mode.
\item \textbf{Heiko Oberdiek} also for answering my stupid questions on d.c.t.t., as well as for the development of dozens of very usefull packages, especially \file{hyperref.sty}, \file{hycolor.sty} and \file{zref.sty}, which made this package possible.
\item \textbf{Herbert Voß} also for answering my stupid questions on d.c.t.t.
\end{itemize}
I also want to thank the following persons for bug reports, feature requests, ...:
Gabriel Cardona, Jin-Hwan Cho, Thomas König, Marc-André Michel, Guillaume Millet, Fritz Moore, Michael Niedermair
\clearpage
\section{Options}
\subsection{Global options}
\subsubsection[\texttt{final}]{\styleoption{final}}\label{sec:final}
The option \styleoption{final} will set the package to final mode. The PDF annotations will not be typeset and will not influence line breaking.
\subsubsection[\texttt{draft}]{\styleoption{draft}}\label{sec:draft}
The option \styleoption{draft} (default) will set the package to draft mode. Therefore, the PDF annotations will be typeset.
\subsubsection[\texttt{dvipdfmx}]{\styleoption{dvipdfmx}}\label{sec:dvipdfmx}
If you want to use the driver \texttt{dvipdfmx} for creating your documents, you have to use the option \styleoption{dvipdfmx}. The other drivers are recognized automatically.
\subsection{Local options}
The following options are useable as options for the commands presented in sections \ref{sec:kommentarumgebungen} and \ref{sec:kommentarbefehle}, as well as style options. As style options they have global effect, whereas they have only local effect when used in commands. Furthermore global options are not overwritten.
\subsubsection[\texttt{subject}]{\styleoption{subject}}\label{sec:subject}
You can use the option \styleoption{subject} for defining the subject of the PDF popup annotations.
\subsubsection[\texttt{author}]{\styleoption{author}}\label{sec:author}
You can use the option \styleoption{author} for defining the author of the PDF popup annotations.
\subsubsection[\texttt{opacity}]{\styleoption{opacity}}\label{sec:opacity}
You can use the option \styleoption{opacity} for defining the opacity of PDF annotations with values between 0 (transparent) and 1 (not transparent, default). If you want to print PDF popup annotations with transparency you will have to use the option \styleoption{open} = \texttt{true}.
\subsubsection[\texttt{color}]{\styleoption{color}}\label{sec:color}
You can use the option \styleoption{color} for defining the color of PDF annotations in the form \{0.34 0.56 0.12\} (RGB). If you are using the additional package \package{xcolor} you can use predefined color names, as well as the available optional color names. Furthermore you can use the command \cmd\definecolor{} to define your own named colors. Please take a look at the attached example \file{example.tex}.\marginnote{\attachfile[author={Josef Kleber},subject={example.tex},description={source code: example.tex} ,mimetype={text/plain}, icon={Tag}]{example.tex}} It shows the different possibilities of defining colors.
By definition the PDF specification allows four different color spaces with different numbers of color values:
\begin{center}
\begin{tabular}{cl}
\# & color space\\
\hline
0 & transparent \\
1 & grey scale \\
3 & RGB\\
4 & CMYK\\
\end{tabular}
\end{center}
\subsubsection[\texttt{icolor}]{\styleoption{icolor}}\label{sec:icolor}
You can use the option \styleoption{icolor} for defining the so called 'inner color', which is used by some PDF annotations, like arrowheads or the inner area of PDF circle annotation. For the rest, the provisions of the option \styleoption{color} shall apply.
\subsubsection[\texttt{icon}]{\styleoption{icon}}\label{sec:icon}
You can use the option \styleoption{icon} for defining the graphic used for the PDF text annotations. The following icons are defined as mandatory by the PDF reference:
\bigskip\pdfcommentsetup{author={Josef Kleber},subject={Icon overview}}
\texttt{Comment} \hspace{1em} \pdfcomment[icon=Comment,color=Ivory]{Options: icon=Comment,color=Ivory} \hfill \texttt{Key} \hspace{1em} \pdfcomment[icon=Key,color=Khaki]{Options: icon=Key,color=Khaki} \hfill \texttt{Note} \hspace{1em} \pdfcomment[icon=Note,color=LavenderBlush]{Options: icon=Note,color=LavenderBlush} \hfill \texttt{Help} \hspace{1em} \pdfcomment[icon=Help,color=CornflowerBlue]{Options: icon=Help,color=CornflowerBlue}\hspace{20pt}
\bigskip
\hspace*{1cm}\texttt{NewParagraph} \hspace{1em} \pdfcomment[icon=NewParagraph,color=SkyBlue]{Options: icon=NewParagraph,color=SkyBlue} \hfill \texttt{Paragraph} \hspace{1em} \pdfcomment[icon=Paragraph,color=SpringGreen]{Options: icon=Paragraph,color=SpringGreen} \hfill \texttt{Insert} \hspace{1em} \pdfcomment[icon=Insert,color=PaleTurquoise]{Options: Insert,color=PaleTurquoise}\hspace{0pt}\hspace*{1cm}\hspace{20pt}
\bigskip
Furthermore the following icons are also supported by \texttt{Adobe Reader} and some other PDF viewers:
\bigskip
\texttt{Check} \hspace{1em} \pdfcomment[icon=Check,color=Orchid]{Options: icon=Check,color=Orchid} \hfill \texttt{Circle} \hspace{1em} \pdfcomment[icon=Circle,color=LightCyan]{Options: icon=Circle,color=LightCyan} \hfill \texttt{Cross} \hspace{1em} \pdfcomment[icon=Cross,color=Bisque]{Options: icon=Cross,color=Bisque}\hspace{20pt}
\bigskip
\hspace*{1cm}\texttt{Star} \hspace{1em} \pdfcomment[icon=Star,color=Aquamarine]{Options: icon=Star,color=Aquamarine} \hfill \texttt{RightArrow} \hspace{1em} \pdfcomment[icon=RightArrow,color=Gainsboro]{Options: icon=RightArrow,color=Gainsboro} \hfill \texttt{RightPointer} \hspace{1em} \pdfcomment[icon=RightPointer,color=Salmon]{Options: icon=RightPointer,color=Salmon}\hspace*{1cm}\hspace{20pt}
\bigskip
\hspace*{2.5cm}\texttt{UpArrow} \hspace{1em} \pdfcomment[icon=UpArrow,color=Teal]{Options: icon=UpArrow,color=Teal} \hfill \texttt{UpLeftArrow} \hspace{1em} \pdfcomment[icon=UpLeftArrow,color=Magenta]{Options: icon=UpLeftArrow,color=Magenta}\hspace*{2.5cm}\hspace{20pt}
\bigskip
\subsubsection[\texttt{deadline}]{\styleoption{deadline}}\label{sec:deadline}
You can use the option \styleoption{deadline} for defining a time limit until a problem has to be solved. The deadline will be added at the end of the comment, as well as in the list of comments, if an appropriate list style is chosen.
\subsubsection[\texttt{open}]{\styleoption{open}}\label{sec:open}
You can use the option \styleoption{open} for defining the opening status of the PDF popup annotations. Possible values are \texttt{true} or \texttt{false} (default).
If you want to print the PDF popup annotations (with transparency) you will have to use the option \styleoption{open} = \texttt{true}.
\subsubsection[\texttt{hspace}]{\styleoption{hspace}}\label{sec:hspace}
You can use the option \styleoption{hspace} for defining the horizontal space after the PDF text annotations, otherwise the PDF text annoations will overlay the text.
\subsubsection[\texttt{type}]{\styleoption{type}}\label{sec:type}
You can use the option \styleoption{type} for defining the type of PDF annotation, if a comment command supports more than one PDF annotations:
{\renewcommand{\arraystretch}{1.2}
\begin{center}
\begin{tabular}{ll}
\multicolumn{1}{c}{comment command} & \multicolumn{1}{c}{possible types}\\
\hline
\cs{pdffreetextcomment} & freetext, callout, typewriter \\
\cs{pdflinecomment} & line, polyline, polygon \\
\end{tabular}
\end{center}}
\subsubsection[\texttt{font}]{\styleoption{font}}\label{sec:font}
You can use the option \styleoption{font} for defining the font of PDF freetext annotations, like all fonts installed in the system, which don't contain a space in their name. Although \texttt{Adobe Reader} shows these fonts as embedded, they are not embedded in reality, but the PDF file just contains a reference\footnote{Adobe Acrobat offers the possibility to embed the fonts in the PS $\rightarrow$ PDF conversion} to the font (default: Helvetica)! Therefore you should use this option quite carefully. In the case of document exchange between several authors you should just use fonts, which are available on all computer systems, like the so called 'standard 14 fonts'. \pdfcomment[icon=Help,color=blue,open=true,subject={standard 14 fonts}]{Times-Roman (TiRo), Times-Bold (TiBo), Times-Italic (TiIt), Times-BoldItalic (TiBI), Helvetica (Helv), Helvetica-Bold (HeBo), Helvetica-Oblique (HeOb), Helvetica-BoldOblique (HeBO), Courier (Cour), Courier-Bold (CoBo), Courier-Oblique (CoOb), Courier-BoldOblique (CoBO), ZapfDingbats (ZaDb), Symbol (Symb)}
\subsubsection[\texttt{fontsize}]{\styleoption{fontsize}}\label{sec:fontsize}
You can use the option \styleoption{fontsize} for defining the fontsize of PDF freetext annotations.
\subsubsection[\texttt{fontcolor}]{\styleoption{fontcolor}}\label{sec:fontcolor}
You can use the option \styleoption{fontcolor} for defining the font color in PDF freetext annotations, which must be a RGB color.
\subsubsection[\texttt{line}]{\styleoption{line}}\label{sec:line}
You can use the option \styleoption{line} for defining the coordinates of lines in certain PDF annotations, e.\,g. in the form \{$x_1$\space$y_1$\space$x_2$\space$y_2$\}. The origin is in the bottom left page corner. The given numbers will be interpreted as Postscript points (\LaTeX{} unit: bp (big points)), as usual in PDF documents.
{\renewcommand{\arraystretch}{1.2}
\begin{center}
\begin{tabular}{ll}
\multicolumn{1}{c}{type of line} & \multicolumn{1}{c}{\# points}\\
\hline
line & $n = 2$ \\
polyline, polygon & $n > 2$ \\
callout line & $n = 3$ \\
\end{tabular}
\end{center}}
In general, the points must be given from line begin to line end. For callout lines the points must be given from line end to line begin. Please note the example file \LinkEx!
To avoid the method 'trail and error' you can load the PDF file with the Ghostscript viewer, which is capable of showing the cursor position in it's status line.
\subsubsection[\texttt{linewidth}]{\styleoption{linewidth}}\label{sec:linewidth}
You can use the option \styleoption{linewidth} for defining the line width of PDF annoations.
\subsubsection[\texttt{linebegin}]{\styleoption{linebegin}}\label{sec:linebegin}
You can use the option \styleoption{linebegin} for defining the arrow type at the line begin. The example file \LinkEx{} shows all possible types of arrows. \pdfcomment[icon=Help,color=blue,open=true,subject={arrow types}]{/None, /Square, /Circle, /Diamond, /OpenArrow, /ClosedArrow, /Butt (PDF1.5), /ROpenArrow (PDF1.5), /RClosedArrow (PDF1.5), /Slash (PDF1.6)}
\subsubsection[\texttt{lineend}]{\styleoption{lineend}}\label{sec:lineend}
You can use the option \styleoption{lineend} for defining the arrow type at the line end.
\subsubsection[\texttt{linesep}]{\styleoption{linesep}}\label{sec:linesep}
You can use the option \styleoption{linesep} for defining the horizontal space between text and line in the command \cs{pdfsidelinecomment}.
\subsubsection[\texttt{borderstyle}]{\styleoption{borderstyle}}\label{sec:borderstyle}
You can use the option \styleoption{borderstyle} for defining the line style.Possible values are: \styleoption{solid} (default) and \styleoption{dashed}
\subsubsection[\texttt{dashstyle}]{\styleoption{dashstyle}}\label{sec:dashstyle}
You can use the option \styleoption{dashstyle} for defining the dash style, e.\,g. \{5 3\} (5 points line, 3 points space).
\subsubsection[\texttt{bse}]{\styleoption{bse}}\label{sec:bse}
You can use the option \styleoption{bse} for defining the 'border style effect'. Possible values are: \styleoption{none} (default) and \styleoption{cloudy}
\subsubsection[\texttt{bsei}]{\styleoption{bsei}}\label{sec:bsei}
You can use the option \styleoption{bsei} for defining the 'border style effect intensity' (size of cloud elements). The PDF reference suggests values between 1 and 2.
\subsubsection[\texttt{caption}]{\styleoption{caption}}\label{sec:caption}
You can use the option \styleoption{caption} for defining the caption type of lines. Possible values are: none, inline (default), top
The options \styleoption{inline} and \styleoption{top} shows the comment 'inline' and on top of the line. While using \styleoption{none} the comment will be shown in a PDF popup annotation.
\subsubsection[\texttt{captionhoffset}]{\styleoption{captionhoffset}}\label{sec:captionhoffset}
You can use the option \styleoption{captionhoffset} for defining a horizontal offset, that is a horizontal shift of the line caption.
\subsubsection[\texttt{captionvoffset}]{\styleoption{captionvoffset}}\label{sec:captionvoffset}
You can use the option \styleoption{captionvoffset} for definig a vertical offset of the line caption.
\subsubsection[\texttt{voffset}]{\styleoption{voffset}}\label{sec:voffset}
You can use the option \styleoption{voffset} for defining a vertical offset of the PDF annotations, that is a vertical shift for the given length.
\subsubsection[\texttt{hoffset}]{\styleoption{hoffset}}\label{sec:hoffset}
You can use the option \styleoption{hoffset} for defining a horizontal offset of the PDF annotations.
\subsubsection[\texttt{width}]{\styleoption{width}}\label{sec:width}
You can use the option \styleoption{width} for defining the width of PDF annotations, e.\,g. the width of FreeText annotations. PDF text annatations have a width of 0pt by definition.
\subsubsection[\texttt{height}]{\styleoption{height}}\label{sec:height}
You can use the option \styleoption{height} for definig the height of PDF annotations. PDF text annatations have a height of \cmd\baselineskip{} by definition.
\subsubsection[\texttt{markup}]{\styleoption{markup}}\label{sec:markup}
You can use the option \styleoption{markup} for defining the type of the PDF text markup annotation. Possible values are: Highlight, Underline, Squiggly und StrikeOut.
\subsubsection[\texttt{avatar}]{\styleoption{avatar}}\label{sec:avatar}
With the option \styleoption{avatar} you can load the option lists, that were predefined with the command \cmd\defineavatar{} to avoid annoying typing.
\subsubsection[\texttt{style}]{\styleoption{style}}\label{sec:style}
With the option \styleoption{style} you can also load predefined option lists for spliting personal and stylistic options, e.\,g. \texttt{avatar=Josef, style=MyComment}.
\subsubsection[\texttt{mathstyle}]{\styleoption{mathstyle}}\label{sec:mathstyle}
With the option \styleoption{mathstyle} you can correct the wrong size of PDF annotations produced with \texttt{\string\pdfmarkupcomment} in math mode by setting the math style to \texttt{\string\textstyle}, \texttt{\string\displaystyle}, \texttt{\string\scriptstyle} or \texttt{\string\scriptscriptstyle}. This option is only defined for \texttt{\string\pdfmarkupcomment}, so you can not set it globally!
\section{Environments}\label{sec:umgebungen}
\subsection{Comment environments}\label{sec:kommentarumgebungen}
\subsubsection{\texorpdfstring{\cs{pdfsidelinecomment}}{\textbackslash pdfsidelinecomment}}
\label{sec:sidelinecomment}
Possible \marginnote{\raggedleft\scriptsize\envb{pdfsidelinecomment}\\\oarg{options}\marg{comment}\\\dots\\\enve{pdfsidelinecomment}}options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{color}, \styleoption{icolor}, \styleoption{opacity}, \styleoption{linewidth}, \styleoption{linebegin}, \styleoption{lineend}, \styleoption{linesep}, \styleoption{borderstyle}, \styleoption{dashstyle}, \styleoption{caption}, \styleoption{captionhoffset}, \styleoption{captionvoffset}
\bigskip
With the environment \env{pdfsidelinecomment} you can comment complete parts of a page in the form of two lines in the margins.
\hspace*{0pt}\newline
\begin{pdfsidelinecomment}[color=red,icolor=yellow,linebegin=/Circle,lineend=/Circle,linewidth=3bp,linesep=1cm]{ Please note }
Limitations:
\begin{itemize}
\item The PDF sideline annotation must not be longer than one page, otherwise the recognition of the page break will fail.
\item While using dvi files in the meantime you have to use a \LaTeX{} distribution, which is using \texttt{pdf(e)latex} as engine in a version $\geq$ v1.40.0\footnote{older versions are not capable of providing x/y coordinates of the current position in dvi mode.}!
\item While using \XeLaTeX{} you have to make sure that page dimensions are written to the xdvi file, e.\,g. with the option \styleoption{pagesize} of the KoMa-Script classes, or as option of the package \package{typearea.sty} respectively.
\end{itemize}
\end{pdfsidelinecomment}
\clearpage
\section{Commands}\label{sec:befehle}
\subsection{Comment commands}\label{sec:kommentarbefehle}
You can use the following commands for commenting your documents.
\subsubsection{\texorpdfstring{\cs{pdfcomment}}{\textbackslash pdfcomment}}
\label{sec:pdfcomment}
Possible \margcs{\cmd\pdfcomment\\\oarg{options}\marg{comment}}options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{icon}, \styleoption{color}, \styleoption{opacity}, \styleoption{open}, \styleoption{hspace}, \styleoption{voffset}, \styleoption{hoffset}
\bigskip
\cmd\pdfcomment{} will typeset an annotation into the text at the current \pdfcommentsetup{subject={\textbackslash pdfcomment test},hspace=18pt}\pdfcomment[icon=Star,color=YellowGreen]{This is a comment in the text} position.
\subsubsection{\texorpdfstring{\cs{pdfmargincomment}}{\textbackslash pdfmargincomment}}
\label{sec:pdfmargincomment}
Possible \margcs{\cmd\pdfmargincomment\\\oarg{options}\marg{comment}}options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{icon}, \styleoption{color}, \styleoption{opacity}, \styleoption{open}, \styleoption{hspace}, \styleoption{voffset}, \styleoption{hoffset}
\bigskip
\cmd\pdfmargincomment{} will typeset an annotation into the margin. Please note the positioning of the annotation in this example. This documentation was written with the \LaTeX{} class \texttt{ltxdoc}\pdfcommentsetup{subject={\textbackslash pdfmargincomment test}}\pdfmargincomment[icon=Help,color=DeepPink,hspace=-30pt]{This is a comment in the margin}. Therefore the annotation is typeset into the left margin.
\subsubsection{\texorpdfstring{\cs{pdfmarkupcomment}}{\textbackslash pdfmarkupcomment}}
\label{sec:pdfmarkupcomment}
Possible \margcs{\cmd\pdfmarkupcomment\oarg{options}\\\marg{markup text}\marg{comment}}options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{color}, \styleoption{opacity}, \styleoption{markup}, \styleoption{mathstyle}
\bigskip
\cmd\pdfmarkupcomment{} will typeset so called PDF text markup annotations over the text specified in the argument \marg{markup text}. Possible types for the option \styleoption{markup} are: \pdfcommentsetup{subject={\textbackslash pdfmarkupcomment test}}\pdfmarkupcomment[color=yellow,markup=Highlight]{Highlight}{This is a Highlight markup annotation!}, \pdfmarkupcomment[color=red,markup=Underline]{Underline}{This is a Underline markup annotation!}, \pdfmarkupcomment[color=Teal,markup=Squiggly]{Squiggly}{This is a Squiggly markup annotation!} and \pdfmarkupcomment[color=red,markup=StrikeOut]{StrikeOut}{This is a StrikeOut markup annotation!}
\hspace*{0pt}\newline
Limitations:
\begin{itemize}
\item As the name PDF text markup annotation might lead to suggest, this form of comment is suitable for text only.
\item The specified text with the argument \marg{markup text} must not be longer than one paragraph.
\item The PDF text markup annotation must not be longer than one page, otherwise the recognition of the page break will fail.
\item While using dvi files in the meantime you have to use a \LaTeX{} distribution, which is using \texttt{pdf(e)latex} as engine in a version $\geq$ v1.40.0\footnote{older versions are not capable of providing x/y coordinates of the current position in dvi mode.}!
\item While using \XeLaTeX{} you have to make sure that page dimensions are written to the xdvi file, e.\,g. with the option \styleoption{pagesize} of the KoMa-Script classes, or as option of the package \package{typearea.sty} respectively.
\end{itemize}
Since version v1.6, \texttt{\string\pdfmarkupcomment} is also supported in math mode. So you can also comment formula like:
\definestyle{mathpopup}{author={},subject={},color=NavajoWhite,markup=Highlight}
\[
\begin{array}{c>{\displaystyle}c}
\text{ Bernoulli Trials: } &
\pdfmarkupcomment[style=mathpopup]{P(E)}{Probability of event E: Get exactly k heads in n coin flips.}%
=
\pdfmarkupcomment[style=mathpopup]{\dbinom{n}{k}}{Number of ways to get exactly k heads in n coin flips}%
{\pdfmarkupcomment[style=mathpopup]{p}{Probability of getting heads in one flip}%
}^{%
\pdfmarkupcomment[style=mathpopup,mathstyle=\scriptstyle]{k}{Number of heads}
}%
\pdfmarkupcomment[style=mathpopup]{(1-p)}{Probability of getting tails in one flip}^{%
\pdfmarkupcomment[style=mathpopup,mathstyle=\scriptstyle]{n-k}{Number of tails}%
}%
\end{array}
\]
Also see \LinkExMath{} for a more detailed explanation of the possibilities!
\subsubsection{\texorpdfstring{\cs{pdffreetextcomment}}{\textbackslash pdffreetextcomment}}
\label{sec:pdffreetextcomment}
Possible \margcs{\cmd\pdffreetextcomment\\\oarg{options}\marg{comment}} options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{color}, \styleoption{font}, \styleoption{fontsize}, \styleoption{fontcolor}, \styleoption{opacity}, \styleoption{line}, \styleoption{linewidth}, \styleoption{lineend}, \styleoption{borderstyle}, \styleoption{dashstyle}, \styleoption{bse}, \styleoption{bsei}, \styleoption{type}, \styleoption{height}, \styleoption{width}, \styleoption{voffset}, \styleoption{hoffset}
\bigskip
\cmd\pdffreetextcomment{} (type=freetext) will typeset a comment in form of a freely positioned box on the wished spot of the page.\pdffreetextcomment[subject={\textbackslash pdffreetextcomment Test},height=1.2cm,width=4cm,voffset=-3.7cm,hoffset=-1.2cm,opacity=0.5,color=yellow]{This is a FreeText annotation} By using the option \styleoption{type} = \texttt{callout} the box will have an additional so called callout line, to bind the box to a certain element of the page. With the option \styleoption{type} = \texttt{typewriter} you can write a comment everywhere on the page with a virtual 'typewriter'. These PDF freetext annotation do have no frame and a transparent background for 'overwriting' arbitrary parts of the page. Please note the example file \LinkEx!
\subsubsection{\texorpdfstring{\cs{pdfsquarecomment}}{\textbackslash pdfsquarecomment}}
\label{sec:pdfsquarecomment}
Possible \margcs{\cmd\pdfsquarecomment\\\oarg{options}\marg{comment}} options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{color}, \styleoption{icolor}, \styleoption{opacity}, \styleoption{linewidth}, \styleoption{borderstyle}, \styleoption{dashstyle}, \styleoption{bse}, \styleoption{bsei}, \styleoption{height}, \styleoption{width}, \styleoption{voffset}, \styleoption{hoffset}
\bigskip
\cmd\pdfsquarecomment{} will typeset a rectangular box at the wished spot of a page (see: \LinkEx).
\subsubsection{\texorpdfstring{\cs{pdfcirclecomment}}{\textbackslash pdfcirclecomment}}
\label{sec:pdfcirclecomment}
Possible \margcs{\cmd\pdfcirclecomment\\\oarg{options}\marg{comment}} options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{color}, \styleoption{icolor}, \styleoption{opacity}, \styleoption{linewidth}, \styleoption{borderstyle}, \styleoption{dashstyle}, \styleoption{bse}, \styleoption{bsei}, \styleoption{height}, \styleoption{width}, \styleoption{voffset}, \styleoption{hoffset}
\bigskip
\cmd\pdfsquarecomment{} will typeset a comment in form of a circle or ellipse at the wished spot of the page (see: \LinkEx).
\subsubsection{\texorpdfstring{\cs{pdflinecomment}}{\textbackslash pdflinecomment}}
\label{sec:pdflinecomment}
Possible \margcs{\cmd\pdfsidelinecomment\\\oarg{options}\marg{comment}}options: \styleoption{avatar}, \styleoption{style}, \styleoption{subject}, \styleoption{author}, \styleoption{type}, \styleoption{color}, \styleoption{icolor}, \styleoption{opacity}, \styleoption{caption}, \styleoption{captionhoffset}, \styleoption{captionvoffset}, \styleoption{linewidth}, \styleoption{linebegin}, \styleoption{lineend}, \styleoption{line}, \styleoption{borderstyle}, \styleoption{dashstyle}
\bigskip
\cmd\pdflinecomment{} will typeset a comment in form of a line, polyline or polygon at the wished spot of the page (see: \LinkEx).
\subsection{Misc. commands}
\subsubsection{\texorpdfstring{\cs{pdfcommentsetup}}{\textbackslash pdfcommentsetup}}
\label{sec:commentsetup}
With the command \cmd\pdfcommentsetup \margcs{\cmd\pdfcommentsetup\marg{options}} you can reset the global options at any time.
\subsubsection{\texorpdfstring{\cs{listofpdfcomments}}{\textbackslash listofpdfcomments}}
\label{sec:listofpdfcomments}
The command \cmd\listofpdfcomments\margcs{\cmd\listofpdfcomments\oarg{options}} creates a list of the PDF comments to ease finding them. The command offers the following options:
\begin{itemize}
\item \styleoption{liststyle} specifies the list style. Possible option values are:
\begin{itemize}
\item \mco{AuthorSubject} (default)
\item \mco{AuthorSubjectDeadline}
\item \mco{SubjectAuthorComment}
\item \mco{SubjectAuthorCommentDeadline}
\item \mco{AuthorComment}
\item \mco{AuthorCommentDeadline}
\item \mco{SubjectComment}
\item \mco{SubjectCommentDeadline}
\item \mco{Comment}
\item \mco{CommentDeadline}
\end{itemize}
\item \styleoption{heading} specifies an alternative heading, e.\,g. \styleoption{heading}=\{List of comments\}.
\end{itemize}
\subsubsection{\texorpdfstring{\cs{setliststyle}}{\textbackslash setliststyle}}
\label{sec:setliststyle}
The command \cmd\setliststyle\margcs{\cmd\setliststyle\marg{name}} is necessary, if comments are used before \cmd\listofpdfcomments\ and you wish to have an alternative list style.
\subsubsection{\texorpdfstring{\cs{defineliststyle}}{\textbackslash defineliststyle}}
\label{sec:defineliststyle}
With the command \cmd\defineliststyle\margcs{\cmd\defineliststyle\\\marg{name}\marg{definition}} you can define new list styles, e.\,g.:
\medskip
\cmd\makeatletter\\
\cmd\defineliststyle\{MyListstyle\}\{\cmd\pc@lopt@subject\texttt{\textbackslash}\ \cmd\textcolor\{green\}\\\{(\cmd\pc@lopt@author)\}:\texttt{\textbackslash}\ \cmd\pc@lopt@comment\texttt{\textbackslash}\ \cmd\textcolor\{red\}\\\{(\cmd\pc@lopt@deadline)\}\\
\cmd\makeatother
\subsubsection{\texorpdfstring{\cs{defineavatar}}{\textbackslash defineavatar}}
\label{sec:defineavatar}
With the command \cmd\defineavatar \margcs{\cmd\defineavatar\marg{name}\marg{options}} you can create named predefined option lists, which can be later used in the comment commands with the option \styleoption{avatar}. With this option, it's easy for several authors of the same document to switch between different avatars, that is their graphical representation.
\subsubsection{\texorpdfstring{\cs{definestyle}}{\textbackslash definestyle}}
\label{sec:definestyle}
With the command \cmd\definestyle \margcs{\cmd\definestyle\marg{name}\marg{options}} you can split up lists in personal and stylistic option lists (see \LinkEx). This option list can be loaded with the option \styleoption{style}.
\section{Printing comments and popups}
\label{sec:print}
Basically, \texttt{Adobe Reader} is able to print PDF annotations. Therefore, you have to choose 'Document and Markups' in the field 'Comments and Forms' of the print dialog. Additionally, you have to configure the menu 'Edit $\rightarrow$ Preferences $\rightarrow$ Commenting'. Unfortunately, this option does not exist in many versions of \texttt{Adobe Reader}. If it does not exist, the only possibility is to edit the configuration files itself.
\begin{description}
\item[Windows:] the registry needs to be changed (on your own risk!)
Start the registry editor (\file{regedit.exe}) and open the following key, e.\,g. for \texttt{Adobe Reader 9.0}:
\texttt{HKEY\_CURRENT\_USER/Software/Adobe/Acrobat Reader/9.0/Annots/\newline cPrefs}
The key for other version will be similar, except version number and some letters in lower- or uppercase!
Open or create (with closed \texttt{Adobe Reader}) the key \newline\texttt{bprintCommentPopups} and change the value to 1 (dword).
\item[Linux:] open the configuration file:
\nolinkurl{~/.adobe/Acrobat/8.0/Preferences/reader_prefs}
with a text editor and change the entry
{\texttt{/printCommentPopups\,[/b false]} to \texttt{/printCommentPopups\,[/b true]}}
\end{description}
Please note that only opened popups will be printed!
{
\clearpage
\raggedright
\nocite{*}
\bibliography{pdfcomment}
\addcontentsline{toc}{section}{\refname}
}
\end{document}
|