blob: 6b2c2d1f235f92c7644c0718ff30ed221cf0c6a0 (
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
|
%D \module
%D [ file=ppchtex (m-chemie),
%D version=1997.03.19,
%D title=\CONTEXT\ Extra Modules,
%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
%D author=Hans Hagen,
%D date=\huidigedatum,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten},
%D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
%C details.
%D This module facilitates the use of \PPCHTEX\ in macro
%D packages other than \CONTEXT. One of the features of
%D \CONTEXT\ is that the user interface can be in any
%D language. This language is defined at loading time.
%D
%D This module is indeed a surrogate one and is only a poor
%D man's alternative to the more extensive \type{mult-***}
%D modules of \CONTEXT. The extra overhead in terms of macros
%D and functionality that these modules offer is only useful
%D in \CONTEXT.
%D
%D Two interfaces are supported here, but others can easily be
%D defined. This module expects the general system macros to be
%D loaded as wel as a interface switch \type{\ifalternativeinterface}
%D to be set.
%D First we load some auxiliary macro's:
\input supp-mis.tex \let\writestatus\undefined
\input syst-gen.tex
%D after which we can go on with:
\unprotect
%D 0 = english
%D 1 = dutch
%D 2 = german
\ifx\interfacenumber\undefined
\chardef\interfacenumber=0
\fi
\def\definesystemvariable #1 %
{\setvalue{??#1}{@@#1}}
\def\definesystemconstant #1 %
{\setvalue{s!#1}{#1}}
\def\definevariable #1 #2 #3 % en nl de
{\ifcase\interfacenumber
\setvalue{v!#1}{#1}
\or
\setvalue{v!#1}{#2}
\or
\setvalue{v!#1}{#3}
\fi}
\def\defineconstant #1 #2 #3 % en nl de
{\ifcase\interfacenumber
\setvalue{c!#1}{#1}
\setvalue{c!#2}{#1}
\or
\setvalue{c!#1}{#1}
\or
\setvalue{c!#1}{#1}
\setvalue{c!#3}{#1}
\fi}
\def\definecommand #1 #2 #3 %
{\ifcase\interfacenumber
% core commands are english
\or
\doifnot{#1}{#2}{\setvalue{#2}{\getvalue{#1}}}
\or
\doifnot{#1}{#3}{\setvalue{#3}{\getvalue{#1}}}
\fi}
\long\def\startcommands#1\stopcommands
{}
\def\dosetvalue#1#2#3%
{\p!doifundefined{\c!prefix!#2}%
\let\donottest=\doprocesstest
\@EA\def\csname#1#2\endcsname{#3}%
\else
\let\donottest=\doprocesstest
\@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
\fi}
\def\dosetevalue#1#2#3%
{\p!doifundefined{\c!prefix!#2}%
\let\donottest=\doprocesstest
\@EA\edef\csname#1#2\endcsname{#3}%
\else
\let\donottest=\doprocesstest
\@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
\fi}
\def\docopyvalue#1#2#3%
{\p!doifundefined{\c!prefix!#3}%
\let\donottest=\doprocesstest
\@EA\def\csname#1#3\endcsname%
{\csname#2#3\endcsname}%
\else
\let\donottest=\doprocesstest
\@EA\def\csname#1\csname\c!prefix!#3\endcsname\endcsname%
{\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
\fi}
\def\doresetvalue#1#2%
{\dosetvalue{#1}{#2}{}}
\def\dogetvalue#1#2%
{\csname#1\csname\c!prefix!#2\endcsname\endcsname}
\defineconstant axis assenstelsel achsen
\defineconstant top boven oben
\defineconstant width breedte breite
\defineconstant size formaat groesse
\defineconstant number getal nummer
\defineconstant height hoogte hoehe
\defineconstant frame kader rahmen
%defineconstant framecolor kaderkleur rahmenfarbe
\defineconstant color kleur farbe
\defineconstant bodyfont korps fliesstext
\defineconstant style letter schriftstil
\defineconstant rulethickness lijndikte liniendicke
\defineconstant rulecolor lijnkleur linienfarbe
\defineconstant left links links
\defineconstant offset offset offset
\defineconstant bottom onder unten
\defineconstant option optie option
\defineconstant location plaats platz
\defineconstant right rechts rechts
\defineconstant resolution resolutie aufloesung
\defineconstant scale schaal format
\defineconstant state status status
\defineconstant text tekst text
\defineconstant textcolor tekstkleur tekstfarbe
\defineconstant textsize tekstformaat textgroesse
\defineconstant alternative variant alternative
\defineconstant x x x
\defineconstant y y y
\definevariable on aan an
\definevariable big groot gross
\definevariable intext intekst imtext
\definevariable small klein klein
\definevariable medium middel mittel
\definevariable fit passend passend
\definevariable start start start
\definevariable stop stop stop
\definevariable test test test
\definevariable off uit aus
\definecommand definechemical definieerchemie definierechemie
\definecommand setupchemical stelchemiein stellechemieein
\definecommand chemical chemie chemie
\definecommand tochemical naarchemie zurchemie
\definecommand startchemical startchemie startchemie
\definecommand stopchemical stopchemie stopchemie
\definecommand toptext boventekst textueber
\definecommand bottext ondertekst textunter
\definecommand midtext middentekst textmitte
\protect
%D After those definitions we actually load \PPCHTEX:
\input ppchtex.tex
%D We also change some setup values. Let's hope that the next
%D setups forever suits \LATEX.
\unprotect
\ifx\bodyfontsize\undefined
\ifx\f@size\undefined
\ifx\@ptsize\undefined
\setupchemical[\c!bodyfont=11pt]
\else
\setupchemical[\c!bodyfont=1\@ptsize pt]
\fi
\else
\setupchemical[\c!bodyfont=\f@size pt]
\fi
\else
\setupchemical[\c!bodyfont=\bodyfontsize]
\fi
\ifx\mathrm\undefined
\setupchemical[\c!style=\rm]
\else
\setupchemical[\c!style=\mathrm]
\fi
\ifx\outputresolution\undefined
\setupchemical[\c!resolution=300]
\else
\setupchemical[\c!resolution=\outputresolution]
\fi
\protect \endinput
|