summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/generic/babel-german/ngermanb.dtx')
-rw-r--r--Master/texmf-dist/source/generic/babel-german/ngermanb.dtx177
1 files changed, 99 insertions, 78 deletions
diff --git a/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx b/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx
index 04f75ba8cb9..4e305683df7 100644
--- a/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx
+++ b/Master/texmf-dist/source/generic/babel-german/ngermanb.dtx
@@ -28,7 +28,7 @@
% by Bernd Raichle, Hubert Partl et.al.
%
% \fi
-% \CheckSum{370}
+% \CheckSum{365}
%
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
@@ -42,7 +42,7 @@
%<germanb>\ProvidesLanguage{ngermanb}
%\fi
%\ProvidesFile{ngermanb.dtx}
- [2016/11/01 v2.8 German support for babel (new orthography)]
+ [2016/11/02 v2.9 German support for babel (new orthography)]
%\iffalse
%
%<*filedriver>
@@ -54,13 +54,16 @@
\usepackage{array}
\usepackage{booktabs}
\usepackage[tableposition=top]{caption}
+\usepackage{marginnote}
\newcommand*\TeXhax{\TeX hax}
\newcommand*\babel{\textsf{babel}}
\newcommand*\Babel{\textsf{Babel}}
\newcommand*\langvar{$\langle \it lang \rangle$}
+\newcommand*\graph[1]{$\langle$#1$\rangle$}
\newcommand*\note[1]{}
\newcommand*\Lopt[1]{\textsf{#1}}
\newcommand*\file[1]{\texttt{#1}}
+\newcommand*\newfeature[1]{\marginnote{\footnotesize New feature\\in v.\,#1!}}
\GlossaryMin = .33\textheight
\begin{document}
@@ -72,9 +75,6 @@
%
%\RecordChanges
%
-% \changes{Version 2.7b}{2014-10-10}{Omit warn­ing about miss­ing swiss­ger­man pat­terns
-% when \texttt{nswissgerman} is not re­quested.}
-%
% \changes{Version 2.7}{2013/12/13}{Added support for variety \texttt{nswissgerman}.}
% \changes{Version 2.7}{2013/12/13}{Revised \texttt{naustrian} support.}
% \changes{Version 2.7}{2013/12/13}{Revised documentation: Turn the \babel{}
@@ -86,7 +86,7 @@
%
% \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.}}
+% Current maintainer. Please report issues via \protect\url{https://github.com/jspitz/babel-german}.}}
% \date{\fileversion\ (\filedate)}
% \maketitle
%
@@ -138,59 +138,65 @@
% by \file{ngermanb.ldf}}\label{tab:german-quote}
% \begin{tabular}{l>{\raggedright}p{.9\textwidth}}
% \toprule
-% |"a| & umlaut \"a (shorthand for |\"a|). Similar shorthands are
+% |"a| & Umlaut \graph{\"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|). \tabularnewline
-% |"s| & German \ss{} (shorthand for |\ss{}|). \tabularnewline
-% |"z| & German \ss{} (shorthand for |\ss{}|). \tabularnewline
-% |"S| & |SS| (|\uppercase{"s}|, since \ss{} must be written
-% as SS in uppercase writing). \tabularnewline
-% |"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. \tabularnewline
-% \verb="|= & disable ligature at this position
-% (e.\,g. \verb=Auf"|lage=). \tabularnewline
-% |"-| & an additional breakpoint that does still
-% allow for hyphenation at the breakpoints preset in
+% |"U|; tremata: |"e|, |"i|, |"E|, |"I|). \tabularnewline
+% |"s| & German \graph{\ss} (shorthand for |\ss{}|). \tabularnewline
+% |"z| & German \graph{\ss} (shorthand for |\ss{}|).
+% The difference to |"s| is the uppercase version. \tabularnewline
+% |"S| & |\uppercase{"s}|, typeset as \graph{SS}(\graph{\ss}
+% must be written as \graph{SS} in uppercase writing). \tabularnewline
+% |"Z| & |\uppercase{"z}|, typeset as \graph{SZ}. In traditional
+% spelling, \graph{\ss} could also be written as \graph{SZ}
+% instead of \graph{SS} in uppercase writing. Note that,
+% with reformed orthography, the \graph{SZ} variant has
+% been deprecated in favour of \graph{SS} only. \tabularnewline
+% \verb="|= & Disable ligature at this position (e.\,g., at morpheme
+% boundaries, as in \verb=Auf"|lage=). \tabularnewline
+% |"-| & An additional breakpoint that does still
+% allow for hyphenation at the breakpoints preset in
% the hyphenation patterns (as opposed to |\-|). \tabularnewline
-% |""| & 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|). \tabularnewline
-% |"~| & a compound word mark without a breakpoint. Useful for
-% cases such as |bergauf und "~ab|. \tabularnewline
-% |"=| & a compound word mark with a breakpoint, allowing
+% |""| & A breakpoint that does not output a hyphen if the line
+% break is performed (useful for compound words with
+% hyphen, e.\,g., |(Un-)""Sinn|). \tabularnewline
+% |"~| & An explicit hyphen without a breakpoint. Useful for
+% cases where the hyphen should stick at the following
+% word, e.\,g., |bergauf und "~ab| . \tabularnewline
+% |"=| & An explicit hyphen with a breakpoint, allowing
% for hyphenation at the other points preset in the
-% hyphenation patterns (as opposed to plain |-|). \tabularnewline
-% |"`| & German left double quotes (i.\,e. ,,). \tabularnewline
-% |"'| & German right double quotes (i.\,e. ``). \tabularnewline
-% |"<| & French/Swiss left double quotes (i.\,e. <<). \tabularnewline
-% |">| & French/Swiss right double quotes (i.\,e. >>). \tabularnewline
+% hyphenation patterns (as opposed to plain |-|);
+% useful for long compounds. \tabularnewline
+% |"/| & \newfeature{2.9}A slash that allows for a linebreak.
+% As opposed to |\slash{}|, hyphenation at the breakpoints
+% preset in the hyphenation patterns is still allowed. \tabularnewline
+% |"`| & German left double quotes \graph{,,}. \tabularnewline
+% |"'| & German right double quotes \graph{``}. \tabularnewline
+% |"<| & French/Swiss left double quotes \graph{<<}. \tabularnewline
+% |">| & French/Swiss right double quotes \graph{>>}. \tabularnewline
% \bottomrule
% \end{tabular}
% \end{center}
% \end{table}
%
-% Table~\ref{tab:more-quote} lists some macros for quotation marks
+% Table~\ref{tab:more-quote} lists some \babel\ macros for quotation marks
% that might be used as an alternative to the quotation mark shorthands
% provided by \file{ngermanb.ldf}.
% \begin{table}[!h]
% \begin{center}
% \small
% \caption{Alternative commands for quotation marks (provided by \babel)}\label{tab:more-quote}
-% \begin{tabular}{lp{9cm}}
+% \begin{tabular}{lp{.88\textwidth}}
% \toprule
-% |\glqq| & German left double quotes (i.\,e. ,,). \tabularnewline
-% |\grqq| & German right double quotes (i.\,e. ``). \tabularnewline
-% |\glq| & German left single quotes (i.\,e. ,). \tabularnewline
-% |\grq| & German right single quotes (i.\,e. `). \tabularnewline
-% |\flqq| & French/Swiss left double quotes (i.\,e. <<). \tabularnewline
-% |\frqq| & French/Swiss right double quotes (i.\,e. >>). \tabularnewline
-% |\flq| & French/Swiss left single quotes (i.\,e. \guilsinglleft). \tabularnewline
-% |\frq| & French/Swiss right single quotes (i.\,e. \guilsinglright). \tabularnewline
-% |\dq| & the original quotation mark character (i.\,e. |"|). \tabularnewline
+% |\glqq| & German left double quotes \graph{,,}. \tabularnewline
+% |\grqq| & German right double quotes \graph{``}. \tabularnewline
+% |\glq| & German left single quotes \graph{,}. \tabularnewline
+% |\grq| & German right single quotes \graph{`}. \tabularnewline
+% |\flqq| & French/Swiss left double quotes \graph{<<}. \tabularnewline
+% |\frqq| & French/Swiss right double quotes \graph{>>}. \tabularnewline
+% |\flq| & French/Swiss left single quotes \graph{\guilsinglleft}. \tabularnewline
+% |\frq| & French/Swiss right single quotes \graph{\guilsinglright}. \tabularnewline
+% |\dq| & The straight quotation mark character \graph{\textquotedbl}. \tabularnewline
% \bottomrule
% \end{tabular}
% \end{center}
@@ -203,8 +209,8 @@
%
% \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.
+% If \file{ngermanb.ldf} is read via the deprecated \babel\ option
+% \Lopt{ngermanb}, we make it behave as if \Lopt{ngerman} was specified.
% \iffalse
%<*germanb>
% \fi
@@ -216,16 +222,16 @@
% \end{macrocode}
%
% The macro |\LdfInit| takes care of preventing that this file is
-% loaded more than once, checking the category code of the
-% \texttt{@} sign, etc.
+% loaded more than once with the same option, checking the category
+% code of the \texttt{@} sign, etc.
% \begin{macrocode}
\LdfInit\CurrentOption{captions\CurrentOption}
% \end{macrocode}
%
% If \file{ngermanb.ldf} is read as an option, i.e., by the |\usepackage|
-% command, \texttt{ngerman} will be an `unknown' language, so we
+% command, \texttt{ngerman} could be an `unknown' language, so we
% have to make it known. We check for the existence of
-% |\l@ngerman| to see whether we have to do something here.
+% |\l@ngerman| and issue a warning if it is unknown.
%
% \begin{macrocode}
\ifx\l@ngerman\@undefined
@@ -236,32 +242,29 @@
%
% We set \texttt{naustrian} and \texttt{nswissgerman} as dialects
% of \texttt{ngerman}, since they use the same hyphenation patterns
-% than \texttt{ngerman}.
+% than \texttt{ngerman}. If no \texttt{ngerman} patterns are found,
+% we issue a warning.
% \changes{Version 2.8}{2016/11/01}{Only add dialects if the respective
% variety is loaded}
+% \changes{Version 2.9}{2016/11/02}{Do not attempt to load \cs{l@naustrian}
+% or \cs{l@nswissgerman}, which do not exist}
% \begin{macrocode}
\def\bbl@tempa{naustrian}
\ifx\CurrentOption\bbl@tempa
- \ifx\l@naustrian\@undefined
- \ifx\l@ngerman\@undefined
- \@nopatterns{Austrian (new orthography) and German (new orthography)}
- \adddialect\l@naustrian0
- \else
- \@nopatterns{Austrian}
- \adddialect\l@naustrian\l@ngerman
- \fi
+ \ifx\l@ngerman\@undefined
+ \@nopatterns{German (new orthography), needed by Austrian (new orthography)}
+ \adddialect\l@naustrian0
+ \else
+ \adddialect\l@naustrian\l@ngerman
\fi
\fi
\def\bbl@tempa{nswissgerman}
\ifx\CurrentOption\bbl@tempa
- \ifx\l@nswissgerman\@undefined
- \ifx\l@ngerman\@undefined
- \@nopatterns{Swiss German (new orthography) and German (new orthography)}
- \adddialect\l@nswissgerman0
- \else
- \@nopatterns{Swiss German (new orthography)}
- \adddialect\l@nswissgerman\l@ngerman
- \fi
+ \ifx\l@ngerman\@undefined
+ \@nopatterns{German (new orthography), needed by Swiss German (new orthography)}
+ \adddialect\l@nswissgerman0
+ \else
+ \adddialect\l@nswissgerman\l@ngerman
\fi
\fi
% \end{macrocode}
@@ -331,7 +334,8 @@
% \begin{macro}{\captionsnaustrian}
% The macro |\captionsnaustrian| builds on |\@captionsngerman|, but
% redefines some strings following Austrian conventions (for the
-% respective variants, cf. \cite{vwb}).
+% respective variants, cf. \cite{vwb}). It is only defined if
+% \texttt{naustrian} is requested.
% \changes{Version 2.8}{2016/11/01}{Only define \cs{captionsnaustrian} if
% \texttt{naustrian} is requested.}
% \begin{macrocode}
@@ -347,7 +351,8 @@
% \begin{macro}{\captionsnswissgerman}
% The macro |\captionsnswissgerman| builds on |\@captionsngerman|, but
% redefines some strings following Swiss conventions (for the
-% respective variants, cf. \cite{vwb}).
+% respective variants, cf. \cite{vwb}). It is only defined if
+% \texttt{nswissgerman} is requested.
% \changes{Version 2.8}{2016/11/01}{Only define \cs{captionsnswissgerman} if
% \texttt{nswissgerman} is requested.}
% \begin{macrocode}
@@ -419,32 +424,44 @@
%
% \subsection{Extras}
%
-% \begin{macro}{\extrasngerman}
% \begin{macro}{\extrasnaustrian}
% \begin{macro}{\extrasnswissgerman}
-% \begin{macro}{\noextrasngerman}
+% \changes{Version 2.7}{2013/12/13}{Added \cs{extrasnswissgerman}.}
+% \begin{macro}{\extrasngerman}
% \begin{macro}{\noextrasnaustrian}
% \begin{macro}{\noextrasnswissgerman}
+% \changes{Version 2.7}{2013/12/13}{Added \cs{noextrasnswissgerman}.}
+% \begin{macro}{\noextrasngerman}
% 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{Version 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.
+% First, the character \texttt{"} is declared active for all German
+% varieties. This is done once, later on its definition may vary.
% \begin{macrocode}
\initiate@active@char{"}
+% \end{macrocode}
+%
+% Depending on the option with which the language definition file
+% has been loaded, the macro |\extrasngerman|, |\extrasnaustrian|
+% or |\extrasnswissgerman| is defined. Each of those is identical:
+% they load the shorthands defined below and activate the \texttt{"}
+% character.
+% \begin{macrocode}
\@namedef{extras\CurrentOption}{%
\languageshorthands{ngerman}}
\expandafter\addto\csname extras\CurrentOption\endcsname{%
\bbl@activate{"}}
% \end{macrocode}
-% Turn the shorthands off again outside of German.
-% \changes{Version 2.6j}{1999/12/16}{Deactivate shorthands ouside of
+% Next, again depending on the option with which the language definition
+% file has been loaded, the macro |\noextrasngerman|, |\noextrasnaustrian|
+% or |\noextrasnswissgerman| is defined.
+% These deactivate the \texttt{"} character and thus turn the shorthands
+% off again outside of the respective variety.
+% \changes{Version 2.6j}{1999/12/16}{Deactivate shorthands outside of
% German}
% \changes{Version 2.7}{2013/12/13}{Deactivate shorthands also outside of
% \texttt{naustrian} and \texttt{nswissgerman}.}
@@ -554,7 +571,9 @@
\declare@shorthand{ngerman}{"<}{\flqq}
\declare@shorthand{ngerman}{">}{\frqq}
% \end{macrocode}
-% and some additional commands (hyphenation and ligature control):
+% and some additional commands (hyphenation, line breaking and ligature control):
+% \changes{Version 2.9}{2016/11/02}{Add \texttt{"/} shortcut for breakable slash
+% (taken from \texttt{dutch.ldf})}
% \begin{macrocode}
\declare@shorthand{ngerman}{"-}{\nobreak\-\bbl@allowhyphens}
\declare@shorthand{ngerman}{"|}{%
@@ -563,6 +582,8 @@
\declare@shorthand{ngerman}{""}{\hskip\z@skip}
\declare@shorthand{ngerman}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{ngerman}{"=}{\penalty\@M-\hskip\z@skip}
+\declare@shorthand{ngerman}{"/}{\textormath
+ {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}}
% \end{macrocode}
%
% \begin{macro}{\mdqon}
@@ -622,7 +643,7 @@
% \emph{Babel}.
% \url{http://www.ctan.org/pkg/babel}.
% \bibitem{HP} Partl, Hubert:
-% \emph{German \TeX}, \emph{TUGboat} 9 (1988) \#1, p.~70--72.
+% \emph{German \TeX}, \emph{TUGboat} 9/1 (1988), p.~70--72.
% \bibitem{gerdoc} Raichle, Bernd:
% \emph{German}.
% \url{http://www.ctan.org/pkg/german}.