1 % \iffalse meta-comment
3 % Copyright 1989-2008 Johannes L. Braams and any individual authors
4 % listed elsewhere in this file. All rights reserved.
6 % This file is part of the Babel system.
7 % --------------------------------------
9 % It may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either version 1.3
11 % of this license or (at your option) any later version.
12 % The latest version of this license is in
13 % http://www.latex-project.org/lppl.txt
14 % and version 1.3 or later is part of all distributions of LaTeX
15 % version 2003/12/01 or later.
17 % This work has the LPPL maintenance status "maintained".
19 % The Current Maintainer of this work is Johannes Braams.
21 % The list of all files belonging to the Babel system is
22 % given in the file `manifest.bbl. See also `legal.bbl' for additional
25 % The list of derived (unpacked) files belonging to the distribution
26 % and covered by LPPL is defined by the unpacking scripts (with
27 % extension .ins) which are part of the distribution.
30 %%% docstring = " This file can act as a template for
31 %%% people who want to provide extra
32 %%% languages to be included in the babel
36 % Tell the \LaTeX\ system who we are and write an entry on the
39 \ProvidesFile{<language>.dtx}
41 %<code>\ProvidesLanguage{<language>}
43 %\ProvidesFile{<language>.dtx}
44 [2008/03/17 v1.6 <Language> support from the babel system]
46 %% Babel package for LaTeX version 2e
47 %% Copyright (C) 1989 -- 2008
48 %% by Johannes Braams, TeXniek
50 %% Please report errors to: J.L. Braams
51 %% babel at braams.xs4all.nl
53 % This file is part of the babel system, it provides the source code for
54 % the <Language> language definition file.
56 \documentclass{ltxdoc}
57 \newcommand*{\TeXhax}{\TeX hax}
58 \newcommand*{\babel}{\textsf{babel}}
59 \newcommand*{\langvar}{$\langle \mathit lang \rangle$}
60 \newcommand*{\note}[1]{}
61 \newcommand*{\Lopt}[1]{\textsf{#1}}
62 \newcommand*{\file}[1]{\texttt{#1}}
64 \DocInput{<language>.dtx}
68 % \GetFileInfo{<language>.dtx}
70 % \changes{v1.1}{1994/02/27}{Rearranged the file a little}
71 % \changes{v1.2}{1994/06/04}{Update for \LaTeXe}
72 % \changes{v1.3}{1995/05/13}{Update for \babel\ release 3.5}
73 % \changes{v1.4}{1996/10/30}{Update for \babel\ release 3.6}
74 % \changes{v1.5}{1997/03/18}{Update for \babel\ release 3.7}
75 % \changes{v1.6}{2004/02/20}{Update for \babel\ release 3.8}
77 % \section{The <Language> language}
79 % The file \file{\filename}\footnote{The file described in this
80 % section has version number \fileversion\ and was last revised on
81 % \filedate.} defines all the language definition macros for the
82 % <Language> languagee.
86 % The macro |\LdfInit| takes care of preventing that this file is
87 % loaded more than once, checking the category code of the
88 % \texttt{@} sign, etc.
91 \LdfInit{<language>}{captions<language>}
94 % When this file is read as an option, i.e. by the |\usepackage|
95 % command, \texttt{<language>} could be an `unknown' language in
96 % which case we have to make it known. So we check for the
97 % existence of |\l@<language>| to see whether we have to do
101 \ifx\undefined\l@<language>
102 \@nopatterns{<Language>}
103 \adddialect\l@<language>0\fi
105 % For the <Dialect> version of these definitions we just add a
106 % ``dialect''. Also, the macros |\captions<dialect>| and
107 % |\extras<dialect>| are |\let| to their \texttt{<language>}
108 % counterparts when these parts are defined.
110 \adddialect\l@<dialect>\l@<language>
112 % The next step consists of defining commands to switch to (and
113 % from) the <Language> language.
115 % Now we declare the |<attrib>| language attribute.
117 \bbl@declare@ttribute{<language>}{<attrib>}{%
119 % This code adds the expansion of |\extras<attrib><language>| to
120 % |\extras<language>|.
122 \expandafter\addto\expandafter\extras<language>
123 \expandafter{\extras<attrib><language>}%
124 \let\captions<language>\captions<attrib><language>
128 % \begin{macro}{\<language>hyphenmins}
129 % This macro is used to store the correct values of the hyphenation
130 % parameters |\lefthyphenmin| and |\righthyphenmin|.
132 \providehyphenmins{<language>}{\tw@\thr@@}
136 % \begin{macro}{\captions<language>}
137 % The macro |\captions<language>| defines all strings used in the
138 % four standard documentclasses provided with \LaTeX.
140 \def\captions<language>{}
144 % \begin{macro}{\captions<dialect>}
146 \let\captions<dialect>\captions<language>
150 % \begin{macro}{\date<language>}
151 % The macro |\date<language>| redefines the command |\today| to
152 % produce <Language> dates.
154 \def\date<language>{%
159 % \begin{macro}{\date<dialect>}
160 % The macro |\date<dialect>| redefines the command |\today| to
161 % produce <Dialect> dates.
168 % \begin{macro}{\extras<language>}
169 % \begin{macro}{\noextras<language>}
170 % The macro |\extras<language>| will perform all the extra
171 % definitions needed for the <Language> language. The macro
172 % |\noextras<language>| is used to cancel the actions of
173 % |\extras<language>|. For the moment these macros are empty but
174 % they are defined for compatibility with the other
175 % language definition files.
178 \addto\extras<language>{}
179 \addto\noextras<language>{}
184 % \begin{macro}{\extras<dialect>}
185 % \begin{macro}{\noextras<dialect>}
186 % Also for the ``<dialect>'' variant no extra definitions are
187 % needed at the moment.
189 \let\extras<dialect>\extras<language>
190 \let\noextras<dialect>\noextras<language>
195 % The macro |\ldf@finish| takes care of looking for a
196 % configuration file, setting the main language to be switched on
197 % at |\begin{document}| and resetting the category code of
198 % \texttt{@} to its original value.
200 \ldf@finish{<language>}
207 %% {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
208 %% 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
209 %% Digits \0\1\2\3\4\5\6\7\8\9
210 %% Exclamation \! Double quote \" Hash (number) \#
211 %% Dollar \$ Percent \% Ampersand \&
212 %% Acute accent \' Left paren \( Right paren \)
213 %% Asterisk \* Plus \+ Comma \,
214 %% Minus \- Point \. Solidus \/
215 %% Colon \: Semicolon \; Less than \<
216 %% Equals \= Greater than \> Question mark \?
217 %% Commercial at \@ Left bracket \[ Backslash \\
218 %% Right bracket \] Circumflex \^ Underscore \_
219 %% Grave accent \` Left brace \{ Vertical bar \|
220 %% Right brace \} Tilde \~}