]> git.lyx.org Git - lyx.git/blob - lib/examples/PDF-comment.lyx
PDF-comment.lyx: remove unneeded preamble code
[lyx.git] / lib / examples / PDF-comment.lyx
1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 479
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 pdfcomment"
49 \pdf_author "Uwe Stöhr"
50 \pdf_subject "pdfcomment"
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 0
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 a description.
132 \end_layout
133
134 \end_inset
135
136
137 \end_layout
138
139 \begin_layout Title
140 Description of the module pdfcomment
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  And you can also define a special layout for the comment which you can
155  use several 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 comments 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 all PDF comment types you can add a lot of things to the option of
217  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 blue 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's 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 beside 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 command 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 id=1,markup=Highlight
711 \end_layout
712
713 \end_inset
714
715 Highlight PDF-Markup
716 \begin_inset Argument post:1
717 status open
718
719 \begin_layout Plain Layout
720 a comment
721 \end_layout
722
723 \end_inset
724
725
726 \end_layout
727
728 \end_inset
729
730
731 \begin_inset Note Note
732 status collapsed
733
734 \begin_layout Plain Layout
735 see the next section for the description of the option 
736 \series bold
737 id=1
738 \end_layout
739
740 \end_inset
741
742
743 \end_layout
744
745 \begin_layout Description
746 Underline The markup text will be underlined: 
747 \begin_inset Flex PDF-Markup
748 status open
749
750 \begin_layout Plain Layout
751 \begin_inset Argument 1
752 status open
753
754 \begin_layout Plain Layout
755 markup=Underline
756 \end_layout
757
758 \end_inset
759
760 Underlining PDF-Markup
761 \end_layout
762
763 \end_inset
764
765
766 \end_layout
767
768 \begin_layout Description
769 Squiggly The markup text will be underlined with a wave: 
770 \begin_inset Flex PDF-Markup
771 status open
772
773 \begin_layout Plain Layout
774 \begin_inset Argument 1
775 status open
776
777 \begin_layout Plain Layout
778 markup=Squiggly
779 \end_layout
780
781 \end_inset
782
783 Underwave PDF-Markup
784 \end_layout
785
786 \end_inset
787
788
789 \end_layout
790
791 \begin_layout Description
792 StrikeOut The markup text will be struck-out: 
793 \begin_inset Flex PDF-Markup
794 status open
795
796 \begin_layout Plain Layout
797 \begin_inset Argument 1
798 status open
799
800 \begin_layout Plain Layout
801 markup=StrikeOut
802 \end_layout
803
804 \end_inset
805
806 Striked-out PDF-Markup
807 \end_layout
808
809 \end_inset
810
811
812 \end_layout
813
814 \begin_layout Standard
815 The text for the comment is inserted with the inset option 
816 \family sans
817 Comment
818 \family default
819 .
820 \end_layout
821
822 \begin_layout Standard
823 PDF-Markup has some limitations:
824 \end_layout
825
826 \begin_layout Itemize
827 it is only suitable for text or inline math!
828 \end_layout
829
830 \begin_layout Itemize
831 the markup text must not be longer than one paragraph
832 \end_layout
833
834 \begin_layout Itemize
835 the markup annotation must not be longer than one page, otherwise the recognitio
836 n of the page break will fail
837 \end_layout
838
839 \begin_layout Itemize
840 when using XeTeX you have to assure that the page dimensions are internally
841  output, e.
842 \begin_inset space \thinspace{}
843 \end_inset
844
845 g.
846 \begin_inset space \space{}
847 \end_inset
848
849 with the document class option 
850 \series bold
851 pagesize
852 \series default
853  for the KOMA-Script classes, or the option 
854 \series bold
855 pagesize
856 \series default
857  for the LaTeX-package 
858 \series bold
859 typearea
860 \series default
861 .
862 \end_layout
863
864 \begin_layout Subsection
865 PDF-Reply
866 \end_layout
867
868 \begin_layout Standard
869 With a PDF-Reply you can compose replies to PDF comments.
870  The option 
871 \series bold
872 replyto
873 \series default
874  provides a clear reference to the comment the reply refers to.
875 \end_layout
876
877 \begin_layout Standard
878 As example see the reply to the Highlight PDF-Markup from the previous section.
879  
880 \begin_inset Flex PDF-Reply
881 status open
882
883 \begin_layout Plain Layout
884 \begin_inset Argument 1
885 status open
886
887 \begin_layout Plain Layout
888 id=2,replyto=1,date=D:20101211161247+01'00'
889 \end_layout
890
891 \end_inset
892
893 This is a reply.
894 \end_layout
895
896 \end_inset
897
898  It appears in that PDF-Markup comment.
899  To be able to reference the PDF-Markup the option 
900 \series bold
901 id=1
902 \series default
903  was added to its options.
904  The PDF-Reply got the option 
905 \series bold
906 replyto=1
907 \series default
908 .
909 \end_layout
910
911 \begin_layout Standard
912 You can also reply to replies by adding an 
913 \series bold
914 id
915 \series default
916  option to the reply that should be replied to.
917  As example see the reply to the reply to the PDF-Markup.
918  
919 \begin_inset Flex PDF-Reply
920 status open
921
922 \begin_layout Plain Layout
923 \begin_inset Argument 1
924 status open
925
926 \begin_layout Plain Layout
927 replyto=2,date=D:20101212095321+01'00'
928 \end_layout
929
930 \end_inset
931
932 Of course, you can reply to a reply.
933 \end_layout
934
935 \end_inset
936
937
938 \end_layout
939
940 \begin_layout Standard
941 \begin_inset Note Greyedout
942 status open
943
944 \begin_layout Plain Layout
945
946 \series bold
947 Note:
948 \series default
949  Due to technical reasons PDF-Reply works only when using pdflatex.
950 \end_layout
951
952 \end_inset
953
954
955 \end_layout
956
957 \begin_layout Standard
958 PDF-Reply has some further limitations:
959 \end_layout
960
961 \begin_layout Itemize
962 It can not support page breaks.
963 \end_layout
964
965 \begin_layout Itemize
966 The replies will only appear in the PDF annotations on the second page.
967  (Replies to comments without page break work smoothly.)
968 \end_layout
969
970 \begin_layout Subsection
971 PDF-Sideline
972 \end_layout
973
974 \begin_layout Standard
975 This will typeset a comment in form of identical markers on every side of
976  the page.
977  The yellow arrows besides this text is an example without any options:
978  
979 \begin_inset Flex PDF-Sideline
980 status open
981
982 \begin_layout Plain Layout
983 a simple PDF-Sideline
984 \end_layout
985
986 \end_inset
987
988
989 \end_layout
990
991 \begin_layout Standard
992 As you can see a PDF-Sideline comment without options is quite useless.
993  PDF-Sideline is useful if you want to highlight complete parts of a page.
994  The inset options define the layout of the marker while the normal content
995  of the inset is the text surrounded by the markers.
996  The content of the inset option 
997 \family sans
998 Comment
999 \family default
1000  will be printed along both markers.
1001  Here is an example:
1002 \end_layout
1003
1004 \begin_layout Standard
1005 \begin_inset Flex PDF-Sideline
1006 status open
1007
1008 \begin_layout Plain Layout
1009 \begin_inset Argument 1
1010 status open
1011
1012 \begin_layout Plain Layout
1013 opacity=0.33,color=magenta,icolor=cyan,caption=inline,linebegin=
1014 \begin_inset ERT
1015 status collapsed
1016
1017 \begin_layout Plain Layout
1018
1019 {
1020 \end_layout
1021
1022 \end_inset
1023
1024 /Butt
1025 \begin_inset ERT
1026 status collapsed
1027
1028 \begin_layout Plain Layout
1029
1030 }
1031 \end_layout
1032
1033 \end_inset
1034
1035 ,lineend=
1036 \begin_inset ERT
1037 status collapsed
1038
1039 \begin_layout Plain Layout
1040
1041 {
1042 \end_layout
1043
1044 \end_inset
1045
1046 /Square
1047 \begin_inset ERT
1048 status collapsed
1049
1050 \begin_layout Plain Layout
1051
1052 }
1053 \end_layout
1054
1055 \end_inset
1056
1057 ,linewidth=3bp,linesep=0.7cm
1058 \end_layout
1059
1060 \end_inset
1061
1062 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1063  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1064  voluptua.
1065  At vero eos et accusam et justo duo dolores et ea rebum.
1066  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
1067  sit amet.
1068  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1069  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1070  voluptua.
1071 \end_layout
1072
1073 \begin_layout Plain Layout
1074 At vero eos et accusam et justo duo dolores et ea rebum.
1075  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
1076  sit amet.
1077  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
1078  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
1079  voluptua.
1080  At vero eos et accusam et justo duo dolores et ea rebum.
1081  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
1082  sit amet.
1083 \begin_inset Argument 2
1084 status open
1085
1086 \begin_layout Plain Layout
1087 Comment text
1088 \end_layout
1089
1090 \end_inset
1091
1092
1093 \end_layout
1094
1095 \end_inset
1096
1097
1098 \end_layout
1099
1100 \begin_layout Standard
1101 PDF-Sideline has some limitations:
1102 \end_layout
1103
1104 \begin_layout Itemize
1105 the markup annotation should not be longer than one page, otherwise the
1106  recognition of the page could fail
1107 \end_layout
1108
1109 \begin_layout Itemize
1110 when using XeTeX you have to assure that the page dimensions are internally
1111  output, e.
1112 \begin_inset space \thinspace{}
1113 \end_inset
1114
1115 g.
1116 \begin_inset space \space{}
1117 \end_inset
1118
1119 with the document class option 
1120 \series bold
1121 pagesize
1122 \series default
1123  for the KOMA-Script classes, or the option 
1124 \series bold
1125 pagesize
1126 \series default
1127  for the LaTeX-package 
1128 \series bold
1129 typearea
1130 \series default
1131 .
1132 \end_layout
1133
1134 \begin_layout Subsection
1135 PDF-Square
1136 \end_layout
1137
1138 \begin_layout Standard
1139 This will typeset a rectangular box.
1140  Here is an example without any options: 
1141 \begin_inset Flex PDF-Square
1142 status open
1143
1144 \begin_layout Plain Layout
1145 a simple PDF-Square comment
1146 \end_layout
1147
1148 \end_inset
1149
1150
1151 \end_layout
1152
1153 \begin_layout Standard
1154 Below this text you see a rectangle comment with a curvy outline as example
1155  of a PDF-Square with options.
1156 \end_layout
1157
1158 \begin_layout Standard
1159 \begin_inset Flex PDF-Square
1160 status open
1161
1162 \begin_layout Plain Layout
1163 \begin_inset Argument 1
1164 status collapsed
1165
1166 \begin_layout Plain Layout
1167 height=2cm,width=4.8cm,voffset=-2cm,hoffset=1cm,opacity=1.0,justification=right,ic
1168 olor=CornflowerBlue,bse=cloudy,bsei=2.5,linewidth=8pt
1169 \end_layout
1170
1171 \end_inset
1172
1173 A fancy PDF-Square comment
1174 \end_layout
1175
1176 \end_inset
1177
1178
1179 \begin_inset Newline newline
1180 \end_inset
1181
1182
1183 \begin_inset Newline newline
1184 \end_inset
1185
1186
1187 \begin_inset Newline newline
1188 \end_inset
1189
1190
1191 \begin_inset Newline newline
1192 \end_inset
1193
1194
1195 \end_layout
1196
1197 \begin_layout Subsection
1198 PDF-Tooltip
1199 \end_layout
1200
1201 \begin_layout Standard
1202 With this you can annotate any object with a tooltip.
1203 \begin_inset Foot
1204 status open
1205
1206 \begin_layout Plain Layout
1207 All objects that can be set into a TeX-box to measure its size.
1208 \end_layout
1209
1210 \end_inset
1211
1212
1213 \end_layout
1214
1215 \begin_layout Standard
1216 The PDF-Tooltip inset has a mandatory argument for the tooltip.
1217  The object that should be annotated is set into the PDF-Tooltip inset,
1218  the tooltip is written into the mandatory argument of the inset.
1219  Here is an example of a word with a tooltip: 
1220 \begin_inset Flex PDF-Tooltip
1221 status open
1222
1223 \begin_layout Plain Layout
1224 \begin_inset Argument post:1
1225 status open
1226
1227 \begin_layout Plain Layout
1228 This is a tooltip!
1229 \end_layout
1230
1231 \end_inset
1232
1233
1234 \color red
1235 words
1236 \end_layout
1237
1238 \end_inset
1239
1240
1241 \end_layout
1242
1243 \begin_layout Standard
1244 As the object for the tooltip can be almost anything, we can also use it
1245  for chemical notations in math: 
1246 \begin_inset Flex PDF-Tooltip
1247 status open
1248
1249 \begin_layout Plain Layout
1250 \begin_inset Argument post:1
1251 status open
1252
1253 \begin_layout Plain Layout
1254 Sulfuric acid
1255 \end_layout
1256
1257 \end_inset
1258
1259
1260 \begin_inset Formula $\ce{H2SO4}$
1261 \end_inset
1262
1263
1264 \end_layout
1265
1266 \end_inset
1267
1268
1269 \end_layout
1270
1271 \begin_layout Standard
1272 The PDF-Tooltip inset has also an optional argument that is used to correct
1273  the size of tooltips for math (if necessary) or to disable an annotation.
1274  Here is an example with a mathstyle option:
1275 \end_layout
1276
1277 \begin_layout Standard
1278 \begin_inset Flex PDF-Tooltip
1279 status open
1280
1281 \begin_layout Plain Layout
1282 \begin_inset Argument 1
1283 status open
1284
1285 \begin_layout Plain Layout
1286 mathstyle=
1287 \begin_inset ERT
1288 status collapsed
1289
1290 \begin_layout Plain Layout
1291
1292
1293 \backslash
1294
1295 \end_layout
1296
1297 \end_inset
1298
1299 displaystyle
1300 \end_layout
1301
1302 \end_inset
1303
1304
1305 \begin_inset Argument post:1
1306 status open
1307
1308 \begin_layout Plain Layout
1309 little Gauß
1310 \end_layout
1311
1312 \end_inset
1313
1314
1315 \begin_inset Formula $x^{2}+2xy+y^{2}\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)$
1316 \end_inset
1317
1318
1319 \end_layout
1320
1321 \end_inset
1322
1323  
1324 \end_layout
1325
1326 \begin_layout Section
1327 Comment definitions
1328 \end_layout
1329
1330 \begin_layout Standard
1331 The package 
1332 \series bold
1333 pdfcomment
1334 \series default
1335  provides the following environments to define or change PDF comments:
1336 \end_layout
1337
1338 \begin_layout Subsection
1339 PDF-Comment setup
1340 \begin_inset CommandInset label
1341 LatexCommand label
1342 name "sub:PDF-Comment-setup"
1343
1344 \end_inset
1345
1346
1347 \end_layout
1348
1349 \begin_layout Standard
1350 With this custom inset you can reset the global (document-wide) options
1351  at any time.
1352  For example the default color for new PDF comments is blue.
1353  To get Adobe Reader's yellow colored notes for all comments in your document,
1354  add the PDF comment setup inset to the beginning of your document and insert
1355  there the option 
1356 \series bold
1357 color=yellow
1358 \series default
1359 .
1360  This was also done in this document.
1361 \end_layout
1362
1363 \begin_layout Standard
1364 By using its optional option 
1365 \series bold
1366 local
1367 \series default
1368  you can keep the reset local within a group enclosed by TeX-braces.
1369  For example you want to reset the color only for two consecutive comments,
1370  then enclose the PDF comment setup inset and the two comment insets in
1371  TeX-braces.
1372  Here is an example:
1373 \end_layout
1374
1375 \begin_layout Standard
1376 \begin_inset ERT
1377 status collapsed
1378
1379 \begin_layout Plain Layout
1380
1381 {
1382 \end_layout
1383
1384 \end_inset
1385
1386
1387 \begin_inset Flex PDF-Comment-Setup
1388 status open
1389
1390 \begin_layout Plain Layout
1391 \begin_inset Argument 1
1392 status open
1393
1394 \begin_layout Plain Layout
1395 local
1396 \end_layout
1397
1398 \end_inset
1399
1400 color=Orange
1401 \end_layout
1402
1403 \end_inset
1404
1405
1406 \begin_inset Flex PDF-Markup
1407 status collapsed
1408
1409 \begin_layout Plain Layout
1410 PDF-Markup in orange
1411 \end_layout
1412
1413 \end_inset
1414
1415
1416 \begin_inset space ~
1417 \end_inset
1418
1419
1420 \begin_inset space ~
1421 \end_inset
1422
1423
1424 \begin_inset space ~
1425 \end_inset
1426
1427
1428 \begin_inset Flex PDF-Annotation
1429 status collapsed
1430
1431 \begin_layout Plain Layout
1432 PDF-Annotation in orange
1433 \end_layout
1434
1435 \end_inset
1436
1437
1438 \begin_inset ERT
1439 status collapsed
1440
1441 \begin_layout Plain Layout
1442
1443 }
1444 \end_layout
1445
1446 \end_inset
1447
1448
1449 \begin_inset Flex PDF-Margin
1450 status collapsed
1451
1452 \begin_layout Plain Layout
1453 default PDF-Margin comment
1454 \end_layout
1455
1456 \end_inset
1457
1458
1459 \end_layout
1460
1461 \begin_layout Subsection
1462 PDF Comment style
1463 \end_layout
1464
1465 \begin_layout Standard
1466 This environment allows you to define a style for a PDF comment that can
1467  be used by several comments.
1468  Assuming you write a Math tutorial and want to add popup explanations in
1469  the PDF for several expressions, then insert a PDF Comment style environment
1470  before your first formula.
1471  Name it for example 
1472 \series bold
1473 MathPopup
1474 \series default
1475 , set the color to white with 
1476 \series bold
1477 color=white
1478 \series default
1479  and highlight the whole formula with 
1480 \series bold
1481 markup=Highlight
1482 \series default
1483 .
1484 \end_layout
1485
1486 \begin_layout Define PDF-Comment Style
1487 \begin_inset Argument 1
1488 status open
1489
1490 \begin_layout Plain Layout
1491 MathPopup
1492 \end_layout
1493
1494 \end_inset
1495
1496 color=white,markup=Highlight
1497 \end_layout
1498
1499 \begin_layout Standard
1500 In the comments use the option 
1501 \series bold
1502 style=MathPopup
1503 \series default
1504  to use your style.
1505  Here is an example:
1506 \end_layout
1507
1508 \begin_layout Standard
1509 \begin_inset Flex PDF-Markup
1510 status open
1511
1512 \begin_layout Plain Layout
1513 \begin_inset Argument 1
1514 status open
1515
1516 \begin_layout Plain Layout
1517
1518 \family roman
1519 \series medium
1520 \shape up
1521 \size normal
1522 \emph off
1523 \bar no
1524 \strikeout off
1525 \uuline off
1526 \uwave off
1527 \noun off
1528 \color none
1529 style=
1530 \family default
1531 \series default
1532 \shape default
1533 \size default
1534 \emph default
1535 \bar default
1536 \strikeout default
1537 \uuline default
1538 \uwave default
1539 \noun default
1540 \color inherit
1541 MathPopup
1542 \end_layout
1543
1544 \end_inset
1545
1546
1547 \begin_inset Formula $P(E)$
1548 \end_inset
1549
1550
1551 \begin_inset Argument post:1
1552 status open
1553
1554 \begin_layout Plain Layout
1555
1556 \family roman
1557 \series medium
1558 \shape up
1559 \size normal
1560 \emph off
1561 \bar no
1562 \strikeout off
1563 \uuline off
1564 \uwave off
1565 \noun off
1566 \color none
1567 Probability of event E
1568 \end_layout
1569
1570 \end_inset
1571
1572
1573 \end_layout
1574
1575 \end_inset
1576
1577
1578 \end_layout
1579
1580 \begin_layout Subsection
1581 \begin_inset CommandInset label
1582 LatexCommand label
1583 name "sec:Avatars"
1584
1585 \end_inset
1586
1587 Avatars
1588 \end_layout
1589
1590 \begin_layout Standard
1591 If you are for example reviewing a document, you need to add your name to
1592  every of your comments.
1593  In case you use a special layout of your annotations, you would have to
1594  do a lot of copy-paste work.
1595  But this can be avoided if you define for every person a special avatar.
1596 \end_layout
1597
1598 \begin_layout Standard
1599 Assuming your name is 
1600 \begin_inset Quotes eld
1601 \end_inset
1602
1603 Oleg Testman
1604 \begin_inset Quotes erd
1605 \end_inset
1606
1607  you can define an avatar for your using the environment Define
1608 \begin_inset space ~
1609 \end_inset
1610
1611 Avatar.
1612  Its mandatory option is the name.
1613  In your case, name it 
1614 \series bold
1615 Oleg
1616 \series default
1617 .
1618  Add behind the name of the avatar your name as author by writing 
1619 \series bold
1620 author={Oleg Testman}
1621 \series default
1622 .
1623 \begin_inset Newline newline
1624 \end_inset
1625
1626 You might use a special icon to see at the first look which comments were
1627  made by you.
1628  You therefore add behind the author-statement, separated by a comma, 
1629 \series bold
1630 icon=Check
1631 \series default
1632
1633 \begin_inset Quotes erd
1634 \end_inset
1635
1636  to get a checkmark.
1637 \begin_inset Foot
1638 status open
1639
1640 \begin_layout Plain Layout
1641 For all possible icons, see the 
1642 \series bold
1643 pdfcomment
1644 \series default
1645  manual.
1646 \end_layout
1647
1648 \end_inset
1649
1650  the checkmark should have a green color so that you add 
1651 \series bold
1652 color=lime
1653 \series default
1654  to the avatar definition.
1655  Your whole definition reads now
1656 \begin_inset Newline newline
1657 \end_inset
1658
1659
1660 \series bold
1661 author={Oleg Testman},icon=Check,color=lime
1662 \end_layout
1663
1664 \begin_layout Define Avatar
1665 \begin_inset Argument 1
1666 status open
1667
1668 \begin_layout Plain Layout
1669 Oleg
1670 \end_layout
1671
1672 \end_inset
1673
1674 author={Oleg Testman},icon=Check,color=lime
1675 \end_layout
1676
1677 \begin_layout Standard
1678 To use now your avatar for PDF comments you have two choices:
1679 \end_layout
1680
1681 \begin_layout Enumerate
1682 You set up ALL PDF comments in the document using your avatar.
1683  This is done by inserting the custom inset 
1684 \family sans
1685 PDF
1686 \begin_inset space ~
1687 \end_inset
1688
1689 Comment-Setup
1690 \family default
1691  before the first PDF comment in your document.
1692  Insert to this inset 
1693 \series bold
1694 avatar=Oleg
1695 \series default
1696 .
1697 \end_layout
1698
1699 \begin_layout Enumerate
1700 You add 
1701 \series bold
1702 avatar=Oleg
1703 \series default
1704  to the options of a particular PDF comment.
1705  The avatar will then only be used for this comment.
1706 \end_layout
1707
1708 \begin_layout Standard
1709 Here is an example for the 
1710 \family sans
1711 PDF
1712 \begin_inset space ~
1713 \end_inset
1714
1715 Comment-Setup
1716 \family default
1717  method:
1718 \begin_inset Flex PDF-Comment-Setup
1719 status open
1720
1721 \begin_layout Plain Layout
1722 avatar=Oleg
1723 \end_layout
1724
1725 \end_inset
1726
1727
1728 \begin_inset Flex PDF-Annotation
1729 status open
1730
1731 \begin_layout Plain Layout
1732 Oleg said: Wow, that's nice!
1733 \end_layout
1734
1735 \end_inset
1736
1737
1738 \begin_inset Newline newline
1739 \end_inset
1740
1741 and here is another comment:
1742 \begin_inset Flex PDF-Annotation
1743 status open
1744
1745 \begin_layout Plain Layout
1746 Oleg also said: I hate to repeat myself.
1747 \end_layout
1748
1749 \end_inset
1750
1751
1752 \end_layout
1753
1754 \begin_layout Define Avatar
1755 \begin_inset Argument 1
1756 status open
1757
1758 \begin_layout Plain Layout
1759 Dolittle
1760 \end_layout
1761
1762 \end_inset
1763
1764 color=NavyBlue,opacity=0.5,open=false,icon=Circle,author={Dr.
1765  Dolittle}
1766 \end_layout
1767
1768 \begin_layout Standard
1769 Here is an example where another avatar 
1770 \begin_inset Quotes eld
1771 \end_inset
1772
1773 Dolittle
1774 \begin_inset Quotes erd
1775 \end_inset
1776
1777  is only used for this comment:
1778 \begin_inset Flex PDF-Margin
1779 status open
1780
1781 \begin_layout Plain Layout
1782 \begin_inset Argument 1
1783 status open
1784
1785 \begin_layout Plain Layout
1786 avatar=Dolittle
1787 \end_layout
1788
1789 \end_inset
1790
1791 I am Dr.
1792  Dolittle! Respect my authority!
1793 \end_layout
1794
1795 \end_inset
1796
1797
1798 \end_layout
1799
1800 \begin_layout Section
1801 List of PDF comments
1802 \end_layout
1803
1804 \begin_layout Standard
1805 You can insert a list with all PDF comments using the environment List of
1806  PDF comments.
1807  By specifying options for it you can determine what parts of the comments
1808  shpuld appear in the list.
1809  Here is the list for this document where only the comments of a defined
1810  author are printed:
1811 \end_layout
1812
1813 \begin_layout List of PDF Comments
1814 \begin_inset Argument 1
1815 status open
1816
1817 \begin_layout Plain Layout
1818 liststyle=
1819 \begin_inset ERT
1820 status collapsed
1821
1822 \begin_layout Plain Layout
1823
1824 {
1825 \end_layout
1826
1827 \end_inset
1828
1829 AuthorComment
1830 \begin_inset ERT
1831 status collapsed
1832
1833 \begin_layout Plain Layout
1834
1835 }
1836 \end_layout
1837
1838 \end_inset
1839
1840 , heading =
1841 \begin_inset ERT
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845
1846 {
1847 \end_layout
1848
1849 \end_inset
1850
1851 List of PDF comments
1852 \begin_inset ERT
1853 status collapsed
1854
1855 \begin_layout Plain Layout
1856
1857 }
1858 \end_layout
1859
1860 \end_inset
1861
1862
1863 \end_layout
1864
1865 \end_inset
1866
1867
1868 \end_layout
1869
1870 \begin_layout Standard
1871 You can also define your own style using the environment
1872 \begin_inset Newline newline
1873 \end_inset
1874
1875
1876 \family sans
1877 Define
1878 \begin_inset space ~
1879 \end_inset
1880
1881 PDF
1882 \begin_inset space ~
1883 \end_inset
1884
1885 Comment
1886 \begin_inset space ~
1887 \end_inset
1888
1889 List
1890 \begin_inset space ~
1891 \end_inset
1892
1893 Style
1894 \begin_inset Newline newline
1895 \end_inset
1896
1897
1898 \family default
1899 if you know enough about the tricky LaTeX internals.
1900  With the environment
1901 \begin_inset Newline newline
1902 \end_inset
1903
1904
1905 \family sans
1906 Set
1907 \begin_inset space ~
1908 \end_inset
1909
1910 PDF
1911 \begin_inset space ~
1912 \end_inset
1913
1914 Comment
1915 \begin_inset space ~
1916 \end_inset
1917
1918 List
1919 \begin_inset space ~
1920 \end_inset
1921
1922 Style
1923 \begin_inset Newline newline
1924 \end_inset
1925
1926
1927 \family default
1928 you can set a list style in case it was changed before the list of comments.
1929 \end_layout
1930
1931 \begin_layout Define PDF-Comment List Style
1932 \begin_inset Argument 1
1933 status open
1934
1935 \begin_layout Plain Layout
1936 MyStyle
1937 \end_layout
1938
1939 \end_inset
1940
1941
1942 \backslash
1943 makeatletter
1944 \backslash
1945 pc@lopt@author
1946 \backslash
1947  - 
1948 \backslash
1949 pc@lopt@subject
1950 \backslash
1951  (
1952 \backslash
1953 pc@lopt@deadline)
1954 \backslash
1955 makeatother
1956 \end_layout
1957
1958 \begin_layout Set PDF-Comment List Style
1959 AuthorCommentDeadline
1960 \end_layout
1961
1962 \begin_layout Standard
1963 \begin_inset Note Greyedout
1964 status open
1965
1966 \begin_layout Plain Layout
1967
1968 \series bold
1969 Note:
1970 \series default
1971  Only one list of comments can be printed in the PDF.
1972 \end_layout
1973
1974 \end_inset
1975
1976
1977 \end_layout
1978
1979 \begin_layout Section
1980 General Hints
1981 \end_layout
1982
1983 \begin_layout Itemize
1984 To be able to use all kinds of colors and color definitions you must load
1985  the LaTeX-package 
1986 \series bold
1987 xcolor
1988 \series default
1989  in the document preamble this way:
1990 \begin_inset Newline newline
1991 \end_inset
1992
1993
1994 \series bold
1995
1996 \backslash
1997 usepackage[svgnames,rgb]{xcolor}
1998 \end_layout
1999
2000 \begin_layout Itemize
2001 If you have two consecutive PDF
2002 \begin_inset space ~
2003 \end_inset
2004
2005 comment insets, the will appear in the PDF one over each other:
2006 \begin_inset Flex PDF-Comment-Setup
2007 status open
2008
2009 \begin_layout Plain Layout
2010 avatar=Oleg
2011 \end_layout
2012
2013 \end_inset
2014
2015
2016 \begin_inset Flex PDF-Annotation
2017 status open
2018
2019 \begin_layout Plain Layout
2020 Oleg said: Wow, that's nice!
2021 \end_layout
2022
2023 \end_inset
2024
2025
2026 \begin_inset Flex PDF-Annotation
2027 status open
2028
2029 \begin_layout Plain Layout
2030 Oleg also said: I hate to repeat myself.
2031 \end_layout
2032
2033 \end_inset
2034
2035
2036 \begin_inset Newline newline
2037 \end_inset
2038
2039 To avoid that separate them with whitespace like protected space:
2040 \begin_inset Flex PDF-Annotation
2041 status open
2042
2043 \begin_layout Plain Layout
2044 Oleg said: Wow, that's nice!
2045 \end_layout
2046
2047 \end_inset
2048
2049
2050 \begin_inset space ~
2051 \end_inset
2052
2053
2054 \begin_inset space ~
2055 \end_inset
2056
2057
2058 \begin_inset space ~
2059 \end_inset
2060
2061
2062 \begin_inset space ~
2063 \end_inset
2064
2065
2066 \begin_inset space ~
2067 \end_inset
2068
2069
2070 \begin_inset space ~
2071 \end_inset
2072
2073
2074 \begin_inset space ~
2075 \end_inset
2076
2077
2078 \begin_inset Flex PDF-Annotation
2079 status open
2080
2081 \begin_layout Plain Layout
2082 Oleg also said: I hate to repeat myself.
2083 \end_layout
2084
2085 \end_inset
2086
2087
2088 \end_layout
2089
2090 \begin_layout Itemize
2091 You cannot use non-Latin characters in your comment or in the author name.
2092  The reason is that PDFs use a special character encoding that is not compatible
2093  with LaTeX.
2094 \end_layout
2095
2096 \end_body
2097 \end_document