1 The Norwegian language

The file norsk.dtx^{1} defines all the language definition macros for the Norwegian language as well as for a new spelling variant ‘nynorsk’ for this language.

For this language currently no special definitions are needed or available.

The macro \LdfInit takes care of preventing that this file is loaded more than once, checking the category code of the @ sign, etc.

1 ⟨∗code⟩

 2 \LdfInit\CurrentOption{captions\CurrentOption}

When this file is read as an option, i.e. by the \usepackage command, norsk will be an ‘unknown’ language in which case we have to make it known. So we check for the existence of \l@norsk to see whether we have to do something here.

 3 \ifx\l@norsk\@undefined
 4  \@nopatterns{Norsk}
 5  \adddialect\l@norsk0\fi

\norskhyphenmins The Norwegian hyphenation patterns can be used with \lefthyphenmin set to 1 and \righthyphenmin set to 2. This is true for both ‘versions’ of the language.

 6 \@namedef{\CurrentOption hyphenmins}{\@ne\tw@}

Now we have to decide which version of the captions should be made available. This can be done by checking the contents of \CurrentOption.

 7 \def\bbl@tempa{norsk}
 8 \ifx\CurrentOption\bbl@tempa

The next step consists of defining commands to switch to (and from) the Norwegian language.

\captionsnorsk The macro \captionsnorsk defines all strings used in the four standard documentclasses provided with L^{A}TEX.

 9 \def\captionsnorsk{%
10  \def\prefacename{Forord}%
11  \def\refname{Referanser}%
12  \def\abstractname{Sammendrag}%
13  \def\bibname{Bibliografi}%      or Litteraturoversikt
14 %                                   or Litteratur or Referanser
15  \def\chaptername{Kapittel}%
16  \def\appendixname{Tillegg}%    or Appendiks
17  \def\contentsname{Innhold}%
18  \def\listfigurename{Figurer}%  or Figurliste
19  \def\listtablename{Tabeller}%  or Tabelliste
20  \def\indexname{Register}%
21  \def\figurename{Figur}%
22  \def\tablename{Tabell}%
23  \def\partname{Del}%
24  \def\enclname{Vedlegg}%
25  \def\ccname{Kopi sendt}%
26  \def\headtoname{Til}% in letter

1The file described in this section has version number v1.2h and was last revised on 1996/12/23. Contributions were made by Haavard Helstrup (HAAVARD@CERNVM) and Alv Kjetil Holme (HOLMEA@CERNVM); the ‘nynorsk’ variant has been supplied by Per Steinar Iversen iversen@vxcern.cern.ch) and Terje Engeset Petterst (TERJEEP@VSFYS1.FI.UIB.NO).

27  \def\pagename{Side}%
28  \def\seename{Se}%
29  \def\alsoname{Se ogs\aa{}}%
30  \def\proofname{Bevis}%

31 }

32 \else

For the ‘nynorsk’ version of these definitions we just add a “dialect”.

33 \adddialect\l@nynorsk\l@norsk

\captionsnynorsk The macro \captionsnynorsk defines all strings used in the four standard documentclasses provided with L^{A}TEX, but using a different spelling than in the com-

mand \captionsnorsk.
34 \def\captionsnynorsk{%
35  \def\prefacename{Forord}%
36  \def\refname{Referansar}%
37  \def\abstractname{Samandrag}%
38  \def\bibname{Litteratur}%     or Litteraturoversyn
39 %                           %    or Referansar
40  \def\chaptername{Kapittel}%
41  \def\appendixname{Tillegg}%   or Appendiks
42  \def\contentsname{Innhald}%
43  \def\listfigurename{Figurar}% or Figurliste
44  \def\listtablename{Tabellar}% or Tabelliste
45  \def\indexname{Register}%
46  \def\figurename{Figur}%
47  \def\tablename{Tabell}%
48  \def\partname{Del}%
49  \def\enclname{Vedlegg}%
50  \def\ccname{Kopi sendt}%
51  \def\headtoname{Til}% in letter
52  \def\pagename{Side}%
53  \def\seename{Sj\aa{}}%
54  \def\alsoname{Sj\aa{} ogs\aa{}}%
55  \def\proofname{Bevis}%

56 }

57 \fi

\datenorsk The macro \datenorsk redefines the command \today to produce Norwegian dates.

58 \@namedef{date\CurrentOption}{%
59 \def\today{\number\day.~\ifcase\month\or
60  januar\or februar\or mars\or april\or mai\or juni\or
61  juli\or august\or september\or oktober\or november\or desember
62  \fi
63  \space\number\year}}

\extrasnorsk \extrasnynorsk The macro \extrasnorsk will perform all the extra definitions needed for the Norwegian language. The macro \noextrasnorsk is used to cancel the actions of

\extrasnorsk.

Norwegian typesetting requires \frencspacing to be in effect.

64 \@namedef{extras\CurrentOption}{\bbl@frenchspacing}
65 \@namedef{noextras\CurrentOption}{\bbl@nonfrenchspacing}

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 @ to its original value.

66 \ldf@finish\CurrentOption

67 ⟨/code⟩