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
|
*****************************************************************
* *
* Program MNU *
* *
* A configurable menu for starting applications under DOS *
* *
* ( A brief description ) *
* *
*****************************************************************
The program MNU allows, together with its control batch (".bat"),
repeated starting of various application programs. It has been developed
for the TeX packages, nonetheless, it can be utilized elsewhere.
The batch "demo.bat" starts a simple exhibition of possibilities of the
program MNU itself. The second batch "demotex.bat" shows a more complicated
example of configuration of emTeX used in CSTeX package. This example
exhibits possibilities of MNU program itself on the one hand, and of its
suggested configuration "cfg.mnu" suitable for the emTeX packages with DOS
on the other hand. These examples are documented in EXAMPLES.DOC file.
The documentation of program MNU is writen in MNU.DOC file or MNU.TEX
file (plain TeX format).
The documentation is intended for the users, who wish to change the
existing configuration of the system, where the program is applied, or who
wish to develop a new one. Therefore some deeper knowledge of DOS is
assumed, esp. some advanced skills in batch (".bat") programming.
The program keeps up appearances of an integrated environment for starting
of various processes. This environment is fully configurable, including
window colours and shapes, names and ways of application of individual menu
items, context help, etc. The process is controlled by the batch. In a
definite moment, the batch starts the MNU program with a single parameter --
the configuration file name (e.g. "texcfg.mnu"). The program MNU reads
a full description of menu structure from this file and displays menu items on
the screen. Now the user can choose the particular item comfortably. When
the item is chosen, the program MNU terminates and the control batch
evaluates the error code corresponding to the respective item. In the
batch, the chosen item number is determined using a set of "if errorlevel"
commands, and the batch branches to separate application processes. When
the application ends, the batch calls the MNU program again, and the user
can choose a new item, and so on.
The batch can also communicate with the MNU program by means of DOS
``environment variables'', and of input and/or output files. The program can
display and edit the content of these variables (if this is given in the
configuration file). Moreover, there exists a special environment variable
called ``MNU'' influencing the start of the program -- the item specified
in this variable is offered as active when the program starts. Seeing that,
the user does not need to choose tediously the next item, provided his
activity proceeds in the ``normal'' sequence. For example, after the
TeX\ program run it is possible for the batch to examine (using the "if
errorlevel" command) whether the translation ended without errors. If so,
then the variable ``MNU'' can be set in such a way that the item "View" is
active in the next call of the menu. In the menu environment, the user can
do nothing but "Enter" pressing.
The advantage of this ``batch'' philosophy is that the MNU program does not
occupy the memory during the application run. Furthermore, concerning the
system configuration, there are practically no limitations on variability
in setting the behaviour of particular processes. The only limitations are
due to the DOS itself. Only a batch allows to express all configuration
possibilities of separate application programs.
The list of files contained in the MNU program package is given in the
following table:
readme.txt Basic information about the program -- this text
mnu.doc Detailed documentation of the program
examples.doc Description of some tricks used in the demo batches
mnu.tex Contents of three previous files in plain TeX
mnu.exe The MNU program itself
demo.bat, demo.mnu A simple example of program MNU possibilities
demotex.bat, cfg.mnu,
sorry.mnu, *.bat A more complicated example of emTeX configuration
totext.exe, totext.c Switches the screen to the text mode 80x25
dupcent.exe, dupcent.c Duplicates "%" (utility program)
kalk.exe, kalk.hlp The calculator -- an illustration of an
application program
The software contained in the files listed above is in the public domain.
The author transfers it to the CSTUG association (Czechoslovak TeX Users
Group) and expects that they will care about its popularization and further
distribution. It is not allowed to utilize these programs and/or their
modifications for commercial purposes. That means, it is not allowed to
sell this software (with the exception of a diskette copying fee), nor to
include it in systems designed merely for commercial purposes.
Since of the first public distribution of this product (Euro-TeX 92)
some unimportant improvements were made. This changes keep full
compatibility with the old configuration files and offers some new
possibilities (see the end of the documentation MNU.DOC).
The author will not more change or improve this software, esp. its basic
conception. However, he welcomes all suggestions leading to elimination of
errors, which can, unfortunately, appear in any software.
The source code of the MNU program (written in C language) is not public.
address: Petr Olsak
Department of Mathematics
Faculty of Electrical Engineering
Czech Technical University
166 27 PRAGUE
--------------------------
CZECH REPUBLIC
email: olsak@csearn.bitnet
|