pdfform.module: new module to create PDF forms

- PDF-form.lyx: example file describing the module

No special package is required since the PDF form features are provided by hyperref.
This commit is contained in:
Uwe Stöhr 2015-04-27 02:56:25 +02:00
parent e73f61d300
commit 892abc5ee9
3 changed files with 2520 additions and 0 deletions

View File

@ -328,6 +328,7 @@ dist_examples_DATA = \
examples/MultilingualCaptions.lyx \
examples/noweb2lyx.lyx \
examples/PDF-comment.lyx \
examples/PDF-form.lyx \
examples/powerdot-example.lyx \
examples/recipebook.lyx \
examples/R-S-statements.lyx \
@ -2088,6 +2089,7 @@ dist_layouts_DATA =\
layouts/numrevtex.inc \
layouts/paper.layout \
layouts/pdfcomment.module \
layouts/pdfform.module \
layouts/powerdot.layout \
layouts/RJournal.layout \
layouts/recipebook.layout \

2342
lib/examples/PDF-form.lyx Normal file

File diff suppressed because it is too large Load Diff

176
lib/layouts/pdfform.module Normal file
View File

@ -0,0 +1,176 @@
#\DeclareLyXModule{PDF Form}
#DescriptionBegin
#Provides various kinds of annotations for the PDF output. The module uses
#the hyperref package. Please consult LyX example file PDF-form.lyx and the
#package documentation for details.
#DescriptionEnd
# Author: Uwe Stöhr <uwestoehr@lyx.org>
Format 54
#
# the form environment
#
Style "Begin PDF Form"
Margin Dynamic
LatexType Command
LatexName begin{Form}
Category "PDF form"
KeepEmpty 1
ParSkip 0.4
Align Block
LabelSep xx
LabelType Static
LabelString "Begin PDF Form"
Argument 1
MenuString "PDF form parameters"
LabelString "Params"
Tooltip "Insert PDF form parameters here"
EndArgument
LabelFont
Series Bold
Color Green
EndFont
Requires hyperref
End
Style "End PDF Form"
CopyStyle "Begin PDF Form"
LatexName end{Form}
LabelString "End PDF Form"
End
#
# form fields
#
InsetLayout Flex:TextField
LyXType custom
LatexType command
Decoration classic
LatexName TextField
LabelString "TextField"
Argument 1
MenuString "PDF form parameters"
LabelString "Params"
Tooltip "Insert PDF form parameters here"
EndArgument
PassThru 1
LabelFont
Color magenta
Size Small
EndFont
Requires hyperref
End
InsetLayout Flex:CheckBox
CopyStyle Flex:TextField
LatexName CheckBox
LabelString "CheckBox"
End
InsetLayout Flex:ChoiceMenu
CopyStyle Flex:TextField
LatexName ChoiceMenu
LabelString "ChoiceMenu"
Argument 2
LabelString "Label"
Mandatory 1
AutoInsert 1
ToolTip "Insert the label here"
EndArgument
End
InsetLayout Flex:PushButton
CopyStyle Flex:TextField
LatexName PushButton
LabelString "PushButton"
End
InsetLayout Flex:SubmitButton
CopyStyle Flex:TextField
LatexName Submit
LabelString "SubmitButton"
End
InsetLayout Flex:ResetButton
CopyStyle Flex:TextField
LatexName Reset
LabelString "ResetButton"
End
#
# PDF viewer-specific insets
#
InsetLayout Flex:PDFAction
CopyStyle Flex:TextField
LatexName Acrobatmenu
LabelString "PDFAction"
Argument 1
LabelString "Action"
Mandatory 1
AutoInsert 1
ToolTip "the name of the PDF action"
EndArgument
End
#
# Form style layouts
#
Style "Text Field Style"
CopyStyle "Begin PDF Form"
LatexName renewcommand*{\DefaultOptionsofText}
LabelString "Default text field style"
PassThru 1
End
Style "Submit Button Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofSubmit}
LabelString "Default submit button style"
End
Style "Push Button Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofPushButton}
LabelString "Default push button style"
End
Style "Check Box Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofCheckBox}
LabelString "Default check box style"
End
Style "Reset Button Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofReset}
LabelString "Default reset button style"
End
Style "List Box Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofListBox}
LabelString "Default list box style"
End
Style "Combo Box Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofComboBox}
LabelString "Default combo box style"
End
Style "Popdown Box Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofPopdownBox}
LabelString "Default popdown box style"
End
Style "Radio Box Style"
CopyStyle "Text Field Style"
LatexName renewcommand*{\DefaultOptionsofRadio}
LabelString "Default radio box style"
End