%
% $Header: swedish.tex,v 1.3 86/11/04 21:02:49 sven Exp $
%
% $Log:	swedish.tex,v $
% Revision 1.3  86/11/04  21:02:49  sven
% Fixed !input<file> bug, by letting \bgroup and \egroup to the new
% group characters. /Sven 861104
% 
% Revision 1.2  86/09/14  00:19:57  sven
% Initial revision, LaTeX 2.09
% 
% Revision 1.1  86/01/15  22:36:34  sven
% Initial revision, LaTeX 2.08
% 
%
% Change escape character from '\' to '!', grouping characters from
% '{}' to '<>' and set up Swedish characters at [{]}\|.

\typeout{Change national characters to Swedish.}

% Make some special characters accesible

%\def\bang{{\char'041}}
\let\bang=!
\def\|{\relax\ifmmode\vert\else$\vert$\fi}

% The following two are already defined in lplain.tex
%\def\{{\relax\ifmmode\lbrace\else$\lbrace$\fi}
%\def\}{\relax\ifmmode\rbrace\else$\rbrace$\fi}

\def\<{<} \def\>{>}
%\def\lt{{\char'074}} \def\gt{{\char'076}}
%\let\<=< \let\>=>
\let\lt=< \let\gt=>

% \! was neg. thin space in math-mode but !! cannot be used as it is a
% special LaTeX command. Thus \! is replaced by \nspace

\def\nspace{\mskip-\thinmuskip}

\escapechar`\!
\catcode`\!=0 \catcode`\<=1 \catcode`\>=2
!catcode`!{=12 !catcode`!\=12 !catcode`!}=12

% Make national characters active

!def!svenska<!catcode`{=13 !catcode`|=13 !catcode`}=13
              !catcode`[=13 !catcode`\=13 !catcode`]=13>

!svenska

% Map active characters

!def{<!sveae> !def|<!sveoe> !def}<!sveaa>
              !def[<!sveAE> !def\<!sveOE> !def]<!sveAA>

!catcode`{=12 !catcode`|=12 !catcode`}=12
!catcode`[=12 !catcode`\=12 !catcode`]=12

% Define national characters

!def!sveae<!accent"7F a>
!def!sveaa<!accent'27 a>
!def!sveoe<!accent"7F o>
!def!sveAE<!accent"7F A>
!def!sveOE<!accent"7F O>
!def!sveAA<!accent'27 A>

%!newdimen!ringoffset
%!newdimen!dotoffset

% Twiddle with the placement of the ring and the dots for } and {

%!def!sveae<!leavevmode!rlap<!kern!dotoffset!hbox<!char'177>>a>
%!def!sveaa<!leavevmode!rlap<!ringfont!kern!ringoffset!hbox<!char'27>>a>

%!def!rm<!ringoffset=-0.16em !dotoffset=-0.03em
%        !let !ringfont=!rmfont !fam0 !rmfont>
%!def!sl<!ringoffset=-0.06em !dotoffset=-0.03em
%        !let !ringfont=!rmfont !fam!slfam !slfont>
%!def!it<!ringoffset=-0.00em !dotoffset=-0.03em
%        !let !ringfont=!rmfont !fam!itfam !itfont>
%!def!bf<!ringoffset=-0.16em !dotoffset=-0.03em
%        !let !ringfont=!bffont !fam!bffam !bffont>
%!def!tt<!fam!ttfam !ttfont>

!svenska

% Change implicit characters
!let!bgroup=< !let!egroup=>
