summaryrefslogtreecommitdiff
path: root/language/swedish/slatex/swedish.tex
blob: c20d656fb0bb9be2ca4be7ab5adc3767ddc202dc (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
%
% $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=>