diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-15 23:01:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-15 23:01:23 +0000 |
commit | b156cde1780f6df554a080befab5b52305c44081 (patch) | |
tree | 128cae84e9a13f718f56d82882398c542facaf0d /Master/texmf-dist/source/generic/babel-german/ngermanb.dtx | |
parent | e1a3413e3ea38ea17e2959c1e4faa6a7b713b574 (diff) |
babel-german (15dec13)
git-svn-id: svn://tug.org/texlive/trunk@32421 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/babel-german/ngermanb.dtx')
-rw-r--r-- | Master/texmf-dist/source/generic/babel-german/ngermanb.dtx | 374 |
1 files changed, 290 insertions, 84 deletions
diff --git a/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx b/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx index 481a274d284..80b61927ff4 100644 --- a/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx +++ b/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx @@ -1,10 +1,16 @@ % \iffalse meta-comment % -% Copyright 1989-2008 Johannes L. Braams and any individual authors -% listed elsewhere in this file. All rights reserved. +% File `ngermanb.dtx' +% +% Copyright 1989--2013 Johannes L. Braams +% Bernd Raichle +% Walter Schmidt, +% Juergen Spitzmueller +% All rights reserved. % -% This file is part of the Babel system. -% -------------------------------------- +% This file is part of the babel-german bundle, +% an extension to the Babel system. +% ---------------------------------------------- % % It may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -16,17 +22,13 @@ % % This work has the LPPL maintenance status "maintained". % -% The Current Maintainer of this work is Johannes Braams. -% -% The list of all files belonging to the Babel system is -% given in the file `manifest.bbl. See also `legal.bbl' for additional -% information. -% -% The list of derived (unpacked) files belonging to the distribution -% and covered by LPPL is defined by the unpacking scripts (with -% extension .ins) which are part of the distribution. +% The Current Maintainer of this work is Juergen Spitzmueller. +% +% This file is based on german.tex version 2.5e +% by Bernd Raichle, Hubert Partl et.al. +% % \fi -% \CheckSum{266} +% \CheckSum{294} % % \iffalse % Tell the \LaTeX\ system who we are and write an entry on the @@ -34,37 +36,30 @@ %<*dtx> \ProvidesFile{ngermanb.dtx} %</dtx> -%<code>\ProvidesLanguage{ngermanb} +%<austrian>\ProvidesLanguage{naustrian} +%<german>\ProvidesLanguage{ngerman} +%<swiss>\ProvidesLanguage{nswissgerman} +%<germanb>\ProvidesLanguage{ngermanb} %\fi %\ProvidesFile{ngermanb.dtx} - [2008/07/06 v2.6n new German support from the babel system] + [2013/12/13 v2.7 German support for babel (new orthography)] %\iffalse -%% File `ngermanb.dtx' -%% Babel package for LaTeX version 2e -%% Copyright (C) 1989 - 2008 -%% by Johannes Braams, TeXniek -% -%% new Germanb Language Definition File -%% Copyright (C) 1989 - 2008 -%% by Bernd Raichle raichle at azu.Informatik.Uni-Stuttgart.de -%% Johannes Braams, TeXniek, -%% Walter Schmidt. -% This file is based on german.tex version 2.5e -% by Bernd Raichle, Hubert Partl et.al. -% -%% Please report errors to: J.L. Braams -%% babel at braams.xs4all.nl % %<*filedriver> \documentclass{ltxdoc} +\usepackage{bera} +\usepackage{url} \font\manual=logo10 % font used for the METAFONT logo, etc. \newcommand*\MF{{\manual META}\-{\manual FONT}} \newcommand*\TeXhax{\TeX hax} \newcommand*\babel{\textsf{babel}} +\newcommand*\Babel{\textsf{Babel}} \newcommand*\langvar{$\langle \it lang \rangle$} \newcommand*\note[1]{} \newcommand*\Lopt[1]{\textsf{#1}} \newcommand*\file[1]{\texttt{#1}} +\GlossaryMin = .33\textheight + \begin{document} \DocInput{ngermanb.dtx} \end{document} @@ -72,30 +67,136 @@ %\fi % \GetFileInfo{ngermanb.dtx} % +%\RecordChanges +% +% \changes{ngermanb-2.7}{2013/12/13}{Added support for variety \texttt{nswissgerman}.} +% \changes{ngermanb-2.7}{2013/12/13}{Revised \texttt{naustrian} support.} +% \changes{ngermanb-2.7}{2013/12/13}{Revised documentation: Turn the \babel{} +% manual chapter into a self-enclosed manual.} +% % \changes{ngermanb-2.6f}{1999/03/24}{Renamed from \file{germanb.ldf}; % language names changed from \texttt{german} and \texttt{austrian} % to \texttt{ngerman} and \texttt{naustrian}.} % -% \section{The German language -- new orthography} +% \title{Babel support for the German language (new~orthography)} +% \author{Johannes Braams \and Bernd Raichle \and Walter Schmidt \and J\"urgen Spitzm\"uller\thanks{% +% Current maintainer. Address correspondence to juergen (at) spitzmueller (dot) org.}} +% \date{\fileversion\ (\filedate)} +% \maketitle +% +% \begin{abstract} +% \noindent This manual documents the \babel\ language definition file \file{ngermanb.ldf} +% for German (new orthography). +% The file is part of the \textsf{babel-german} bundle. +% \end{abstract} +% +% \section{Aim and usage} +% +% The file \file{ngermanb.ldf} provides the \babel\ package with all language +% definition macros (language specific strings and settings) for the German +% language, including the Austrian and Swiss varieties of German. Furthermore, +% it assures that the correct hyphenation patterns for the respective language +% or variety are used.\footnote{The file \file{ngermanb.ldf} started as a +% re-implementation of the package \file{ngerman.sty} by Bernd Raichle (cf. \cite{gerdoc}), +% which itself builds on \file{german.sty}, originally developed by Hubert Partl +% (cf. \cite{HP}) and later maintained by Bernd Raichle as well. +% The re-implementation was done by Johannes Braams.} +% The file adheres to the reformed (1996\,ff.) orthography. +% For traditional (1901--1996) German orthography support, +% please refer to the complementary |germanb.ldf| file. +% +% In order to use the language definitions provided here, you need to use +% the \babel\ package and pass the respective language name as an +% option, either of +% +% \begin{itemize} +% \setlength{\itemsep}{0pt} +% \item |\usepackage[ngerman]{babel}| +% \item |\usepackage[naustrian]{babel}| +% \item |\usepackage[nswissgerman]{babel}| +% \end{itemize} +% Please consult the \babel\ manual \cite{babel} for details. +% +% \section{Shorthands} +% +% For all three varieties of German, the character |"| is made active +% in order to provide some shorthand macros. +% The shorthands provide access to some frequently +% used special characters as well as some further possibilities +% to control hyphenation, to break lines and to deal with ligatures. +% Table~\ref{tab:german-quote} provides an overview of the shorthands +% that are provided by \file{ngermanb.ldf}. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{.75\textwidth}} +% |"a| & umlaut \"a (shorthand for |\"a|). Similar shorthands are +% available for all other lower- and uppercase +% vowels (umlauts: |"a|, |"o|, |"u|, |"A|, |"O|, +% |"U|, as well as tremata: |"e|, |"i|, |"E|, |"I|).\\ +% |"s| & German \ss{} (shorthand for |\ss{}|). \\ +% |"z| & German \ss{} (shorthand for |\ss{}|). \\ +% |"S| & |SS| (|\uppercase{"s}|, since \ss{} must be written +% as SS in uppercase writing). \\ +% |"Z| & |SZ| (|\uppercase{"z}|). An alternative to |"S| common +% in traditional spelling, where \ss{} could also +% be written as SZ instead of SS in uppercase writing. +% Note that, with reformed orthography, the SZ +% variant has been deprecated in favour of SS only. \\ +% \verb="|= & disable ligature at this position +% (e.\,g. \verb=Auf"|lage=). \\ +% |"-| & an additional breakpoint that does still +% allow for hyphenation at the breakpoints preset in +% the hyphenation patterns (as opposed to |\-|). \\ +% |""| & a breakpoint that does not output a hyphen sign +% if the line break is performed (useful for compound +% words with hyphen, e.\,g.\ |(Un-)""Sinn|). \\ +% |"~| & a compound word mark without a breakpoint. Useful for +% cases such as |bergauf und "~ab|. \\ +% |"=| & a compound word mark with a breakpoint, allowing +% for hyphenation at the other points preset in the +% hyphenation patterns (as opposed to plain |-|). \\ +% |"`| & German left double quotes (i.\,e. ,,). \\ +% |"'| & German right double quotes (i.\,e. ``). \\ +% |"<| & French/Swiss left double quotes (i.\,e. <<). \\ +% |">| & French/Swiss right double quotes (i.\,e. >>). \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{ngermanb.ldf}}\label{tab:german-quote} +% \end{center} +% \end{table} +% +% Table~\ref{tab:more-quote} lists some macros for quotation marks +% that might be used as an alternative to the quotation mark shorthands +% provided by \file{ngermanb.ldf}. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |\glqq| & German left double quotes (i.\,e. ,,). \\ +% |\grqq| & German right double quotes (i.\,e. ``). \\ +% |\glq| & German left single quotes (i.\,e. ,). \\ +% |\grq| & German right single quotes (i.\,e. `). \\ +% |\flqq| & French/Swiss left double quotes (i.\,e. <<). \\ +% |\frqq| & French/Swiss right double quotes (i.\,e. >>).\\ +% |\flq| & French/Swiss left single quotes (i.\,e. \guilsinglleft). \\ +% |\frq| & French/Swiss right single quotes (i.\,e. \guilsinglright). \\ +% |\dq| & the original quotation mark character (i.\,e. |"|). \\ +% \end{tabular} +% \caption{Alternative commands for quotation marks (provided by \babel)}\label{tab:more-quote} +% \end{center} +% \end{table} % -% The file \file{\filename}\footnote{The file described in this -% section has version number \fileversion\ and was last revised on -% \filedate.} defines all the language definition macros for the -% German language with the `new orthography' introduced in -% August 1998. This includes also the Austrian dialect of this -% language. -% -% As with the `traditional' German orthography, -% the character |"| is made active, and -% the commands in table~\ref{tab:german-quote} can be used, except -% for |"ck| and |"ff| etc., which are no longer required. +% \StopEventually{} % -% The internal language names are |ngerman| and |naustrian|. % -% \StopEventually{} +% \section{Implementation} % -% When this file was read through the option \Lopt{ngermanb} we make -% it behave as if \Lopt{ngerman} was specified. +% \subsection{General settings} +% +% If \file{ngermanb.ldf} is read via the \babel\ option \Lopt{ngermanb}, +% we make it behave as if \Lopt{ngerman} was specified. +% \iffalse +%<*germanb> +% \fi % \begin{macrocode} \def\bbl@tempa{ngermanb} \ifx\CurrentOption\bbl@tempa @@ -107,13 +208,12 @@ % loaded more than once, checking the category code of the % \texttt{@} sign, etc. % \begin{macrocode} -%<*code> \LdfInit\CurrentOption{captions\CurrentOption} % \end{macrocode} % -% When this file is read as an option, i.e., by the |\usepackage| +% If \file{ngermanb.ldf} is read as an option, i.e., by the |\usepackage| % command, \texttt{ngerman} will be an `unknown' language, so we -% have to make it known. So we check for the existence of +% have to make it known. We check for the existence of % |\l@ngerman| to see whether we have to do something here. % % \begin{macrocode} @@ -123,26 +223,34 @@ \fi % \end{macrocode} % -% For the Austrian version of these definitions we just add another -% language. +% We set \texttt{naustrian} and \texttt{nswissgerman} as dialects +% of \texttt{ngerman}, since they use the same hyphenation patterns +% than \texttt{ngerman}. % \begin{macrocode} \adddialect\l@naustrian\l@ngerman +\adddialect\l@nswissgerman\l@ngerman % \end{macrocode} % -% The next step consists of defining commands to switch to (and -% from) the German language. +% \subsection{Language-specific strings (captions)} +% +% The next step consists of defining macros that provide language specific strings +% and settings. % % \begin{macro}{\captionsngerman} -% \begin{macro}{\captionsnaustrian} -% \changes{ngermab-v2.6n}{2008/07/06}{Corrected typo +% \changes{ngermanb-2.6n}{2008/07/06}{Corrected typo % \cs{captionnsgerman}} -% Either the macro |\captionsngerman| or the macro -% |\captionsnaustrian| will define all strings used in the four -% standard document classes provided with \LaTeX. -% +% The macro |\captionsngerman| defines all strings used in the four +% standard document classes provided with \LaTeX\ for German. +% +% \changes{ngermanb-2.7}{2013/12/13}{Split \cs{captionsngerman} from +% \cs{captionsnaustrian} and +% \cs{captionsnswissgerman}.} +% \changes{ngermanb-2.7}{2013/12/13}{Changed \cs{enclname} in +% \texttt{naustrian} to +% \emph{Beilage(n)}.} % \changes{ngermanb-2.6k}{2000/09/20}{Added \cs{glossaryname}} % \begin{macrocode} -\@namedef{captions\CurrentOption}{% +\@namedef{captionsngerman}{% \def\prefacename{Vorwort}% \def\refname{Literatur}% \def\abstractname{Zusammenfassung}% @@ -156,7 +264,7 @@ \def\figurename{Abbildung}% \def\tablename{Tabelle}% % oder: Tafel \def\partname{Teil}% - \def\enclname{Anlage(n)}% % oder: Beilage(n) + \def\enclname{Anlage(n)}% \def\ccname{Verteiler}% % oder: Kopien an \def\headtoname{An}% \def\pagename{Seite}% @@ -167,8 +275,31 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}{\captionsnaustrian} +% The macro |\captionsnaustrian| builds on |\captionsngerman|, but +% redefines some strings following Austrian conventions (for the +% respective variants, cf. \cite{vwb}). +% \begin{macrocode} +\@namedef{captionsnaustrian}{% + \@nameuse{captionsngerman} + \def\enclname{Beilage(n)}% + } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\captionsnswissgerman} +% The macro |\captionsnswissgerman| builds on |\captionsngerman|, but +% redefines some strings following Swiss conventions (for the +% respective variants, cf. \cite{vwb}). +% \begin{macrocode} +\@namedef{captionsnswissgerman}{% + \@nameuse{captionsngerman} + \def\enclname{Beilage(n)}% + } +% \end{macrocode} % \end{macro} % +% \subsection{Date localizations} +% % \begin{macro}{\datengerman} % The macro |\datengerman| redefines the command % |\today| to produce German dates. @@ -181,25 +312,45 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\dateanustrian} +% \begin{macro}{\datenswissgerman} +% \changes{ngermanb-2.7}{2013/12/13}{Added \cs{datenswissgerman}.} +% The macro |\datenswissgerman| does the same for Swiss German dates. +% The result is identical to German. +% \begin{macrocode} +\def\datenswissgerman{\def\today{\number\day.~\month@ngerman + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datenaustrian} % The macro |\datenaustrian| redefines the command -% |\today| to produce Austrian version of the German dates. +% |\today| to produce Austrian versions of the German dates. +% Here, the naming of January (,,J\"anner``) differs from the +% other German varieties. % \begin{macrocode} \def\datenaustrian{\def\today{\number\day.~\ifnum1=\month J\"anner\else \month@ngerman\fi \space\number\year}} % \end{macrocode} % \end{macro} % +% \subsection{Extras} +% % \begin{macro}{\extrasngerman} % \begin{macro}{\extrasnaustrian} +% \begin{macro}{\extrasnswissgerman} % \begin{macro}{\noextrasngerman} % \begin{macro}{\noextrasnaustrian} -% Either the macro |\extrasngerman| or the macros |\extrasnaustrian| -% will perform all the extra definitions needed for the German -% language. The macro |\noextrasngerman| is used to cancel the -% actions of |\extrasngerman|. -% -% For German (as well as for Dutch) the \texttt{"} character is +% \begin{macro}{\noextrasnswissgerman} +% The macros |\extrasngerman|, |\extrasnaustrian| +% and |\extrasnswissgerman|, respectively, will perform all the extra +% definitions needed for the German language or the respective +% variety. The macro |\noextrasngerman| is used to cancel the +% actions of |\extrasngerman|. |\noextrasnaustrian| and +% |\noextrasnswissgerman| behave analoguously. +% \changes{ngermanb-2.7}{2013/12/13}{Added \cs{extrasnswissgerman} +% and \cs{noextrasnswissgerman}.} +% +% For all German varieties, the character \texttt{"} is % made active. This is done once, later on its definition may vary. % \begin{macrocode} \initiate@active@char{"} @@ -208,11 +359,14 @@ \expandafter\addto\csname extras\CurrentOption\endcsname{% \bbl@activate{"}} % \end{macrocode} -% Don't forget to turn the shorthands off again. +% Turn the shorthands off again outside of German. % \changes{ngermanb-2.6j}{1999/12/16}{Deactivate shorthands ouside of % German} +% \changes{ngermanb-2.7}{2013/12/13}{Deactivate shorthands also outside of +% \texttt{naustrian} and \texttt{nswissgerman}.} % \begin{macrocode} -\addto\noextrasngerman{\bbl@deactivate{"}} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@deactivate{"}} % \end{macrocode} % % @@ -231,17 +385,22 @@ % \begin{macrocode} \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\"\umlautlow} -\@namedef{noextras\CurrentOption}{\umlauthigh} +% \end{macrocode} +% \changes{ngermanb-2.7}{2013/12/13}{Do not use \cs{@namedef} when +% \cs{noextras} is already defined and should not be overwritten.} +% \begin{macrocode} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \umlauthigh} % \end{macrocode} % The current -% version of the `new' German hyphenation patterns (\file{dehyphn.tex} +% version of the `new' German hyphenation patterns (\file{dehyphn.tex}) % is to be used with |\lefthyphenmin| and |\righthyphenmin| set to~2. % \changes{ngermanb-2.6k}{2000/09/22}{Now use \cs{providehyphenmins} to % provide a default value} % \begin{macrocode} \providehyphenmins{\CurrentOption}{\tw@\tw@} % \end{macrocode} -% For German texts we need to make sure that |\frenchspacing| is +% For German texts we need to assure that |\frenchspacing| is % turned on. % \changes{ngermanb-2.6m}{2001/01/26}{Turn frenchspacing on, as in % \texttt{german.sty}} @@ -255,17 +414,21 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % -% The code above is necessary because we need an extra active +% \subsection{Active characters, macros \& shorthands} +% +% The following code is necessary because we need an extra active % character. This character is then used as indicated in % table~\ref{tab:german-quote}. % -% To be able to define the function of |"|, we first define a +% In order 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 +% We save the original double quotation mark character in |\dq| to keep % it available, the math accent |\"| can now be typed as |"|. % \begin{macrocode} \begingroup \catcode`\"12 @@ -276,7 +439,7 @@ % \end{macrocode} % \end{macro} % -% Now we can define the doublequote macros: the umlauts, +% Now we can define the doublequote shorthands: the umlauts, % \begin{macrocode} \declare@shorthand{ngerman}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}} \declare@shorthand{ngerman}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}} @@ -285,7 +448,7 @@ \declare@shorthand{ngerman}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}} \declare@shorthand{ngerman}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}} % \end{macrocode} -% tremas, +% tremata, % \begin{macrocode} \declare@shorthand{ngerman}{"e}{\textormath{\"{e}}{\ddot e}} \declare@shorthand{ngerman}{"E}{\textormath{\"{E}}{\ddot E}} @@ -293,21 +456,21 @@ {\ddot\imath}} \declare@shorthand{ngerman}{"I}{\textormath{\"{I}}{\ddot I}} % \end{macrocode} -% german es-zet (sharp s), +% German \ss{}, % \begin{macrocode} \declare@shorthand{ngerman}{"s}{\textormath{\ss}{\@SS{}}} \declare@shorthand{ngerman}{"S}{\SS} \declare@shorthand{ngerman}{"z}{\textormath{\ss}{\@SS{}}} \declare@shorthand{ngerman}{"Z}{SZ} % \end{macrocode} -% german and french quotes, +% German and French/Swiss quotation marks, % \begin{macrocode} \declare@shorthand{ngerman}{"`}{\glqq} \declare@shorthand{ngerman}{"'}{\grqq} \declare@shorthand{ngerman}{"<}{\flqq} \declare@shorthand{ngerman}{">}{\frqq} % \end{macrocode} -% and some additional commands: +% and some additional commands (hyphenation and ligature control): % \begin{macrocode} \declare@shorthand{ngerman}{"-}{\nobreak\-\bbl@allowhyphens} \declare@shorthand{ngerman}{"|}{% @@ -335,8 +498,51 @@ % \texttt{@} to its original value. % \begin{macrocode} \ldf@finish\CurrentOption -%</code> % \end{macrocode} +% \iffalse +%</germanb> +% \fi +% +% \subsection{\file{naustrian.ldf}, \file{ngerman.ldf} and \file{nswissgerman.ldf}} +% +% \changes{ngermanb-2.7}{2013/12/13}{Generate portmanteau files \file{naustrian.ldf}, +% \file{ngerman.ldf} and \file{nswissgerman.ldf}.} +% +% \Babel\ expects a \file{\langvar{}.ldf} file for each \langvar. So we create portmanteau +% ldf files for \texttt{naustrian}, \texttt{ngerman} and \texttt{nswissgerman}.\footnote{% +% For some \texttt{naustrian} and \texttt{ngerman}, this is not strictly necessary, +% since \babel\ provides aliases for these languages (pointing to \texttt{ngermanb}). +% However, since \babel\ does not officially support these aliases anymore after +% the language definition files have been separated from the core, we provide +% the whole range of ldf files for the sake of completeness.} These files themselves +% only load \file{ngermanb.ldf}, which does the real work: +% +% \iffalse +%<*austrian|german|swiss> +% \fi +% \begin{macrocode} +\input ngermanb.ldf\relax +% \end{macrocode} +% \iffalse +%</austrian|german|swiss> +% \fi +% +%\PrintChanges +% +% \begin{thebibliography}{9} +% \bibitem{vwb} Ammon, Ulrich et al.: +% \emph{Variantenw\"orterbuch des Deutschen. Die Standardsprache in \"Osterreich, der Schweiz +% und Deutschland sowie in Liechtenstein, Luxemburg, Ostbelgien und S\"udtirol.} +% Berlin, New York: De Gruyter. +% \bibitem{babel} Braams, Johannes and Bezos, Javier: +% \emph{Babel}. +% \url{http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf}. +% \bibitem{HP} Partl, Hubert: +% \emph{German \TeX}, \emph{TUGboat} 9 (1988) \#1, p.~70--72. +% \bibitem{gerdoc} Raichle, Bernd: +% \emph{Kurzbeschreibung german.sty und ngerman.sty (Version 2.5)}. +% \url{http://mirrors.ctan.org/language/german/gerdoc.pdf}. +% \end{thebibliography} % % \Finale %% |