diff options
Diffstat (limited to 'macros/latex/contrib/forms16be/examples/forms16be-ef.tex')
-rw-r--r-- | macros/latex/contrib/forms16be/examples/forms16be-ef.tex | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/macros/latex/contrib/forms16be/examples/forms16be-ef.tex b/macros/latex/contrib/forms16be/examples/forms16be-ef.tex new file mode 100644 index 0000000000..71688dae0c --- /dev/null +++ b/macros/latex/contrib/forms16be/examples/forms16be-ef.tex @@ -0,0 +1,56 @@ +\documentclass{article} +\usepackage[designi,tight*]{web} +\usepackage{eforms}[2019/05/24] % this version supports \tops, see below +\usepackage{forms16be} + +% \previewOn \pmcaOn % try compiling with these switches un-commented + + +\def\cs#1{\texttt{\char`\\#1}} +\let\pkg\textsf + +\parindent0pt \parskip6pt + +\begin{document} + +Initialize a text field using unicode character strings, + + +\defUniStr{VDV}{\u03B1 cos(\u03B8)} +\defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"} + +Text field: \textField[% + \TU{\unicodeStr(TU)} + \DV{\unicodeStr(VDV)} + \V{\tops{$\alpha\cos(\theta)$}{\unicodeStr(VDV)}} +]{tst}{1.5in}{11bp}\olBdry + +Button: \pushButton[% + \CA{\tops{$\alpha\cos(\theta)$}{\unicodeStr(VDV)}} + \AAmouseup{app.alert("Initialized to \\"\\u03B1 cos(\\u03B8)\\"");} +]{btn}{1in}{11bp}\cgBdry[1em] + +\pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp} + +Note the JavaScript alert message, we use the same markup as for +\cs{defUniStr}, but use \cs{\cs{uXXXX}} rather than \cs{uXXXX}. See the +source file. + +Initialize a combo box using unicode character strings. + +\defUniStr{myEuro}{\u20AC (Euro)} +\defUniStr{myYen}{\u00A5 (Yen)} +\defUniStr{mySheqel}{\u20AA (Sheqel)} +\defUniStr{myPound}{\u00A3 (Pound)} +\defUniStr{myFranc}{\u20A3 (Franc)} + +\comboBox[\Ff\FfEdit\DV{Euro}\V{\tops{Euro}{Euro}}\textFont{Arial} +\BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp} +{*{[(Euro)<\unicodeStr(myEuro)>] + [(Yen)<\unicodeStr(myYen)>] + [(Sheqel)<\unicodeStr(mySheqel)>] + [(Pound)<\unicodeStr(myPound)>] + [(Franc)<\unicodeStr(myFranc)>]} +} + +\end{document} |