Debian Codegraph @

texmf-dist/doc/latex/forms16be/examples/forms16be-ef.tex

raw
1 \documentclass{article}
2 \usepackage[designi,tight*]{web}
3 \usepackage{eforms}[2019/05/24] % this version supports \tops, see below
4 \usepackage{forms16be}
5
6 % \previewOn \pmcaOn % try compiling with these switches un-commented
7
8
9 \def\cs#1{\texttt{\char`\\#1}}
10 \let\pkg\textsf
11
12 \parindent0pt \parskip6pt
13
14 \begin{document}
15
16 Initialize a text field using unicode character strings,
17
18
19 \defUniStr{VDV}{\u03B1 cos(\u03B8)}
20 \defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"}
21
22 Text field: \textField[%
23 \TU{\unicodeStr(TU)}
24 \DV{\unicodeStr(VDV)}
25 \V{\tops{$\alpha\cos(\theta)$}{\unicodeStr(VDV)}}
26 ]{tst}{1.5in}{11bp}\olBdry
27
28 Button: \pushButton[%
29 \CA{\tops{$\alpha\cos(\theta)$}{\unicodeStr(VDV)}}
30 \AAmouseup{app.alert("Initialized to \\"\\u03B1 cos(\\u03B8)\\"");}
31 ]{btn}{1in}{11bp}\cgBdry[1em]
32
33 \pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp}
34
35 Note the JavaScript alert message, we use the same markup as for
36 \cs{defUniStr}, but use \cs{\cs{uXXXX}} rather than \cs{uXXXX}. See the
37 source file.
38
39 Initialize a combo box using unicode character strings.
40
41 \defUniStr{myEuro}{\u20AC (Euro)}
42 \defUniStr{myYen}{\u00A5 (Yen)}
43 \defUniStr{mySheqel}{\u20AA (Sheqel)}
44 \defUniStr{myPound}{\u00A3 (Pound)}
45 \defUniStr{myFranc}{\u20A3 (Franc)}
46
47 \comboBox[\Ff\FfEdit\DV{Euro}\V{\tops{Euro}{Euro}}\textFont{Arial}
48 \BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp}
49 {*{[(Euro)<\unicodeStr(myEuro)>]
50 [(Yen)<\unicodeStr(myYen)>]
51 [(Sheqel)<\unicodeStr(mySheqel)>]
52 [(Pound)<\unicodeStr(myPound)>]
53 [(Franc)<\unicodeStr(myFranc)>]}
54 }
55
56 \end{document}