2015-04-27 00:56:25 +00:00
|
|
|
#\DeclareLyXModule{PDF Form}
|
|
|
|
#DescriptionBegin
|
2015-04-27 01:00:27 +00:00
|
|
|
#Provides fields and buttons for PDF forms. The module uses
|
|
|
|
#the LaTeX package hyperref. Please consult the LyX example file PDF-form.lyx
|
|
|
|
#and the documentation of hyperref for details.
|
2015-04-27 00:56:25 +00:00
|
|
|
#DescriptionEnd
|
|
|
|
# Author: Uwe Stöhr <uwestoehr@lyx.org>
|
|
|
|
|
2019-03-26 16:46:21 +00:00
|
|
|
Format 72
|
2015-04-27 00:56:25 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# the form environment
|
|
|
|
#
|
|
|
|
|
|
|
|
Style "Begin PDF Form"
|
|
|
|
Margin Dynamic
|
|
|
|
LatexType Command
|
|
|
|
LatexName begin{Form}
|
|
|
|
Category "PDF form"
|
|
|
|
KeepEmpty 1
|
2015-04-28 00:00:53 +00:00
|
|
|
PassThru 1
|
2015-04-27 00:56:25 +00:00
|
|
|
ParSkip 0.4
|
|
|
|
Align Block
|
|
|
|
LabelSep xx
|
|
|
|
LabelType Static
|
|
|
|
LabelString "Begin PDF Form"
|
|
|
|
Argument 1
|
2015-05-04 23:33:11 +00:00
|
|
|
MenuString "PDF Form Parameters"
|
|
|
|
LabelString "Params"
|
2015-04-29 23:23:47 +00:00
|
|
|
Tooltip "Insert PDF form parameters here"
|
2015-05-04 23:33:11 +00:00
|
|
|
AutoInsert 1
|
2015-04-27 00:56:25 +00:00
|
|
|
EndArgument
|
|
|
|
LabelFont
|
|
|
|
Series Bold
|
|
|
|
Color Green
|
|
|
|
EndFont
|
2015-05-19 21:09:21 +00:00
|
|
|
Requires hyperref
|
2015-04-27 00:56:25 +00:00
|
|
|
End
|
|
|
|
|
|
|
|
Style "End PDF Form"
|
|
|
|
CopyStyle "Begin PDF Form"
|
|
|
|
LatexName end{Form}
|
|
|
|
LabelString "End PDF Form"
|
2015-04-29 20:06:00 +00:00
|
|
|
ResetArgs 1
|
2015-04-27 00:56:25 +00:00
|
|
|
End
|
|
|
|
|
2015-04-28 00:00:53 +00:00
|
|
|
Style "PDF Link Setup"
|
|
|
|
CopyStyle "Begin PDF Form"
|
|
|
|
LatexName hypersetup
|
|
|
|
LabelString "PDF link setup"
|
|
|
|
KeepEmpty 0
|
|
|
|
End
|
|
|
|
|
2015-04-27 00:56:25 +00:00
|
|
|
#
|
|
|
|
# form fields
|
|
|
|
#
|
|
|
|
|
|
|
|
InsetLayout Flex:TextField
|
|
|
|
LyXType custom
|
|
|
|
LatexType command
|
|
|
|
Decoration classic
|
|
|
|
LatexName TextField
|
|
|
|
LabelString "TextField"
|
|
|
|
Argument 1
|
2015-05-04 23:33:11 +00:00
|
|
|
MenuString "PDF Form Parameters"
|
|
|
|
LabelString "Params"
|
2015-04-29 23:23:47 +00:00
|
|
|
Tooltip "Insert PDF form parameters here"
|
2015-05-04 23:33:11 +00:00
|
|
|
AutoInsert 1
|
2015-05-19 21:09:21 +00:00
|
|
|
PassThruChars "\[]{}"
|
2015-04-27 00:56:25 +00:00
|
|
|
EndArgument
|
|
|
|
LabelFont
|
|
|
|
Color magenta
|
|
|
|
Size Small
|
|
|
|
EndFont
|
2015-05-19 21:09:21 +00:00
|
|
|
Requires hyperref
|
2015-04-27 00:56:25 +00:00
|
|
|
End
|
|
|
|
|
|
|
|
InsetLayout Flex:CheckBox
|
|
|
|
CopyStyle Flex:TextField
|
|
|
|
LatexName CheckBox
|
|
|
|
LabelString "CheckBox"
|
|
|
|
End
|
|
|
|
|
|
|
|
InsetLayout Flex:ChoiceMenu
|
|
|
|
CopyStyle Flex:TextField
|
|
|
|
LatexName ChoiceMenu
|
|
|
|
LabelString "ChoiceMenu"
|
|
|
|
Argument 2
|
2015-05-04 23:33:11 +00:00
|
|
|
LabelString "Label"
|
2015-04-29 23:23:47 +00:00
|
|
|
Mandatory 1
|
2015-05-04 23:33:11 +00:00
|
|
|
AutoInsert 1
|
2015-04-29 23:23:47 +00:00
|
|
|
ToolTip "Insert the label here"
|
2015-04-27 00:56:25 +00:00
|
|
|
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
|
2015-05-04 23:33:11 +00:00
|
|
|
LabelString "Action"
|
2015-04-29 23:23:47 +00:00
|
|
|
Mandatory 1
|
2015-05-04 23:33:11 +00:00
|
|
|
AutoInsert 1
|
2015-05-03 11:58:06 +00:00
|
|
|
ToolTip "The name of the PDF action"
|
2015-04-27 00:56:25 +00:00
|
|
|
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
|