summaryrefslogtreecommitdiff
path: root/systems/mac/linotex/linotexplus.tex-update
blob: b2f664b20b90965130fe44d9a4d19a485e1a2d1b (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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
 %%%% LinoTeXPlus.tex, June 92 -- Feb 1993
 %%% --- part of the LinoTeX package, 1991-
 %%% for interactive "mousing" with TeX.
 %%% Master postings: 
 %%%    ftp matups.matups.fr  [192.54.146.4] 
 %%%    ftp rsovax.ups.circe.fr  [130.84.128.100]
 %%% 
 %%% All you have to do to adapt your
 %%% article <myart>.tex is sweep all the macros
 %%% and parameter settings into the style file
 %%% <myart>.sty,  something that is good 
 %%% practice in any event.

 %%% AIM: create a TEMPORARY format and some .tex files
 %% for use of LinoTeXPlus with a specific article.
 %% This format is for the selection test file
 %% not for the whole article!

 %%% COMPILATION PROCEDURE:
 %% See after \endinput
 %% See also LinoTeX.doc

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 \chardef\LinoEmark=\the\catcode`\!
 \catcode`\!=12
 \chardef\LinoAtmark=\the\catcode`\@
 \catcode`\@=11
 
  \def\ms@g{\immediate\write16}

 \ms@g{}
 \ms@g{ ********* LinoTeXPlus format compiler *********}
 \ms@g{ *** Hit return and select style file to compile}
 \ms@g{ *** to create format and .tex files to repeatedly }
 \ms@g{ *** compose selections from your article.} 
 \ms@g{ *** The style file must contain all your macros and params!}
 \ms@g{ *** You must now be running the base format for your article.}
 \ms@g{ *** And remember OzTeX must be using INITEX.}
 \show\anticipation

  \ifx\undefined\LinoTeXPlusLoaded
     \let\temp\relax
 \else
     \message{ *** LinoTeX macros already loaded.}%
     \def\temp{\endinput}%
 \fi
 \temp

 \input MagicDefault.sty

 \catcode`\@=11
 \catcode`\!=12
 
 \newbox\Linobox
 \setbox\Linobox=\vbox{\offinterlineskip
         \hbox to \hsize{\tt LinoTeXPlus selection typeset:
               \hss[end of line\hbox to 1sp{}]}%
    \vskip3pt
    \hbox to \hsize{%
       \vrule height 0pt depth 5pt width.4pt\hss
       \vrule height .4pt width\hsize depth 0pt\hss
       \vrule height 0pt depth 5pt width.4pt}
    \vskip3pt
    }

 \def\LinoPlusExceptions{%
 \ms@g{}
 \ms@g{ !! I was expecting \string~ first off.}
 \ms@g{ !! So this is NOT a LinoTeXPlus selection!}
 \ms@g{ !! Hit  return  to stop.}
 \ms@g{ !   If you are an efficiency freak, you can}
 \ms@g{ !   go on by hitting  y  (or any key) plus  return.}
 \ms@g{ !   The test formatting will then be gone but not} 
 \ms@g{ !   the temporary macros.}
 \ms@g{}
   \def\temp{\par}
   \read16 to \YourChoice
   \ifx\YourChoice\temp
      \def\Temp{\csname bye\endcsname}
   \else
     \def\Temp{%
       \let\TestFormatting\endinput
       \input\TempMacros\relax
       }
   \fi
   \Temp
 }

 \def\LinoGobble#1{\ignorespaces}

 \def\LinoTeXMain{\input\TempMacros\relax
    \LinoRulerSpider{\copy\Linobox}%
    \noindent\leavevmode
    %\tracingmacros=0%%%%%%
    \LinoGobble
    }

  \let\LinoRulerSpider\relax
  \def\KillLinoRuler{\def\LinoRulerSpider##1{\relax}}

  \def\LinoPlusPrep{%
     \ifx\next~\relax%%%%
        \let\temp\LinoTeXMain
     \else
        \let\temp\LinoPlusExceptions
     \fi\temp}
 
  \everyjob{%\tracingmacros=1 %%%
     \futurelet\next\LinoPlusPrep}

  \tracingstats=0
 
  \let\LinoTeXPlusLoaded\relax
  \let\TestFormatting\relax

  %% for LaTeX provide a \bye
 \begingroup
   \ifx\undefined\@@end \global\let\@@end\end
   \fi
   \gdef\bye{\vfill\supereject\@@end}
 \endgroup

 \def\TempMacros{TempMacros.tex}
 \def\TexturesTest{!!!!!TexturesTest}
 \def\OzTest{OzTest.tex}

 \openin15 LinoCnfg.tex
 \ifeof15
    \closein15\let\temp\relax
 \else
    \closein15\def\temp{\input LinoCnfg.tex}%    
 \fi
 \temp


 \let\Temp\relax

   \ms@g{}
   \ms@g{ ** Hit return key to renew auxiliary files,}
   \ms@g{ ** (then all must currently be closed!)}
   \ms@g{ *  x or any key to leave existing files.}
   \def\temp{\par}
   \read16 to \YourChoice
   \ifx\YourChoice\temp
   \else
     \let\Temp\dump
   \fi

 \catcode`\!=\the\LinoEmark
 \catcode`\@=\the\LinoAtmark

 \Temp %% valve is \relax if we make new copy of TempMacros
       %% else is \dump

 \catcode`\@=11 %% back into programming
 \catcode`\!=12

 
 \openin15 \TexturesTest
 \ifeof 15
   \closein15
   \immediate\openout15 \TexturesTest
   \immediate\closeout15
 \else
   \closein15
 \fi

 \openin15 \OzTest
 \ifeof15\relax
   \closein15
   \immediate\openout15 \OzTest
   \immediate\closeout15
 \else
   \closein15
 \fi

 \immediate\openout15 \TempMacros

 \begingroup
 \catcode`\;=12\catcode`\?=12
 \catcode`\:=12\catcode`\!=12
 \catcode`\%=12
 \catcode`\_=12
 \catcode`\&=13
 \def&#1_{\immediate\write15{#1}}
 \catcode`\^^0d=14
 \catcode`\/=0
 \catcode`\\=12
 \catcode`/ =12

&%%%% TempMacros.tex %% see (1)(3) below_
&_
& \count255=\the\catcode`\@ % save to scratch register 255_
& \catcode`\@=11_
&  %%% macros here with @ in cs names!_
&_
&_
& \catcode`\@=\count255 % restore 12 or 13?_
&_
&_
& \TestFormatting %% see (2)_
& %%% format modifications here_
& \output{\shipout\box255} % most common one_
&_
&_
& \endinput_
&_
& %%%% COMMENTS on TempMacros.tex_
&   %_
& %%%%%% (1) from beginning to \TestFormatting_
& %% Macros in this segment are \input before each selection is composed _
& %% by LinoTeX+, and also when whole article is typeset normally._
& %% Be alert for required catcode changes_
& %% particularly of the form \catcode`\@=..._
&_
& %%%%%% (2) from \TestFormatting to \endinput_
& %% Some possible simplifications of output to consider_
& %% to enhance speed and clarity of tests. _
& %%  _
&  % \TestFormatting %% always include; _
&  %%     valve: possible values \relax and \endinput _
&  % \output{\shipout\box255} % most common one_
&  % \KillLinoRuler %% for big selections?_
&  % \nopagenumbers_
&  % \hsize=?? %% to fit preview to screen_
&  % \let\makeheadline=\relax_
&  % \let\makefootlineline=\relax_
&  % \output{\shipout\box255} % fast; some inserts will disappear_
&  % \errorcontextlines=0_
&  % \tracingstats=0_
&_
&  %% Alternative for LaTeX (only)_
&     % \def\bye{\end{document}} %% (b) _
&     %  This is more in the spirit of LaTeX, but it will require_
&     %  you to select the end of every environment of which _
&     %  you select the beginning._
&  % \endinput %% always include_
&_
& %%%%% (3) for improved speed delete all comments_
& %% and empty lines above \endinput_
&_
/endgroup

 \immediate\closeout15 
 \catcode`\@=\the\LinoAtmark
 \catcode`\!=\the\LinoEmark

 \dump





 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

COMPILATION INSTRUCTIONS

     Place this file LinoTeX.tex in the same directory as your 
TeX typescript and  compose LinoTeX.tex on top of your base
format It will ask for your style file, and then dump the
required format after creating auxiliary files

     !!!!!TexturesTest  
     OzTeXTest.tex
     TempMacros.tex

These are default names that you can change by setting out
a file LinoCfg.tex given as an Appendix. 

     Best use a conventional name such as "LT" for
the format since you do not want such bulky files to
accumulate. This "LT" is normally to be recompiled for every
work session, although, on single user machines, it can serve
longer.

    This format "LT" is designed for the compilation
of LinoTeX selections and NOT for the compilation of your whole
article.

    NB. LaTeX users should include in myart.sty the document-style 
and begin-document commands. An example of these is:

   \documentstyle[11pt]{article}
   \begin{document}


Appendix: 

  The configuration file LinoCnfg.tex if present at all
should be of the form:

 \def\TempMacros{TempMacros.tex}
 \def\TexturesTest{!!!!!TexturesTest}
 \def\OzTest{OzTest.tex}

where of course the names are to be changed.  For the last
two, the empty is empty name can be used to omit that file.