X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fexamples%2FPDF-comment.lyx;h=e68450cfa8b4f2ff7aa0ab7eb52f7542852758e8;hb=97dfacfffa0299005898ab1c26459a60c057c5bf;hp=f1eb7f9c21b0f1d4558b7a0b3038103690d1370b;hpb=2dff14d23894d03e1a54f3ddc01ca0f6be02a395;p=lyx.git diff --git a/lib/examples/PDF-comment.lyx b/lib/examples/PDF-comment.lyx index f1eb7f9c21..e68450cfa8 100644 --- a/lib/examples/PDF-comment.lyx +++ b/lib/examples/PDF-comment.lyx @@ -1,7 +1,9 @@ #LyX 2.2 created this file. For more info see http://www.lyx.org/ -\lyxformat 479 +\lyxformat 506 \begin_document \begin_header +\save_transient_properties true +\origin /systemlyxdir/examples/ \textclass scrartcl \begin_preamble % to be able to use all color settings of pdfcomment @@ -17,7 +19,7 @@ \fi % end if pdflatex is used \end_preamble -\options index=totoc,BCOR7.5mm,captions=tableheading,pagesize +\options BCOR8mm,pagesize \use_default_options false \begin_modules pdfcomment @@ -27,28 +29,28 @@ pdfcomment \language_package default \inputencoding auto \fontencoding global -\font_roman default -\font_sans default -\font_typewriter default -\font_math auto +\font_roman "default" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false -\font_sf_scale 100 -\font_tt_scale 100 +\font_sf_scale 100 100 +\font_tt_scale 100 100 \graphics default -\default_output_format default +\default_output_format pdf2 \output_sync 0 \bibtex_command bibtex \index_command default \paperfontsize 12 \spacing single \use_hyperref true -\pdf_title "Description of the module pdfcomment" +\pdf_title "Description of the module PDF Comments" \pdf_author "Uwe Stöhr" -\pdf_subject "pdfcomment" -\pdf_keywords "LyX, PDF-comments, pdfcomment" +\pdf_subject "PDF comments" +\pdf_keywords "LyX, PDF comments, pdfcomment" \pdf_bookmarks true \pdf_bookmarksnumbered true \pdf_bookmarksopen true @@ -66,7 +68,7 @@ pdfcomment \use_package cancel 0 \use_package esint 1 \use_package mathdots 1 -\use_package mathtools 0 +\use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 0 \use_package stmaryrd 0 @@ -117,18 +119,18 @@ color=yellow status collapsed \begin_layout Plain Layout -Use yelow as default color for new PDF-comments, see sec. +This sets yellow as default color for new PDF comments, see sec. \begin_inset space ~ \end_inset \begin_inset CommandInset ref LatexCommand ref -reference "sub:PDF-Comment-setup" +reference "subsec:PDF-Comment-setup" \end_inset - for a description. + for the description. \end_layout \end_inset @@ -137,7 +139,7 @@ reference "sub:PDF-Comment-setup" \end_layout \begin_layout Title -Description of the module pdfcomment +Description of the module PDF Comments \end_layout \begin_layout Author @@ -145,19 +147,20 @@ Uwe Stöhr \end_layout \begin_layout Standard -The LaTeX package +The \SpecialChar LaTeX + package \series bold pdfcomment \series default provides full access for PDF comments. - You can add normal comments as well as margin comments, underlining etc. - And you can also define a special layout for the comment, which you can - use several times in the document. + You can add normal comments as well as margin comments, underlining etc.. + You can also define a special layout for a comment which you can use several + times in the document. This document is only a excerpt of the documentation of \series bold pdfcomment \series default -, See its documentation for all information: +; see its documentation for all information: \begin_inset Newline newline \end_inset @@ -176,13 +179,13 @@ http://mirrors.ctan.org/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf \end_layout \begin_layout Section -The different comments types +The different comment types \end_layout \begin_layout Standard The different comment types are inserted using the menu \family sans -Insert\SpecialChar \menuseparator +Insert\SpecialChar menuseparator Custom \begin_inset space ~ \end_inset @@ -198,13 +201,13 @@ PDF-Annotation \end_layout \begin_layout Standard -This is the standard PDF-comment. +This is the standard PDF comment. Here is an example: \begin_inset Flex PDF-Annotation status open \begin_layout Plain Layout -This is a simple PDF-Annotation +This is a simple PDF-Annotation. \end_layout \end_inset @@ -213,12 +216,12 @@ This is a simple PDF-Annotation \end_layout \begin_layout Standard -Like all PDF-comment types you can add a lot of things to the option of - the inset. +Like for all PDF comment types you can add a lot of things to the option + of the inset. To insert the options inset, set the cursor into the comment inset and use the menu \family sans -Insert\SpecialChar \menuseparator +Insert\SpecialChar menuseparator PDF Comment Options \family default . @@ -233,8 +236,8 @@ status open \series bold Note: \series default - Literal TeX code, such as braces and brackets, must be inserted as TeX-code - to the comment options. + All braces and brackets in comment options must be inserted as \SpecialChar TeX + code! \end_layout \end_inset @@ -264,17 +267,51 @@ status open status collapsed \begin_layout Plain Layout +author= \begin_inset ERT -status open +status collapsed + +\begin_layout Plain Layout + +{ +\end_layout + +\end_inset + +Daisy Duck +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + +,color= +\begin_inset ERT +status collapsed \begin_layout Plain Layout -author={Daisy Duck},color={0.234 0.867 0.211},voffset=8pt,opacity=0.5 +{ \end_layout \end_inset +0.234 0.867 0.211 +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout +} +\end_layout + +\end_inset + +,voffset=8pt,opacity=0.5 \end_layout \end_inset @@ -347,14 +384,47 @@ status open status collapsed \begin_layout Plain Layout +id=1,color=blue,height=2.5cm,width=5.8cm,voffset=-2.8cm,hoffset=8cm,opacity=1.0,just +ification=right,icolor= \begin_inset ERT -status open +status collapsed \begin_layout Plain Layout -id=1,color=blue,height=2.5cm,width=5.8cm,voffset=-2.8cm,hoffset=8cm,opacity=1.0,just -ification=right,icolor={yellow},linewidth=12pt,borderstyle=dashed,dashstyle={10 - 5} +{ +\end_layout + +\end_inset + +yellow +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + +,linewidth=12pt,borderstyle=dashed,dashstyle= +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +{ +\end_layout + +\end_inset + +10 5 +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +} \end_layout \end_inset @@ -403,7 +473,7 @@ type=typewriter you can write a comment everywhere on the page with a virtual ’typewriter’. These PDF-Freetext annotations do have no frame and a transparent background for ’overwriting’ arbitrary parts of the page. - Here is an example in form of a blue rectangle: + Here is an example in form of a yellow rectangle: \begin_inset Flex PDF-Freetext status open @@ -412,23 +482,13 @@ status open status collapsed \begin_layout Plain Layout -\begin_inset ERT -status open - -\begin_layout Plain Layout - height=3cm,type=freetext,subject={freetext},width=4.5cm,voffset=-3.2cm,hoffset=-3.2 cm,opacity=0.9,justification=right \end_layout \end_inset - -\end_layout - -\end_inset - -This is also a comment, but it's a PDF-Freetext annotation. +This is also a comment, but it is a PDF-Freetext annotation. \end_layout \end_inset @@ -491,19 +551,73 @@ status open status collapsed \begin_layout Plain Layout +type=line,opacity=1,line= \begin_inset ERT -status open +status collapsed + +\begin_layout Plain Layout + +{ +\end_layout + +\end_inset + +50 480 50 180 +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + +,color=green,icolor=blue,caption=top,linebegin= +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +{ +\end_layout + +\end_inset + +/ROpenArrow +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + +,lineend= +\begin_inset ERT +status collapsed \begin_layout Plain Layout -type=line,opacity=1,line={50 480 50 180},color=green,icolor=blue,caption=top,lin -ebegin={/ROpenArrow},lineend={/OpenArrow},linewidth=2bp,captionhoffset=-5pt,capt -ionvoffset=15pt +{ \end_layout \end_inset +/OpenArrow +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset +,linewidth=2bp,captionhoffset=-5pt,captionvoffset=15pt \end_layout \end_inset @@ -522,7 +636,7 @@ PDF-Margin \begin_layout Standard This will typeset an annotation into the margin. - Right beside this text is an example without options: + Right besides this text is an example without options: \begin_inset Flex PDF-Margin status open @@ -536,7 +650,7 @@ a simple PDF-Margin comment \end_layout \begin_layout Standard -The red margin note is an example for a PDF-Margin command with options. +The red margin note is an example for a PDF-Margin with options. \begin_inset Flex PDF-Margin status open @@ -597,7 +711,16 @@ status open status open \begin_layout Plain Layout -id=1,markup=Highlight +\begin_inset Note Note +status open + +\begin_layout Plain Layout +id=1, +\end_layout + +\end_inset + +markup=Highlight \end_layout \end_inset @@ -679,7 +802,7 @@ Underwave PDF-Markup \end_layout \begin_layout Description -StrikeOut The markup text will be struck out: +StrikeOut The markup text will be struck-out: \begin_inset Flex PDF-Markup status open @@ -699,6 +822,82 @@ Striked-out PDF-Markup \end_inset +\end_layout + +\begin_layout Description +mathpopup Formula parts will be highlighted. + +\series bold + +\series default + +\begin_inset Note Greyedout +status open + +\begin_layout Plain Layout + +\series bold +Note: +\series default + The PDF-Markup inset cannot be used for this option! +\end_layout + +\end_inset + + Instead the command +\series bold + +\backslash +pdfmarkupcomment +\series default + woll be used in a formula with this scheme: +\begin_inset Newline newline +\end_inset + +Command: +\begin_inset Newline newline +\end_inset + + +\series bold + +\backslash +pdfmarkupcomment[style=mathpopup] +\backslash +{formula part} +\begin_inset Formula $\to$ +\end_inset + + +\backslash +{ +\backslash +text +\begin_inset space \textvisiblespace{} +\end_inset + + +\begin_inset Newline newline +\end_inset + +optional comment} +\begin_inset Newline newline +\end_inset + + +\series default +Result: +\end_layout + +\begin_layout Standard +\begin_inset Formula +\[ +\pdfmarkupcomment[style=mathpopup]{\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)}{\text{little Gauss}} +\] + +\end_inset + + \end_layout \begin_layout Standard @@ -713,10 +912,6 @@ Comment PDF-Markup has some limitations: \end_layout -\begin_layout Itemize -it is only suitable for text or inline math! -\end_layout - \begin_layout Itemize the markup text must not be longer than one paragraph \end_layout @@ -727,7 +922,8 @@ n of the page break will fail \end_layout \begin_layout Itemize -when using XeTeX you have to assure that the page dimensions are internally +when using Xe\SpecialChar TeX + you have to assure that the page dimensions are internally output, e. \begin_inset space \thinspace{} \end_inset @@ -744,7 +940,8 @@ pagesize \series bold pagesize \series default - for the LaTeX-package + for the \SpecialChar LaTeX +-package \series bold typearea \series default @@ -756,7 +953,26 @@ PDF-Reply \end_layout \begin_layout Standard -With a PDF-Reply you can compose replies to PDF-comments. +\begin_inset Note Greyedout +status open + +\begin_layout Plain Layout + +\series bold +Attention: +\series default + Due to technical limitations PDF-Reply only works when using pdflatex. + On some \SpecialChar LaTeX + installations it won't even work in general. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +With a PDF-Reply you can compose replies to PDF comments. The option \series bold replyto @@ -767,6 +983,10 @@ replyto \begin_layout Standard As example see the reply to the Highlight PDF-Markup from the previous section. +\begin_inset Note Note +status open + +\begin_layout Plain Layout \begin_inset Flex PDF-Reply status open @@ -783,6 +1003,11 @@ id=2,replyto=1,date=D:20101211161247+01'00' This is a reply. \end_layout +\end_inset + + +\end_layout + \end_inset It appears in that PDF-Markup comment. @@ -806,6 +1031,10 @@ id option to the reply that should be replied to. As example see the reply to the reply to the PDF-Markup. +\begin_inset Note Note +status open + +\begin_layout Plain Layout \begin_inset Flex PDF-Reply status open @@ -827,25 +1056,13 @@ Of course, you can reply to a reply. \end_layout -\begin_layout Standard -\begin_inset Note Greyedout -status open - -\begin_layout Plain Layout - -\series bold -Note: -\series default - Due to technical reasons PDF-Reply works only when using pdflatex. -\end_layout - \end_inset \end_layout \begin_layout Standard -PDF-Reply has some further limitations: +PDF-Reply has limitations: \end_layout \begin_layout Itemize @@ -864,8 +1081,8 @@ PDF-Sideline \begin_layout Standard This will typeset a comment in form of identical markers on every side of the page. - The yellow arrows besides this text is an example without any options: - + The yellow arrows besides this text are an example of a PDF-Sideline without + any options: \begin_inset Flex PDF-Sideline status open @@ -897,7 +1114,7 @@ status open \begin_layout Plain Layout \begin_inset Argument 1 -status open +status collapsed \begin_layout Plain Layout opacity=0.33,color=magenta,icolor=cyan,caption=inline,linebegin= @@ -992,12 +1209,13 @@ PDF-Sideline has some limitations: \end_layout \begin_layout Itemize -the markup annotation should not be longer than one page, otherwise the - recognition of the page could fail +the comment should not be longer than one page, otherwise the recognition + of the page could fail \end_layout \begin_layout Itemize -when using XeTeX you have to assure that the page dimensions are internally +when using Xe\SpecialChar TeX + you have to assure that the page dimensions are internally output, e. \begin_inset space \thinspace{} \end_inset @@ -1014,7 +1232,8 @@ pagesize \series bold pagesize \series default - for the LaTeX-package + for the \SpecialChar LaTeX +-package \series bold typearea \series default @@ -1094,7 +1313,8 @@ With this you can annotate any object with a tooltip. status open \begin_layout Plain Layout -All objects that can be set into a TeX-box to measure its size. +All objects that can be set into a \SpecialChar TeX +-box to measure its size. \end_layout \end_inset @@ -1105,8 +1325,8 @@ All objects that can be set into a TeX-box to measure its size. \begin_layout Standard The PDF-Tooltip inset has a mandatory argument for the tooltip. The object that should be annotated is set into the PDF-Tooltip inset, - the tooltip is written into the mandatory argument of the inset. - Here is an example of a word with a tooltip: + the tooltip is written into the mandatory argument. + Here is as example of a word with a tooltip: \begin_inset Flex PDF-Tooltip status open @@ -1122,7 +1342,7 @@ This is a tooltip! \color red -words +word \end_layout \end_inset @@ -1131,8 +1351,8 @@ words \end_layout \begin_layout Standard -As the object for the tooltip can be almost anything, we can also use it - for chemical notations in math: +Since a tooltip can be used for almost any object, one can also use it for + chemical notations in math: \begin_inset Flex PDF-Tooltip status open @@ -1159,8 +1379,8 @@ Sulfuric acid \end_layout \begin_layout Standard -The PDF-Tooltip inset has also an optional argument that is used to correct - the size of tooltips for math (if necessary) or to disable an annotation. +The PDF-Tooltip inset has also an option that is used to correct the size + of the tooltip for math (if necessary) or to disable an annotation. Here is an example with a mathstyle option: \end_layout @@ -1173,19 +1393,20 @@ status open status open \begin_layout Plain Layout +mathstyle= \begin_inset ERT -status open +status collapsed \begin_layout Plain Layout -mathstyle= + \backslash displaystyle \end_layout \end_inset - + \end_layout \end_inset @@ -1201,7 +1422,7 @@ little Gauß \end_inset -\begin_inset Formula $x^{2}+2xy+y^{2}\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)$ +\begin_inset Formula $\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)$ \end_inset @@ -1221,14 +1442,14 @@ The package \series bold pdfcomment \series default - provides the following environments to define or change PDF-comments: + provides the following environments to define or change PDF comments: \end_layout \begin_layout Subsection PDF-Comment setup \begin_inset CommandInset label LatexCommand label -name "sub:PDF-Comment-setup" +name "subsec:PDF-Comment-setup" \end_inset @@ -1238,9 +1459,9 @@ name "sub:PDF-Comment-setup" \begin_layout Standard With this custom inset you can reset the global (document-wide) options at any time. - For example the default color for new PDF-comments is blue. + For example the default color for new PDF comments is blue. To get Adobe Reader's yellow colored notes for all comments in your document, - add the PDF-comment setup inset to the beginning of your document and insert + add the PDF comment setup inset to the beginning of your document and insert there the option \series bold color=yellow @@ -1254,10 +1475,12 @@ By using its optional option \series bold local \series default - you can keep the reset local within a group enclosed by TeX-braces. + you can keep the reset local within a group enclosed by \SpecialChar TeX +-braces. For example you want to reset the color only for two consecutive comments, - then enclose the PDF-comment setup inset and the two comment insets in - TeX-braces. + then enclose the PDF comment setup inset and the two comment insets in + \SpecialChar TeX +-braces. Here is an example: \end_layout @@ -1348,14 +1571,14 @@ default PDF-Margin comment \end_layout \begin_layout Subsection -PDF-Comment style +PDF Comment style \end_layout \begin_layout Standard -This environment allows you to define a style for a PDF-comment that can +This environment allows you to define a style for a PDF comment that can be used by several comments. Assuming you write a Math tutorial and want to add popup explanations in - the PDF for several expressions, then insert a PDF-Comment style environment + the PDF for several expressions, then insert a PDF Comment style environment before your first formula. Name it for example \series bold @@ -1481,7 +1704,8 @@ If you are for example reviewing a document, you need to add your name to every of your comments. In case you use a special layout of your annotations, you would have to do a lot of copy-paste work. - But this can be avoided if you define for every person a special avatar. + But this can be avoided if you define for every comment author a special + avatar. \end_layout \begin_layout Standard @@ -1493,11 +1717,15 @@ Oleg Testman \begin_inset Quotes erd \end_inset - you can define an avatar for your using the environment Define + you can define an avatar for your name using the environment +\family sans +Define \begin_inset space ~ \end_inset -Avatar. +Avatar +\family default +. Its mandatory option is the name. In your case, name it \series bold @@ -1515,6 +1743,10 @@ author={Oleg Testman} You might use a special icon to see at the first look which comments were made by you. You therefore add behind the author-statement, separated by a comma, +\begin_inset Quotes eld +\end_inset + + \series bold icon=Check \series default @@ -1564,16 +1796,20 @@ author={Oleg Testman},icon=Check,color=lime \end_layout \begin_layout Standard -To use now your avatar for PDF-comments you have two choices: +To use now your avatar for PDF comments you have two choices: \end_layout \begin_layout Enumerate -You set up ALL PDF-comments in the document using your avatar. +You set up that all PDF comments in the document use your avatar. This is done by inserting the custom inset \family sans -PDF-Comment-Setup +PDF +\begin_inset space ~ +\end_inset + +Comment-Setup \family default - before the first PDF-comment in your document. + before the first PDF comment in your document. Insert to this inset \series bold avatar=Oleg @@ -1586,14 +1822,18 @@ You add \series bold avatar=Oleg \series default - to the options of a particular PDF-comment. + to the options of a particular PDF comment. The avatar will then only be used for this comment. \end_layout \begin_layout Standard Here is an example for the \family sans -PDF-Comment-Setup +PDF +\begin_inset space ~ +\end_inset + +Comment-Setup \family default method: \begin_inset Flex PDF-Comment-Setup @@ -1679,14 +1919,17 @@ I am Dr. \end_layout \begin_layout Section -List of PDF-comments +List of PDF comments \end_layout \begin_layout Standard -You can insert a list with all PDF-comments using the environment List of - PDF-comments. +You can insert a list with all PDF comments using the environment +\family sans +List of PDF comments +\family default +. By specifying options for it you can determine what parts of the comments - shpuld appear in the list. + should appear in the list. Here is the list for this document where only the comments of a defined author are printed: \end_layout @@ -1698,7 +1941,7 @@ status open \begin_layout Plain Layout liststyle= \begin_inset ERT -status open +status collapsed \begin_layout Plain Layout @@ -1709,7 +1952,7 @@ status open AuthorComment \begin_inset ERT -status open +status collapsed \begin_layout Plain Layout @@ -1720,7 +1963,7 @@ status open , heading = \begin_inset ERT -status open +status collapsed \begin_layout Plain Layout @@ -1729,9 +1972,9 @@ status open \end_inset -List of PDF-comments +List of PDF comments \begin_inset ERT -status open +status collapsed \begin_layout Plain Layout @@ -1759,7 +2002,11 @@ Define \begin_inset space ~ \end_inset -PDF-Comment +PDF +\begin_inset space ~ +\end_inset + +Comment \begin_inset space ~ \end_inset @@ -1773,7 +2020,8 @@ Style \family default -if you know enough about the tricky LaTeX internals. +if you know enough about the tricky \SpecialChar LaTeX + internals. With the environment \begin_inset Newline newline \end_inset @@ -1784,7 +2032,11 @@ Set \begin_inset space ~ \end_inset -PDF-Comment +PDF +\begin_inset space ~ +\end_inset + +Comment \begin_inset space ~ \end_inset @@ -1798,7 +2050,7 @@ Style \family default -you can set a list style in case it was changed before the list of comments. +you can set a list style. \end_layout \begin_layout Define PDF-Comment List Style @@ -1855,7 +2107,8 @@ General Hints \begin_layout Itemize To be able to use all kinds of colors and color definitions you must load - the LaTeX-package + the \SpecialChar LaTeX + package \series bold xcolor \series default @@ -1871,8 +2124,11 @@ usepackage[svgnames,rgb]{xcolor} \end_layout \begin_layout Itemize -If you have two consecutive PDF-comment insets, the will appear in the PDF - one over each other: +If you have two consecutive PDF +\begin_inset space ~ +\end_inset + +comment insets, the will appear in the PDF one over each other: \begin_inset Flex PDF-Comment-Setup status open @@ -1960,7 +2216,8 @@ Oleg also said: I hate to repeat myself. \begin_layout Itemize You cannot use non-Latin characters in your comment or in the author name. The reason is that PDFs use a special character encoding that is not compatible - with LaTeX. + with \SpecialChar LaTeX +. \end_layout \end_body