summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/galois/galois.sty
blob: 61ae28476351faa9cf37f1ab915f088ad20b7963 (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
%%
%% 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.04}
\def\filedate{1999/05/01}
%% \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 Patrick.Cousot@ens.fr
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{galois}
       [\filedate\space v\fileversion, Galois connections, Patrick.Cousot@ens.fr]
\@ifundefined{comp}{%
\newcommand{\comp}{\mathchoice{\mathrel{\raisebox{0.2ex}{$\scriptstyle\circ$}}}%
{\mathrel{\raisebox{0.2ex}{$\scriptstyle\circ$}}}%
{\mathrel{\raisebox{0.1ex}{$\scriptscriptstyle\circ$}}}%
{\mathrel{\raisebox{0.1ex}{$\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#3#4{%
\ensuremath{\mathrel{%
\def\@GALOISalphatag{\ $\GaloisStyle#1$\ }%
\def\@GALOISgammatag{\ $\GaloisStyle#2$\ }%
\settowidth{\@GALOISalphaarrowwidth}{$\mathord{#3}$}%
\settowidth{\@GALOISgammaarrowwidth}{$\mathord{#4}$}%
\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{\@GALOISrightarrowfill{#3}}}%
\def\@GALOISleftarrow{\hbox to\@GALOISwidth{\@GALOISleftarrowfill{#4}}}%
\settodepth{\@GALOISalphaarrowhalfheight}{$\mathord{#3}$}%
\settoheight{\@tempdima}{$\mathord{#3}$}%
\addtolength{\@GALOISalphaarrowhalfheight}{\@tempdima}%
\divide \@GALOISalphaarrowhalfheight by 2%
\settodepth{\@GALOISgammaarrowhalfheight}{$\mathord{#4}$}%
\settoheight{\@tempdima}{$\mathord{#4}$}%
\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 }% lift from the stem thickness
\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}[2]{\@GALOIS{#1}{#2}{\rightarrow}{\leftarrow}}%
\def\@GALOISmytwoheadrightarrow{\rlap{$\:\,{\rightarrow}$}{\longrightarrow}}%
\def\@GALOIStwoheadrightarrow{\protect\@GALOISmytwoheadrightarrow}%
\newcommand{\galoiS}[2]{\@GALOIS{#1}{#2}{\@GALOIStwoheadrightarrow}{\leftarrow}}%
\def\@GALOISmytwoheadrightarrowreduc{\rlap{\smash{\hskip1ex\raisebox{0.815ex}%
{\tiny$\equiv$}}}\rlap{$\:\,{\rightarrow}$}{\longrightarrow}}%
\def\@GALOIStwoheadrightarrowreduc{\protect\@GALOISmytwoheadrightarrowreduc}%
\newcommand{\galoiSr}[2]{\@GALOIS{#1}{#2}{\@GALOIStwoheadrightarrowreduc}{\leftarrow}}%
\def\@GALOISmytwoheadleftarrow{\rlap{$\:{\leftarrow}$}{\longleftarrow}}%
\def\@GALOIStwoheadleftarrow{\protect\@GALOISmytwoheadleftarrow}%
\newcommand{\Galois}[2]{\@GALOIS{#1}{#2}{\rightarrow}{\@GALOIStwoheadleftarrow}}%
\newcommand{\GaloiS}[2]{\@GALOIS{#1}{#2}%
{\@GALOIStwoheadrightarrow}{\@GALOISmytwoheadleftarrow}}%
\endinput
%%
%% End of file `galois.sty'.