]> matita.cs.unibo.it Git - helm.git/blob - components/tactics/doc/ligature.sty
added a subtle List.rev that makes the order of the equalities taken from the library...
[helm.git] / components / tactics / doc / ligature.sty
1 %%
2 %% This is file `ligature.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% semantic.dtx  (with options: `allOptions,ligature')
8 %% 
9 %% IMPORTANT NOTICE:
10 %% 
11 %% For the copyright see the source file.
12 %% 
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from ligature.sty.
15 %% 
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file semantic.dtx.
18 %% 
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
23 %%
24 %% semantic.dtx  (c)1995--2002 Peter M^^f8ller Neergaard and
25 %%                             Arne John Glenstrup
26 %%
27 \expandafter\ifx\csname sem@nticsLoader\endcsname\relax
28   \PackageError{semantic}{%
29     This file should not be loaded directly}
30     {%
31       This file is an option of the semantic package.  It should not be
32         loaded directly\MessageBreak
33       but by using \protect\usepackage{semantic} in your document
34         preamble.\MessageBreak
35       No commands are defined.\MessageBreak
36      Type <return> to proceed.
37     }%
38 \else
39 \TestForConflict{\@addligto,\@addligtofollowlist,\@def@ligstep}
40 \TestForConflict{\@@trymathlig,\@defactive,\@defligstep}
41 \TestForConflict{\@definemathlig,\@domathligfirsts,\@domathligfollows}
42 \TestForConflict{\@exitmathlig,\@firstmathligs,\@ifactive,\@ifcharacter}
43 \TestForConflict{\@ifinlist,\@lastvalidmathlig,\@mathliglink}
44 \TestForConflict{\@mathligredefactive,\@mathligsoff,\@mathligson}
45 \TestForConflict{\@seentoks,\@setupfirstligchar,\@try@mathlig}
46 \TestForConflict{\@trymathlig,\if@mathligon,\mathlig,\mathligprotect}
47 \TestForConflict{\mathligsoff,\mathligson,\@startmathlig,\@pushedtoks}
48 \newif\if@mathligon
49 \DeclareRobustCommand\mathlig[1]{\@addligtolists#1\@@
50   \if@mathligon\mathligson\fi
51   \@setupfirstligchar#1\@@
52   \@defligstep{}#1\@@}
53 \def\@mathligson{\if@mathligon\mathligson\fi}
54 \def\@mathligsoff{\if@mathligon\mathligsoff\@mathligontrue\fi}
55 \DeclareRobustCommand\mathligprotect[1]{\expandafter
56   \def\expandafter#1\expandafter{%
57     \expandafter\@mathligsoff#1\@mathligson}}
58 \DeclareRobustCommand\mathligson{\def\do##1##2##3{\mathcode`##1="8000}%
59   \@domathligfirsts\@mathligontrue}
60 \AtBeginDocument{\mathligson}
61 \DeclareRobustCommand\mathligsoff{\def\do##1##2##3{\mathcode`##1=##2}%
62   \@domathligfirsts\@mathligonfalse}
63 \edef\@mathliglink{Error: \noexpand\verb|\string\@mathliglink| expanded}
64 {\catcode`\A=11\catcode`\1=12\catcode`\~=13 % Letter, Other and Active
65 \gdef\@ifcharacter#1{\ifcat A\noexpand#1\let\next\@firstoftwo
66                 \else\ifcat 1\noexpand#1\let\next\@firstoftwo
67                 \else\ifcat \noexpand~\noexpand#1\let\next\@firstoftwo
68                 \else\let\next\@secondoftwo\fi\fi\fi\next}%
69 \gdef\@ifactive#1{\ifcat \noexpand~\noexpand#1\let\next\@firstoftwo
70                   \else\let\next\@secondoftwo\fi\next}}
71 \def\@domathligfollows{}\def\@domathligfirsts{}
72 \def\@makemathligsactive{\mathligson
73   \def\do##1##2##3{\catcode`##1=12}\@domathligfollows}
74 \def\@makemathligsnormal{\mathligsoff
75   \def\do##1##2##3{\catcode`##1=##3}\@domathligfollows}
76 \def\@ifinlist#1#2{\@tempswafalse
77   \def\do##1##2##3{\ifnum`##1=`#2\relax\@tempswatrue\fi}#1%
78   \if@tempswa\let\next\@firstoftwo\else\let\next\@secondoftwo\fi\next}
79 \def\@addligto#1#2{%
80   \@ifinlist#1#2{\def\do##1##2##3{\noexpand\do\noexpand##1%
81       \ifnum`##1=`#2 {\the\mathcode`#2}{\the\catcode`#2}%
82       \else{##2}{##3}\fi}%
83     \edef#1{#1}}%
84   {\def\do##1##2##3{\noexpand\do\noexpand##1%
85       \ifnum`##1=`#2 {\the\mathcode`#2}{\the\catcode`#2}%
86       \else{##2}{##3}\fi}%
87     \edef#1{#1\do#2{\the\mathcode`#2}{\the\catcode`#2}}}}
88 \def\@addligtolists#1{\expandafter\@addligto
89   \expandafter\@domathligfirsts
90   \csname\string#1\endcsname\@addligtofollowlist}
91 \def\@addligtofollowlist#1{\ifx#1\@@\let\next\relax\else
92   \def\next{\expandafter\@addligto
93     \expandafter\@domathligfollows
94     \csname\string#1\endcsname
95     \@addligtofollowlist}\fi\next}
96 \def\@defligstep#1#2{\def\@tempa##1{\ifx##1\endcsname
97     \expandafter\endcsname\else
98     \string##1\expandafter\@tempa\fi}%
99   \expandafter\@def@ligstep\csname @mathlig\@tempa#1#2\endcsname{#1#2}}
100 \def\@def@ligstep#1#2#3{%
101   \ifx#3\@@
102     \def\next{\def#1}%
103   \else
104     \ifx#1\relax
105       \def\next{\let#1\@mathliglink\@defligstep{#2}#3}%
106     \else
107       \def\next{\@defligstep{#2}#3}%
108     \fi
109   \fi\next}
110 \def\@setupfirstligchar#1#2\@@{%
111   \@ifactive{#1}{%
112     \expandafter\expandafter\expandafter\@mathligredefactive
113     \expandafter\string\expandafter#1\expandafter{#1}{#1}}%
114   {\@defactive#1{\@startmathlig #1}\@namedef{@mathlig#1}{#1}}}
115 \def\@mathligredefactive#1#2#3{%
116   \def#3{{}\ifmmode\def\next{\@startmathlig#1}\else
117     \def\next{#2}\fi\next}%
118   \@namedef{@mathlig#1}{#2}}
119 \def\@defactive#1{\@ifundefined{@definemathlig\string#1}%
120   {\@latex@error{Illegal first character in math ligature}
121     {You can only use \@firstmathligs\space as the first^^J
122       character of a math ligature}}%
123   {\csname @definemathlig\string#1\endcsname}}
124
125 {\def\@firstmathligs{}\def\do#1{\catcode`#1=\active
126     \expandafter\gdef\expandafter\@firstmathligs
127     \expandafter{\@firstmathligs\space\string#1}\next}
128   \def\next#1{\expandafter\gdef\csname
129     @definemathlig\string#1\endcsname{\def#1}}
130   \do{"}"\do{@}@\do{/}/\do{(}(\do{)})\do{[}[\do{]}]\do{=}=
131   \do{?}?\do{!}!\do{`}`\do{'}'\do{|}|\do{~}~\do{<}<\do{>}>
132   \do{+}+\do{-}-\do{*}*\do{.}.\do{,},\do{:}:\do{;};}
133 \newtoks\@pushedtoks
134 \newtoks\@seentoks
135 \def\@startmathlig{\def\@lastvalidmathlig{}\@pushedtoks{}%
136   \@seentoks{}\@trymathlig}
137 \def\@trymathlig{\futurelet\next\@@trymathlig}
138 \def\@@trymathlig{\@ifcharacter\next{\@try@mathlig}{\@exitmathlig{}}}
139 \def\@exitmathlig#1{%
140   \expandafter\@makemathligsnormal\@lastvalidmathlig\mathligson
141   \the\@pushedtoks#1}
142 \def\@try@mathlig#1{%\typeout{char: #1 catcode: \the\catcode`#1
143   \@ifundefined{@mathlig\the\@seentoks#1}{\@exitmathlig{#1}}%
144   {\expandafter\ifx
145                  \csname @mathlig\the\@seentoks#1\endcsname
146                  \@mathliglink
147       \expandafter\@pushedtoks
148         \expandafter=\expandafter{\the\@pushedtoks#1}%
149     \else
150       \expandafter\let\expandafter\@lastvalidmathlig
151       \csname @mathlig\the\@seentoks#1\endcsname
152       \@pushedtoks={}%
153     \fi
154     \expandafter\@seentoks\expandafter=\expandafter%
155     {\the\@seentoks#1}\@makemathligsactive\obeyspaces\@trymathlig}}
156 \edef\patch@newmcodes@{%
157   \mathcode\number`\'=39
158   \mathcode\number`\*=42
159   \mathcode\number`\.=\string "613A
160   \mathchardef\noexpand\std@minus=\the\mathcode`\-\relax
161   \mathcode\number`\-=45
162   \mathcode\number`\/=47
163   \mathcode\number`\:=\string "603A\relax
164 }
165 \AtBeginDocument{\let\newmcodes@=\patch@newmcodes@}
166 \fi
167 \endinput
168 %%
169 %% End of file `ligature.sty'.