summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/galois/galois.sty
blob: cebe8a2bd7549d70b8cc991ebdcdd2aaf4bffb7d (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
%%
%% This is file `galois.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% galois.dtx  (with options: `package')
%% 
%% This generated file may be distributed under the terms of the LaTeX
%% Project Public License, as described in lppl.txt in the base LaTeX
%% distribution.  Either version 1.0 or, at your option, any later
%% version.
%% 
\def\fileversion{1.05}
\def\filedate{2005/03/19}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%%
%% Source File: galois.dtx
%% Copyright 1994 1998 1999 2006 Patrick.Cousot@ens.fr
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{galois}
       [\filedate\space v\fileversion, Galois connections, Patrick.Cousot@ens.fr]
\DeclareOption{color}{%
  \def\@GALOIScolor{\color}}
\ProcessOptions
\ifx\@GALOIScolor\undefined
\def\@GALOIScolor#1{\relax}%
\else
\RequirePackage{color}%
\fi
\@ifundefined{comp}{%
\newcommand{\comp}{\@ifnextchar[{\@GALOIScomp}{\@GALOIScomp[black]}}%
\def\@GALOIScomp[#1]{\mathchoice
{\mathrel{\raisebox{0.2ex}{$\@GALOIScolor{#1}\scriptstyle\circ$}}}%
{\mathrel{\raisebox{0.2ex}{$\@GALOIScolor{#1}\scriptstyle\circ$}}}%
{\mathrel{\raisebox{0.1ex}{$\@GALOIScolor{#1}\scriptscriptstyle\circ$}}}%
{\mathrel{\raisebox{0.1ex}{$\@GALOIScolor{#1}\scriptscriptstyle\circ$}}}}%
}{}%
\newcommand{\GaloisStyle}{\scriptstyle}%
\newcommand{\GaloisArrowThickness}{0.1ex}%
\newcommand{\GaloisArrowsSep}{0.2ex}%
\newcommand{\GaloisArrowTagSep}{0.5ex}%
\newlength{\@GALOISalphadepth}%
\newlength{\@GALOISalphaheight}%
\newlength{\@GALOISgammadepth}%
\newlength{\@GALOISwidth}%
\newlength{\@GALOISheight}%
\newlength{\@GALOISdepth}%
\newlength{\@GALOIStotalheight}%
\newlength{\@GALOISGap}%
\newlength{\@GALOISalphaarrowwidth}%
\newlength{\@GALOISalphaarrowhalfheight}%
\newlength{\@GALOISgammaarrowwidth}%
\newlength{\@GALOISgammaarrowhalfheight}%
\def\Galois@put(#1,#2-#3)#4{\rlap{\smash{\hskip#1\setlength{\@tempdimc}{#2}%
\addtolength{\@tempdimc}{-#3}\raisebox{\@tempdimc}{#4}}}}%
\def\@GALOISrightarrowfill#1{$\m@th \smash- \mkern-7mu%
 \cleaders\hbox{$\mkern-2mu \smash- \mkern-2mu$}\hfill%
 \mkern-7mu \mathord{#1}$}%
\def\@GALOISleftarrowfill#1{$\m@th \mathord{#1} \mkern-7mu%
  \cleaders\hbox{$\mkern-2mu \smash- \mkern-2mu$}\hfill%
  \mkern-7mu \smash-$}%
\def\@GALOIS#1#2{\@ifnextchar[{\@GALOISca{#1}{#2}}{\@GALOISca{#1}{#2}[black]}}%
\def\@GALOISca#1#2[#3]#4{\@ifnextchar[{\@GALOIScacg{#1}{#2}[#3]{#4}}%
                                      {\@GALOIScacg{#1}{#2}[#3]{#4}[black]}}%
\def\@GALOIScacg#1#2[#3]#4[#5]#6{%
\ensuremath{\mathrel{%
\def\@GALOISalphatag{\ $\@GALOIScolor{#3}\GaloisStyle#4$\ }%
\def\@GALOISgammatag{\ $\@GALOIScolor{#5}\GaloisStyle#6$\ }%
\settowidth{\@GALOISalphaarrowwidth}{$\mathord{#1}$}%
\settowidth{\@GALOISgammaarrowwidth}{$\mathord{#2}$}%
\ifdim\@GALOISalphaarrowwidth>\@GALOISgammaarrowwidth%
\settowidth{\@tempdima}{\hbox{\hspace*{\@GALOISalphaarrowwidth}\@GALOISalphatag}}%
\settowidth{\@tempdimb}{\hbox{\hspace*{\@GALOISalphaarrowwidth}\@GALOISgammatag}}%
\else%
\settowidth{\@tempdima}{\hbox{\hspace*{\@GALOISgammaarrowwidth}\@GALOISalphatag}}%
\settowidth{\@tempdimb}{\hbox{\hspace*{\@GALOISgammaarrowwidth}\@GALOISgammatag}}%
\fi%
\ifdim\@tempdima>\@tempdimb%
\setlength{\@GALOISwidth}{\@tempdima}%
\else%
\setlength{\@GALOISwidth}{\@tempdimb}%
\fi%
\def\@GALOISrightarrow{\hbox to\@GALOISwidth
{\@GALOIScolor{#3}\@GALOISrightarrowfill{#1}}}%
\def\@GALOISleftarrow{\hbox to\@GALOISwidth
{\@GALOIScolor{#5}\@GALOISleftarrowfill{#2}}}%
\settodepth{\@GALOISalphaarrowhalfheight}{$\mathord{#1}$}%
\settoheight{\@tempdima}{$\mathord{#1}$}%
\addtolength{\@GALOISalphaarrowhalfheight}{\@tempdima}%
\divide \@GALOISalphaarrowhalfheight by 2%
\settodepth{\@GALOISgammaarrowhalfheight}{$\mathord{#2}$}%
\settoheight{\@tempdima}{$\mathord{#2}$}%
\addtolength{\@GALOISgammaarrowhalfheight}{\@tempdima}%
\divide \@GALOISgammaarrowhalfheight by 2%
\ifdim\@GALOISalphaarrowhalfheight>\@GALOISgammaarrowhalfheight%
\setlength{\@GALOISGap}{\@GALOISalphaarrowhalfheight}%
\else%
\addtolength{\@GALOISGap}{\@GALOISgammaarrowhalfheight}%
\fi%
\addtolength{\@GALOISGap}{\GaloisArrowsSep}%
\addtolength{\@GALOISGap}{\GaloisArrowThickness }%
\addtolength{\@GALOISGap}{\GaloisArrowThickness }%
\settodepth{\@GALOISalphadepth}{\@GALOISalphatag}%
\settoheight{\@GALOISalphaheight}{\@GALOISalphatag}%
\settodepth{\@GALOISgammadepth}{\@GALOISgammatag}%
\setlength{\@GALOISdepth}{\@GALOISalphadepth}%
\addtolength{\@GALOISdepth}{\@GALOISalphaheight}%
\addtolength{\@GALOISdepth}{\GaloisArrowTagSep}%
\addtolength{\@GALOISdepth}{-\GaloisArrowThickness }%
\setlength{\@GALOISheight}{\@GALOISGap}%
\addtolength{\@GALOISheight}{\GaloisArrowTagSep}%
\addtolength{\@GALOISheight}{\@GALOISgammadepth}%
\settoheight{\@tempdima}{\@GALOISgammatag}%
\addtolength{\@GALOISheight}{\@tempdima}%
\setlength{\@GALOIStotalheight}{\@GALOISdepth}%
\addtolength{\@GALOIStotalheight}{\@GALOISheight}%
\Galois@put(0pt,0pt-\@GALOISalphaarrowhalfheight){\@GALOISrightarrow}%
\Galois@put(0pt,\@GALOISGap-\@GALOISalphaarrowhalfheight){\@GALOISleftarrow}%
\setlength{\@tempdima}{\@GALOISwidth}%
\settowidth{\@tempdimb}{\@GALOISalphatag}%
\addtolength{\@tempdima}{-\@tempdimb}%
\divide\@tempdima by 2%
\Galois@put(\@tempdima,\@GALOISalphadepth-\@GALOISdepth){\@GALOISalphatag}%
\setlength{\@tempdima}{\@GALOISwidth}%
\settowidth{\@tempdimb}{\@GALOISgammatag}%
\addtolength{\@tempdima}{-\@tempdimb}%
\divide\@tempdima by 2%
\setlength{\@tempdimb}{\@GALOISalphadepth}%
\addtolength{\@tempdimb}{\@GALOISalphaheight}%
\addtolength{\@tempdimb}{\GaloisArrowTagSep}%
\addtolength{\@tempdimb}{\GaloisArrowTagSep}%
\addtolength{\@tempdimb}{\@GALOISGap}%
\addtolength{\@tempdimb}{\@GALOISgammadepth}%
\Galois@put(\@tempdima,\@tempdimb-\@GALOISdepth){\@GALOISgammatag}%
\rule[-\@GALOISdepth]{0pt}{\@GALOIStotalheight}% set depth and height
\hspace*{\@GALOISwidth}% set width
}}}%
\newcommand{\galois}{\@GALOIS{\rightarrow}{\leftarrow}}%
\def\@GALOISmytwoheadrightarrow{\rlap{$\:\,{\rightarrow}$}{\longrightarrow}}%
\def\@GALOIStwoheadrightarrow{\protect\@GALOISmytwoheadrightarrow}%
\newcommand{\galoiS}{\@GALOIS{\@GALOIStwoheadrightarrow}{\leftarrow}}%
\def\@GALOISmytwoheadrightarrowreduc{\rlap{\smash{\hskip1ex\raisebox{0.815ex}%
{\tiny$\equiv$}}}\rlap{$\:\,{\rightarrow}$}{\longrightarrow}}%
\def\@GALOIStwoheadrightarrowreduc{\protect\@GALOISmytwoheadrightarrowreduc}%
\newcommand{\galoiSr}{\@GALOIS{\@GALOIStwoheadrightarrowreduc}{\leftarrow}}%
\def\@GALOISmytwoheadleftarrow{\rlap{$\:{\leftarrow}$}{\longleftarrow}}%
\def\@GALOIStwoheadleftarrow{\protect\@GALOISmytwoheadleftarrow}%
\newcommand{\Galois}{\@GALOIS{\rightarrow}{\@GALOIStwoheadleftarrow}}%
\newcommand{\GaloiS}{\@GALOIS%
{\@GALOIStwoheadrightarrow}{\@GALOISmytwoheadleftarrow}}%
\endinput
%%
%% End of file `galois.sty'.