]> git.lyx.org Git - lyx.git/blob - lib/examples/PDF-comment.lyx
2020bda5b1d301209e6024e33114ca227ca108f6
[lyx.git] / lib / examples / PDF-comment.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
3 \begin_document
4 \begin_header
5 \textclass scrartcl
6 \begin_preamble
7 % to be able to use all color settings of pdfcomment
8 \usepackage[svgnames,rgb]{xcolor}
9
10 % if pdflatex is used
11 \usepackage{ifpdf}
12 \ifpdf
13
14 % set fonts for nicer pdf view
15 \IfFileExists{lmodern.sty}
16  {\usepackage{lmodern}}{}
17
18 \fi % end if pdflatex is used
19 \end_preamble
20 \options BCOR8mm,pagesize
21 \use_default_options false
22 \begin_modules
23 pdfcomment
24 \end_modules
25 \maintain_unincluded_children false
26 \language english
27 \language_package default
28 \inputencoding auto
29 \fontencoding global
30 \font_roman default
31 \font_sans default
32 \font_typewriter default
33 \font_math auto
34 \font_default_family default
35 \use_non_tex_fonts false
36 \font_sc false
37 \font_osf false
38 \font_sf_scale 100
39 \font_tt_scale 100
40 \graphics default
41 \default_output_format default
42 \output_sync 0
43 \bibtex_command bibtex
44 \index_command default
45 \paperfontsize 12
46 \spacing single
47 \use_hyperref true
48 \pdf_title "Description of the module PDF Comments"
49 \pdf_author "Uwe Stöhr"
50 \pdf_subject "PDF comments"
51 \pdf_keywords "LyX, PDF comments, pdfcomment"
52 \pdf_bookmarks true
53 \pdf_bookmarksnumbered true
54 \pdf_bookmarksopen true
55 \pdf_bookmarksopenlevel 2
56 \pdf_breaklinks false
57 \pdf_pdfborder false
58 \pdf_colorlinks true
59 \pdf_backref false
60 \pdf_pdfusetitle false
61 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
62 \papersize a4paper
63 \use_geometry false
64 \use_package amsmath 1
65 \use_package amssymb 1
66 \use_package cancel 0
67 \use_package esint 1
68 \use_package mathdots 1
69 \use_package mathtools 1
70 \use_package mhchem 1
71 \use_package stackrel 0
72 \use_package stmaryrd 0
73 \use_package undertilde 0
74 \cite_engine basic
75 \cite_engine_type default
76 \biblio_style plain
77 \use_bibtopic false
78 \use_indices false
79 \paperorientation portrait
80 \suppress_date true
81 \justification true
82 \use_refstyle 0
83 \notefontcolor #0000ff
84 \index Index
85 \shortcut idx
86 \color #008000
87 \end_index
88 \secnumdepth 3
89 \tocdepth 2
90 \paragraph_separation skip
91 \defskip medskip
92 \quotes_language english
93 \papercolumns 1
94 \papersides 1
95 \paperpagestyle default
96 \tracking_changes false
97 \output_changes false
98 \html_math_output 0
99 \html_css_as_file 0
100 \html_be_strict false
101 \end_header
102
103 \begin_body
104
105 \begin_layout Standard
106 \begin_inset Flex PDF-Comment-Setup
107 status open
108
109 \begin_layout Plain Layout
110 color=yellow
111 \end_layout
112
113 \end_inset
114
115
116 \begin_inset Note Note
117 status collapsed
118
119 \begin_layout Plain Layout
120 This sets yellow as default color for new PDF comments, see sec.
121 \begin_inset space ~
122 \end_inset
123
124
125 \begin_inset CommandInset ref
126 LatexCommand ref
127 reference "sub:PDF-Comment-setup"
128
129 \end_inset
130
131  for the description.
132 \end_layout
133
134 \end_inset
135
136
137 \end_layout
138
139 \begin_layout Title
140 Description of the module PDF Comments
141 \end_layout
142
143 \begin_layout Author
144 Uwe Stöhr
145 \end_layout
146
147 \begin_layout Standard
148 The LaTeX package 
149 \series bold
150 pdfcomment
151 \series default
152  provides full access for PDF comments.
153  You can add normal comments as well as margin comments, underlining etc..
154  You can also define a special layout for a comment which you can use several
155  times in the document.
156  This document is only a excerpt of the documentation of 
157 \series bold
158 pdfcomment
159 \series default
160 ; see its documentation for all information:
161 \begin_inset Newline newline
162 \end_inset
163
164
165 \begin_inset Flex URL
166 status open
167
168 \begin_layout Plain Layout
169
170 http://mirrors.ctan.org/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf
171 \end_layout
172
173 \end_inset
174
175
176 \end_layout
177
178 \begin_layout Section
179 The different comment types
180 \end_layout
181
182 \begin_layout Standard
183 The different comment types are inserted using the menu 
184 \family sans
185 Insert\SpecialChar \menuseparator
186 Custom
187 \begin_inset space ~
188 \end_inset
189
190 Insets
191 \family default
192 .
193  You can select one of the following:
194 \end_layout
195
196 \begin_layout Subsection
197 PDF-Annotation
198 \end_layout
199
200 \begin_layout Standard
201 This is the standard PDF comment.
202  Here is an example: 
203 \begin_inset Flex PDF-Annotation
204 status open
205
206 \begin_layout Plain Layout
207 This is a simple PDF-Annotation.
208 \end_layout
209
210 \end_inset
211
212
213 \end_layout
214
215 \begin_layout Standard
216 Like for all PDF comment types you can add a lot of things to the option
217  of the inset.
218  To insert the options inset, set the cursor into the comment inset and
219  use the menu 
220 \family sans
221 Insert\SpecialChar \menuseparator
222 PDF Comment Options
223 \family default
224 .
225 \end_layout
226
227 \begin_layout Standard
228 \begin_inset Note Greyedout
229 status open
230
231 \begin_layout Plain Layout
232
233 \series bold
234 Note:
235 \series default
236  All braces and brackets in comment options must be inserted as TeX code!
237 \end_layout
238
239 \end_inset
240
241
242 \begin_inset Newline newline
243 \end_inset
244
245
246 \end_layout
247
248 \begin_layout Standard
249 Here is an example PDF-Annotation where the author is set to 
250 \begin_inset Quotes eld
251 \end_inset
252
253 Daisy Duck
254 \begin_inset Quotes erd
255 \end_inset
256
257
258 \begin_inset Flex PDF-Annotation
259 status open
260
261 \begin_layout Plain Layout
262 \begin_inset Argument 1
263 status collapsed
264
265 \begin_layout Plain Layout
266 author=
267 \begin_inset ERT
268 status collapsed
269
270 \begin_layout Plain Layout
271
272 {
273 \end_layout
274
275 \end_inset
276
277 Daisy Duck
278 \begin_inset ERT
279 status collapsed
280
281 \begin_layout Plain Layout
282
283 }
284 \end_layout
285
286 \end_inset
287
288 ,color=
289 \begin_inset ERT
290 status collapsed
291
292 \begin_layout Plain Layout
293
294 {
295 \end_layout
296
297 \end_inset
298
299 0.234 0.867 0.211
300 \begin_inset ERT
301 status collapsed
302
303 \begin_layout Plain Layout
304
305 }
306 \end_layout
307
308 \end_inset
309
310 ,voffset=8pt,opacity=0.5
311 \end_layout
312
313 \end_inset
314
315 This is an annotation with a complex option.
316 \end_layout
317
318 \end_inset
319
320
321 \end_layout
322
323 \begin_layout Standard
324 To avoid to write the same options like the author again and again, you
325  can define a so-called 
326 \begin_inset Quotes eld
327 \end_inset
328
329 avatar
330 \begin_inset Quotes erd
331 \end_inset
332
333  for every person and/or comment layout.
334  See 
335 \begin_inset CommandInset ref
336 LatexCommand ref
337 reference "sec:Avatars"
338
339 \end_inset
340
341  for further information.
342 \end_layout
343
344 \begin_layout Standard
345 For a full list of possible options, please look at the 
346 \series bold
347 pdfcomment
348 \series default
349  documentation.
350 \end_layout
351
352 \begin_layout Subsection
353 PDF-Circle
354 \end_layout
355
356 \begin_layout Standard
357 This will typeset a comment in form of a circle or ellipse.
358  Here is an example without any options: 
359 \begin_inset Flex PDF-Circle
360 status open
361
362 \begin_layout Plain Layout
363 a simple circle comment
364 \end_layout
365
366 \end_inset
367
368
369 \end_layout
370
371 \begin_layout Standard
372 At the right side you see a large, elliptical comment as example of a PDF-Circle
373  with options.
374  
375 \begin_inset Flex PDF-Circle
376 status open
377
378 \begin_layout Plain Layout
379 \begin_inset Argument 1
380 status collapsed
381
382 \begin_layout Plain Layout
383 id=1,color=blue,height=2.5cm,width=5.8cm,voffset=-2.8cm,hoffset=8cm,opacity=1.0,just
384 ification=right,icolor=
385 \begin_inset ERT
386 status collapsed
387
388 \begin_layout Plain Layout
389
390 {
391 \end_layout
392
393 \end_inset
394
395 yellow
396 \begin_inset ERT
397 status collapsed
398
399 \begin_layout Plain Layout
400
401 }
402 \end_layout
403
404 \end_inset
405
406 ,linewidth=12pt,borderstyle=dashed,dashstyle=
407 \begin_inset ERT
408 status collapsed
409
410 \begin_layout Plain Layout
411
412 {
413 \end_layout
414
415 \end_inset
416
417 10 5
418 \begin_inset ERT
419 status collapsed
420
421 \begin_layout Plain Layout
422
423 }
424 \end_layout
425
426 \end_inset
427
428
429 \end_layout
430
431 \end_inset
432
433 a circle comment in form of a large ellipse
434 \end_layout
435
436 \end_inset
437
438
439 \begin_inset Newline newline
440 \end_inset
441
442
443 \begin_inset Newline newline
444 \end_inset
445
446
447 \begin_inset Newline newline
448 \end_inset
449
450
451 \end_layout
452
453 \begin_layout Subsection
454 PDF-Freetext
455 \end_layout
456
457 \begin_layout Standard
458 This will typeset a comment in form of a freely positioned box.
459  By using the option 
460 \series bold
461 type=callout
462 \series default
463  the box will have an additional so called callout line, to bind the box
464  to a certain element of the page.
465  With the option 
466 \series bold
467 type=typewriter
468 \series default
469  you can write a comment everywhere on the page with a virtual ’typewriter’.
470  These PDF-Freetext annotations do have no frame and a transparent background
471  for ’overwriting’ arbitrary parts of the page.
472  Here is an example in form of a yellow rectangle:
473 \begin_inset Flex PDF-Freetext
474 status open
475
476 \begin_layout Plain Layout
477 \begin_inset Argument 1
478 status collapsed
479
480 \begin_layout Plain Layout
481 height=3cm,type=freetext,subject={freetext},width=4.5cm,voffset=-3.2cm,hoffset=-3.2
482 cm,opacity=0.9,justification=right
483 \end_layout
484
485 \end_inset
486
487 This is also a comment, but it is a PDF-Freetext annotation.
488 \end_layout
489
490 \end_inset
491
492
493 \begin_inset Newline newline
494 \end_inset
495
496
497 \begin_inset Newline newline
498 \end_inset
499
500
501 \begin_inset Newline newline
502 \end_inset
503
504
505 \begin_inset Newline newline
506 \end_inset
507
508
509 \end_layout
510
511 \begin_layout Subsection
512 PDF-Line
513 \end_layout
514
515 \begin_layout Standard
516 This will typeset a comment in form of a line, polyline or polygon.
517  Here is an example without any options: 
518 \begin_inset Flex PDF-Line
519 status open
520
521 \begin_layout Plain Layout
522 a simple PDF-Line comment
523 \end_layout
524
525 \end_inset
526
527
528 \begin_inset Newline newline
529 \end_inset
530
531
532 \end_layout
533
534 \begin_layout Standard
535 As you can see a PDF-Line comment without options is useless.
536 \end_layout
537
538 \begin_layout Standard
539 The green arrow at the left side of this page is an example for a PDF-Line
540  comment with options.
541  
542 \begin_inset Flex PDF-Line
543 status open
544
545 \begin_layout Plain Layout
546 \begin_inset Argument 1
547 status collapsed
548
549 \begin_layout Plain Layout
550 type=line,opacity=1,line=
551 \begin_inset ERT
552 status collapsed
553
554 \begin_layout Plain Layout
555
556 {
557 \end_layout
558
559 \end_inset
560
561 50 480 50 180
562 \begin_inset ERT
563 status collapsed
564
565 \begin_layout Plain Layout
566
567 }
568 \end_layout
569
570 \end_inset
571
572 ,color=green,icolor=blue,caption=top,linebegin=
573 \begin_inset ERT
574 status collapsed
575
576 \begin_layout Plain Layout
577
578 {
579 \end_layout
580
581 \end_inset
582
583 /ROpenArrow
584 \begin_inset ERT
585 status collapsed
586
587 \begin_layout Plain Layout
588
589 }
590 \end_layout
591
592 \end_inset
593
594 ,lineend=
595 \begin_inset ERT
596 status collapsed
597
598 \begin_layout Plain Layout
599
600 {
601 \end_layout
602
603 \end_inset
604
605 /OpenArrow
606 \begin_inset ERT
607 status collapsed
608
609 \begin_layout Plain Layout
610
611 }
612 \end_layout
613
614 \end_inset
615
616 ,linewidth=2bp,captionhoffset=-5pt,captionvoffset=15pt
617 \end_layout
618
619 \end_inset
620
621 a PDF-Line comment with options
622 \end_layout
623
624 \end_inset
625
626
627 \end_layout
628
629 \begin_layout Subsection
630 PDF-Margin
631 \end_layout
632
633 \begin_layout Standard
634 This will typeset an annotation into the margin.
635  Right besides this text is an example without options: 
636 \begin_inset Flex PDF-Margin
637 status open
638
639 \begin_layout Plain Layout
640 a simple PDF-Margin comment
641 \end_layout
642
643 \end_inset
644
645
646 \end_layout
647
648 \begin_layout Standard
649 The red margin note is an example for a PDF-Margin with options.
650  
651 \begin_inset Flex PDF-Margin
652 status open
653
654 \begin_layout Plain Layout
655 \begin_inset Argument 1
656 status collapsed
657
658 \begin_layout Plain Layout
659 icon=Note,color=red,open=true,hspace=100pt
660 \end_layout
661
662 \end_inset
663
664 a PDF-Margin comment with options
665 \end_layout
666
667 \end_inset
668
669
670 \end_layout
671
672 \begin_layout Subsection
673 PDF-Markup
674 \end_layout
675
676 \begin_layout Standard
677 This will typeset so called PDF text markup annotations over some text or
678  math.
679  Here is a markup without options: 
680 \begin_inset Flex PDF-Markup
681 status open
682
683 \begin_layout Plain Layout
684 simple PDF-Markup
685 \end_layout
686
687 \end_inset
688
689
690 \end_layout
691
692 \begin_layout Standard
693 Possible types for the option 
694 \series bold
695 markup
696 \series default
697  are:
698 \end_layout
699
700 \begin_layout Description
701 Highlight The markup text will be highlighted: 
702 \begin_inset Flex PDF-Markup
703 status open
704
705 \begin_layout Plain Layout
706 \begin_inset Argument 1
707 status open
708
709 \begin_layout Plain Layout
710 \begin_inset Note Note
711 status open
712
713 \begin_layout Plain Layout
714 id=1,
715 \end_layout
716
717 \end_inset
718
719 markup=Highlight
720 \end_layout
721
722 \end_inset
723
724 Highlight PDF-Markup
725 \begin_inset Argument post:1
726 status open
727
728 \begin_layout Plain Layout
729 a comment
730 \end_layout
731
732 \end_inset
733
734
735 \end_layout
736
737 \end_inset
738
739
740 \begin_inset Note Note
741 status collapsed
742
743 \begin_layout Plain Layout
744 see the next section for the description of the option 
745 \series bold
746 id=1
747 \end_layout
748
749 \end_inset
750
751
752 \end_layout
753
754 \begin_layout Description
755 Underline The markup text will be underlined: 
756 \begin_inset Flex PDF-Markup
757 status open
758
759 \begin_layout Plain Layout
760 \begin_inset Argument 1
761 status open
762
763 \begin_layout Plain Layout
764 markup=Underline
765 \end_layout
766
767 \end_inset
768
769 Underlining PDF-Markup
770 \end_layout
771
772 \end_inset
773
774
775 \end_layout
776
777 \begin_layout Description
778 Squiggly The markup text will be underlined with a wave: 
779 \begin_inset Flex PDF-Markup
780 status open
781
782 \begin_layout Plain Layout
783 \begin_inset Argument 1
784 status open
785
786 \begin_layout Plain Layout
787 markup=Squiggly
788 \end_layout
789
790 \end_inset
791
792 Underwave PDF-Markup
793 \end_layout
794
795 \end_inset
796
797
798 \end_layout
799
800 \begin_layout Description
801 StrikeOut The markup text will be struck-out: 
802 \begin_inset Flex PDF-Markup
803 status open
804
805 \begin_layout Plain Layout
806 \begin_inset Argument 1
807 status open
808
809 \begin_layout Plain Layout
810 markup=StrikeOut
811 \end_layout
812
813 \end_inset
814
815 Striked-out PDF-Markup
816 \end_layout
817
818 \end_inset
819
820
821 \end_layout
822
823 \begin_layout Description
824 mathpopup Formula parts will be highlighted.
825
826 \series bold
827  
828 \series default
829
830 \begin_inset Note Greyedout
831 status open
832
833 \begin_layout Plain Layout
834
835 \series bold
836 Note:
837 \series default
838  The PDF-Markup inset cannot be used for this option!
839 \end_layout
840
841 \end_inset
842
843  Instead the command 
844 \series bold
845
846 \backslash
847 pdfmarkupcomment
848 \series default
849  woll be used in a formula with this scheme:
850 \begin_inset Newline newline
851 \end_inset
852
853 Command:
854 \begin_inset Newline newline
855 \end_inset
856
857
858 \series bold
859
860 \backslash
861 pdfmarkupcomment[style=mathpopup]
862 \backslash
863 {formula part}
864 \begin_inset Formula $\to$
865 \end_inset
866
867
868 \backslash
869 {
870 \backslash
871 text
872 \begin_inset space \textvisiblespace{}
873 \end_inset
874
875
876 \begin_inset Newline newline
877 \end_inset
878
879 optional comment}
880 \begin_inset Newline newline
881 \end_inset
882
883
884 \series default
885 Result:
886 \end_layout
887
888 \begin_layout Standard
889 \begin_inset Formula 
890 \[
891 \pdfmarkupcomment[style=mathpopup]{\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)}{\text{little Gauss}}
892 \]
893
894 \end_inset
895
896
897 \end_layout
898
899 \begin_layout Standard
900 The text for the comment is inserted with the inset option 
901 \family sans
902 Comment
903 \family default
904 .
905 \end_layout
906
907 \begin_layout Standard
908 PDF-Markup has some limitations:
909 \end_layout
910
911 \begin_layout Itemize
912 the markup text must not be longer than one paragraph
913 \end_layout
914
915 \begin_layout Itemize
916 the markup annotation must not be longer than one page, otherwise the recognitio
917 n of the page break will fail
918 \end_layout
919
920 \begin_layout Itemize
921 when using XeTeX you have to assure that the page dimensions are internally
922  output, e.
923 \begin_inset space \thinspace{}
924 \end_inset
925
926 g.
927 \begin_inset space \space{}
928 \end_inset
929
930 with the document class option 
931 \series bold
932 pagesize
933 \series default
934  for the KOMA-Script classes, or the option 
935 \series bold
936 pagesize
937 \series default
938  for the LaTeX-package 
939 \series bold
940 typearea
941 \series default
942 .
943 \end_layout
944
945 \begin_layout Subsection
946 PDF-Reply
947 \end_layout
948
949 \begin_layout Standard
950 \begin_inset Note Greyedout
951 status open
952
953 \begin_layout Plain Layout
954
955 \series bold
956 Attention:
957 \series default
958  Due to technical limitations PDF-Reply only works when using pdflatex.
959  On some LaTeX installations it won't even work in general.
960 \end_layout
961
962 \end_inset
963
964
965 \end_layout
966
967 \begin_layout Standard
968 With a PDF-Reply you can compose replies to PDF comments.
969  The option 
970 \series bold
971 replyto
972 \series default
973  provides a clear reference to the comment the reply refers to.
974 \end_layout
975
976 \begin_layout Standard
977 As example see the reply to the Highlight PDF-Markup from the previous section.
978  
979 \begin_inset Note Note
980 status open
981
982 \begin_layout Plain Layout
983 \begin_inset Flex PDF-Reply
984 status open
985
986 \begin_layout Plain Layout
987 \begin_inset Argument 1
988 status open
989
990 \begin_layout Plain Layout
991 id=2,replyto=1,date=D:20101211161247+01'00'
992 \end_layout
993
994 \end_inset
995
996 This is a reply.
997 \end_layout
998
999 \end_inset
1000
1001
1002 \end_layout
1003
1004 \end_inset
1005
1006  It appears in that PDF-Markup comment.
1007  To be able to reference the PDF-Markup the option 
1008 \series bold
1009 id=1
1010 \series default
1011  was added to its options.
1012  The PDF-Reply got the option 
1013 \series bold
1014 replyto=1
1015 \series default
1016 .
1017 \end_layout
1018
1019 \begin_layout Standard
1020 You can also reply to replies by adding an 
1021 \series bold
1022 id
1023 \series default
1024  option to the reply that should be replied to.
1025  As example see the reply to the reply to the PDF-Markup.
1026  
1027 \begin_inset Note Note
1028 status open
1029
1030 \begin_layout Plain Layout
1031 \begin_inset Flex PDF-Reply
1032 status open
1033
1034 \begin_layout Plain Layout
1035 \begin_inset Argument 1
1036 status open
1037
1038 \begin_layout Plain Layout
1039 replyto=2,date=D:20101212095321+01'00'
1040 \end_layout
1041
1042 \end_inset
1043
1044 Of course, you can reply to a reply.
1045 \end_layout
1046
1047 \end_inset
1048
1049
1050 \end_layout
1051
1052 \end_inset
1053
1054
1055 \end_layout
1056
1057 \begin_layout Standard
1058 PDF-Reply has limitations:
1059 \end_layout
1060
1061 \begin_layout Itemize
1062 It can not support page breaks.
1063 \end_layout
1064
1065 \begin_layout Itemize
1066 The replies will only appear in the PDF annotations on the second page.
1067  (Replies to comments without page break work smoothly.)
1068 \end_layout
1069
1070 \begin_layout Subsection
1071 PDF-Sideline
1072 \end_layout
1073
1074 \begin_layout Standard
1075 This will typeset a comment in form of identical markers on every side of
1076  the page.
1077  The yellow arrows besides this text are an example of a PDF-Sideline without
1078  any options: 
1079 \begin_inset Flex PDF-Sideline
1080 status open
1081
1082 \begin_layout Plain Layout
1083 a simple PDF-Sideline
1084 \end_layout
1085
1086 \end_inset
1087
1088
1089 \end_layout
1090
1091 \begin_layout Standard
1092 As you can see a PDF-Sideline comment without options is quite useless.
1093  PDF-Sideline is useful if you want to highlight complete parts of a page.
1094  The inset options define the layout of the marker while the normal content
1095  of the inset is the text surrounded by the markers.
1096  The content of the inset option 
1097 \family sans
1098 Comment
1099 \family default
1100  will be printed along both markers.
1101  Here is an example:
1102 \end_layout
1103
1104 \begin_layout Standard
1105 \begin_inset Flex PDF-Sideline
1106 status open
1107
1108 \begin_layout Plain Layout
1109 \begin_inset Argument 1
1110 status collapsed
1111
1112 \begin_layout Plain Layout
1113 opacity=0.33,color=magenta,icolor=cyan,caption=inline,linebegin=
1114 \begin_inset ERT
1115 status collapsed
1116
1117 \begin_layout Plain Layout
1118
1119 {
1120 \end_layout
1121
1122 \end_inset
1123
1124 /Butt
1125 \begin_inset ERT
1126 status collapsed
1127
1128 \begin_layout Plain Layout
1129
1130 }
1131 \end_layout
1132
1133 \end_inset
1134
1135 ,lineend=
1136 \begin_inset ERT
1137 status collapsed
1138
1139 \begin_layout Plain Layout
1140
1141 {
1142 \end_layout
1143
1144 \end_inset
1145
1146 /Square
1147 \begin_inset ERT
1148 status collapsed
1149
1150 \begin_layout Plain Layout
1151
1152 }
1153 \end_layout
1154
1155 \end_inset
1156
1157 ,linewidth=3bp,linesep=0.7cm
1158 \end_layout
1159
1160 \end_inset
1161
1162 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1163  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1164  voluptua.
1165  At vero eos et accusam et justo duo dolores et ea rebum.
1166  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
1167  sit amet.
1168  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1169  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1170  voluptua.
1171 \end_layout
1172
1173 \begin_layout Plain Layout
1174 At vero eos et accusam et justo duo dolores et ea rebum.
1175  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
1176  sit amet.
1177  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1178  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1179  voluptua.
1180  At vero eos et accusam et justo duo dolores et ea rebum.
1181  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
1182  sit amet.
1183 \begin_inset Argument 2
1184 status open
1185
1186 \begin_layout Plain Layout
1187 Comment text
1188 \end_layout
1189
1190 \end_inset
1191
1192
1193 \end_layout
1194
1195 \end_inset
1196
1197
1198 \end_layout
1199
1200 \begin_layout Standard
1201 PDF-Sideline has some limitations:
1202 \end_layout
1203
1204 \begin_layout Itemize
1205 the comment should not be longer than one page, otherwise the recognition
1206  of the page could fail
1207 \end_layout
1208
1209 \begin_layout Itemize
1210 when using XeTeX you have to assure that the page dimensions are internally
1211  output, e.
1212 \begin_inset space \thinspace{}
1213 \end_inset
1214
1215 g.
1216 \begin_inset space \space{}
1217 \end_inset
1218
1219 with the document class option 
1220 \series bold
1221 pagesize
1222 \series default
1223  for the KOMA-Script classes, or the option 
1224 \series bold
1225 pagesize
1226 \series default
1227  for the LaTeX-package 
1228 \series bold
1229 typearea
1230 \series default
1231 .
1232 \end_layout
1233
1234 \begin_layout Subsection
1235 PDF-Square
1236 \end_layout
1237
1238 \begin_layout Standard
1239 This will typeset a rectangular box.
1240  Here is an example without any options: 
1241 \begin_inset Flex PDF-Square
1242 status open
1243
1244 \begin_layout Plain Layout
1245 a simple PDF-Square comment
1246 \end_layout
1247
1248 \end_inset
1249
1250
1251 \end_layout
1252
1253 \begin_layout Standard
1254 Below this text you see a rectangle comment with a curvy outline as example
1255  of a PDF-Square with options.
1256 \end_layout
1257
1258 \begin_layout Standard
1259 \begin_inset Flex PDF-Square
1260 status open
1261
1262 \begin_layout Plain Layout
1263 \begin_inset Argument 1
1264 status collapsed
1265
1266 \begin_layout Plain Layout
1267 height=2cm,width=4.8cm,voffset=-2cm,hoffset=1cm,opacity=1.0,justification=right,ic
1268 olor=CornflowerBlue,bse=cloudy,bsei=2.5,linewidth=8pt
1269 \end_layout
1270
1271 \end_inset
1272
1273 A fancy PDF-Square comment
1274 \end_layout
1275
1276 \end_inset
1277
1278
1279 \begin_inset Newline newline
1280 \end_inset
1281
1282
1283 \begin_inset Newline newline
1284 \end_inset
1285
1286
1287 \begin_inset Newline newline
1288 \end_inset
1289
1290
1291 \begin_inset Newline newline
1292 \end_inset
1293
1294
1295 \end_layout
1296
1297 \begin_layout Subsection
1298 PDF-Tooltip
1299 \end_layout
1300
1301 \begin_layout Standard
1302 With this you can annotate any object with a tooltip.
1303 \begin_inset Foot
1304 status open
1305
1306 \begin_layout Plain Layout
1307 All objects that can be set into a TeX-box to measure its size.
1308 \end_layout
1309
1310 \end_inset
1311
1312
1313 \end_layout
1314
1315 \begin_layout Standard
1316 The PDF-Tooltip inset has a mandatory argument for the tooltip.
1317  The object that should be annotated is set into the PDF-Tooltip inset,
1318  the tooltip is written into the mandatory argument.
1319  Here is as example of a word with a tooltip: 
1320 \begin_inset Flex PDF-Tooltip
1321 status open
1322
1323 \begin_layout Plain Layout
1324 \begin_inset Argument post:1
1325 status open
1326
1327 \begin_layout Plain Layout
1328 This is a tooltip!
1329 \end_layout
1330
1331 \end_inset
1332
1333
1334 \color red
1335 word
1336 \end_layout
1337
1338 \end_inset
1339
1340
1341 \end_layout
1342
1343 \begin_layout Standard
1344 Since a tooltip can be used for almost any object, one can also use it for
1345  chemical notations in math: 
1346 \begin_inset Flex PDF-Tooltip
1347 status open
1348
1349 \begin_layout Plain Layout
1350 \begin_inset Argument post:1
1351 status open
1352
1353 \begin_layout Plain Layout
1354 Sulfuric acid
1355 \end_layout
1356
1357 \end_inset
1358
1359
1360 \begin_inset Formula $\ce{H2SO4}$
1361 \end_inset
1362
1363
1364 \end_layout
1365
1366 \end_inset
1367
1368
1369 \end_layout
1370
1371 \begin_layout Standard
1372 The PDF-Tooltip inset has also an option that is used to correct the size
1373  of the tooltip for math (if necessary) or to disable an annotation.
1374  Here is an example with a mathstyle option:
1375 \end_layout
1376
1377 \begin_layout Standard
1378 \begin_inset Flex PDF-Tooltip
1379 status open
1380
1381 \begin_layout Plain Layout
1382 \begin_inset Argument 1
1383 status open
1384
1385 \begin_layout Plain Layout
1386 mathstyle=
1387 \begin_inset ERT
1388 status collapsed
1389
1390 \begin_layout Plain Layout
1391
1392
1393 \backslash
1394 displaystyle
1395 \end_layout
1396
1397 \end_inset
1398
1399  
1400 \end_layout
1401
1402 \end_inset
1403
1404
1405 \begin_inset Argument post:1
1406 status open
1407
1408 \begin_layout Plain Layout
1409 little Gauß
1410 \end_layout
1411
1412 \end_inset
1413
1414
1415 \begin_inset Formula $\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)$
1416 \end_inset
1417
1418
1419 \end_layout
1420
1421 \end_inset
1422
1423  
1424 \end_layout
1425
1426 \begin_layout Section
1427 Comment definitions
1428 \end_layout
1429
1430 \begin_layout Standard
1431 The package 
1432 \series bold
1433 pdfcomment
1434 \series default
1435  provides the following environments to define or change PDF comments:
1436 \end_layout
1437
1438 \begin_layout Subsection
1439 PDF-Comment setup
1440 \begin_inset CommandInset label
1441 LatexCommand label
1442 name "sub:PDF-Comment-setup"
1443
1444 \end_inset
1445
1446
1447 \end_layout
1448
1449 \begin_layout Standard
1450 With this custom inset you can reset the global (document-wide) options
1451  at any time.
1452  For example the default color for new PDF comments is blue.
1453  To get Adobe Reader's yellow colored notes for all comments in your document,
1454  add the PDF comment setup inset to the beginning of your document and insert
1455  there the option 
1456 \series bold
1457 color=yellow
1458 \series default
1459 .
1460  This was also done in this document.
1461 \end_layout
1462
1463 \begin_layout Standard
1464 By using its optional option 
1465 \series bold
1466 local
1467 \series default
1468  you can keep the reset local within a group enclosed by TeX-braces.
1469  For example you want to reset the color only for two consecutive comments,
1470  then enclose the PDF comment setup inset and the two comment insets in
1471  TeX-braces.
1472  Here is an example:
1473 \end_layout
1474
1475 \begin_layout Standard
1476 \begin_inset ERT
1477 status collapsed
1478
1479 \begin_layout Plain Layout
1480
1481 {
1482 \end_layout
1483
1484 \end_inset
1485
1486
1487 \begin_inset Flex PDF-Comment-Setup
1488 status open
1489
1490 \begin_layout Plain Layout
1491 \begin_inset Argument 1
1492 status open
1493
1494 \begin_layout Plain Layout
1495 local
1496 \end_layout
1497
1498 \end_inset
1499
1500 color=Orange
1501 \end_layout
1502
1503 \end_inset
1504
1505
1506 \begin_inset Flex PDF-Markup
1507 status collapsed
1508
1509 \begin_layout Plain Layout
1510 PDF-Markup in orange
1511 \end_layout
1512
1513 \end_inset
1514
1515
1516 \begin_inset space ~
1517 \end_inset
1518
1519
1520 \begin_inset space ~
1521 \end_inset
1522
1523
1524 \begin_inset space ~
1525 \end_inset
1526
1527
1528 \begin_inset Flex PDF-Annotation
1529 status collapsed
1530
1531 \begin_layout Plain Layout
1532 PDF-Annotation in orange
1533 \end_layout
1534
1535 \end_inset
1536
1537
1538 \begin_inset ERT
1539 status collapsed
1540
1541 \begin_layout Plain Layout
1542
1543 }
1544 \end_layout
1545
1546 \end_inset
1547
1548
1549 \begin_inset Flex PDF-Margin
1550 status collapsed
1551
1552 \begin_layout Plain Layout
1553 default PDF-Margin comment
1554 \end_layout
1555
1556 \end_inset
1557
1558
1559 \end_layout
1560
1561 \begin_layout Subsection
1562 PDF Comment style
1563 \end_layout
1564
1565 \begin_layout Standard
1566 This environment allows you to define a style for a PDF comment that can
1567  be used by several comments.
1568  Assuming you write a Math tutorial and want to add popup explanations in
1569  the PDF for several expressions, then insert a PDF Comment style environment
1570  before your first formula.
1571  Name it for example 
1572 \series bold
1573 MathPopup
1574 \series default
1575 , set the color to white with 
1576 \series bold
1577 color=white
1578 \series default
1579  and highlight the whole formula with 
1580 \series bold
1581 markup=Highlight
1582 \series default
1583 .
1584 \end_layout
1585
1586 \begin_layout Define PDF-Comment Style
1587 \begin_inset Argument 1
1588 status open
1589
1590 \begin_layout Plain Layout
1591 MathPopup
1592 \end_layout
1593
1594 \end_inset
1595
1596 color=white,markup=Highlight
1597 \end_layout
1598
1599 \begin_layout Standard
1600 In the comments use the option 
1601 \series bold
1602 style=MathPopup
1603 \series default
1604  to use your style.
1605  Here is an example:
1606 \end_layout
1607
1608 \begin_layout Standard
1609 \begin_inset Flex PDF-Markup
1610 status open
1611
1612 \begin_layout Plain Layout
1613 \begin_inset Argument 1
1614 status open
1615
1616 \begin_layout Plain Layout
1617
1618 \family roman
1619 \series medium
1620 \shape up
1621 \size normal
1622 \emph off
1623 \bar no
1624 \strikeout off
1625 \uuline off
1626 \uwave off
1627 \noun off
1628 \color none
1629 style=
1630 \family default
1631 \series default
1632 \shape default
1633 \size default
1634 \emph default
1635 \bar default
1636 \strikeout default
1637 \uuline default
1638 \uwave default
1639 \noun default
1640 \color inherit
1641 MathPopup
1642 \end_layout
1643
1644 \end_inset
1645
1646
1647 \begin_inset Formula $P(E)$
1648 \end_inset
1649
1650
1651 \begin_inset Argument post:1
1652 status open
1653
1654 \begin_layout Plain Layout
1655
1656 \family roman
1657 \series medium
1658 \shape up
1659 \size normal
1660 \emph off
1661 \bar no
1662 \strikeout off
1663 \uuline off
1664 \uwave off
1665 \noun off
1666 \color none
1667 Probability of event E
1668 \end_layout
1669
1670 \end_inset
1671
1672
1673 \end_layout
1674
1675 \end_inset
1676
1677
1678 \end_layout
1679
1680 \begin_layout Subsection
1681 \begin_inset CommandInset label
1682 LatexCommand label
1683 name "sec:Avatars"
1684
1685 \end_inset
1686
1687 Avatars
1688 \end_layout
1689
1690 \begin_layout Standard
1691 If you are for example reviewing a document, you need to add your name to
1692  every of your comments.
1693  In case you use a special layout of your annotations, you would have to
1694  do a lot of copy-paste work.
1695  But this can be avoided if you define for every comment author a special
1696  avatar.
1697 \end_layout
1698
1699 \begin_layout Standard
1700 Assuming your name is 
1701 \begin_inset Quotes eld
1702 \end_inset
1703
1704 Oleg Testman
1705 \begin_inset Quotes erd
1706 \end_inset
1707
1708  you can define an avatar for your name using the environment 
1709 \family sans
1710 Define
1711 \begin_inset space ~
1712 \end_inset
1713
1714 Avatar
1715 \family default
1716 .
1717  Its mandatory option is the name.
1718  In your case, name it 
1719 \series bold
1720 Oleg
1721 \series default
1722 .
1723  Add behind the name of the avatar your name as author by writing 
1724 \series bold
1725 author={Oleg Testman}
1726 \series default
1727 .
1728 \begin_inset Newline newline
1729 \end_inset
1730
1731 You might use a special icon to see at the first look which comments were
1732  made by you.
1733  You therefore add behind the author-statement, separated by a comma, 
1734 \begin_inset Quotes eld
1735 \end_inset
1736
1737
1738 \series bold
1739 icon=Check
1740 \series default
1741
1742 \begin_inset Quotes erd
1743 \end_inset
1744
1745  to get a checkmark.
1746 \begin_inset Foot
1747 status open
1748
1749 \begin_layout Plain Layout
1750 For all possible icons, see the 
1751 \series bold
1752 pdfcomment
1753 \series default
1754  manual.
1755 \end_layout
1756
1757 \end_inset
1758
1759  the checkmark should have a green color so that you add 
1760 \series bold
1761 color=lime
1762 \series default
1763  to the avatar definition.
1764  Your whole definition reads now
1765 \begin_inset Newline newline
1766 \end_inset
1767
1768
1769 \series bold
1770 author={Oleg Testman},icon=Check,color=lime
1771 \end_layout
1772
1773 \begin_layout Define Avatar
1774 \begin_inset Argument 1
1775 status open
1776
1777 \begin_layout Plain Layout
1778 Oleg
1779 \end_layout
1780
1781 \end_inset
1782
1783 author={Oleg Testman},icon=Check,color=lime
1784 \end_layout
1785
1786 \begin_layout Standard
1787 To use now your avatar for PDF comments you have two choices:
1788 \end_layout
1789
1790 \begin_layout Enumerate
1791 You set up that all PDF comments in the document use your avatar.
1792  This is done by inserting the custom inset 
1793 \family sans
1794 PDF
1795 \begin_inset space ~
1796 \end_inset
1797
1798 Comment-Setup
1799 \family default
1800  before the first PDF comment in your document.
1801  Insert to this inset 
1802 \series bold
1803 avatar=Oleg
1804 \series default
1805 .
1806 \end_layout
1807
1808 \begin_layout Enumerate
1809 You add 
1810 \series bold
1811 avatar=Oleg
1812 \series default
1813  to the options of a particular PDF comment.
1814  The avatar will then only be used for this comment.
1815 \end_layout
1816
1817 \begin_layout Standard
1818 Here is an example for the 
1819 \family sans
1820 PDF
1821 \begin_inset space ~
1822 \end_inset
1823
1824 Comment-Setup
1825 \family default
1826  method:
1827 \begin_inset Flex PDF-Comment-Setup
1828 status open
1829
1830 \begin_layout Plain Layout
1831 avatar=Oleg
1832 \end_layout
1833
1834 \end_inset
1835
1836
1837 \begin_inset Flex PDF-Annotation
1838 status open
1839
1840 \begin_layout Plain Layout
1841 Oleg said: Wow, that's nice!
1842 \end_layout
1843
1844 \end_inset
1845
1846
1847 \begin_inset Newline newline
1848 \end_inset
1849
1850 and here is another comment:
1851 \begin_inset Flex PDF-Annotation
1852 status open
1853
1854 \begin_layout Plain Layout
1855 Oleg also said: I hate to repeat myself.
1856 \end_layout
1857
1858 \end_inset
1859
1860
1861 \end_layout
1862
1863 \begin_layout Define Avatar
1864 \begin_inset Argument 1
1865 status open
1866
1867 \begin_layout Plain Layout
1868 Dolittle
1869 \end_layout
1870
1871 \end_inset
1872
1873 color=NavyBlue,opacity=0.5,open=false,icon=Circle,author={Dr.
1874  Dolittle}
1875 \end_layout
1876
1877 \begin_layout Standard
1878 Here is an example where another avatar 
1879 \begin_inset Quotes eld
1880 \end_inset
1881
1882 Dolittle
1883 \begin_inset Quotes erd
1884 \end_inset
1885
1886  is only used for this comment:
1887 \begin_inset Flex PDF-Margin
1888 status open
1889
1890 \begin_layout Plain Layout
1891 \begin_inset Argument 1
1892 status open
1893
1894 \begin_layout Plain Layout
1895 avatar=Dolittle
1896 \end_layout
1897
1898 \end_inset
1899
1900 I am Dr.
1901  Dolittle! Respect my authority!
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \end_layout
1908
1909 \begin_layout Section
1910 List of PDF comments
1911 \end_layout
1912
1913 \begin_layout Standard
1914 You can insert a list with all PDF comments using the environment 
1915 \family sans
1916 List of PDF comments
1917 \family default
1918 .
1919  By specifying options for it you can determine what parts of the comments
1920  should appear in the list.
1921  Here is the list for this document where only the comments of a defined
1922  author are printed:
1923 \end_layout
1924
1925 \begin_layout List of PDF Comments
1926 \begin_inset Argument 1
1927 status open
1928
1929 \begin_layout Plain Layout
1930 liststyle=
1931 \begin_inset ERT
1932 status collapsed
1933
1934 \begin_layout Plain Layout
1935
1936 {
1937 \end_layout
1938
1939 \end_inset
1940
1941 AuthorComment
1942 \begin_inset ERT
1943 status collapsed
1944
1945 \begin_layout Plain Layout
1946
1947 }
1948 \end_layout
1949
1950 \end_inset
1951
1952 , heading =
1953 \begin_inset ERT
1954 status collapsed
1955
1956 \begin_layout Plain Layout
1957
1958 {
1959 \end_layout
1960
1961 \end_inset
1962
1963 List of PDF comments
1964 \begin_inset ERT
1965 status collapsed
1966
1967 \begin_layout Plain Layout
1968
1969 }
1970 \end_layout
1971
1972 \end_inset
1973
1974
1975 \end_layout
1976
1977 \end_inset
1978
1979
1980 \end_layout
1981
1982 \begin_layout Standard
1983 You can also define your own style using the environment
1984 \begin_inset Newline newline
1985 \end_inset
1986
1987
1988 \family sans
1989 Define
1990 \begin_inset space ~
1991 \end_inset
1992
1993 PDF
1994 \begin_inset space ~
1995 \end_inset
1996
1997 Comment
1998 \begin_inset space ~
1999 \end_inset
2000
2001 List
2002 \begin_inset space ~
2003 \end_inset
2004
2005 Style
2006 \begin_inset Newline newline
2007 \end_inset
2008
2009
2010 \family default
2011 if you know enough about the tricky LaTeX internals.
2012  With the environment
2013 \begin_inset Newline newline
2014 \end_inset
2015
2016
2017 \family sans
2018 Set
2019 \begin_inset space ~
2020 \end_inset
2021
2022 PDF
2023 \begin_inset space ~
2024 \end_inset
2025
2026 Comment
2027 \begin_inset space ~
2028 \end_inset
2029
2030 List
2031 \begin_inset space ~
2032 \end_inset
2033
2034 Style
2035 \begin_inset Newline newline
2036 \end_inset
2037
2038
2039 \family default
2040 you can set a list style.
2041 \end_layout
2042
2043 \begin_layout Define PDF-Comment List Style
2044 \begin_inset Argument 1
2045 status open
2046
2047 \begin_layout Plain Layout
2048 MyStyle
2049 \end_layout
2050
2051 \end_inset
2052
2053
2054 \backslash
2055 makeatletter
2056 \backslash
2057 pc@lopt@author
2058 \backslash
2059  - 
2060 \backslash
2061 pc@lopt@subject
2062 \backslash
2063  (
2064 \backslash
2065 pc@lopt@deadline)
2066 \backslash
2067 makeatother
2068 \end_layout
2069
2070 \begin_layout Set PDF-Comment List Style
2071 AuthorCommentDeadline
2072 \end_layout
2073
2074 \begin_layout Standard
2075 \begin_inset Note Greyedout
2076 status open
2077
2078 \begin_layout Plain Layout
2079
2080 \series bold
2081 Note:
2082 \series default
2083  Only one list of comments can be printed in the PDF.
2084 \end_layout
2085
2086 \end_inset
2087
2088
2089 \end_layout
2090
2091 \begin_layout Section
2092 General Hints
2093 \end_layout
2094
2095 \begin_layout Itemize
2096 To be able to use all kinds of colors and color definitions you must load
2097  the LaTeX package 
2098 \series bold
2099 xcolor
2100 \series default
2101  in the document preamble this way:
2102 \begin_inset Newline newline
2103 \end_inset
2104
2105
2106 \series bold
2107
2108 \backslash
2109 usepackage[svgnames,rgb]{xcolor}
2110 \end_layout
2111
2112 \begin_layout Itemize
2113 If you have two consecutive PDF
2114 \begin_inset space ~
2115 \end_inset
2116
2117 comment insets, the will appear in the PDF one over each other:
2118 \begin_inset Flex PDF-Comment-Setup
2119 status open
2120
2121 \begin_layout Plain Layout
2122 avatar=Oleg
2123 \end_layout
2124
2125 \end_inset
2126
2127
2128 \begin_inset Flex PDF-Annotation
2129 status open
2130
2131 \begin_layout Plain Layout
2132 Oleg said: Wow, that's nice!
2133 \end_layout
2134
2135 \end_inset
2136
2137
2138 \begin_inset Flex PDF-Annotation
2139 status open
2140
2141 \begin_layout Plain Layout
2142 Oleg also said: I hate to repeat myself.
2143 \end_layout
2144
2145 \end_inset
2146
2147
2148 \begin_inset Newline newline
2149 \end_inset
2150
2151 To avoid that separate them with whitespace like protected space:
2152 \begin_inset Flex PDF-Annotation
2153 status open
2154
2155 \begin_layout Plain Layout
2156 Oleg said: Wow, that's nice!
2157 \end_layout
2158
2159 \end_inset
2160
2161
2162 \begin_inset space ~
2163 \end_inset
2164
2165
2166 \begin_inset space ~
2167 \end_inset
2168
2169
2170 \begin_inset space ~
2171 \end_inset
2172
2173
2174 \begin_inset space ~
2175 \end_inset
2176
2177
2178 \begin_inset space ~
2179 \end_inset
2180
2181
2182 \begin_inset space ~
2183 \end_inset
2184
2185
2186 \begin_inset space ~
2187 \end_inset
2188
2189
2190 \begin_inset Flex PDF-Annotation
2191 status open
2192
2193 \begin_layout Plain Layout
2194 Oleg also said: I hate to repeat myself.
2195 \end_layout
2196
2197 \end_inset
2198
2199
2200 \end_layout
2201
2202 \begin_layout Itemize
2203 You cannot use non-Latin characters in your comment or in the author name.
2204  The reason is that PDFs use a special character encoding that is not compatible
2205  with LaTeX.
2206 \end_layout
2207
2208 \end_body
2209 \end_document