]> git.lyx.org Git - lyx.git/blob - lib/examples/PDF-comment.lyx
f1eb7f9c21b0f1d4558b7a0b3038103690d1370b
[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 index=totoc,BCOR7.5mm,captions=tableheading,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 Use yelow 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  Literal TeX code, such as braces and brackets, must be inserted as TeX-code
237  to the comment options.
238 \end_layout
239
240 \end_inset
241
242
243 \begin_inset Newline newline
244 \end_inset
245
246
247 \end_layout
248
249 \begin_layout Standard
250 Here is an example PDF-Annotation where the author is set to 
251 \begin_inset Quotes eld
252 \end_inset
253
254 Daisy Duck
255 \begin_inset Quotes erd
256 \end_inset
257
258
259 \begin_inset Flex PDF-Annotation
260 status open
261
262 \begin_layout Plain Layout
263 \begin_inset Argument 1
264 status collapsed
265
266 \begin_layout Plain Layout
267 \begin_inset ERT
268 status open
269
270 \begin_layout Plain Layout
271
272 author={Daisy Duck},color={0.234 0.867 0.211},voffset=8pt,opacity=0.5
273 \end_layout
274
275 \end_inset
276
277
278 \end_layout
279
280 \end_inset
281
282 This is an annotation with a complex option.
283 \end_layout
284
285 \end_inset
286
287
288 \end_layout
289
290 \begin_layout Standard
291 To avoid to write the same options like the author again and again, you
292  can define a so-called 
293 \begin_inset Quotes eld
294 \end_inset
295
296 avatar
297 \begin_inset Quotes erd
298 \end_inset
299
300  for every person and/or comment layout.
301  See 
302 \begin_inset CommandInset ref
303 LatexCommand ref
304 reference "sec:Avatars"
305
306 \end_inset
307
308  for further information.
309 \end_layout
310
311 \begin_layout Standard
312 For a full list of possible options, please look at the 
313 \series bold
314 pdfcomment
315 \series default
316  documentation.
317 \end_layout
318
319 \begin_layout Subsection
320 PDF-Circle
321 \end_layout
322
323 \begin_layout Standard
324 This will typeset a comment in form of a circle or ellipse.
325  Here is an example without any options: 
326 \begin_inset Flex PDF-Circle
327 status open
328
329 \begin_layout Plain Layout
330 a simple circle comment
331 \end_layout
332
333 \end_inset
334
335
336 \end_layout
337
338 \begin_layout Standard
339 At the right side you see a large, elliptical comment as example of a PDF-Circle
340  with options.
341  
342 \begin_inset Flex PDF-Circle
343 status open
344
345 \begin_layout Plain Layout
346 \begin_inset Argument 1
347 status collapsed
348
349 \begin_layout Plain Layout
350 \begin_inset ERT
351 status open
352
353 \begin_layout Plain Layout
354
355 id=1,color=blue,height=2.5cm,width=5.8cm,voffset=-2.8cm,hoffset=8cm,opacity=1.0,just
356 ification=right,icolor={yellow},linewidth=12pt,borderstyle=dashed,dashstyle={10
357  5}
358 \end_layout
359
360 \end_inset
361
362
363 \end_layout
364
365 \end_inset
366
367 a circle comment in form of a large ellipse
368 \end_layout
369
370 \end_inset
371
372
373 \begin_inset Newline newline
374 \end_inset
375
376
377 \begin_inset Newline newline
378 \end_inset
379
380
381 \begin_inset Newline newline
382 \end_inset
383
384
385 \end_layout
386
387 \begin_layout Subsection
388 PDF-Freetext
389 \end_layout
390
391 \begin_layout Standard
392 This will typeset a comment in form of a freely positioned box.
393  By using the option 
394 \series bold
395 type=callout
396 \series default
397  the box will have an additional so called callout line, to bind the box
398  to a certain element of the page.
399  With the option 
400 \series bold
401 type=typewriter
402 \series default
403  you can write a comment everywhere on the page with a virtual ’typewriter’.
404  These PDF-Freetext annotations do have no frame and a transparent background
405  for ’overwriting’ arbitrary parts of the page.
406  Here is an example in form of a blue rectangle:
407 \begin_inset Flex PDF-Freetext
408 status open
409
410 \begin_layout Plain Layout
411 \begin_inset Argument 1
412 status collapsed
413
414 \begin_layout Plain Layout
415 \begin_inset ERT
416 status open
417
418 \begin_layout Plain Layout
419
420 height=3cm,type=freetext,subject={freetext},width=4.5cm,voffset=-3.2cm,hoffset=-3.2
421 cm,opacity=0.9,justification=right
422 \end_layout
423
424 \end_inset
425
426
427 \end_layout
428
429 \end_inset
430
431 This is also a comment, but it's a PDF-Freetext annotation.
432 \end_layout
433
434 \end_inset
435
436
437 \begin_inset Newline newline
438 \end_inset
439
440
441 \begin_inset Newline newline
442 \end_inset
443
444
445 \begin_inset Newline newline
446 \end_inset
447
448
449 \begin_inset Newline newline
450 \end_inset
451
452
453 \end_layout
454
455 \begin_layout Subsection
456 PDF-Line
457 \end_layout
458
459 \begin_layout Standard
460 This will typeset a comment in form of a line, polyline or polygon.
461  Here is an example without any options: 
462 \begin_inset Flex PDF-Line
463 status open
464
465 \begin_layout Plain Layout
466 a simple PDF-Line comment
467 \end_layout
468
469 \end_inset
470
471
472 \begin_inset Newline newline
473 \end_inset
474
475
476 \end_layout
477
478 \begin_layout Standard
479 As you can see a PDF-Line comment without options is useless.
480 \end_layout
481
482 \begin_layout Standard
483 The green arrow at the left side of this page is an example for a PDF-Line
484  comment with options.
485  
486 \begin_inset Flex PDF-Line
487 status open
488
489 \begin_layout Plain Layout
490 \begin_inset Argument 1
491 status collapsed
492
493 \begin_layout Plain Layout
494 \begin_inset ERT
495 status open
496
497 \begin_layout Plain Layout
498
499 type=line,opacity=1,line={50 480 50 180},color=green,icolor=blue,caption=top,lin
500 ebegin={/ROpenArrow},lineend={/OpenArrow},linewidth=2bp,captionhoffset=-5pt,capt
501 ionvoffset=15pt
502 \end_layout
503
504 \end_inset
505
506
507 \end_layout
508
509 \end_inset
510
511 a PDF-Line comment with options
512 \end_layout
513
514 \end_inset
515
516
517 \end_layout
518
519 \begin_layout Subsection
520 PDF-Margin
521 \end_layout
522
523 \begin_layout Standard
524 This will typeset an annotation into the margin.
525  Right beside this text is an example without options: 
526 \begin_inset Flex PDF-Margin
527 status open
528
529 \begin_layout Plain Layout
530 a simple PDF-Margin comment
531 \end_layout
532
533 \end_inset
534
535
536 \end_layout
537
538 \begin_layout Standard
539 The red margin note is an example for a PDF-Margin command with options.
540  
541 \begin_inset Flex PDF-Margin
542 status open
543
544 \begin_layout Plain Layout
545 \begin_inset Argument 1
546 status collapsed
547
548 \begin_layout Plain Layout
549 icon=Note,color=red,open=true,hspace=100pt
550 \end_layout
551
552 \end_inset
553
554 a PDF-Margin comment with options
555 \end_layout
556
557 \end_inset
558
559
560 \end_layout
561
562 \begin_layout Subsection
563 PDF-Markup
564 \end_layout
565
566 \begin_layout Standard
567 This will typeset so called PDF text markup annotations over some text or
568  math.
569  Here is a markup without options: 
570 \begin_inset Flex PDF-Markup
571 status open
572
573 \begin_layout Plain Layout
574 simple PDF-Markup
575 \end_layout
576
577 \end_inset
578
579
580 \end_layout
581
582 \begin_layout Standard
583 Possible types for the option 
584 \series bold
585 markup
586 \series default
587  are:
588 \end_layout
589
590 \begin_layout Description
591 Highlight The markup text will be highlighted: 
592 \begin_inset Flex PDF-Markup
593 status open
594
595 \begin_layout Plain Layout
596 \begin_inset Argument 1
597 status open
598
599 \begin_layout Plain Layout
600 id=1,markup=Highlight
601 \end_layout
602
603 \end_inset
604
605 Highlight PDF-Markup
606 \begin_inset Argument post:1
607 status open
608
609 \begin_layout Plain Layout
610 a comment
611 \end_layout
612
613 \end_inset
614
615
616 \end_layout
617
618 \end_inset
619
620
621 \begin_inset Note Note
622 status collapsed
623
624 \begin_layout Plain Layout
625 see the next section for the description of the option 
626 \series bold
627 id=1
628 \end_layout
629
630 \end_inset
631
632
633 \end_layout
634
635 \begin_layout Description
636 Underline The markup text will be underlined: 
637 \begin_inset Flex PDF-Markup
638 status open
639
640 \begin_layout Plain Layout
641 \begin_inset Argument 1
642 status open
643
644 \begin_layout Plain Layout
645 markup=Underline
646 \end_layout
647
648 \end_inset
649
650 Underlining PDF-Markup
651 \end_layout
652
653 \end_inset
654
655
656 \end_layout
657
658 \begin_layout Description
659 Squiggly The markup text will be underlined with a wave: 
660 \begin_inset Flex PDF-Markup
661 status open
662
663 \begin_layout Plain Layout
664 \begin_inset Argument 1
665 status open
666
667 \begin_layout Plain Layout
668 markup=Squiggly
669 \end_layout
670
671 \end_inset
672
673 Underwave PDF-Markup
674 \end_layout
675
676 \end_inset
677
678
679 \end_layout
680
681 \begin_layout Description
682 StrikeOut The markup text will be struck out: 
683 \begin_inset Flex PDF-Markup
684 status open
685
686 \begin_layout Plain Layout
687 \begin_inset Argument 1
688 status open
689
690 \begin_layout Plain Layout
691 markup=StrikeOut
692 \end_layout
693
694 \end_inset
695
696 Striked-out PDF-Markup
697 \end_layout
698
699 \end_inset
700
701
702 \end_layout
703
704 \begin_layout Standard
705 The text for the comment is inserted with the inset option 
706 \family sans
707 Comment
708 \family default
709 .
710 \end_layout
711
712 \begin_layout Standard
713 PDF-Markup has some limitations:
714 \end_layout
715
716 \begin_layout Itemize
717 it is only suitable for text or inline math!
718 \end_layout
719
720 \begin_layout Itemize
721 the markup text must not be longer than one paragraph
722 \end_layout
723
724 \begin_layout Itemize
725 the markup annotation must not be longer than one page, otherwise the recognitio
726 n of the page break will fail
727 \end_layout
728
729 \begin_layout Itemize
730 when using XeTeX you have to assure that the page dimensions are internally
731  output, e.
732 \begin_inset space \thinspace{}
733 \end_inset
734
735 g.
736 \begin_inset space \space{}
737 \end_inset
738
739 with the document class option 
740 \series bold
741 pagesize
742 \series default
743  for the KOMA-Script classes, or the option 
744 \series bold
745 pagesize
746 \series default
747  for the LaTeX-package 
748 \series bold
749 typearea
750 \series default
751 .
752 \end_layout
753
754 \begin_layout Subsection
755 PDF-Reply
756 \end_layout
757
758 \begin_layout Standard
759 With a PDF-Reply you can compose replies to PDF-comments.
760  The option 
761 \series bold
762 replyto
763 \series default
764  provides a clear reference to the comment the reply refers to.
765 \end_layout
766
767 \begin_layout Standard
768 As example see the reply to the Highlight PDF-Markup from the previous section.
769  
770 \begin_inset Flex PDF-Reply
771 status open
772
773 \begin_layout Plain Layout
774 \begin_inset Argument 1
775 status open
776
777 \begin_layout Plain Layout
778 id=2,replyto=1,date=D:20101211161247+01'00'
779 \end_layout
780
781 \end_inset
782
783 This is a reply.
784 \end_layout
785
786 \end_inset
787
788  It appears in that PDF-Markup comment.
789  To be able to reference the PDF-Markup the option 
790 \series bold
791 id=1
792 \series default
793  was added to its options.
794  The PDF-Reply got the option 
795 \series bold
796 replyto=1
797 \series default
798 .
799 \end_layout
800
801 \begin_layout Standard
802 You can also reply to replies by adding an 
803 \series bold
804 id
805 \series default
806  option to the reply that should be replied to.
807  As example see the reply to the reply to the PDF-Markup.
808  
809 \begin_inset Flex PDF-Reply
810 status open
811
812 \begin_layout Plain Layout
813 \begin_inset Argument 1
814 status open
815
816 \begin_layout Plain Layout
817 replyto=2,date=D:20101212095321+01'00'
818 \end_layout
819
820 \end_inset
821
822 Of course, you can reply to a reply.
823 \end_layout
824
825 \end_inset
826
827
828 \end_layout
829
830 \begin_layout Standard
831 \begin_inset Note Greyedout
832 status open
833
834 \begin_layout Plain Layout
835
836 \series bold
837 Note:
838 \series default
839  Due to technical reasons PDF-Reply works only when using pdflatex.
840 \end_layout
841
842 \end_inset
843
844
845 \end_layout
846
847 \begin_layout Standard
848 PDF-Reply has some further limitations:
849 \end_layout
850
851 \begin_layout Itemize
852 It can not support page breaks.
853 \end_layout
854
855 \begin_layout Itemize
856 The replies will only appear in the PDF annotations on the second page.
857  (Replies to comments without page break work smoothly.)
858 \end_layout
859
860 \begin_layout Subsection
861 PDF-Sideline
862 \end_layout
863
864 \begin_layout Standard
865 This will typeset a comment in form of identical markers on every side of
866  the page.
867  The yellow arrows besides this text is an example without any options:
868  
869 \begin_inset Flex PDF-Sideline
870 status open
871
872 \begin_layout Plain Layout
873 a simple PDF-Sideline
874 \end_layout
875
876 \end_inset
877
878
879 \end_layout
880
881 \begin_layout Standard
882 As you can see a PDF-Sideline comment without options is quite useless.
883  PDF-Sideline is useful if you want to highlight complete parts of a page.
884  The inset options define the layout of the marker while the normal content
885  of the inset is the text surrounded by the markers.
886  The content of the inset option 
887 \family sans
888 Comment
889 \family default
890  will be printed along both markers.
891  Here is an example:
892 \end_layout
893
894 \begin_layout Standard
895 \begin_inset Flex PDF-Sideline
896 status open
897
898 \begin_layout Plain Layout
899 \begin_inset Argument 1
900 status open
901
902 \begin_layout Plain Layout
903 opacity=0.33,color=magenta,icolor=cyan,caption=inline,linebegin=
904 \begin_inset ERT
905 status collapsed
906
907 \begin_layout Plain Layout
908
909 {
910 \end_layout
911
912 \end_inset
913
914 /Butt
915 \begin_inset ERT
916 status collapsed
917
918 \begin_layout Plain Layout
919
920 }
921 \end_layout
922
923 \end_inset
924
925 ,lineend=
926 \begin_inset ERT
927 status collapsed
928
929 \begin_layout Plain Layout
930
931 {
932 \end_layout
933
934 \end_inset
935
936 /Square
937 \begin_inset ERT
938 status collapsed
939
940 \begin_layout Plain Layout
941
942 }
943 \end_layout
944
945 \end_inset
946
947 ,linewidth=3bp,linesep=0.7cm
948 \end_layout
949
950 \end_inset
951
952 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
953  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
954  voluptua.
955  At vero eos et accusam et justo duo dolores et ea rebum.
956  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
957  sit amet.
958  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
959  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
960  voluptua.
961 \end_layout
962
963 \begin_layout Plain Layout
964 At vero eos et accusam et justo duo dolores et ea rebum.
965  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
966  sit amet.
967  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
968  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
969  voluptua.
970  At vero eos et accusam et justo duo dolores et ea rebum.
971  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
972  sit amet.
973 \begin_inset Argument 2
974 status open
975
976 \begin_layout Plain Layout
977 Comment text
978 \end_layout
979
980 \end_inset
981
982
983 \end_layout
984
985 \end_inset
986
987
988 \end_layout
989
990 \begin_layout Standard
991 PDF-Sideline has some limitations:
992 \end_layout
993
994 \begin_layout Itemize
995 the markup annotation should not be longer than one page, otherwise the
996  recognition of the page could fail
997 \end_layout
998
999 \begin_layout Itemize
1000 when using XeTeX you have to assure that the page dimensions are internally
1001  output, e.
1002 \begin_inset space \thinspace{}
1003 \end_inset
1004
1005 g.
1006 \begin_inset space \space{}
1007 \end_inset
1008
1009 with the document class option 
1010 \series bold
1011 pagesize
1012 \series default
1013  for the KOMA-Script classes, or the option 
1014 \series bold
1015 pagesize
1016 \series default
1017  for the LaTeX-package 
1018 \series bold
1019 typearea
1020 \series default
1021 .
1022 \end_layout
1023
1024 \begin_layout Subsection
1025 PDF-Square
1026 \end_layout
1027
1028 \begin_layout Standard
1029 This will typeset a rectangular box.
1030  Here is an example without any options: 
1031 \begin_inset Flex PDF-Square
1032 status open
1033
1034 \begin_layout Plain Layout
1035 a simple PDF-Square comment
1036 \end_layout
1037
1038 \end_inset
1039
1040
1041 \end_layout
1042
1043 \begin_layout Standard
1044 Below this text you see a rectangle comment with a curvy outline as example
1045  of a PDF-Square with options.
1046 \end_layout
1047
1048 \begin_layout Standard
1049 \begin_inset Flex PDF-Square
1050 status open
1051
1052 \begin_layout Plain Layout
1053 \begin_inset Argument 1
1054 status collapsed
1055
1056 \begin_layout Plain Layout
1057 height=2cm,width=4.8cm,voffset=-2cm,hoffset=1cm,opacity=1.0,justification=right,ic
1058 olor=CornflowerBlue,bse=cloudy,bsei=2.5,linewidth=8pt
1059 \end_layout
1060
1061 \end_inset
1062
1063 A fancy PDF-Square comment
1064 \end_layout
1065
1066 \end_inset
1067
1068
1069 \begin_inset Newline newline
1070 \end_inset
1071
1072
1073 \begin_inset Newline newline
1074 \end_inset
1075
1076
1077 \begin_inset Newline newline
1078 \end_inset
1079
1080
1081 \begin_inset Newline newline
1082 \end_inset
1083
1084
1085 \end_layout
1086
1087 \begin_layout Subsection
1088 PDF-Tooltip
1089 \end_layout
1090
1091 \begin_layout Standard
1092 With this you can annotate any object with a tooltip.
1093 \begin_inset Foot
1094 status open
1095
1096 \begin_layout Plain Layout
1097 All objects that can be set into a TeX-box to measure its size.
1098 \end_layout
1099
1100 \end_inset
1101
1102
1103 \end_layout
1104
1105 \begin_layout Standard
1106 The PDF-Tooltip inset has a mandatory argument for the tooltip.
1107  The object that should be annotated is set into the PDF-Tooltip inset,
1108  the tooltip is written into the mandatory argument of the inset.
1109  Here is an example of a word with a tooltip: 
1110 \begin_inset Flex PDF-Tooltip
1111 status open
1112
1113 \begin_layout Plain Layout
1114 \begin_inset Argument post:1
1115 status open
1116
1117 \begin_layout Plain Layout
1118 This is a tooltip!
1119 \end_layout
1120
1121 \end_inset
1122
1123
1124 \color red
1125 words
1126 \end_layout
1127
1128 \end_inset
1129
1130
1131 \end_layout
1132
1133 \begin_layout Standard
1134 As the object for the tooltip can be almost anything, we can also use it
1135  for chemical notations in math: 
1136 \begin_inset Flex PDF-Tooltip
1137 status open
1138
1139 \begin_layout Plain Layout
1140 \begin_inset Argument post:1
1141 status open
1142
1143 \begin_layout Plain Layout
1144 Sulfuric acid
1145 \end_layout
1146
1147 \end_inset
1148
1149
1150 \begin_inset Formula $\ce{H2SO4}$
1151 \end_inset
1152
1153
1154 \end_layout
1155
1156 \end_inset
1157
1158
1159 \end_layout
1160
1161 \begin_layout Standard
1162 The PDF-Tooltip inset has also an optional argument that is used to correct
1163  the size of tooltips for math (if necessary) or to disable an annotation.
1164  Here is an example with a mathstyle option:
1165 \end_layout
1166
1167 \begin_layout Standard
1168 \begin_inset Flex PDF-Tooltip
1169 status open
1170
1171 \begin_layout Plain Layout
1172 \begin_inset Argument 1
1173 status open
1174
1175 \begin_layout Plain Layout
1176 \begin_inset ERT
1177 status open
1178
1179 \begin_layout Plain Layout
1180
1181 mathstyle=
1182 \backslash
1183 displaystyle
1184 \end_layout
1185
1186 \end_inset
1187
1188
1189 \end_layout
1190
1191 \end_inset
1192
1193
1194 \begin_inset Argument post:1
1195 status open
1196
1197 \begin_layout Plain Layout
1198 little Gauß
1199 \end_layout
1200
1201 \end_inset
1202
1203
1204 \begin_inset Formula $x^{2}+2xy+y^{2}\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)$
1205 \end_inset
1206
1207
1208 \end_layout
1209
1210 \end_inset
1211
1212  
1213 \end_layout
1214
1215 \begin_layout Section
1216 Comment definitions
1217 \end_layout
1218
1219 \begin_layout Standard
1220 The package 
1221 \series bold
1222 pdfcomment
1223 \series default
1224  provides the following environments to define or change PDF-comments:
1225 \end_layout
1226
1227 \begin_layout Subsection
1228 PDF-Comment setup
1229 \begin_inset CommandInset label
1230 LatexCommand label
1231 name "sub:PDF-Comment-setup"
1232
1233 \end_inset
1234
1235
1236 \end_layout
1237
1238 \begin_layout Standard
1239 With this custom inset you can reset the global (document-wide) options
1240  at any time.
1241  For example the default color for new PDF-comments is blue.
1242  To get Adobe Reader's yellow colored notes for all comments in your document,
1243  add the PDF-comment setup inset to the beginning of your document and insert
1244  there the option 
1245 \series bold
1246 color=yellow
1247 \series default
1248 .
1249  This was also done in this document.
1250 \end_layout
1251
1252 \begin_layout Standard
1253 By using its optional option 
1254 \series bold
1255 local
1256 \series default
1257  you can keep the reset local within a group enclosed by TeX-braces.
1258  For example you want to reset the color only for two consecutive comments,
1259  then enclose the PDF-comment setup inset and the two comment insets in
1260  TeX-braces.
1261  Here is an example:
1262 \end_layout
1263
1264 \begin_layout Standard
1265 \begin_inset ERT
1266 status collapsed
1267
1268 \begin_layout Plain Layout
1269
1270 {
1271 \end_layout
1272
1273 \end_inset
1274
1275
1276 \begin_inset Flex PDF-Comment-Setup
1277 status open
1278
1279 \begin_layout Plain Layout
1280 \begin_inset Argument 1
1281 status open
1282
1283 \begin_layout Plain Layout
1284 local
1285 \end_layout
1286
1287 \end_inset
1288
1289 color=Orange
1290 \end_layout
1291
1292 \end_inset
1293
1294
1295 \begin_inset Flex PDF-Markup
1296 status collapsed
1297
1298 \begin_layout Plain Layout
1299 PDF-Markup in orange
1300 \end_layout
1301
1302 \end_inset
1303
1304
1305 \begin_inset space ~
1306 \end_inset
1307
1308
1309 \begin_inset space ~
1310 \end_inset
1311
1312
1313 \begin_inset space ~
1314 \end_inset
1315
1316
1317 \begin_inset Flex PDF-Annotation
1318 status collapsed
1319
1320 \begin_layout Plain Layout
1321 PDF-Annotation in orange
1322 \end_layout
1323
1324 \end_inset
1325
1326
1327 \begin_inset ERT
1328 status collapsed
1329
1330 \begin_layout Plain Layout
1331
1332 }
1333 \end_layout
1334
1335 \end_inset
1336
1337
1338 \begin_inset Flex PDF-Margin
1339 status collapsed
1340
1341 \begin_layout Plain Layout
1342 default PDF-Margin comment
1343 \end_layout
1344
1345 \end_inset
1346
1347
1348 \end_layout
1349
1350 \begin_layout Subsection
1351 PDF-Comment style
1352 \end_layout
1353
1354 \begin_layout Standard
1355 This environment allows you to define a style for a PDF-comment that can
1356  be used by several comments.
1357  Assuming you write a Math tutorial and want to add popup explanations in
1358  the PDF for several expressions, then insert a PDF-Comment style environment
1359  before your first formula.
1360  Name it for example 
1361 \series bold
1362 MathPopup
1363 \series default
1364 , set the color to white with 
1365 \series bold
1366 color=white
1367 \series default
1368  and highlight the whole formula with 
1369 \series bold
1370 markup=Highlight
1371 \series default
1372 .
1373 \end_layout
1374
1375 \begin_layout Define PDF-Comment Style
1376 \begin_inset Argument 1
1377 status open
1378
1379 \begin_layout Plain Layout
1380 MathPopup
1381 \end_layout
1382
1383 \end_inset
1384
1385 color=white,markup=Highlight
1386 \end_layout
1387
1388 \begin_layout Standard
1389 In the comments use the option 
1390 \series bold
1391 style=MathPopup
1392 \series default
1393  to use your style.
1394  Here is an example:
1395 \end_layout
1396
1397 \begin_layout Standard
1398 \begin_inset Flex PDF-Markup
1399 status open
1400
1401 \begin_layout Plain Layout
1402 \begin_inset Argument 1
1403 status open
1404
1405 \begin_layout Plain Layout
1406
1407 \family roman
1408 \series medium
1409 \shape up
1410 \size normal
1411 \emph off
1412 \bar no
1413 \strikeout off
1414 \uuline off
1415 \uwave off
1416 \noun off
1417 \color none
1418 style=
1419 \family default
1420 \series default
1421 \shape default
1422 \size default
1423 \emph default
1424 \bar default
1425 \strikeout default
1426 \uuline default
1427 \uwave default
1428 \noun default
1429 \color inherit
1430 MathPopup
1431 \end_layout
1432
1433 \end_inset
1434
1435
1436 \begin_inset Formula $P(E)$
1437 \end_inset
1438
1439
1440 \begin_inset Argument post:1
1441 status open
1442
1443 \begin_layout Plain Layout
1444
1445 \family roman
1446 \series medium
1447 \shape up
1448 \size normal
1449 \emph off
1450 \bar no
1451 \strikeout off
1452 \uuline off
1453 \uwave off
1454 \noun off
1455 \color none
1456 Probability of event E
1457 \end_layout
1458
1459 \end_inset
1460
1461
1462 \end_layout
1463
1464 \end_inset
1465
1466
1467 \end_layout
1468
1469 \begin_layout Subsection
1470 \begin_inset CommandInset label
1471 LatexCommand label
1472 name "sec:Avatars"
1473
1474 \end_inset
1475
1476 Avatars
1477 \end_layout
1478
1479 \begin_layout Standard
1480 If you are for example reviewing a document, you need to add your name to
1481  every of your comments.
1482  In case you use a special layout of your annotations, you would have to
1483  do a lot of copy-paste work.
1484  But this can be avoided if you define for every person a special avatar.
1485 \end_layout
1486
1487 \begin_layout Standard
1488 Assuming your name is 
1489 \begin_inset Quotes eld
1490 \end_inset
1491
1492 Oleg Testman
1493 \begin_inset Quotes erd
1494 \end_inset
1495
1496  you can define an avatar for your using the environment Define
1497 \begin_inset space ~
1498 \end_inset
1499
1500 Avatar.
1501  Its mandatory option is the name.
1502  In your case, name it 
1503 \series bold
1504 Oleg
1505 \series default
1506 .
1507  Add behind the name of the avatar your name as author by writing 
1508 \series bold
1509 author={Oleg Testman}
1510 \series default
1511 .
1512 \begin_inset Newline newline
1513 \end_inset
1514
1515 You might use a special icon to see at the first look which comments were
1516  made by you.
1517  You therefore add behind the author-statement, separated by a comma, 
1518 \series bold
1519 icon=Check
1520 \series default
1521
1522 \begin_inset Quotes erd
1523 \end_inset
1524
1525  to get a checkmark.
1526 \begin_inset Foot
1527 status open
1528
1529 \begin_layout Plain Layout
1530 For all possible icons, see the 
1531 \series bold
1532 pdfcomment
1533 \series default
1534  manual.
1535 \end_layout
1536
1537 \end_inset
1538
1539  the checkmark should have a green color so that you add 
1540 \series bold
1541 color=lime
1542 \series default
1543  to the avatar definition.
1544  Your whole definition reads now
1545 \begin_inset Newline newline
1546 \end_inset
1547
1548
1549 \series bold
1550 author={Oleg Testman},icon=Check,color=lime
1551 \end_layout
1552
1553 \begin_layout Define Avatar
1554 \begin_inset Argument 1
1555 status open
1556
1557 \begin_layout Plain Layout
1558 Oleg
1559 \end_layout
1560
1561 \end_inset
1562
1563 author={Oleg Testman},icon=Check,color=lime
1564 \end_layout
1565
1566 \begin_layout Standard
1567 To use now your avatar for PDF-comments you have two choices:
1568 \end_layout
1569
1570 \begin_layout Enumerate
1571 You set up ALL PDF-comments in the document using your avatar.
1572  This is done by inserting the custom inset 
1573 \family sans
1574 PDF-Comment-Setup
1575 \family default
1576  before the first PDF-comment in your document.
1577  Insert to this inset 
1578 \series bold
1579 avatar=Oleg
1580 \series default
1581 .
1582 \end_layout
1583
1584 \begin_layout Enumerate
1585 You add 
1586 \series bold
1587 avatar=Oleg
1588 \series default
1589  to the options of a particular PDF-comment.
1590  The avatar will then only be used for this comment.
1591 \end_layout
1592
1593 \begin_layout Standard
1594 Here is an example for the 
1595 \family sans
1596 PDF-Comment-Setup
1597 \family default
1598  method:
1599 \begin_inset Flex PDF-Comment-Setup
1600 status open
1601
1602 \begin_layout Plain Layout
1603 avatar=Oleg
1604 \end_layout
1605
1606 \end_inset
1607
1608
1609 \begin_inset Flex PDF-Annotation
1610 status open
1611
1612 \begin_layout Plain Layout
1613 Oleg said: Wow, that's nice!
1614 \end_layout
1615
1616 \end_inset
1617
1618
1619 \begin_inset Newline newline
1620 \end_inset
1621
1622 and here is another comment:
1623 \begin_inset Flex PDF-Annotation
1624 status open
1625
1626 \begin_layout Plain Layout
1627 Oleg also said: I hate to repeat myself.
1628 \end_layout
1629
1630 \end_inset
1631
1632
1633 \end_layout
1634
1635 \begin_layout Define Avatar
1636 \begin_inset Argument 1
1637 status open
1638
1639 \begin_layout Plain Layout
1640 Dolittle
1641 \end_layout
1642
1643 \end_inset
1644
1645 color=NavyBlue,opacity=0.5,open=false,icon=Circle,author={Dr.
1646  Dolittle}
1647 \end_layout
1648
1649 \begin_layout Standard
1650 Here is an example where another avatar 
1651 \begin_inset Quotes eld
1652 \end_inset
1653
1654 Dolittle
1655 \begin_inset Quotes erd
1656 \end_inset
1657
1658  is only used for this comment:
1659 \begin_inset Flex PDF-Margin
1660 status open
1661
1662 \begin_layout Plain Layout
1663 \begin_inset Argument 1
1664 status open
1665
1666 \begin_layout Plain Layout
1667 avatar=Dolittle
1668 \end_layout
1669
1670 \end_inset
1671
1672 I am Dr.
1673  Dolittle! Respect my authority!
1674 \end_layout
1675
1676 \end_inset
1677
1678
1679 \end_layout
1680
1681 \begin_layout Section
1682 List of PDF-comments
1683 \end_layout
1684
1685 \begin_layout Standard
1686 You can insert a list with all PDF-comments using the environment List of
1687  PDF-comments.
1688  By specifying options for it you can determine what parts of the comments
1689  shpuld appear in the list.
1690  Here is the list for this document where only the comments of a defined
1691  author are printed:
1692 \end_layout
1693
1694 \begin_layout List of PDF Comments
1695 \begin_inset Argument 1
1696 status open
1697
1698 \begin_layout Plain Layout
1699 liststyle=
1700 \begin_inset ERT
1701 status open
1702
1703 \begin_layout Plain Layout
1704
1705 {
1706 \end_layout
1707
1708 \end_inset
1709
1710 AuthorComment
1711 \begin_inset ERT
1712 status open
1713
1714 \begin_layout Plain Layout
1715
1716 }
1717 \end_layout
1718
1719 \end_inset
1720
1721 , heading =
1722 \begin_inset ERT
1723 status open
1724
1725 \begin_layout Plain Layout
1726
1727 {
1728 \end_layout
1729
1730 \end_inset
1731
1732 List of PDF-comments
1733 \begin_inset ERT
1734 status open
1735
1736 \begin_layout Plain Layout
1737
1738 }
1739 \end_layout
1740
1741 \end_inset
1742
1743
1744 \end_layout
1745
1746 \end_inset
1747
1748
1749 \end_layout
1750
1751 \begin_layout Standard
1752 You can also define your own style using the environment
1753 \begin_inset Newline newline
1754 \end_inset
1755
1756
1757 \family sans
1758 Define
1759 \begin_inset space ~
1760 \end_inset
1761
1762 PDF-Comment
1763 \begin_inset space ~
1764 \end_inset
1765
1766 List
1767 \begin_inset space ~
1768 \end_inset
1769
1770 Style
1771 \begin_inset Newline newline
1772 \end_inset
1773
1774
1775 \family default
1776 if you know enough about the tricky LaTeX internals.
1777  With the environment
1778 \begin_inset Newline newline
1779 \end_inset
1780
1781
1782 \family sans
1783 Set
1784 \begin_inset space ~
1785 \end_inset
1786
1787 PDF-Comment
1788 \begin_inset space ~
1789 \end_inset
1790
1791 List
1792 \begin_inset space ~
1793 \end_inset
1794
1795 Style
1796 \begin_inset Newline newline
1797 \end_inset
1798
1799
1800 \family default
1801 you can set a list style in case it was changed before the list of comments.
1802 \end_layout
1803
1804 \begin_layout Define PDF-Comment List Style
1805 \begin_inset Argument 1
1806 status open
1807
1808 \begin_layout Plain Layout
1809 MyStyle
1810 \end_layout
1811
1812 \end_inset
1813
1814
1815 \backslash
1816 makeatletter
1817 \backslash
1818 pc@lopt@author
1819 \backslash
1820  - 
1821 \backslash
1822 pc@lopt@subject
1823 \backslash
1824  (
1825 \backslash
1826 pc@lopt@deadline)
1827 \backslash
1828 makeatother
1829 \end_layout
1830
1831 \begin_layout Set PDF-Comment List Style
1832 AuthorCommentDeadline
1833 \end_layout
1834
1835 \begin_layout Standard
1836 \begin_inset Note Greyedout
1837 status open
1838
1839 \begin_layout Plain Layout
1840
1841 \series bold
1842 Note:
1843 \series default
1844  Only one list of comments can be printed in the PDF.
1845 \end_layout
1846
1847 \end_inset
1848
1849
1850 \end_layout
1851
1852 \begin_layout Section
1853 General Hints
1854 \end_layout
1855
1856 \begin_layout Itemize
1857 To be able to use all kinds of colors and color definitions you must load
1858  the LaTeX-package 
1859 \series bold
1860 xcolor
1861 \series default
1862  in the document preamble this way:
1863 \begin_inset Newline newline
1864 \end_inset
1865
1866
1867 \series bold
1868
1869 \backslash
1870 usepackage[svgnames,rgb]{xcolor}
1871 \end_layout
1872
1873 \begin_layout Itemize
1874 If you have two consecutive PDF-comment insets, the will appear in the PDF
1875  one over each other:
1876 \begin_inset Flex PDF-Comment-Setup
1877 status open
1878
1879 \begin_layout Plain Layout
1880 avatar=Oleg
1881 \end_layout
1882
1883 \end_inset
1884
1885
1886 \begin_inset Flex PDF-Annotation
1887 status open
1888
1889 \begin_layout Plain Layout
1890 Oleg said: Wow, that's nice!
1891 \end_layout
1892
1893 \end_inset
1894
1895
1896 \begin_inset Flex PDF-Annotation
1897 status open
1898
1899 \begin_layout Plain Layout
1900 Oleg also said: I hate to repeat myself.
1901 \end_layout
1902
1903 \end_inset
1904
1905
1906 \begin_inset Newline newline
1907 \end_inset
1908
1909 To avoid that separate them with whitespace like protected space:
1910 \begin_inset Flex PDF-Annotation
1911 status open
1912
1913 \begin_layout Plain Layout
1914 Oleg said: Wow, that's nice!
1915 \end_layout
1916
1917 \end_inset
1918
1919
1920 \begin_inset space ~
1921 \end_inset
1922
1923
1924 \begin_inset space ~
1925 \end_inset
1926
1927
1928 \begin_inset space ~
1929 \end_inset
1930
1931
1932 \begin_inset space ~
1933 \end_inset
1934
1935
1936 \begin_inset space ~
1937 \end_inset
1938
1939
1940 \begin_inset space ~
1941 \end_inset
1942
1943
1944 \begin_inset space ~
1945 \end_inset
1946
1947
1948 \begin_inset Flex PDF-Annotation
1949 status open
1950
1951 \begin_layout Plain Layout
1952 Oleg also said: I hate to repeat myself.
1953 \end_layout
1954
1955 \end_inset
1956
1957
1958 \end_layout
1959
1960 \begin_layout Itemize
1961 You cannot use non-Latin characters in your comment or in the author name.
1962  The reason is that PDFs use a special character encoding that is not compatible
1963  with LaTeX.
1964 \end_layout
1965
1966 \end_body
1967 \end_document