Debian Codegraph @

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

raw
1 \documentclass{article}
2 \usepackage{amsmath}
3
4 \usepackage[
5 useacrobat,
6 web={designv,forcolorpaper,tight*},
7 eforms,
8 % The next two option require dvips/Distiller workflow
9 % linktoattachments,
10 % attachsource=tex
11 ]{aeb_pro}
12 \usepackage{forms16be}
13
14 \def\cs#1{\texttt{\char`\\#1}}
15 \let\pkg\textsf
16 \let\opt\texttt
17 \let\app\textsf
18
19 \parindent0pt \parskip6pt
20
21 \begin{document}
22
23 This file uses \pkg{aeb\_pro}, which assumes the document author
24 uses \app{Acrobat}. When the option \opt{linktoattachments} is
25 used, \pkg{forms16be} is automatically included, but
26 \app{dvips/Distiller} must be used as the PDF creator. However,
27 if you don't want to attach or link to files, then simply say
28 \verb~\usepackage{forms16be}~, as is done in this file, but
29 specify the \opt{useacrobat} for \pkg{aeb\_pro}. The latter is
30 how this source file is configured. As a user of \app{pdflatex},
31 \app{lualatex}, or \app{xelatex}, you can build this source file
32 if you have \app{Acrobat} as your default PDF viewer.
33
34 Initialize a text field using unicode character strings,
35
36 \defUniStr{VDV}{\u03B1 cos(\u03B8)}
37 \defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"}
38
39 \textField[\TU{\unicodeStr(TU)}\DV{\unicodeStr(VDV)}\V{\unicodeStr(VDV)}]{tst}{1.5in}{11bp}\olBdry
40 \pushButton[\CA{\unicodeStr(VDV)}\AAmouseup{app.alert("Initialized to \\"\\u03B1 cos(\\u03B8)\\"");}]{btn}{1in}{11bp}\cgBdry[1em]
41 \pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp}
42
43 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.
44
45 Initialize a combo box using unicode character strings.
46
47 \defUniStr{myEuro}{\u20AC (Euro)}
48 \defUniStr{myYen}{\u00A5 (Yen)}
49 \defUniStr{mySheqel}{\u20AA (Sheqel)}
50 \defUniStr{myPound}{\u00A3 (Pound)}
51 \defUniStr{myFranc}{\u20A3 (Franc)}
52
53 \comboBox[\Ff\FfEdit\DV{Euro}\V{Euro}\textFont{Arial}
54 \BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp}
55 {*{[(Euro)<\unicodeStr(myEuro)>]%
56 [(Yen)<\unicodeStr(myYen)>]%
57 [(Sheqel)<\unicodeStr(mySheqel)>]%
58 [(Pound)<\unicodeStr(myPound)>]%
59 [(Franc)<\unicodeStr(myFranc)>]}
60 }
61
62 \end{document}