diff options
author | Norbert Preining <norbert@preining.info> | 2024-01-21 03:01:05 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-01-21 03:01:05 +0000 |
commit | b2fc73208c72c65ca8f9ce068898291b69322d32 (patch) | |
tree | c5027d520af6b383a642459af510e38224cf97d5 /macros/latex/contrib/babel-contrib/german/ngermanb.dtx | |
parent | 2fd07558ccd8d3c8e354f8ea0b342ef7ac1e87a3 (diff) |
CTAN sync 202401210301
Diffstat (limited to 'macros/latex/contrib/babel-contrib/german/ngermanb.dtx')
-rw-r--r-- | macros/latex/contrib/babel-contrib/german/ngermanb.dtx | 122 |
1 files changed, 99 insertions, 23 deletions
diff --git a/macros/latex/contrib/babel-contrib/german/ngermanb.dtx b/macros/latex/contrib/babel-contrib/german/ngermanb.dtx index d0b638457f..98b9d2063a 100644 --- a/macros/latex/contrib/babel-contrib/german/ngermanb.dtx +++ b/macros/latex/contrib/babel-contrib/german/ngermanb.dtx @@ -2,7 +2,7 @@ % % File `ngermanb.dtx' % -% Copyright 1989--2021 +% Copyright 1989--2024 % Johannes L. Braams % Bernd Raichle % Walter Schmidt @@ -29,7 +29,7 @@ % by Bernd Raichle, Hubert Partl et.al. % % \fi -% \CheckSum{409} +% \CheckSum{505} % % \iffalse % Tell the \LaTeX\ system who we are and write an entry on the @@ -43,7 +43,7 @@ %<ngermanb>\ProvidesLanguage{ngermanb} %\fi %\ProvidesFile{ngermanb.dtx} - [2021/02/27 v2.13 German support for babel (post-1996 orthography)] + [2024/01/19 v2.14 German support for babel (post-1996 orthography)] %\iffalse % %<*filedriver> @@ -134,6 +134,9 @@ % \setlength{\itemsep}{0pt} % \item |\usepackage[ngerman]{babel}| % \item |\usepackage[naustrian]{babel}| +% \item |\usepackage[ngerman.capsz]{babel}|\newfeature{2.14}\footnote{% +% See sec.~\ref{sec:capsz} on the \Lopt{capsz} modifier.} +% \item |\usepackage[naustrian.capsz]{babel}| % \item |\usepackage[nswissgerman]{babel}| % \item |\usepackage[nswissgerman.toss]{babel}|\newfeature{2.10}\footnote{% % See sec.~\ref{sec:toss} on the \Lopt{toss} modifier.} @@ -167,7 +170,8 @@ % Differs to |"s| in uppercase version; % but cf. sec.~\ref{sec:toss}. \tabularnewline % |"S| & |\uppercase{"s}|, typeset as \graph{SS}(\graph{\ss} -% must be written as \graph{SS} in uppercase writing). \tabularnewline +% is traditonally written as \graph{SS} in uppercase writing, +% but cf. sec.~\ref{sec:capsz} if you prefer a capital eszett). \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, @@ -192,6 +196,16 @@ % |"/| & \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 +% |"*| & \newfeature{2.14}An asterisk which assures the word can +% still be hyphenated at its defined breakpoints. +% Useful if you want to employ gender-sensitive writing +% (,gender star`). +% Similar shorthands are available for the alternative +% gender-sensitive spellings, |":| and |"_|. \tabularnewline +% |"x| & \newfeature{2.14}Inserts a gender mark which assures +% the word can still be hyphenated at its defined breakpoints. +% This is predefined to |*| but can be globally redefined +% by redefining the macro |\def\mkngender{*}| \tabularnewline % |"`| & German left double quotes \graph{,,}. \tabularnewline % |"'| & German right double quotes \graph{``}. \tabularnewline % |"<| & French/Swiss left double quotes \graph{<<}. \tabularnewline @@ -241,23 +255,32 @@ % of software updates. % % This means that you need to explicitly activate the new patterns for a given document with the classic engines, should you want to use them -% instead of the old ones. With \Babel, this can be done quite easily by means of the \textsf{hyphsubst} \cite{hyphsubst} package: +% instead of the old ones. With \Babel, this can be done easily by means of the \cs{babelprovide} command and the \textsf{hyphenrules} option: % \begin{verbatim} -% \usepackage[ngerman=ngerman-x-latest]{hyphsubst} -% \usepackage[ngerman]{babel} +% \babelprovide[hyphenrules=ngerman-x-latest]{ngerman} % \end{verbatim}\vspace{-\baselineskip} -% Since \Lopt{naustrian} and \Lopt{nswissgerman} use the same patterns as \Lopt{ngerman}, the given \textsf{hyphsubst} option activates -% the new patterns for all varieties; but note that \textsf{hyphsubst} must be loaded before \babel\ (please refer to \cite{exptl} and -% \cite{hyphsubst} for details). +% For \Lopt{naustrian} and \Lopt{nswissgerman}, use a respectively adapted version of the above. % -% If you only want to use experimental patterns for one variety, you can do like so: -% \begin{verbatim} -% \usepackage{hyphsubst} -% \usepackage[ngerman,naustrian]{babel} -% \HyphSubstLet{naustrian}{ngerman-x-latest} -% \end{verbatim}\vspace{-\baselineskip} +% \section{Variety-specific options}% +% +% \subsection{Capital eszett letter}\label{sec:capsz} +% +% In\newfeature{2.14} 2008, a capital variant of the letter \graph{\ss} has been included to the Unicode standard +% (U+1E9E), and in 2017, the capital eszett letter has been acknowledged in German orthography as a valid alternative +% to \graph{SS} in uppercase writing of \graph{\ss}. The letter differs from its miniscule counterpart in that it is +% usually more wide to match the form of uppercase letters. % -% \section{Variety-specific options}\label{sec:toss} +% If you want to use this letter, you can do so by using the \Babel\ modifier \Lopt{capsz}, which is supported +% for the ngerman and naustrian varieties. I.\,e., pass \Lopt{ngerman.capsz} or \Lopt{naustrian.capsz} +% (rather than \Lopt{ngerman} or \Lopt{naustrian}) as \babel\ option. As the eszett letter is not common +% in Swiss German writing in general, the option is not supported there. Similarly, the pre-1996 varieties +% do not support the letter either. +% +% The modifier causes both |\MakeUppercase| and the |"S| shorthand to use the capital eszett letter. +% Note that this requires a font which actually contains the glyph (otherwise, you still get \graph{SS}) +% and \LaTeX\ kernel 2023/06 at least. +% +% \subsection{Handling of \texttt{"s} and \texttt{"z} in Swiss German}\label{sec:toss} % % In\newfeature{2.10} Swiss (and Liechtensteinian) German writing, the use of \graph{\ss} is rather uncommon. % Swiss writers would normally use \graph{ss} where German or Austrian writers use the \graph{\ss} character @@ -564,7 +587,7 @@ % \begin{macro}{\ntossfalse} % For Swiss Standard German, we allow optionally to expand the \graph{\ss}-related % shorthands the Swiss way, i.\,e. as \graph{ss} (globally, if the modifier \Lopt{toss} -% is used or locally if |\ntosstrue|.). +% is used or locally if |\ntosstrue|). % \begin{macrocode} \newif\ifntoss\ntossfalse \newif\ifbbl@ntoss\bbl@ntossfalse @@ -581,6 +604,37 @@ % \end{macro} % \end{macro} % +% \begin{macro}{capsz} +% \changes{Version 2.9e=Version 2.14}{2024/01/19}{Implement modifier \Lopt{capsz} +% to use capital eszett letter in Austrian and German varieties if possible.} +% For German and Austrian Standard German, we allow optionally to uppercase \graph{\ss} +% with the capital eszett letter rather as \graph{SS} if the font provides the glyph +% (if the modifier \Lopt{capsz} is used). +% \begin{macrocode} +\newif\ifcapsz\capszfalse +\newif\ifbbl@capsz\bbl@capszfalse +\ifx\bbl@mod@ngerman\@undefined\else + \@expandtwoargs\in@{,capsz,}{,\bbl@mod@ngerman,} + \ifin@ + \capsztrue + \fi + \addto\extrasngerman{% + \ifcapsz\bbl@capsztrue\bbl@csarg\xdef{casing@ngerman}{de-x-eszett}% + \else\bbl@csarg\xdef{casing@ngerman}{de}\bbl@capszfalse\fi} +\fi +\newif\if@at@capsz\@at@capszfalse +\ifx\bbl@mod@naustrian\@undefined\else + \@expandtwoargs\in@{,capsz,}{,\bbl@mod@naustrian,} + \ifin@ + \@at@capsztrue + \fi + \addto\extrasnaustrian{% + \if@at@capsz\bbl@capsztrue\bbl@csarg\xdef{casing@naustrian}{de-x-eszett}% + \else\bbl@csarg\xdef{casing@naustrian}{de}\bbl@capszfalse\fi} +\fi +% \end{macrocode} +% \end{macro} +% % Next, again depending on the option with which the language definition % file has been loaded, the macro |\noextrasngerman|, |\noextrasnaustrian| % or |\noextrasnswissgerman| is defined. @@ -593,9 +647,23 @@ % \begin{macrocode} \expandafter\addto\csname noextras\CurrentOption\endcsname{% \bbl@deactivate{"}} +% \end{macrocode} +% +% Now deactivate the settings that might have been done by the modifiers: +% \begin{macrocode} \ifx\CurrentOption\bbl@opt@nswissgerman \addto\noextrasnswissgerman{\bbl@ntossfalse} \fi +\ifx\CurrentOption\bbl@opt@ngerman + \ifbbl@capsz + \addto\noextrasngerman{\bbl@capszfalse\bbl@csarg\xdef{casing@ngerman}{de}} + \fi +\fi +\ifx\CurrentOption\bbl@opt@naustrian + \ifbbl@capsz + \addto\noextrasnaustrian{\bbl@capszfalse\bbl@csarg\xdef{casing@naustrian}{de}} + \fi +\fi % \end{macrocode} % % @@ -656,6 +724,7 @@ % couple of `support' macros. % % +% \changes{Version 2.9e=Version 2.14}{2024/01/19}{Output capital eszett for \texttt{"S} if possible and required} % \begin{macro}{\dq} % We save the original double quotation mark character in |\dq| to keep % it available, the math accent |\"| can now be typed as |"|. @@ -667,7 +736,7 @@ \def\dq{"} \def\@SS{\mathchar"7019 } \def\bbl@ss{\ifbbl@ntoss ss\else\textormath{\ss}{\@SS{}}\fi} - \def\bbl@SS{SS} + \def\bbl@SS{\ifbbl@capsz\MakeUppercase{\ss}\else SS\fi} \def\bbl@sz{\ifbbl@ntoss sz\else\textormath{\ss}{\@SS{}}\fi} \def\bbl@SZ{SZ} } @@ -713,7 +782,7 @@ \declare@shorthand{ngerman}{"<}{\flqq} \declare@shorthand{ngerman}{">}{\frqq} % \end{macrocode} -% and some additional commands (hyphenation, line breaking and ligature control): +% some additional commands (hyphenation, line breaking and ligature control): % \changes{Version 2.9}{2016/11/02}{Add \texttt{"/} shortcut for breakable slash % (taken from \file{dutch.ldf})} % \changes{Version 2.9b=Version 2.11}{2018/12/08}{Fix old hyphenation regression introduced with \babel\ 3.7 @@ -734,6 +803,16 @@ \declare@shorthand{ngerman}{"/}{\textormath {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}} % \end{macrocode} +% and some shorthands to support gender-sensitive spelling: +% \changes{Version 2.9e=Version 2.14}{2024/01/19}{Add \texttt{"*}, \texttt{":}, \texttt{"\_}, and \texttt{"x} +% shorthands to support gender-sensitive writing} +% \begin{macrocode} +\def\mkngender{*} +\declare@shorthand{ngerman}{":}{\nobreak:\bbl@allowhyphens} +\declare@shorthand{ngerman}{"*}{\nobreak*\bbl@allowhyphens} +\declare@shorthand{ngerman}{"_}{\nobreak\_\bbl@allowhyphens} +\declare@shorthand{ngerman}{"x}{\nobreak\mkngender\bbl@allowhyphens} +% \end{macrocode} % % \begin{macro}{\mdqon} % \begin{macro}{\mdqoff} @@ -794,9 +873,6 @@ % \bibitem{exptl} Deutschsprachige Trennmustermannschaft: % \emph{dehyph-exptl -- Experimental hyphenation patterns for the German language}. % \url{https://ctan.org/pkg/dehyph-exptl}. -% \bibitem{hyphsubst} Heiko Oberdiek: -% \emph{hyphsubst -- Substitute hyphenation patterns}. -% \url{https://ctan.org/pkg/hyphsubst}. % \bibitem{HP} Partl, Hubert: % \emph{German \TeX}, \emph{TUGboat} 9/1 (1988), p.~70--72. % \bibitem{hyph-utf8} Manuel P\'egouri\'e-Gonnard et al.: |