1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
The `dialogl' collection Michael Downes, 10-Nov-1994
mjd@math.ams.org (Internet)
The purpose of the `dialogl' collection is to gather together in one
place a lot of information and examples---probably more than you really
wanted---about how to write TeX macros to carry on dialog with the user.
The centerpiece of the package is the file `dialog.sty', which makes it
easy to add bits of dialog to a LaTeX document; it can also be used with
non-LaTeX macro packages, if they are plain.tex compatible. Another
file, listout.tex, has a menu system built with the functions defined in
menus.sty, which you may enjoy trying out. Listout.tex was originally
written to work with plain TeX; my later attempts to retrofit LaTeX
compatibility may have some gaps, but it seems to work in the simple
tests that I have done.
The total size of the dialogl collection is approximately 580K.
INSTALLATION:
LATEX: The .sty files and listout.tex should go into your
LaTeX input files area, wherever that may be on your system. The
remaining files can go wherever you want.
PLAIN TEX: For use with plain TeX, old LaTeX (version 2.09), or other
non-LaTeX formats, installation is essentially the same as above,
except that for the .sty files you should use the `plain' versions by
renaming grabhedr.stp to grabhedr.sty, dialog.stp to dialog.sty, and
menus.stp to menus.sty. These versions don't include LaTeX
administrative functions such as \ProvidesPackage.
Suggested usage:
(1) Try using listout.tex to print out some e-mail or program source
files (e.g. TeX macros), eight or ten pages: Give the command
tex listout
Navigate through the menu system, try to break it by giving bizarre
answers, look for other kinds of deficiencies. (Send me mail if you find
something that ought to be fixed.) Find and try out the `tiny tabs'
option. Find out how to make Control-L characters produce a `newpage'
effect in the printout.
(2) Print pages 1--5 of the documentation for dialog.sty (dia-driv.tex,
~25 pages total, see below). You will need doc.sty to do this. Look at
the user functions described in the documentation to see which ones you
might want to use.
(3) Try out the animals.tex game: Think of any old animal and give the
command
tex animals
(The entertaining part is making up the questions when TeX fails to
guess your animal. Be creative, have fun.)
(4) If you are interested, print out codialog.tex (29 pages): it gives
a technical overview of TeX's capabilities for dialog, with various
examples. Further technical discussion is found in the .dtx files, which
can be printed out individually or using the driver file dia-driv.tex.
dialog.dtx 11 pages
menus.dtx 9 pages
grabhedr.dtx 4 pages
listout.dtx 40 pages (includes a full listing of menus at the end)
FUTURE ENHANCEMENTS NEEDED
---Add \nmenu, \nxmenu.
---Adapt further for LaTeX2e. `menus' might perhaps better be done as a
package option of the dialog package:
\usepackage[menus]{dialog}
to cut down on the number of different files required.
---Add support for reading menus from disk to cut down on memory
consumption (currently latex2e+listout.tex uses more than 65K,
producing `TeX capacity exceeded' error for small TeXs).
---Provide better documentation about what is available for use in the
running heads/feet (\todaysdate, \nowtime, (\TeXdate \TeXtime?),
\thisfilename, \dirprefix, etc. Also \folio should be separated into
\columnfolio and \pagefolio or maybe \pagefolio and \sheetfolio so that
they can be put in different places separately.
---Provide better support for printing characters in the range 0-31,
127-255 if suitable fonts are available. (Where the meaning of
`suitable' is system-dependent and language-dependent.)
---Provide support for embedding `listout' fragments in parent
documents. Output routine complications make this difficult for
fragments more than one page long, unless they are restricted to single
column format. But even that much would be useful.
---Add an index for listout.dtx.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
File list:
INSTALLATION
read.me
dialogl.ins (for LaTeX2e)
diatest.tex (test file)
UTILITIES
dialog.sty dialog.stp
menus.sty menus.stp
grabhedr.sty grabhedr.stp
listout.tex
DOCUMENTATION
Main File Subfiles
---------------------------
dia-driv.tex dialog.dtx
menus.dtx
grabhedr.dtx
listout.dtx default.los
codialog.tex animals.tex
animals2.tex
animal.dat
cnvunits.tex
fontmenu.tex
fontmenu.log
uktex91.1x
dialogl.sty
DIA-DRIV.TEX
This is the driver file for printing out the documentation of
dialog.sty, menus.sty, and grabhedr.sty. Run it through standard
LaTeX.
It will probably appear as an article in TUGboat, some time in 1994.
CODIALOG.TEX
This is a substantially revised and augmented version of the paper
`Dialog with TeX' that appeared in the Proceedings of the 1991 TUG
Conference at Dedham, Massachusetts (TUGboat vol 12 no 3, December
1991, Part 2). [In other words: I was dissatisfied with the first
published version, so I am `publishing' here a better organized
version with some nice added examples.]
The following files that are printed in the appendixes of the paper are
included in electronic form in case any finds some use for them.
---animals.tex is derived from Andrew Marc Greene's original game
file of the same name (TUGboat 10(4), pages 691--705, 1989), modified
slightly to allow starting over again with a new animal without having to
restart TeX. Included here by permission of the author.
---uktex91.1x is an excerpt from uktex91.001 where Brian Hamilton
Kelly's checknum.sty first appeared.
---fontmenu.tex shows how the token-deletion option of TeX's
error recovery mechanism can be used to implement a crude menu
facility.
---cnvunits.tex contains some routines that demonstrate conversion of
point units to inch units.
|