\message{Hello world!}
\message{This is llconnex Version 0.99 (14 June 2007) by J.M.Egger.}
\message{A newer version of llconnex may or may not be available.} 
\message{Please check my website to be sure!  Look in comments for URL.} 
%% SORRY: \message doesn't seem to like ~s, and I can't find a solution!
%% \message{(http://www.mscs.dal.ca/~jegger/llconnex/)} % produces error.
\message{Documentation for llconnex can also be found there.}

%% KNOWN BUGS: I have not yet created proper scriptscriptsize versions of
%% \ntimes and \utimes.  If you are using Xy-pic and arrow-names which
%% have subscripts or superscripts containing connective symbols, you
%% may wish to consider inserting \let\labelstyle\displaystyle. 

%%%%% MULTIPLICATIVES AND ADDITIVES %%%%%

\RequirePackage{stmaryrd}
\def\amper{\mathrel{\binampersand}} 
\def\repma{\mathrel{\bindnasrepma}}
\def\bigamper{\mathop{\binampersand}\limits} 
\def\bigrepma{\mathop{\bindnasrepma}\limits}
\DeclareOption{jyg}{ 
  \let\tens\otimes
  \let\with\amper 
  \let\parr\repma 
  \let\plus\oplus 
  \let\uftens=1
  \let\ufparr\bot
  \let\ufwith\top
  \let\ufplus=0
  \let\bigtens\bigotimes
  \let\bigwith\bigamper 
  \let\bigparr\bigrepma 
  \let\bigplus\bigoplus 
}
\DeclareOption{cns}{ 
  \let\tens\otimes
  \let\parr\oplus
  \let\with\times
  \let\plus=+ 
  \let\uftens\top
  \let\ufparr\bot
  \let\ufwith=1
  \let\ufplus=0
  \let\bigtens\bigotimes
  \let\bigparr\bigoplus
  \let\bigwith\prod
  \let\bigplus\sum
}
\DeclareOption{cjm}{ 
  \let\tens\amper 
  \let\parr\repma
  \let\with\wedge 
  \let\plus\vee 
  \let\uftens=e 	
  \let\ufparr=d		
  \let\ufwith=1 	
  \let\ufplus=0 	
  \let\bigtens\bigamper 
  \let\bigparr\bigrepma
  \let\bigwith\bigwedge 
  \let\bigplus\bigvee 
}
\DeclareOption{jme}{ 
  \let\tens\ntimes 	% definition follows
  \let\parr\utimes 	% definition follows 
  \let\with\nplus 	% in stmaryrd
  \let\plus\uplus 	% standard
  \let\uftens=e 
  \let\ufparr=d 
  \let\ufwith=t 
  \let\ufplus=o 
  \let\bigtens\bigntimes 	% definition follows
  \let\bigparr\bigutimes 	% definition follows 
  \let\bigwith\bignplus 	% in stmaryrd
  \let\bigplus\biguplus 	% standard
}
\DeclareOption{yom}{ 
  \let\tens\amper 
  \let\parr\repma
  \let\with\sqcap 
  \let\plus\sqcup 
  \let\uftens=e 
  \let\ufparr=d 
  \let\ufwith=t
  \let\ufplus=o
  \let\bigtens\bigamper 
  \let\bigparr\bigrepma
  \let\bigwith\bigsqcap 
  \let\bigplus\bigsqcup 
}
\let\avec\with
\let\uptens\uftens
\let\upparr\ufparr
\let\upavec\ufwith
\let\upplus\ufplus
\DeclareOption{uns}{
  \let\e\uftens
  \let\d\ufparr
  \let\t\ufwith
  \let\o\ufplus
}

%%%%% NEGATION, IMPLICATION %%%%%

\def\perpsymbol{\mathrel{^{\,\bot}}}
\def\prepsymbol{\mathrel{^{\bot\,}}}
\def\prep#1{{\prepsymbol\joinrel\mathrel{#1}}}
\def\perp#1{{\mathrel{#1}\joinrel\perpsymbol}}
\DeclareOption{ast}{
  \def\perpsymbol{\mathrel{^{\,\ast}}}
  \def\prepsymbol{\mathrel{^{\ast\,}}}
}
\DeclareOption{jns}{
  \def\perp#1{#1^\ast}
  \def\prep#1{#1^\vee}
}
\DeclareOption{mus}{
  \def\perp#1{#1^\sharp}
  \def\prep#1{#1^\flat}
}
\DeclareOption{cyc}{ \let\prep\perp }

\def\relcirc{\mathrel{\circ}}   
\def\loll{\mathrel{\relbar\joinrel\relcirc}}  
\def\llol{\mathrel{\relcirc\joinrel\relbar}}  
\DeclareOption{arr}{
  \let\loll\rightarrow
  \let\llol\leftarrow
}
\DeclareOption{Arr}{
  \let\loll\Rightarrow
  \let\llol\Leftarrow
}

%%%%% EXPONENTIALS %%%%%

\def\bsur{\mathbf{!}}
\def\ppas{\mathbf{?}}
\let\bang\bsur
\let\whim\ppas
\let\duh\bsur
\let\ynot\ppas

%%%%% OTHERS %%%%%
% less standard things like 
%   \monus (co-implication)
%   \seque (BV cats)
% may appear in future versions

%%%%% SERIOUS BUSINESS %%%%%

\newlength{\llcfoo}
\def\superimpose#1#2{
  \settowidth{\llcfoo}{#2}
  \makebox[\llcfoo]{\makebox[0pt]{#1}\makebox[0pt]{#2}}}
%% \superimpose assumes that the first argument is narrower (or
%% equal-in-width) to the second.
\def\mathsuperimpose#1#2{\mathchoice{
  \superimpose{\ensuremath{\displaystyle#1}}{\ensuremath{\displaystyle#2}}}{
  \superimpose{\ensuremath{\textstyle#1}}{\ensuremath{\textstyle#2}}}{
  \superimpose{\ensuremath{\scriptstyle#1}}{\ensuremath{\scriptstyle#2}}}{
  \superimpose{\ensuremath{\scriptscriptstyle#1}}{\ensuremath{\scriptscriptstyle#2}}}}

      \def\quasipt{1pt}     	% if 12pt font
%     \def\quasipt{0.75pt}  	% if 11pt font
%     \def\quasipt{0.67pt}  	% if 10pt font
      \def\minipt{0.6pt}	% seems to work reasonably well in all fonts
      \def\tinypt{0.4pt}	% seems to work reasonably well in all fonts
    \def\smalltimes{\raisebox{\quasipt}{$\scriptstyle\times$}}
    \def\tinytimes{\raisebox{\minipt}{$\scriptscriptstyle\times$}}
    \def\teenytimes{\cdot} % or {\scriptscriptstyle\ast}} or similar
    \def\fixnormalcup{\raisebox{-\quasipt}{$\cup$}}
    \def\fixsmallcup{\raisebox{-\minipt}{$\scriptstyle\cup$}}
    \def\fixtinycup{\raisebox{-\tinypt}{$\scriptscriptstyle\cup$}}
  \def\fixtimes{
    \mathchoice{\smalltimes}{\smalltimes}{\tinytimes}{\teenytimes}}
  \def\fixcup{
    \mathchoice{\fixnormalcup}{\fixnormalcup}{\fixsmallcup}{\fixtinycup}}
\def\ntimes{\mathrel{\mathsuperimpose{\fixtimes}{\cap}}}
\def\utimes{\mathrel{\mathsuperimpose{\fixtimes}{\fixcup}}}
\def\bigntimes{\mathop{\mathsuperimpose{\times}{\bigcap}}\limits}
\def\bigutimes{\mathop{\mathsuperimpose{\times}{\bigcup}}\limits}
\def\varntimes{\mathrel{\mathchoice{\scriptstyle\bigntimes}{
  \scriptstyle\bigntimes}{\scriptscriptstyle\bigntimes}{\ntimes}}}
\def\varutimes{\mathrel{\mathchoice{\scriptstyle\bigutimes}{
  \scriptstyle\bigutimes}{\scriptscriptstyle\bigutimes}{\utimes}}}

\def\relsquare{\mathrel{\boxempty}}   
\def\relbullet{\mathrel{\bullet}}   
\def\reldoubcirc{\mathrel{\varocircle}} %amssymb: \circledcirc
\def\sqloll{\mathrel{\relbar\joinrel\relsquare}}  
\def\sqllol{\mathrel{\relsquare\joinrel\relbar}}  
\def\varloll{\mathrel{\relbar\joinrel\relbullet}}  
\def\varllol{\mathrel{\relbullet\joinrel\relbar}}  
\def\doubloll{\mathrel{\relbar\joinrel\reldoubcirc}}  
\def\doubllol{\mathrel{\reldoubcirc\joinrel\relbar}}  

\ProcessOptions\relax
