diff options
author | Karl Berry <karl@freefriends.org> | 2006-07-15 20:49:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-07-15 20:49:34 +0000 |
commit | 9f9467342aa8d5908460d4ced2213a521376f7b4 (patch) | |
tree | 6200a30f4592cf504433b58769d94f7ba1884216 /Master/texmf-dist/tex/latex/galois | |
parent | 8b925dde573a00183495444e8996715aa166e6d8 (diff) |
galois update (23mar06)
git-svn-id: svn://tug.org/texlive/trunk@1847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/galois')
-rw-r--r-- | Master/texmf-dist/tex/latex/galois/galois.sty | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/galois/galois.sty b/Master/texmf-dist/tex/latex/galois/galois.sty index 61ae2847635..cebe8a2bd75 100644 --- a/Master/texmf-dist/tex/latex/galois/galois.sty +++ b/Master/texmf-dist/tex/latex/galois/galois.sty @@ -11,8 +11,8 @@ %% distribution. Either version 1.0 or, at your option, any later %% version. %% -\def\fileversion{1.04} -\def\filedate{1999/05/01} +\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 @@ -31,16 +31,26 @@ %% %% %% Source File: galois.dtx -%% Copyright 1994 1998 1999 Patrick.Cousot@ens.fr +%% 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}{\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{\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}% @@ -66,12 +76,15 @@ \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{% +\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{\ $\GaloisStyle#1$\ }% -\def\@GALOISgammatag{\ $\GaloisStyle#2$\ }% -\settowidth{\@GALOISalphaarrowwidth}{$\mathord{#3}$}% -\settowidth{\@GALOISgammaarrowwidth}{$\mathord{#4}$}% +\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}}% @@ -84,14 +97,16 @@ \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}$}% +\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{#4}$}% -\settoheight{\@tempdima}{$\mathord{#4}$}% +\settodepth{\@GALOISgammaarrowhalfheight}{$\mathord{#2}$}% +\settoheight{\@tempdima}{$\mathord{#2}$}% \addtolength{\@GALOISgammaarrowhalfheight}{\@tempdima}% \divide \@GALOISgammaarrowhalfheight by 2% \ifdim\@GALOISalphaarrowhalfheight>\@GALOISgammaarrowhalfheight% @@ -108,7 +123,7 @@ \setlength{\@GALOISdepth}{\@GALOISalphadepth}% \addtolength{\@GALOISdepth}{\@GALOISalphaheight}% \addtolength{\@GALOISdepth}{\GaloisArrowTagSep}% -\addtolength{\@GALOISdepth}{-\GaloisArrowThickness }% lift from the stem thickness +\addtolength{\@GALOISdepth}{-\GaloisArrowThickness }% \setlength{\@GALOISheight}{\@GALOISGap}% \addtolength{\@GALOISheight}{\GaloisArrowTagSep}% \addtolength{\@GALOISheight}{\@GALOISgammadepth}% @@ -137,18 +152,18 @@ \rule[-\@GALOISdepth]{0pt}{\@GALOIStotalheight}% set depth and height \hspace*{\@GALOISwidth}% set width }}}% -\newcommand{\galois}[2]{\@GALOIS{#1}{#2}{\rightarrow}{\leftarrow}}% +\newcommand{\galois}{\@GALOIS{\rightarrow}{\leftarrow}}% \def\@GALOISmytwoheadrightarrow{\rlap{$\:\,{\rightarrow}$}{\longrightarrow}}% \def\@GALOIStwoheadrightarrow{\protect\@GALOISmytwoheadrightarrow}% -\newcommand{\galoiS}[2]{\@GALOIS{#1}{#2}{\@GALOIStwoheadrightarrow}{\leftarrow}}% +\newcommand{\galoiS}{\@GALOIS{\@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}}% +\newcommand{\galoiSr}{\@GALOIS{\@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}% +\newcommand{\Galois}{\@GALOIS{\rightarrow}{\@GALOIStwoheadleftarrow}}% +\newcommand{\GaloiS}{\@GALOIS% {\@GALOIStwoheadrightarrow}{\@GALOISmytwoheadleftarrow}}% \endinput %% |