% \iffalse meta-comment
%
% Copyright 1989-1996 Johannes L. Braams and any individual authors
% listed elsewhere in this file.  All rights reserved.
% 
% For further copyright information see any other copyright notices in 
% this file.
% 
% This file is part of the Babel system release 3.6.
% --------------------------------------------------
%   This system is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% 
%   For error reports concerning UNCHANGED versions of this file no
%   more than one year old, see bugs.txt.
% 
%   Please do not request updates from me directly.  Primary
%   distribution is through the CTAN archives.
% 
% 
% IMPORTANT COPYRIGHT NOTICE:
% 
% You are NOT ALLOWED to distribute this file alone.
% 
% You are allowed to distribute this file under the condition that it
% is distributed together with all the files listed in manifest.txt.
% 
% If you receive only some of these files from someone, complain!
% 
% Permission is granted to copy this file to another file with a
% clearly different name and to customize the declarations in that
% copy to serve the needs of your installation, provided that you
% comply with the conditions in the file legal.txt from the LaTeX2e
% distribution.
% 
% However, NO PERMISSION is granted to produce or to distribute a
% modified version of this file under its original name.
%  
% You are NOT ALLOWED to change this file.
% 
% 
% \fi
% \CheckSum{237}
% \iffalse
%    Tell the \LaTeX\ system who we are and write an entry on the
%    transcript.
%<*dtx>
\ProvidesFile{swedish.dtx}
%</dtx>
%<code>\ProvidesFile{swedish.ldf}
%\fi
%\ProvidesFile{swedish.dtx}
        [1996/12/23 v2.1 Swedish support from the babel system]
%\iffalse
% Babel package for LaTeX version 2e
% Copyright (C) 1989 - 1996
%           by Johannes Braams, TeXniek
%
% Please report errors to: J.L. Braams
%                          JLBraams@cistron.nl
%
%    This file is part of the babel system, it provides the source
%    code for the Swedish language definition file.  A contribution was
%    made by Sten Hellman HELLMAN@CERNVM.CERN.CH
%
%    Further enhancements for version 2.0 were provided by 
%    Erik "Osthols <erik@inekfk.de>
%<*filedriver>
\documentclass{ltxdoc}
\newcommand*\TeXhax{\TeX hax}
\newcommand*\babel{\textsf{babel}}
\newcommand*\langvar{$\langle \it lang \rangle$}
\newcommand*\note[1]{}
\newcommand*\Lopt[1]{\textsf{#1}}
\newcommand*\file[1]{\texttt{#1}}
\begin{document}
 \DocInput{swedish.dtx}
\end{document}
%</filedriver>
%\fi
% \GetFileInfo{swedish.dtx}
%
% \changes{swedish-1.0a}{1991/07/15}{Renamed \file{babel.sty} in
%    \file{babel.com}}
% \changes{swedish-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a}
% \changes{swedish-1.2}{1994/02/27}{Update for LaTeX2e}
% \changes{swedish-1.3d}{1994/06/26}{Removed the use of \cs{filedate}
%    and moved identification after the loading of \file{babel.def}}
% \changes{swedish-1.3e}{1995/05/28}{Update for release 3.5}
% \changes{swedish-2.0}{1996/01/24}{Introduced active double quote}
% \changes{swedish-2.1}{1996/10/10}{Replaced \cs{undefined} with
%    \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency
%    with \LaTeX, moved the definition of \cs{atcatcode} right to the
%    beginning.}
%
%  \section{The Swedish language}
%
%    The file \file{\filename}\footnote{The file described in this
%    section has version number \fileversion\ and was last revised on
%    \filedate. Contributions were made by Sten Hellman
%    (\texttt{HELLMAN@CERNVM.CERN.CH}) and Erik \"Oshols
%    (\texttt{erik@ine.kfk.de}).} defines all the
%    language-specific macros for the Swedish language.
%
%    For this language the character |"| is made active. In
%    table~\ref{tab:swedish-quote} an overview is given of its
%    purpose. The vertical placement of the "umlaut" in some letters
%    can be controlled this way.
%    \begin{table}[htb]
%     \begin{center}
%     \begin{tabular}{lp{8cm}}
%      |"a| & |\"a|, also implemented for A, o and O. \\
%      |"w| & gives {\aa}, also works for uppercase letters. \\
%      |"ff|& for |ff| to be hyphenated as |ff-f|,
%                  this is also implemented for b, d, f, g, l, m, n,
%                  p, r, s, and t.                                  \\
%      \verb="|= & disable ligature at this position.               \\
%      |"-| & an explicit hyphen sign, allowing hyphenation
%                  in the rest of the word.                         \\
%      |""| & like |"-|, but producing no hyphen sign
%                  (for compound words with hyphen, e.g.\ |x-""y|). \\
%      |"~| & for a compound word mark without a breakpoint.       \\
%      |"=| & for a compound word mark with a breakpoint, allowing
%             hyphenation in the composing words.                  \\
%     \end{tabular}
%     \caption{The extra definitions made
%              by \file{swedish.sty}}\label{tab:swedish-quote}
%     \end{center}
%    \end{table}
%
% \StopEventually{}
%
%    The macro |\LdfInit| takes care of preventing that this file is
%    loaded more than once, checking the category code of the
%    \texttt{@} sign, etc.
% \changes{swedish-2.1}{1996/11/03}{Now use \cs{LdfInit} to perform
%    initial checks} 
%    \begin{macrocode}
%<*code>
\LdfInit{swedish}\captionsswedish
%    \end{macrocode}
%
%    When this file is read as an option, i.e. by the |\usepackage|
%    command, \texttt{swedish} will be an `unknown' language in which
%    case we have to make it known. So we check for the existence of
%    |\l@swedish| to see whether we have to do something here.
%
% \changes{swedish-1.0c}{1991/10/29}{Removed use of \cs{@ifundefined}}
% \changes{swedish-1.1}{1992/02/16}{Added a warning when no hyphenation
%    patterns were loaded.}
% \changes{swedish-1.3d}{1994/06/26}{Now use \cs{@nopatterns} to
%    producew the warning}
%    \begin{macrocode}
\ifx\l@swedish\@undefined
    \@nopatterns{Swedish}
    \adddialect\l@swedish0\fi
%    \end{macrocode}
%
%    The next step consists of defining commands to switch to the
%    Swedish language. The reason for this is that a user might want
%    to switch back and forth between languages.
%
% \begin{macro}{\captionsswedish}
%    The macro |\captionsswedish| defines all strings used in the four
%    standard documentclasses provided with \LaTeX.
% \changes{swedish-1.0b}{1991/08/21}{removed type in definition of
%    \cs{contentsname}}
% \changes{swedish-1.0b}{1991/08/21}{added definition for \cs{enclname}}
% \changes{swedish-1.0b}{1991/08/21}{made definition of \cs{refname}
%    pluralis}
% \changes{swedish-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname}
%    and \cs{prefacename}}
% \changes{swedish-1.1}{1993/07/15}{\cs{headpagename} should be
%    \cs{pagename}}
% \changes{swedish-1.1b}{1993/09/16}{Added translations}
% \changes{swedish-1.3d}{1994/07/27}{Changed \cs{aa} to
%    \cs{csname}\texttt{ aa}\cs{endcsname}, to make \cs{uppercase} do
%    the right thing}
% \changes{swedish-1.3f}{1995/07/04}{Added \cs{proofname} for
%    AMS-\LaTeX}
%    \begin{macrocode}
\addto\captionsswedish{%
  \def\prefacename{F\"orord}%
  \def\refname{Referenser}%
  \def\abstractname{Sammanfattning}%
  \def\bibname{Litteraturf\"orteckning}%
  \def\chaptername{Kapitel}%
  \def\appendixname{Bilaga}%
  \def\contentsname{Inneh\csname aa\endcsname ll}%
  \def\listfigurename{Figurer}%
  \def\listtablename{Tabeller}%
  \def\indexname{Sakregister}%
  \def\figurename{Figur}%
  \def\tablename{Tabell}%
  \def\partname{Del}%
  \def\enclname{Bil}%
  \def\ccname{Kopia f\"or k\"annedom}%
  \def\headtoname{Till}% in letter
  \def\pagename{Sida}%
  \def\seename{se}%
%    \end{macrocode}
% \changes{swedish-1.3e}{1995/05/29}{Changed \cs{alsoname} from
%    `\texttt{se ocks\aa}'}
%    \begin{macrocode}
  \def\alsoname{se \"aven}%
%    \end{macrocode}
% \changes{swedish-1.3g}{1995/11/03}{Replaced `Proof' by its
%    translation} 
%    \begin{macrocode}
  \def\proofname{Bevis}%
  }%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dateswedish}
%    The macro |\dateswedish| redefines the command |\today| to
%    produce Swedish dates.
%    \begin{macrocode}
\def\dateswedish{%
  \def\today{%
    \number\day~\ifcase\month\or
    januari\or februari\or mars\or april\or maj\or juni\or
    juli\or augusti\or september\or oktober\or november\or
    december\fi
    \space\number\year}}
%    \end{macrocode}
% \end{macro}
%
%  \begin{macro}{\swedishhyphenmins}
%    The swedish hyphenation patterns can be used with |\lefthyphenmin|
%    set to~2 and |\righthyphenmin| set to~2.
% \changes{swedish-1.3e}{1995/06/02}{use \cs{swedishhyphenmins} to
%    store the correct values}
%    \begin{macrocode}
\def\swedishhyphenmins{\tw@\tw@}
%    \end{macrocode}
%  \end{macro}
%
% \begin{macro}{\extrasswedish}
% \changes{swedish-1.3e}{1995/05/29}{Added \cs{bbl@frenchspacing}}
% \begin{macro}{\noextrasswedish}
% \changes{swedish-1.3e}{1995/05/29}{Added \cs{bbl@nonfrenchspacing}}
%    The macro |\extrasswedish| performs all the extra definitions
%    needed for the Swedish language. The macro |\noextrasswedish| is
%    used to cancel the actions of |\extrasswedish|.
%
%    For Swedish texts |\frenchspacing| should be in effect.  We make
%    sure this is the case and reset it if necessary.
%
%    \begin{macrocode}
\addto\extrasswedish{\bbl@frenchspacing}
\addto\noextrasswedish{\bbl@nonfrenchspacing}
%    \end{macrocode}
%
%    For Swedish the \texttt{"} character is made active. This is done
%    once, later on its definition may vary.
% \changes{swedish-2.0}{1996/01/24}{Added active double quote
%    character} 
%
%    \begin{macrocode}
\initiate@active@char{"}
\addto\extrasswedish{\languageshorthands{swedish}}
\addto\extrasswedish{\bbl@activate{"}}
%\addto\noextrasswedish{\bbl@deactivate{"}}
%    \end{macrocode}
%    The ``umlaut'' accent macro |\"| is changed to lower the umlaut
%    dots. The redefinition is done with the help of |\umlautlow|.
%    \begin{macrocode}
\addto\extrasswedish{\babel@save\"\umlautlow}
\addto\noextrasswedish{\umlauthigh}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%    The code above is necessary because we need an extra active
%    character. This character is then used as indicated in
%    table~\ref{tab:swedish-quote}.
%
%    To be able to define the function of |"|, we first define a
%    couple of `support' macros.
%
%  \begin{macro}{\dq}
%    We save the original double quote character in |\dq| to keep
%    it available, the math accent |\"| can now be typed as |"|.
%    \begin{macrocode}
\begingroup \catcode`\"12
\def\x{\endgroup
  \def\@SS{\mathchar"7019 }
  \def\dq{"}}
\x
%    \end{macrocode}
%  \end{macro}
%
%    Now we can define the doublequote macros: the umlauts and {\aa},
%    \begin{macrocode}
\declare@shorthand{swedish}{"w}{\textormath{{\aa}}{\ddot w}}
\declare@shorthand{swedish}{"a}{\textormath{\"{a}}{\ddot a}}
\declare@shorthand{swedish}{"o}{\textormath{\"{o}}{\ddot o}}
\declare@shorthand{swedish}{"W}{\textormath{{\AA}}{\ddot W}}
\declare@shorthand{swedish}{"A}{\textormath{\"{A}}{\ddot A}}
\declare@shorthand{swedish}{"O}{\textormath{\"{O}}{\ddot O}}
%    \end{macrocode}
%    discretionary commands
%    \begin{macrocode}
\declare@shorthand{swedish}{"b}{\textormath{\bbl@disc b{bb}}{b}}
\declare@shorthand{swedish}{"B}{\textormath{\bbl@disc B{BB}}{B}}
\declare@shorthand{swedish}{"d}{\textormath{\bbl@disc d{dd}}{d}}
\declare@shorthand{swedish}{"D}{\textormath{\bbl@disc D{DD}}{D}}
\declare@shorthand{swedish}{"f}{\textormath{\bbl@disc f{ff}}{f}}
\declare@shorthand{swedish}{"F}{\textormath{\bbl@disc F{FF}}{F}}
\declare@shorthand{swedish}{"g}{\textormath{\bbl@disc g{gg}}{g}}
\declare@shorthand{swedish}{"G}{\textormath{\bbl@disc G{GG}}{G}}
\declare@shorthand{swedish}{"l}{\textormath{\bbl@disc l{ll}}{l}}
\declare@shorthand{swedish}{"L}{\textormath{\bbl@disc L{LL}}{L}}
\declare@shorthand{swedish}{"m}{\textormath{\bbl@disc m{mm}}{m}}
\declare@shorthand{swedish}{"M}{\textormath{\bbl@disc M{MM}}{M}}
\declare@shorthand{swedish}{"n}{\textormath{\bbl@disc n{nn}}{n}}
\declare@shorthand{swedish}{"N}{\textormath{\bbl@disc N{NN}}{N}}
\declare@shorthand{swedish}{"p}{\textormath{\bbl@disc p{pp}}{p}}
\declare@shorthand{swedish}{"P}{\textormath{\bbl@disc P{PP}}{P}}
\declare@shorthand{swedish}{"r}{\textormath{\bbl@disc r{rr}}{r}}
\declare@shorthand{swedish}{"R}{\textormath{\bbl@disc R{RR}}{R}}
\declare@shorthand{swedish}{"s}{\textormath{\bbl@disc s{ss}}{s}}
\declare@shorthand{swedish}{"S}{\textormath{\bbl@disc S{SS}}{S}}
\declare@shorthand{swedish}{"t}{\textormath{\bbl@disc t{tt}}{t}}
\declare@shorthand{swedish}{"T}{\textormath{\bbl@disc T{TT}}{T}}
%    \end{macrocode}
%    and some additional commands:
%    \begin{macrocode}
\declare@shorthand{swedish}{"-}{\penalty\@M\-\allowhyphens}
\declare@shorthand{swedish}{"|}{%
  \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
              \allowhyphens}{}}
\declare@shorthand{swedish}{""}{\hskip\z@skip}
\declare@shorthand{swedish}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{swedish}{"=}{\penalty\@M-\hskip\z@skip}
%    \end{macrocode}
%
%    The macro |\ldf@finish| takes care of looking for a
%    configuration file, setting the main language to be switched on
%    at |\begin{document}| and resetting the category code of
%    \texttt{@} to its original value.
% \changes{swedish-2.1}{1996/11/03}{Now use \cs{ldf@finish} to wrap up}
%    \begin{macrocode}
\ldf@finish{swedish}
%</code>
%    \end{macrocode}
%
%\Finale
%%
%% \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         \~}
%%
\endinput
