summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mltex/mlltxchg.def
blob: eb927edeb1e7de914c61bcf200e673589b9bd051 (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
%%
%% This is file `mlltxchg.def'.
%% Copyright (C) 1996,1997,1998,1999 Bernd Raichle.
%%
%% -----------------------------------------------------------------
%% IMPORTANT NOTICE:
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% -----------------------------------------------------------------
%%
%% CHANGES:
%% 1997/09/03 0.1a
%%    Changes for LaTeX Kernel <1997/06/01>.
%% 1998/10/21 0.1b
%%    Checked changes for LaTeX Kernel <1998/06/01>.
%% 1998/11/17 0.9a
%%    Final release changes:
%%    Renamed file from ``mlltxchg.def'' to ``mlltxchg.def''.
%%    Added \Fd@<alias> to map from an alias to the original
%%    font encoding (needed for \mlfontencoding).
%% 1998/12/21 0.9b
%%    Removed warning \message; added \GenericInfo that some
%%    NFSS kernel macros has to be changed. 
%% 1999/03/08 0.9c
%%    Changed licensing conditions to LPPL.
%%
%% ------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01] % Need mono-case file names!

\ProvidesFile{mlltxchg.def}%
    [1999/03/08 v0.9c %
     MLTeX/LaTeX changes of LaTeX Kernel (NFSS) (br)]
\GenericInfo{(mlltxchg)}%
   {MLTeX Support Info: Have to change NFSS kernel macros}

%% Provide the new NFSS declaration
%%
%%  \DeclareFontDefinitionEncodingAlias
%%      {<alias-fontenc>}{<fontenc>}
%%
%% which declares that for the font encoding <alias-fontenc>
%% NFSS should access and use the fd files of <fontenc>.
%% This can only be done if the fonts in font encoding <fontenc>
%% are only subsets of the fonts in font encoding <alias-fontenc>.
%%
\newcommand{\DeclareFontDefinitionEncodingAlias}[2]{%
  \expandafter\ifx\csname T@#2\endcsname\relax
    \@font@warning{Font encoding #1 undefined %
                   (used for fd encoding alias)}%
  \else
    \expandafter\ifx\csname T@#1\endcsname\relax
    \else
      \@font@info{Redeclaring font def. encoding alias for #1}%
    \fi
    \expandafter\xdef\csname fD@#1\endcsname{#2}%
    \expandafter\xdef\csname Fd@#2\endcsname{#1}%
  \fi}
\@onlypreamble\DeclareFontDefinitionEncodingAlias


%% Load the .fd file of the FD Encoding Alias if it exists.
%%
%% From file: ``ltfssbas.dtx''
%%
%% .fd file has not to be loaded if
%%   - encoding+family was already loaded
%%   - an fd encoding alias was defined and
%%     the aliased encoding+family was already loaded
%%

%% Original definition from <1996/06/01>
%\def\try@load@fontshape{%
%   \expandafter
%   \ifx\csname \f@encoding+\f@family\endcsname\relax
%     \@font@info{Try loading font information for
%                   \f@encoding+\f@family}%
%    \global\expandafter\let
%       \csname\f@encoding+\f@family\endcsname\@empty
%     \makeatletter
%     \nfss@catcodes
%     \@input@{\f@encoding\f@family.fd}%
%   \fi
%}
%% Original definition from <1995/12/01>...<1998/06/01>
%\def\try@load@fontshape{%
%   \expandafter
%   \ifx\csname \f@encoding+\f@family\endcsname\relax
%     \@font@info{Try loading font information for
%                   \f@encoding+\f@family}%
%    \global\expandafter\let
%       \csname\f@encoding+\f@family\endcsname\@empty
% %   \makeatletter
%     \nfss@catcodes
%     \let\nfss@catcodes\relax
%     \edef\reserved@a{%
%       \lowercase{%
%         \noexpand\InputIfFileExists{\f@encoding\f@family.fd}}}%
%     \reserved@a\relax
%          {\@input@{\f@encoding\f@family.fd}}%
%   \fi}

\def\ml@try@load@fontshape#1{%
     \@font@info{Try loading font information for
                   \f@encoding+\f@family}%
    \global\expandafter\let
       \csname\f@encoding+\f@family\endcsname\@empty
%-br%% following line from <1995/12/01>...<1997/06/01>, needed?
%-br% \makeatletter                 
     \nfss@catcodes
     \let\nfss@catcodes\relax
     \edef\reserved@a{%
       \lowercase{%
         \noexpand\InputIfFileExists{#1\f@family.fd}}}%
     \reserved@a\relax
          {\@input@{#1\f@family.fd}}%
   }
\def\try@load@fontshape{%
   \expandafter
   \ifx\csname \f@encoding+\f@family\endcsname\relax
     \expandafter
     \ifx\csname fD@\f@encoding\endcsname\relax
       \ml@try@load@fontshape\f@encoding
     \else
       \expandafter
       \ifx\csname \csname fD@\f@encoding\endcsname+\f@family\endcsname\relax
         \expandafter\ml@try@load@fontshape\csname fD@\f@encoding\endcsname
       \fi
     \fi
   \fi}


%% Access the FD Encoding Alias as font encoding if it exists:
%%
%% From file: ``ltfssbas.dtx''
%%

%% Original definition from <1994/06/01>...<1998/06/01>
%\def\curr@fontshape{\f@encoding/\f@family/\f@series/\f@shape}

\def\curr@fontshape{%
  \expandafter\ifx\csname fD@\f@encoding\endcsname\relax
    \f@encoding
  \else
    \csname fD@\f@encoding\endcsname
  \fi /\f@family/\f@series/\f@shape}


%% When NFSS is checking defaults, use FD Encoding Alias it it exists:
%%
%% From file: ``ltfssdcl.dtx''
%%

%% Original definition from <1994/06/01>...<1998/06/01>
%\def\process@table{%
%    \def\cdp@elt##1##2##3##4{%
%        \@font@info{Checking defaults for
%                  ##1/##2/##3/##4}%
%        \expandafter
%        \ifx\csname##1/##2/##3/##4\endcsname\relax
%          \begingroup
%           \def\f@encoding{##1}\def\f@family{##2}%
%           \try@load@fontshape
%          \endgroup
%        \fi
%        \expandafter
%        \ifx\csname##1/##2/##3/##4\endcsname\relax
%             \@latex@error{This NFSS system isn't set up properly}%
%                       {For encoding scheme ##1 the defaults
%                        ##2/##3/##4 do not form a valid font shape}%
%        \else
%             \@font@info{... okay}%
%        \fi}%
%    \cdp@list
%    \begingroup
%       \escapechar\m@ne
%       \error@fontshape
%       \expandafter\ifx\csname \curr@fontshape\endcsname\relax
%          \begingroup
%            \try@load@fontshape
%           \endgroup
%       \fi
%       \expandafter\ifx\csname \curr@fontshape\endcsname\relax
%         \@latex@error{This NFSS system isn't set up properly}%
%            {The system maintainer forgot to specify a suitable
%             substitution
%             font shape using the \noexpand\DeclareErrorFont
%             command}%
%       \fi
%    \endgroup
%    \let\select@group\document@select@group
%    \fontencoding{\encodingdefault}%
%    \fontfamily{\familydefault}%
%    \fontseries{\seriesdefault}%
%    \fontshape{\shapedefault}%
% \everyjob{}%
%}

\def\process@table{%
    \def\cdp@elt##1##2##3##4{%
        \@font@info{Checking defaults for
                  ##1/##2/##3/##4}%
        \expandafter
        \ifx\csname##1/##2/##3/##4\endcsname\relax
          \begingroup
           \def\f@encoding{##1}\def\f@family{##2}%
           \try@load@fontshape
          \endgroup
        \fi
%br% new - begin (uses \ifnum 0<0[1]\relax ... trick!)
       \ifnum 0<0%
%br% new - end
        \expandafter
        \ifx\csname##1/##2/##3/##4\endcsname\relax
%br% new - begin
         \expandafter
         \ifx\csname fD@##1\endcsname\relax
           1%
         \else
           \expandafter
           \ifx\csname \csname fD@##1\endcsname
                       /##2/##3/##4\endcsname\relax
              1%
           \fi
         \fi
        \fi \relax
%br% new - end
            \@latex@error{This NFSS system isn't set up properly}%
                       {For encoding scheme ##1 the defaults
                        ##2/##3/##4 do not form a valid font shape}%
        \else
            \@font@info{... okay}%
        \fi}%
    \cdp@list
    \begingroup
       \escapechar\m@ne
       \error@fontshape
       \expandafter\ifx\csname \curr@fontshape\endcsname\relax
          \begingroup
            \try@load@fontshape
           \endgroup
       \fi
       \expandafter\ifx\csname \curr@fontshape\endcsname\relax
         \@latex@error{This NFSS system isn't set up properly}%
            {The system maintainer forgot to specify a suitable
             substitution
             font shape using the \noexpand\DeclareErrorFont
             command}%
       \fi
    \endgroup
    \let\select@group\document@select@group
    \fontencoding{\encodingdefault}%
    \fontfamily{\familydefault}%
    \fontseries{\seriesdefault}%
    \fontshape{\shapedefault}%
 \everyjob{}%
}
\@onlypreamble\process@table

\endinput
%% 
%% End of file `mlltxchg.def'.