2
%% This is file `flexisym.sty',
3
%% generated with the docstrip utility.
5
%% The original source files were:
7
%% flexisym.dtx (with options: `package')
9
%% This is a generated file.
11
%% Copyright (C) 1997-2003 by Michael J. Downes
12
%% Copyright (C) 2007 by Morten Hoegholm <mh.ctan@gmail.com>
14
%% This work may be distributed and/or modified under the
15
%% conditions of the LaTeX Project Public License, either
16
%% version 1.3 of this license or (at your option) any later
17
%% version. The latest version of this license is in
18
%% http://www.latex-project.org/lppl.txt
19
%% and version 1.3 or later is part of all distributions of
20
%% LaTeX version 2005/12/01 or later.
22
%% This work has the LPPL maintenance status "maintained".
24
%% This Current Maintainer of this work is Morten Hoegholm.
26
%% This work consists of the main source file flexisym.dtx
27
%% and the derived files
28
%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
29
%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
31
\ProvidesPackage{flexisym}[2007/12/19 v0.96]
32
\let\@xp\expandafter \let\@nx\noexpand
35
\catcode\number`\"=\number\catcode`\"
42
\DeclareOption{robust}{%
44
\ifx\protect\@typeset@protect \else\protect#1\@xp\@gobblefour\fi
47
\def\mg@bin{2}% binary operators
48
\def\mg@rel{2}% relations
49
%%\def\mg@nre{B}% negated relations
50
\def\mg@del{3}% delimiters
51
%%\def\mg@arr{B}% arrows
52
\def\mg@acc{0}% accents
53
\def\mg@cop{3}% cumulative operators (sum, int)
54
\def\mg@latin{1}% (Latin) letters
55
\def\mg@greek{1}% (lowercase) Greek
56
\def\mg@Greek{0}% (capital) Greek
57
%%\def\mg@bflatin{4}% bold upright Latin letters ?
58
%%\def\mg@Bbb{B}% blackboard bold
59
\def\mg@cal{2}% script/calligraphic
60
%%\def\mg@frak{5}% Fraktur letters
61
\def\mg@digit{0}% decimal digits % 1 = oldstyle, 0 = capital
62
\expandafter\let\csname MathChar \endcsname\mathchar
63
\expandafter\let\csname Delimiter \endcsname\delimiter
64
\expandafter\let\csname Radical \endcsname\radical
65
\newcommand{\MathChar}{}
66
\edef\MathChar{\csname MathChar \endcsname\noexpand\string}
67
\newcommand{\Delimiter}{}
68
\edef\Delimiter{\csname Delimiter \endcsname\noexpand\string}
69
\newcommand{\Radical}{}
70
\edef\Radical{\csname Radical \endcsname\noexpand\string}
71
\let\sumlimits\displaylimits
72
\let\intlimits\nolimits
73
\let\namelimits\displaylimits
74
\edef\m@Ord#1#2#3{\csname MathChar \endcsname"0#1#2#3 }
75
\edef\m@Var#1#2#3{\csname MathChar \endcsname"7#1#2#3 }
76
\edef\m@Bin#1#2#3{\csname MathChar \endcsname"2#1#2#3 }
77
\edef\m@Rel#1#2#3{\csname MathChar \endcsname"3#1#2#3 }
78
\edef\m@Pun#1#2#3{\csname MathChar \endcsname"6#1#2#3 }
79
\edef\m@COs#1#2#3{\csname MathChar \endcsname"1#1#2#3 \sumlimits}
80
\edef\m@COi#1#2#3{\csname MathChar \endcsname"1#1#2#3 \intlimits}
81
\def\delim@a#1#2#3#4{\ifx\relax#1#2#3#4\else#1\fi #2#3#4}
82
\def\delim@b#1#2#3#4{\ifx\relax#1#2#3#4\else#1\fi }
84
\@nx\@xp\@nx\delim@a\@nx\csname sd@##1##2##3\@nx\endcsname ##1##2##3 }
85
\edef\m@DeL#1#2#3{\csname Delimiter \endcsname"4\@tempa}
86
\edef\m@DeR#1#2#3{\csname Delimiter \endcsname"5\@tempa}
87
\edef\m@DeB#1#2#3{\csname Delimiter \endcsname"0\@tempa}
88
\edef\m@DeA#1#2#3{\csname Delimiter \endcsname"3\@tempa}
89
\edef\m@Rad#1#2#3{\csname Radical \endcsname"\@tempa}
90
\def\do#1#2{\@xp\def\csname sd@#1\endcsname{#2}}
121
\def\m@Acc#1#2#3#4{\mathaccent"#1#2#3{#4}}
123
\let\@symtype\@firstofone
124
\def\@symOrd#1#2{\@symtype\mathord{\OrdSymbol{#2}}}
125
\def\@symVar{\@symOrd}
126
\def\@symBin#1#2{\@symtype\mathbin{\OrdSymbol{#2}}}
127
\def\@symRel#1#2{\@symtype\mathrel{\OrdSymbol{#2}}}
128
\def\@symPun#1#2{\@symtype\mathpunct{\OrdSymbol{#2}}}
129
\def\@symCOi#1#2{\@symtype{\mathop{\OrdSymbol{#2}}\intlimits}}
130
\def\@symCOs#1#2{\@symtype{\mathop{\OrdSymbol{#2}}\sumlimits}}
131
\def\@symOpe#1#2{\@symtype\mathopen{\OrdSymbol{#2}}}
132
\def\@symClo#1#2{\@symtype\mathclose{\OrdSymbol{#2}}}
133
\def\@symDeL#1#2{\@symtype\mathopen{\OrdSymbol{#2}}}
134
\def\@symDeR#1#2{\@symtype\mathclose{\OrdSymbol{#2}}}
135
\def\@symDeB#1#2{\@symtype\mathord{\OrdSymbol{#2}}}
136
\def\@symInn#1#2{\@symtype\mathinner{\OrdSymbol{#2}}}
137
\def\@xnce#1{\@xp\@nx\csname#1\endcsname}
138
\let\sym@global\global
139
\def\DeclareFlexSymbol#1#2#3#4{%
141
\edef\@tempb{\@nx\@sym\@nx#1\@xnce{m@#2}\@xnce{mg@#3}#4}%
143
\sym@global\let#1\@tempb
145
\sym@global\mathcode`#1="8000\relax
147
\lowercase{\sym@global\let~\@tempb}%
151
\def\DeclareFlexCompoundSymbol#1#2#3{%
152
\@xp\DeclareRobustCommand\@xp#1\@xp{\csname @sym#2\endcsname#1{#3}}%
153
\sym@global\let#1#1\relax
155
\DeclareRobustCommand\textchar{\text@char\textfont}
156
\DeclareRobustCommand\scriptchar{\text@char\scriptfont}%
157
\def\text@char@a{\?\endgroup}%
158
\def\text@char@sym#1#2#3{%
160
\let\@sym\relax % defense against infinite loops
161
\the\text@script@char#3%
162
\afterassignment\text@char@a
165
\def\text@char#1#2{\begingroup\check@mathfonts
166
\let\text@script@char#1\let\@sym\text@char@sym
167
\let\@symtype\@secondoftwo \let\OrdSymbol\@firstofone
168
\let\ifmmode\iftrue \everymath{$\@gobble}%$
169
\def\mkern{\muskip\z@}\let\mskip\mkern
170
\ifcat\relax\noexpand#2#2%
172
\lccode`\~=\expandafter`\string#2\relax
177
\providecommand\textprime{}
178
\DeclareRobustCommand\textprime{\leavevmode
179
\raise.8ex\hbox{\text@char\scriptfont\prime}%
181
\@ifundefined{resetMathstrut@}{}{%
182
\def\resetMathstrut@{%
183
\setbox\z@\hbox{\textchar\vert}%
184
\ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
187
\@ifundefined{rightarrowfill@}{}{%
188
\def\rightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
189
$#1\copy\z@\mkern-6mu\cleaders
190
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
191
\mkern-6mu\OrdSymbol{\rightarrow}$}
192
\def\leftarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
193
$#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
194
\hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill
196
\def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
197
$#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
198
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
199
\mkern-6mu\OrdSymbol{\rightarrow}$}
201
\def\binrel@sym#1#2#3#4#5{%
203
\ifx\m@Ord#2\@nx\@symOrd
204
\else\ifx\m@Var#2\@nx\@symVar
205
\else\ifx\m@COs#2\@nx\@symCOs
206
\else\ifx\m@COi#2\@nx\@symCOi
207
\else\ifx\m@Bin#2\@nx\@symBin
208
\else\ifx\m@Rel#2\@nx\@symRel
209
\else\ifx\m@Pun#2\@nx\@symPun
210
\else\@nx\@symErr \fi\fi\fi\fi\fi\fi\fi
211
?{\@nx\OrdSymbol{##1}}}%
214
\def\@symOrd##1##2{\gdef\binrel@@####1{\@symOrd##1{\OrdSymbol{####1}}}}%
215
\def\@symVar##1##2{\gdef\binrel@@####1{\@symVar##1{\OrdSymbol{####1}}}}%
216
\def\@symCOs##1##2{\gdef\binrel@@####1{\@symCOs##1{\OrdSymbol{####1}}}}%
217
\def\@symCOi##1##2{\gdef\binrel@@####1{\@symCOi##1{\OrdSymbol{####1}}}}%
218
\def\@symBin##1##2{\gdef\binrel@@####1{\@symBin##1{\OrdSymbol{####1}}}}%
219
\def\@symRel##1##2{\gdef\binrel@@####1{\@symRel##1{\OrdSymbol{####1}}}}%
220
\def\@symPun##1##2{\gdef\binrel@@####1{\@symPun##1{\OrdSymbol{####1}}}}%
224
\let\mathchoice\@gobblethree
225
\let\@sym\binrel@sym \binrel@a
228
\def\@symextension{sym}
229
\newcommand\usesymbols[1]{%
230
\@for\@tempb:=#1\do{%
231
\@xp\@onefilewithoptions\@xp{\@tempb}[][]\@symextension
234
\newcommand\ProvidesSymbols[1]{\ProvidesFile{#1.sym}}
235
\DeclareRobustCommand{\not}[1]{\@symRel\not{\OrdSymbol{\notRel#1}}}
236
\DeclareRobustCommand{\OrdSymbol}[1]{%
237
\begingroup\mathchars@reset#1\endgroup
239
\def\mathchars@reset{\let\@sym\@sym@ord \let\@symtype\@symtype@ord
240
\let\OrdSymbol\relax}
241
\def\@symtype@ord#1#{}% a strange sort of \@gobble
242
\def\@sym@ord#1#2{\@xp\@sym@ord@a\string#2\@nil}%
244
\lccode`\.=`\@ \lowercase{\endgroup
245
\def\@sym@ord@a#1.}#2#3\@nil#4#5#6{%
246
\csname MathChar \endcsname"0%
247
\if D#2\@xp\delim@b\csname sd@#4#5#6\endcsname#4#5#6
251
\@ifpackageloaded{amsmath}{%
253
\long\def\next#1\mathchardef\std@minus\mathcode`\-\relax
254
\mathchardef\std@equal\mathcode`\=\relax#2\flexi@stop{%
256
\xdef\@begindocumenthook{\the\toks@}%
258
\expandafter\next\@begindocumenthook\flexi@stop
263
\mathcode `\'39\mathcode `\*42\mathcode `\."613A
264
\ifnum\mathcode`\-=45
266
\ifnum\mathcode`\-=32768
268
\mathchardef \std@minus \mathcode `\-\relax
271
\mathcode `\-45 \mathcode `\/47\mathcode `\:"603A\relax
274
\DeclareOption{mathstyleoff}{\PassOptionsToPackage{mathactivechars}{mathstyle}}
275
\DeclareOption{cmbase}{\usesymbols{cmbase}}
276
\DeclareOption{mathpazo}{\usesymbols{mathpazo}}
277
\DeclareOption{mathptmx}{\usesymbols{mathptmx}}
278
\ExecuteOptions{cmbase}
279
\ProcessOptions\relax
280
\renewcommand{\lnot}{\neg}
281
\renewcommand{\land}{\wedge}
282
\renewcommand{\lor}{\vee}
283
\renewcommand{\le}{\leq}
284
\renewcommand{\ge}{\geq}
285
\renewcommand{\ne}{\neq}
286
\renewcommand{\owns}{\ni}
287
\renewcommand{\gets}{\leftarrow}
288
\renewcommand{\to}{\rightarrow}
289
\renewcommand{\|}{\Vert}
290
\RequirePackage{mathstyle}
293
%% End of file `flexisym.sty'.