From: Juergen Spitzmueller Date: Thu, 3 Jul 2014 09:30:56 +0000 (+0200) Subject: Add support for the pdfcomment package. X-Git-Tag: 2.2.0alpha1~1805 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d333d7d6961590527a7ecb281a8bdd490c729a7a;p=features.git Add support for the pdfcomment package. Fixes: #6975. --- diff --git a/lib/Makefile.am b/lib/Makefile.am index 7818f10f42..fa78915e96 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2012,6 +2012,7 @@ dist_layouts_DATA =\ layouts/numreport.inc \ layouts/numrevtex.inc \ layouts/paper.layout \ + layouts/pdfcomment.module \ layouts/powerdot.layout \ layouts/RJournal.layout \ layouts/recipebook.layout \ diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index eaa8bd1f58..0cba00ad37 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -337,6 +337,7 @@ \TestPackage{nomencl} \TestPackage{pdfcolmk} \TestPackage{polyglossia} +\TestPackage{pdfcomment} \TestPackage{pdfpages} \TestPackage{prettyref} \TestPackage{preview} diff --git a/lib/layouts/pdfcomment.module b/lib/layouts/pdfcomment.module new file mode 100644 index 0000000000..c50af2680b --- /dev/null +++ b/lib/layouts/pdfcomment.module @@ -0,0 +1,151 @@ +#\DeclareLyXModule{PDF Comments} +#DescriptionBegin +#Provides various kinds of annotations for the PDF output. The module uses +#the pdcomment package. Please consult the package documentation for details. +#DescriptionEnd +# Author: Juergen Spitzmueller + +Format 48 + +# +# Annotation insets +# + +InsetLayout "Flex:PDF-Annotation" + LyXType custom + LatexType command + Decoration classic + LabelString PDF + LatexName pdfcomment + LabelFont + Color magenta + Size Small + EndFont + MultiPar false + Argument 1 + 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 + LabelFont + Color green + Size Small + EndFont +End + +InsetLayout "Flex:PDF-Markup" + CopyStyle "Flex:PDF-Margin" + LabelString "PDF (Markup)" + LatexName pdfmarkupcomment + Argument post:1 + LabelString "Comment" + Mandatory 1 + ToolTip "Insert the comment to the marked-up text here" + EndArgument +End + +InsetLayout "Flex:PDF-Freetext" + CopyStyle "Flex:PDF-Margin" + LabelString "PDF (Freetext)" + LatexName pdffreetextcomment +End + +InsetLayout "Flex:PDF-Square" + CopyStyle "Flex:PDF-Margin" + LabelString "PDF (Square)" + LatexName pdfsquarecomment +End + +InsetLayout "Flex:PDF-Circle" + CopyStyle "Flex:PDF-Margin" + LabelString "PDF (Circle)" + LatexName pdfcirclecomment +End + +InsetLayout "Flex:PDF-Line" + CopyStyle "Flex:PDF-Margin" + LabelString "PDF (Line)" + LatexName pdflinecomment +End + +InsetLayout "Flex:PDF-Sideline" + CopyStyle "Flex:PDF-Margin" + LabelString "PDF (Sideline)" + LatexType environment + LatexName pdfsidelinecomment + MultiPar true + Argument 2 + LabelString "Comment" + Mandatory 1 + ToolTip "Insert the comment here" + EndArgument +End + +InsetLayout "Flex:PDF-Reply" + CopyStyle "Flex:PDF-Margin" + LabelString "PDF (Reply)" + LatexName pdfreply + LabelFont + Color blue + Size Small + EndFont +End + +InsetLayout "Flex:PDF-Tooltip" + CopyStyle "Flex:PDF-Markup" + LabelString "PDF (Tooltip)" + LatexName pdftooltip + LabelFont + Color red + Size Small + EndFont + Argument post:1 + 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 typewriter + Series Medium + Size Small + Color latex + EndFont + + Argument 1 + LabelString "Opts" + MenuString "List Options|s" + Tooltip "Insert list options here (see pdfcomment manual)" + EndArgument + Requires pdfcomment +End diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 2c9c64ca17..cb35fdfb83 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -744,7 +744,8 @@ char const * simplefeatures[] = { "rsphrase", "algorithm2e", "sectionbox", - "tcolorbox" + "tcolorbox", + "pdfcomment" }; char const * bibliofeatures[] = {