blob: a8a5277efd7e76a5964a2984a0bcddec960b2ffa (
plain)
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
|
%%
%% Copyright (C) 1992 by Zden\v{e}k Wagner. All rights reserved.
%%
%% IMPORTANT NOTICE
%%
%% You are NOT ALLOWED to delete this notice. You are NOT ALLOWED to take
%% money for the distribution or use of this file (or a changed version)
%% except for a nominal charge for copying etc.
%%
%% If you change or add something, you are obliged to comment it in such a
%% way that anyone could restore the original version.
%%
%% Error Reports and suggestions for improvements to:<Wagner@csearn.bitnet>
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{_____________________________________________________________}
\typeout{Cumbersome version of "selection" designed by Z. Wagner, 1992}
\typeout{-------------------------------------------------------------}
\typeout{}
\newwrite\sel\relax
\def\writeline#1{%
\immediate\write \sel {#1}
}
\def\writedef#1{%
\immediate\write \sel {\string\def\string#1{#1}}
}
\def\writenewcnt#1{%
\writeline{\string\newcount\string#1 \string#1=\the#1}
}
\def\writecnt#1{%
\writeline{\string#1=\the#1}
}
\def\selection{
\writeline{\string\typeout{No selection was made. Please use}}
\writeline{\string\typeout{\string\string\string\renewcommand{\string\string
\string\selection}{...your commands...}}}
\writeline{\string\typeout{or \string\string\string\def\string\string
\string\selection{...your commands...}}}
\writeline{\string\typeout{to define your selection routine. Do not forget
to delete \jobname.sel!}}
}
\def\makeselection{%
\openin1 \jobname.sel
\ifeof1
\typeout{No file \jobname.sel}
\immediate\openout\sel=\jobname.sel\relax
\selection % this calls user selection routine
\immediate\closeout \sel
\else \closein1\relax
\fi
\input{\jobname.sel}
}
\endinput
|