]> git.lyx.org Git - lyx.git/blobdiff - lib/examples/PDF-form.lyx
Fix up e5fc7327.
[lyx.git] / lib / examples / PDF-form.lyx
index b6808599944f92f7f5003d5f89e7c11bf4e4d709..5f83c33cd8ead54b8adf26e39454e64e76261b14 100644 (file)
@@ -1,5 +1,5 @@
-#LyX 2.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 508
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 544
 \begin_document
 \begin_header
 \save_transient_properties true
    this.delay = true;
    if((event.value == "u") || (event.value == "unlimited")) {
     this.getField("from").display = display.hidden;
-    this.getField("to").display = display.hidden;
+    this.getField("until").display = display.hidden;
    } else {
     this.getField("from").display = display.visible;
-    this.getField("to").display = display.visible;
+    this.getField("until").display = display.visible;
     this.getField("from").setFocus();
    }
    this.delay = false;
@@ -81,6 +81,8 @@ pdfform
 \font_osf false
 \font_sf_scale 100 100
 \font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures false
 \graphics default
 \default_output_format pdf2
 \output_sync 0
@@ -107,14 +109,14 @@ pdfform
 \use_geometry false
 \use_package amsmath 1
 \use_package amssymb 1
-\use_package cancel 0
+\use_package cancel 1
 \use_package esint 1
 \use_package mathdots 1
 \use_package mathtools 1
 \use_package mhchem 1
-\use_package stackrel 0
-\use_package stmaryrd 0
-\use_package undertilde 0
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
 \cite_engine basic
 \cite_engine_type default
 \biblio_style plain
@@ -124,6 +126,7 @@ pdfform
 \suppress_date true
 \justification true
 \use_refstyle 0
+\use_minted 0
 \notefontcolor #0000ff
 \index Index
 \shortcut idx
@@ -133,7 +136,10 @@ pdfform
 \tocdepth 2
 \paragraph_separation skip
 \defskip medskip
-\quotes_language english
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
@@ -151,6 +157,7 @@ pdfform
 status open
 
 \begin_layout Plain Layout
+
 action=mailto:forms@lyx.test?subject=The submitted PDF form, method=post
 \end_layout
 
@@ -179,7 +186,7 @@ insdljs
 \series default
  must be installed.
  If it is not installed you can export the document anyway but the example
- in the section about dynamic form fields won't appear in the output.
+ in the section about dynamic form elements will not appear in the output.
 \end_layout
 
 \end_inset
@@ -348,7 +355,7 @@ reference "subsec:Submit-button"
 \end_layout
 
 \begin_layout Section
-Form fields
+Form elements
 \end_layout
 
 \begin_layout Standard
@@ -407,12 +414,12 @@ Enter your name here:
 \end_layout
 
 \begin_layout Standard
-You must also specify a name for text fields: Set the cursor into its 
+You must also specify a name for text fields.
+ To do this set the cursor into its 
 \family sans
 Params
 \family default
- inset.
- There insert the parameter 
+ inset and insert the parameter 
 \series bold
 name=customer
 \series default
@@ -435,8 +442,8 @@ Here are 2
 \begin_inset space ~
 \end_inset
 
-fields as example: Fill one and see that the other one will also be filled
- automatically when you click outside of the field:
+fields as example: Fill one and see that the other one will be filled automatica
+lly when you click outside of the field:
 \begin_inset Newline newline
 \end_inset
 
@@ -534,7 +541,7 @@ status open
 \begin_layout Plain Layout
 name=customer2, multiline, width=0.6
 \backslash
-textwidth, height=3cm, value={Testman}
+textwidth, height=3cm, value={proposed text}
 \end_layout
 
 \end_inset
@@ -631,7 +638,7 @@ name=age
 \series bold
 age
 \series default
- is the field name) into the 
+ is the name) into the 
 \family sans
 Params
 \family default
@@ -654,11 +661,7 @@ Insert\SpecialChar menuseparator
 Label
 \family default
 .
- Insert the label text into this inset.
-\begin_inset Newline newline
-\end_inset
-
-The different choices are inserted to the inset as comma-separated list.
+ The different choices are inserted to the inset as comma-separated list.
  There are 3
 \begin_inset space ~
 \end_inset
@@ -677,8 +680,7 @@ Combo The choices are listed in a combo box (dropdown list) but the user
 
 \begin_layout Description
 Popdown All choices are listed below each other.
- If the field is not high enough a scroll bar is automatically added to
- the field.
+ If the menu is not high enough a scroll bar is automatically added.
 \end_layout
 
 \begin_layout Standard
@@ -971,6 +973,7 @@ onclick={}
 \begin_inset CommandInset citation
 LatexCommand cite
 key "JavaScript"
+literal "true"
 
 \end_inset
 
@@ -993,7 +996,15 @@ status collapsed
 \end_inset
 
 What the hell? Now you destroyed your fridge.
- Congratulations.
+\begin_inset Quotes eld
+\end_inset
+
+Congratulations.
+\begin_inset Quotes erd
+\end_inset
+
+
 \begin_inset ERT
 status collapsed
 
@@ -1028,7 +1039,15 @@ status collapsed
 \end_inset
 
 What the hell? Now you destroyed your fridge.
- Congratulations.
+\begin_inset Quotes eld
+\end_inset
+
+Congratulations.
+\begin_inset Quotes erd
+\end_inset
+
+
 \begin_inset ERT
 status collapsed
 
@@ -1061,7 +1080,8 @@ status open
 \series bold
 Note:
 \series default
- All quote characters in form parameters must be inserted as \SpecialChar TeX
+ The outer quotes are part of the JavaScript code and must therefore be
+ inserted as \SpecialChar TeX
  code!
 \end_layout
 
@@ -1072,11 +1092,7 @@ Note:
 
 \begin_layout Standard
 A common usage for push buttons is to open a weblink.
- Such a button is created by inserting a hyperlink into the 
-\family sans
-PushButton
-\family default
- inset.
+ Such a button is created by inserting a hyperlink as button text.
  Here is an example:
 \end_layout
 
@@ -1098,7 +1114,8 @@ status open
 \begin_inset CommandInset href
 LatexCommand href
 name "Information how to fill out this form"
-target "http://wiki.lyx.org"
+target "https://wiki.lyx.org"
+literal "false"
 
 \end_inset
 
@@ -1111,7 +1128,7 @@ target "http://wiki.lyx.org"
 \end_layout
 
 \begin_layout Standard
-To get rid of the special frame for weblinks add this to the additional
+To get rid of the predefined frame for weblinks add this to the additional
  options in the document settings under 
 \family sans
 PDF
@@ -1182,8 +1199,8 @@ Send your data via email
 The submit button creates a forms data format (FDF) file (file extension
  *.fdf) which is then submitted.
  The FDF file contains only the form data.
- They can only be applied to a PDF form if all elements in the form have
- a name.
+ They can later only be applied to a PDF form if all elements in the form
have a name.
 \end_layout
 
 \begin_layout Standard
@@ -1221,7 +1238,7 @@ reference "sec:Preparation"
 
  for the description.
  If there are no specifications you will get \SpecialChar LaTeX
- errors!
+ errors.
 \end_layout
 
 \end_inset
@@ -1390,10 +1407,6 @@ Button
 Style
 \end_layout
 
-\begin_layout Text Field Style
-
-\end_layout
-
 \begin_layout Standard
 The content of the styles is a comma-separated list of parameters.
  The possible parameters are listed in sec.
@@ -1417,6 +1430,7 @@ hyperref
 \begin_inset CommandInset citation
 LatexCommand cite
 key "hyperref"
+literal "true"
 
 \end_inset
 
@@ -1426,7 +1440,7 @@ key "hyperref"
 print
 \emph default
  is always part of the definition.
- Otherwise the fields will not appear in the PDF.
+ Otherwise the elements will not appear in the PDF.
  The defined style is applied to all elements following the definition.
 \end_layout
 
@@ -1437,6 +1451,40 @@ Here are some examples:
 \begin_layout Text Field Style
 print, bordercolor=red, borderstyle=U, backgroundcolor=lightgray, color=lime,
  maxlen=10, align=2, charsize=16pt
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+The parameter 
+\series bold
+borderstyle
+\series default
+ can be 
+\series bold
+U
+\series default
+ (underlined), 
+\series bold
+S
+\series default
+ (solid), 
+\series bold
+D
+\series default
+ (dashed), 
+\series bold
+B
+\series default
+ (bevel) or 
+\series bold
+I
+\series default
+ (inverted bevel).
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Check Box Style
@@ -1451,6 +1499,26 @@ print, bordercolor={0.33 0.66 0.33}, borderstyle=D
 
 \begin_layout Popdown Box Style
 print, menulength=2
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Plain Layout
+The parameter
+\series bold
+ menulength
+\series default
+ determines the number of displayed menu entries.
+ It does not work currently because of a bug in the \SpecialChar LaTeX
+ package 
+\series bold
+hyperref
+\series default
+.
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Radio Box Style
@@ -1542,43 +1610,6 @@ Show border hover color for fields
 \end_inset
 
 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-The option 
-\series bold
-borderstyle
-\series default
- can be 
-\series bold
-U
-\series default
- (underlined), 
-\series bold
-S
-\series default
- (solid), 
-\series bold
-D
-\series default
- (dashed), 
-\series bold
-B
-\series default
- (bevel) or 
-\series bold
-I
-\series default
- (inverted bevel).
-\end_layout
-
-\end_inset
-
-
 \end_layout
 
 \begin_layout Itemize
@@ -1637,10 +1668,16 @@ number
 \begin_inset space ~
 \end_inset
 
-2 of 
+2 of the documentation of the \SpecialChar LaTeX
+ package 
+\series bold
+pifont
+\series default
+, 
 \begin_inset CommandInset citation
 LatexCommand cite
 key "pifont"
+literal "true"
 
 \end_inset
 
@@ -1741,9 +1778,9 @@ status open
 \begin_layout Plain Layout
 
 \series bold
-Note
+Note
 \series default
- that the option
+The parameter
 \series bold
 borderstyle B
 \series default
@@ -1808,6 +1845,47 @@ Sex:
 
 \end_layout
 
+\begin_layout Standard
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+Note:
+\series default
+ The parameters 
+\series bold
+backgroundcolor
+\series default
+, 
+\series bold
+color
+\series default
+, 
+\series bold
+height 
+\series default
+and 
+\series bold
+width
+\series default
+ have no effect for push, submit and reset buttons.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+As workaround use a colored box and/or color the box text.
+\end_layout
+
 \begin_layout Itemize
 Push button with a bevel border and colored text:
 \begin_inset VSpace defskip
@@ -1886,49 +1964,12 @@ Don't click on this button!!!
 \end_inset
 
 
-\end_layout
-
-\begin_layout Standard
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Note Greyedout
-status open
-
-\begin_layout Plain Layout
-
-\series bold
-Note
-\series default
-: The options 
-\series bold
-backgroundcolor
-\series default
-, 
-\series bold
-color
-\series default
-, 
-\series bold
-height 
-\series default
-and 
-\series bold
-width
-\series default
- have no effect for push, submit and reset buttons.
-\end_layout
-
+\begin_inset VSpace bigskip
 \end_inset
 
 
 \end_layout
 
-\begin_layout Standard
-As workaround use a colored box and/or color the box text.
-\end_layout
-
 \begin_layout Itemize
 Submit button without border, with cyan background and increased height:
 \begin_inset VSpace defskip
@@ -1953,6 +1994,25 @@ name=submit2
 \end_inset
 
 
+\begin_inset Box Frameless
+position "c"
+hor_pos "c"
+has_inner_box 1
+inner_pos "c"
+use_parbox 0
+use_makebox 1
+width "6cm"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "black"
+backgroundcolor "cyan"
+status open
+
+\begin_layout Plain Layout
 \begin_inset Box Frameless
 position "c"
 hor_pos "c"
@@ -1960,7 +2020,7 @@ has_inner_box 1
 inner_pos "c"
 use_parbox 1
 use_makebox 0
-width "5cm"
+width "4.5cm"
 special "none"
 height "4in"
 height_special "totalheight"
@@ -1968,7 +2028,7 @@ thickness "0.4pt"
 separation "3pt"
 shadowsize "4pt"
 framecolor "black"
-backgroundcolor "cyan"
+backgroundcolor "none"
 status open
 
 \begin_layout Plain Layout
@@ -1983,6 +2043,11 @@ Send your data via mail
 \end_inset
 
 
+\end_layout
+
+\end_inset
+
+
 \begin_inset VSpace bigskip
 \end_inset
 
@@ -2057,12 +2122,12 @@ Reset the form
 \end_layout
 
 \begin_layout Section
-PDF viewer action buttons
+PDF action buttons
 \end_layout
 
 \begin_layout Standard
-One often needs basic actions to be done by the PDF viewer program.
For example to print the form.
+One often needs basic actions to be done by the PDF viewer program, for
+ example to print the form.
  Such PDF program-specific actions can be triggered by adding inserting
  the custom inset 
 \family sans
@@ -2113,6 +2178,7 @@ hyperref
 \begin_inset CommandInset citation
 LatexCommand cite
 key "hyperref"
+literal "true"
 
 \end_inset
 
@@ -2341,7 +2407,15 @@ To customize the border color, border thickness and the distance to the
 \begin_inset space \thinspace{}
 \end_inset
 
-pt thick, teal border:
+pt thick, teal border and 3
+\begin_inset space \thinspace{}
+\end_inset
+
+pt border separation :
+\begin_inset VSpace defskip
+\end_inset
+
+
 \begin_inset Newline newline
 \end_inset
 
@@ -2453,7 +2527,7 @@ Note:
 \series bold
 pdfborder
 \series default
- affects all link types, not only the menu links.
+ affects all link types, not only the action links.
 \end_layout
 
 \end_inset
@@ -2678,12 +2752,12 @@ pdfborder={0 0 1}, menubordercolor={1 0 0}
 \end_layout
 
 \begin_layout Section
-Dynamic form fields
+Dynamic form elements
 \end_layout
 
 \begin_layout Standard
-It is also possible to have dynamic form fields.
- This means that depending on the actions of the user fields can (dis)appear
+It is also possible to have dynamic form elements.
+ This means that depending on the actions of the user elements can (dis)appear
  or change their appearance.
  To use this feature, add these lines to your LaTeX preamble:
 \end_layout
@@ -2716,6 +2790,7 @@ Then add the necessary JavaScript code to your document LaTeX preamble or
 \begin_inset CommandInset citation
 LatexCommand cite
 key "JavaScript"
+literal "true"
 
 \end_inset
 
@@ -2792,7 +2867,7 @@ begin{insDLJS}[exaaae]{exaaae}{JavaScript}
 
 \begin_layout Plain Layout
 
-   this.getField("to").display = display.hidden;
+   this.getField("until").display = display.hidden;
 \end_layout
 
 \begin_layout Plain Layout
@@ -2807,7 +2882,7 @@ begin{insDLJS}[exaaae]{exaaae}{JavaScript}
 
 \begin_layout Plain Layout
 
-   this.getField("to").display = display.visible;
+   this.getField("until").display = display.visible;
 \end_layout
 
 \begin_layout Plain Layout
@@ -2989,7 +3064,7 @@ name=from,width=10em
 \begin_inset Text
 
 \begin_layout Plain Layout
-To:
+Until:
 \end_layout
 
 \end_inset
@@ -3006,7 +3081,7 @@ status open
 status open
 
 \begin_layout Plain Layout
-name=to,width=10em
+name=until,width=10em
 \end_layout
 
 \end_inset
@@ -3192,13 +3267,9 @@ Submitting and applying data requires that all form elements have a name.
 \end_layout
 
 \begin_layout Itemize
-All braces, brackets, backslashes and quote characters in form parameters
- must be inserted as \SpecialChar TeX
- code!
-\end_layout
-
-\begin_layout Itemize
-Creating a PDF form requires pdflatex or lualatex.
+Creating a PDF form requires pdf\SpecialChar TeX
+ or Lua\SpecialChar TeX
+.
  Use therefore either the \SpecialChar LyX
  export formats 
 \family sans
@@ -3206,8 +3277,7 @@ PDF (pdflatex)
 \family default
  or 
 \family sans
-PDF (Lua\SpecialChar TeX
-)
+PDF (LuaTeX)
 \family default
 .
 \end_layout
@@ -3238,6 +3308,7 @@ Show border hover color for fields
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 key "JavaScript"
+literal "true"
 
 \end_inset
 
@@ -3246,6 +3317,7 @@ key "JavaScript"
 LatexCommand href
 name "JavaScript reference"
 target "https://developer.mozilla.org/en/docs/Web/JavaScript/Reference"
+literal "false"
 
 \end_inset
 
@@ -3256,6 +3328,7 @@ target "https://developer.mozilla.org/en/docs/Web/JavaScript/Reference"
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 key "hyperref"
+literal "true"
 
 \end_inset
 
@@ -3263,7 +3336,8 @@ key "hyperref"
 \begin_inset CommandInset href
 LatexCommand href
 name "Documentation"
-target "http://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/manual.pdf"
+target "https://ctan.org/tex-archive/macros/latex/contrib/hyperref/doc/manual.pdf"
+literal "false"
 
 \end_inset
 
@@ -3277,6 +3351,7 @@ hyperref
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 key "pifont"
+literal "true"
 
 \end_inset
 
@@ -3284,7 +3359,8 @@ key "pifont"
 \begin_inset CommandInset href
 LatexCommand href
 name "Documentation"
-target "http://mirrors.ctan.org/macros/latex/required/psnfss/psnfss2e.pdf"
+target "https://ctan.org/tex-archive/macros/latex/required/psnfss/psnfss2e.pdf"
+literal "false"
 
 \end_inset