]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/pdfcomment.module
Do not throw away runparams settings of InsetText in InsetFoot::latex
[lyx.git] / lib / layouts / pdfcomment.module
index ed5c03ca0e3c9b6fd561cd05eb5c82f7b15e3bb4..950f7547411d607191c19546afa272fcca575a1e 100644 (file)
@@ -1,22 +1,24 @@
 #\DeclareLyXModule[datetime.sty,fmtcount.sty]{PDF Comments}
+#\DeclareCategory{Annotation & Revision}
 #DescriptionBegin
 #Provides various kinds of annotations for the PDF output. The module uses
-#the pdcomment package. Please consult the package documentation for details.
+#the pdfcomment package. Please consult Help > Specific Manuals > PDF comments
+#and the package documentation for details.
 #DescriptionEnd
-# Author: Juergen Spitzmueller <spitz@lyx.org> and Uwe Stöhr
+# Author: Juergen Spitzmueller <spitz@lyx.org>
+#         Uwe Stöhr <uwestoehr@lyx.org>
 
-Format 49
-
-AddToPreamble
-       \usepackage{pdfcomment} %support for comments in PDF files
-EndPreamble
+Format 100
 
 #
 # helper commands
 #
 
+# pdfcomment loads hyperref
+Provides hyperref 1
+
 Style Define_Avatar
-       Category                Misc
+       Category                PDF-comment
        LatexType               Command
        Margin                  Dynamic
        LatexName               defineavatar
@@ -25,15 +27,16 @@ Style Define_Avatar
        LabelSep                M
        LabelString             "PDF-comment avatar:"
        Argument 1
-               LabelString     "Name"
-               Tooltip         "Name of the Avatar"
-               Mandatory       1
+         LabelString           "Name"
+         Tooltip               "Name of the Avatar"
+         Mandatory             1
        EndArgument
        PassThru                1
        LabelFont
-         Color                 green
-         Shape                 bold
+         Color                 textlabel2
+         Series                Bold
        EndFont
+       Requires                pdfcomment
 End
 
 Style Define_PDF-Comment_Style
@@ -41,9 +44,9 @@ Style Define_PDF-Comment_Style
        LatexName               definestyle
        LabelString             "PDF-comment style:"
        Argument 1
-               LabelString     "Name"
-               Tooltip         "Name of the style"
-               Mandatory       1
+         LabelString           "Name"
+         Tooltip               "Name of the style"
+         Mandatory             1
        EndArgument
 End
 
@@ -52,9 +55,9 @@ Style Define_PDF-Comment_List_Style
        LatexName               defineliststyle
        LabelString             "Definition of PDF-comment list style:"
        Argument 1
-               LabelString     "Name"
-               Tooltip         "Name of the list style"
-               Mandatory       1
+         LabelString           "Name"
+         Tooltip               "Name of the list style"
+         Mandatory             1
        EndArgument
 End
 
@@ -65,196 +68,173 @@ Style Set_PDF-Comment_List_Style
        ResetArgs               1
 End
 
-#
-# Comment insets
-#
-
-InsetLayout "Flex:PDF-Annotation"
-       LyXType               custom
-       LatexType             command
-       Decoration            classic
-       LabelString           "PDF (Annotation)"
-       LatexName             pdfcomment
+InsetLayout "Flex:PDF-Comment-Setup"
+       LyXType                 custom
+       LatexType               command
+       Decoration              classic
+       LabelString             "PDF (Setup)"
+       LatexName               pdfcommentsetup
        LabelFont
-         Color               magenta
-         Size                Small
+         Color                 textlabel3
+         Size                  Small
        EndFont
-       MultiPar              false
+       MultiPar                false
        Argument 1
-         MenuString          "PDF-Annotation options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Annotation options here (see the pdfcomment manual)"
+         MenuString            "PDF-Comment setup options"
+         LabelString           "Opts"
+         ToolTip               "Insert PDF-Comment setup options here (see the pdfcomment manual)"
        EndArgument
-       Requires              pdfcomment
+       Requires                pdfcomment
 End
 
-InsetLayout "Flex:PDF-Comment-Setup"
-       CopyStyle             "Flex:PDF-Annotation"
-       LabelString           "PDF (Setup)"
-       LatexName             pdfcommentsetup
+#
+# Annotation insets
+#
+
+InsetLayout "Flex:PDF-Annotation"
+       LyXType                 custom
+       LatexType               command
+       Decoration              classic
+       LabelString             PDF
+       LatexName               pdfcomment
+       LabelFont
+         Color                 textlabel3
+         Size                  Small
+       EndFont
+       MultiPar                false
+       NewlineCmd              textCR
        Argument 1
-         MenuString          "PDF-Comment setup options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Comment setup options here (see the pdfcomment manual)"
+         MenuString            "PDFComment Options"
+         LabelString           "Opts"
+         ToolTip               "Insert PDFComment options here (see pdfcomment manual)"
        EndArgument
+       Requires                pdfcomment
 End
 
 InsetLayout "Flex:PDF-Margin"
-       CopyStyle             "Flex:PDF-Annotation"
-       LabelString           "PDF (Margin)"
-       LatexName             pdfmargincomment
-       Argument 1
-         MenuString          "PDF-Margin options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Margin options here (see the pdfcomment manual)"
-       EndArgument
+       CopyStyle               "Flex:PDF-Annotation"
+       LabelString             "PDF (Margin)"
+       LatexName               pdfmargincomment
        LabelFont
-         Color               green
-         Size                Small
+         Color                 textlabel2
+         Size                  Small
        EndFont
 End
 
 InsetLayout "Flex:PDF-Markup"
-       CopyStyle             "Flex:PDF-Margin"
-       LabelString           "PDF (Markup)"
-       LatexName             pdfmarkupcomment
+       CopyStyle               "Flex:PDF-Margin"
+       LabelString             "PDF (Markup)"
+       LatexName               pdfmarkupcomment
+       NeedMBoxProtect         1
+       NewlineCmd              ""
        Argument post:1
-         LabelString         "Comment"
-         Mandatory           1
-         ToolTip             "Insert the comment to the marked-up text here"
+         LabelString           "Comment"
+         Mandatory             1
+         ToolTip               "Insert the comment to the marked-up text here"
+         NewlineCmd            textCR
        EndArgument
 End
 
 InsetLayout "Flex:PDF-Freetext"
-       CopyStyle             "Flex:PDF-Margin"
-       LabelString           "PDF (Freetext)"
-       LatexName             pdffreetextcomment
-       Argument 1
-         MenuString          "PDF-Freetext options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Freetext options here (see the pdfcomment manual)"
-       EndArgument
+       CopyStyle               "Flex:PDF-Margin"
+       LabelString             "PDF (Freetext)"
+       LatexName               pdffreetextcomment
+       NewlineCmd              ""
 End
 
 InsetLayout "Flex:PDF-Square"
-       CopyStyle             "Flex:PDF-Margin"
-       LabelString           "PDF (Square)"
-       LatexName             pdfsquarecomment
-       Argument 1
-         MenuString          "PDF-Square options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Square options here (see the pdfcomment manual)"
-       EndArgument
+       CopyStyle               "Flex:PDF-Margin"
+       LabelString             "PDF (Square)"
+       LatexName               pdfsquarecomment
+       NewlineCmd              ""
 End
 
 InsetLayout "Flex:PDF-Circle"
-       CopyStyle             "Flex:PDF-Margin"
-       LabelString           "PDF (Circle)"
-       LatexName             pdfcirclecomment
-       Argument 1
-         MenuString          "PDF-Circle options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Circle options here (see the pdfcomment manual)"
-       EndArgument
+       CopyStyle               "Flex:PDF-Margin"
+       LabelString             "PDF (Circle)"
+       LatexName               pdfcirclecomment
+       NewlineCmd              ""
 End
 
 InsetLayout "Flex:PDF-Line"
-       CopyStyle             "Flex:PDF-Margin"
-       LabelString           "PDF (Line)"
-       LatexName             pdflinecomment
-       Argument 1
-         MenuString          "PDF-Line options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Line options here (see the pdfcomment manual)"
-       EndArgument
+       CopyStyle               "Flex:PDF-Margin"
+       LabelString             "PDF (Line)"
+       LatexName               pdflinecomment
+       NewlineCmd              ""
 End
 
 InsetLayout "Flex:PDF-Sideline"
-       CopyStyle             "Flex:PDF-Margin"
-       LabelString           "PDF (Sideline)"
-       LatexType             environment
-       LatexName             pdfsidelinecomment
-       MultiPar              true
-       Argument 1
-         MenuString          "PDF-Sideline options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Sideline options here (see the pdfcomment manual)"
-       EndArgument
+       CopyStyle               "Flex:PDF-Margin"
+       LabelString             "PDF (Sideline)"
+       LatexType               environment
+       LatexName               pdfsidelinecomment
+       MultiPar                true
+       NewlineCmd              ""
        Argument 2
-         LabelString         "Comment"
-         Mandatory           1
-         ToolTip             "Insert the comment here"
+         LabelString           "Comment"
+         Mandatory             1
+         ToolTip               "Insert the comment here"
+         NewlineCmd            textCR
        EndArgument
 End
 
 InsetLayout "Flex:PDF-Reply"
-       CopyStyle             "Flex:PDF-Margin"
-       LabelString           "PDF (Reply)"
-       LatexName             pdfreply
-       Argument 1
-         MenuString          "PDF-Reply options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Reply options here (see the pdfcomment manual)"
-       EndArgument
+       CopyStyle               "Flex:PDF-Margin"
+       LabelString             "PDF (Reply)"
+       LatexName               pdfreply
        LabelFont
-         Color               blue
-         Size                Small
+         Color                 textlabel1
+         Size                  Small
        EndFont
 End
 
 InsetLayout "Flex:PDF-Tooltip"
-       CopyStyle             "Flex:PDF-Markup"
-       LabelString           "PDF (Tooltip)"
-       LatexName             pdftooltip
+       CopyStyle               "Flex:PDF-Markup"
+       LabelString             "PDF (Tooltip)"
+       LatexName               pdftooltip
+       NeedMBoxProtect         0
+       NewlineCmd              ""
        LabelFont
-         Color               red
-         Size                Small
+         Color                 textlabel3
+         Size                  Small
        EndFont
-       Argument 1
-         MenuString          "PDF-Tooltip options"
-         LabelString         "Opts"
-         ToolTip             "Insert PDF-Tooltip options here (see the pdfcomment manual)"
-       EndArgument
        Argument post:1
-         MenuString          "Tooltip Text"
-         LabelString         "Tooltip"
-         Mandatory           1
-         ToolTip             "Insert the tooltip text here"
+         MenuString            "Tooltip Text"
+         LabelString           "Tooltip"
+         Mandatory             1
+         ToolTip               "Insert the tooltip text here"
        EndArgument
 End
 
-
 #
 # List of Annotations
 #
 
-Style List_of_PDF-Comments
-       KeepEmpty       1
-       LatexType       Command
-       LatexName       listofpdfcomments
-       Margin          First_Dynamic
-       NextNoIndent    1
-       ParSkip         0
-       TopSep          0
-       BottomSep       0.25
-       ParSep          0
-       Align           Center
-       LabelType       Static
-       LabelBottomSep  0
-       LeftMargin      MMMMM
-       LabelString     "List of PDF-comments"
-       LabelFont 
-           Family      sansserif
-           Series      Medium
-           Size        large
-           Color       latex
-           Shape       bold
+Style List_of_PDF_Comments
+       KeepEmpty               1
+       LatexType               Command
+       LatexName               listofpdfcomments
+       Margin                  First_Dynamic
+       NextNoIndent            1
+       ParSkip                 0
+       TopSep                  0
+       BottomSep               0.25
+       ParSep                  0
+       Align                   Center
+       LabelType               Static
+       LabelBottomSep          0
+       LeftMargin              MMMMM
+       LabelString             "[List of PDF Comments]"
+       LabelFont
+         Family                Sans
+         Series                Bold
+         Size                  Large
+         Color                 latex
        EndFont
        Argument 1
-               LabelString     "Opts"
-               MenuString      "List Options|s"
-               Tooltip         "Insert list options here (see pdfcomment manual)"
+         LabelString           "Opts"
+         MenuString            "List Options|s"
+         Tooltip               "Insert list options here (see pdfcomment manual)"
        EndArgument
-       PassThru        1
-       Requires              pdfcomment
+       Requires                pdfcomment
 End