summaryrefslogtreecommitdiff
path: root/macros/generic/tracklang/tracklang.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-07 03:00:39 +0000
committerNorbert Preining <norbert@preining.info>2019-10-07 03:00:39 +0000
commitba86549c94b1e8b6b19bc82b01e85a7e513e7586 (patch)
treea4a96c454b6e5f38834823746dde14a1101aa4a6 /macros/generic/tracklang/tracklang.dtx
parent37778869d20a42439b123bb0c553953f716886b1 (diff)
CTAN sync 201910070300
Diffstat (limited to 'macros/generic/tracklang/tracklang.dtx')
-rw-r--r--macros/generic/tracklang/tracklang.dtx75
1 files changed, 59 insertions, 16 deletions
diff --git a/macros/generic/tracklang/tracklang.dtx b/macros/generic/tracklang/tracklang.dtx
index 1768bcc3ce..b3415f2e22 100644
--- a/macros/generic/tracklang/tracklang.dtx
+++ b/macros/generic/tracklang/tracklang.dtx
@@ -1,16 +1,16 @@
%\iffalse
% tracklang.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -doc "tracklang-manual.tex"
% -section "chapter"
+% -doc "tracklang-manual.tex"
+% -author "Nicola Talbot"
% -src "tracklang.sty\Z=>tracklang.sty"
% -src "tracklang.tex\Z=>tracklang.tex"
% -src "tracklang-region-codes.tex\Z=>tracklang-region-codes.tex"
% -src "tracklang-scripts.sty\Z=>tracklang-scripts.sty"
% -src "tracklang-scripts.tex\Z=>tracklang-scripts.tex"
-% -author "Nicola Talbot"
% tracklang
-% Created on 2019/8/31 16:29
+% Created on 2019/10/6 15:08
%\fi
%\iffalse
%<*package>
@@ -59,7 +59,7 @@
pdfauthor={Nicola L.C. Talbot},
pdftitle={tracklang: tracking language options}]{hyperref}
-\CheckSum{3961}
+\CheckSum{3965}
\appto\MacroFont{\scriptsize}
\renewcommand*{\usage}[1]{\textit{\hyperpage{#1}}}
@@ -278,11 +278,11 @@ and~\ref{tab:nonisoopts}}
%
%\MakeShortVerb{"}
%
-%\title{tracklang v1.3.7:
+%\title{tracklang v1.3.8:
%tracking language options}
%\author{Nicola L. C. Talbot\\\url{http://www.dickimaw-books.com/}}
%
-%\date{2019-08-31}
+%\date{2019-10-06}
%\maketitle
%
%\begin{abstract}
@@ -321,7 +321,10 @@ and~\ref{tab:nonisoopts}}
%\styfmt{tracklang} to pick up this information, which is entirely up
%to the package authors, but at the moment there's no standard method
%for packages to detect the required language and region. The aim of
-%\styfmt{tracklang} is to provide that method.
+%\styfmt{tracklang} is to provide that method. In particular, the
+%emphasis is on using ISO language and region codes rather than
+%hard-coding the various language labels used by different language
+%packages.
%
%Related article: \qt{Localisation of \TeX\ documents:
%\styfmt{tracklang}.} TUGBoat, Volume~37 (2016), No.~3
@@ -2892,13 +2895,24 @@ and~\ref{tab:nonisoopts}}
%The first case prevents \styfmt{tracklang} from picking up
%the document class options but skips the check for known
%language packages. This check is redundant since this is
-%the language package, so the thing to decide is whether or
+%the language package, so you need to decide is whether or
%not to allow the user to set up the localisation information
%through the document class options.
%
-%(If you just use \cs{input}, there's a test at the start of
+%If you prefer \cs{RequirePackage} over \cs{input} but you want to make
+%\texttt{tracklang.sty} skip the check for known
+%language packages then (as from v1.3.8) define the pre-language
+%package check hook as follows:
+%\begin{verbatim}
+%\providecommand\@tracklang@prelangpkgcheck@hook{\endinput}
+%\RequirePackage{tracklang}[2019/10/06]
+%\end{verbatim}
+%This will still pick up languages supplied through the
+%document class options.
+%
+%If you just use \cs{input}, there's a test at the start of
%\texttt{tracklang.tex} to determine if it's already been loaded, so
-%you don't need to worry if the user has already loaded it.)
+%you don't need to worry if the user has already loaded it.
%
%When the language is set (using commands like \cs{selectlanguage}
%)
@@ -3250,7 +3264,7 @@ and~\ref{tab:nonisoopts}}
% packages such as \styfmt{etoolbox}.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tracklang}[2019/08/31 v1.3.7 (NLCT) Track Languages]
+\ProvidesPackage{tracklang}[2019/10/06 v1.3.8 (NLCT) Track Languages]
% \end{macrocode}
%\begin{macro}{\@tracklang@declareoption}
% Set up package options.
@@ -3290,6 +3304,18 @@ and~\ref{tab:nonisoopts}}
% provide a reliable user interface to determine which languages
% (and variants) have been loaded.
%
+%\begin{macro}{\@tracklang@prelangpkgcheck@hook}
+%In the event that any of the language packages choose to load this
+%package and use \texttt{tracklang.tex}'s commands to identify the
+%tracked languages and regions, then they can first define
+%\cs{@tracklang@prelangpkgcheck@hook} to do \cs{endinput} which will
+%skip the checks.
+%\changes{1.3.8}{2019-10-06}{new}
+% \begin{macrocode}
+\csname @tracklang@prelangpkgcheck@hook\endcsname
+% \end{macrocode}
+%\end{macro}
+%
% \begin{macrocode}
\ifx\@tracklang@languages\@empty
% \end{macrocode}
@@ -3534,7 +3560,7 @@ and~\ref{tab:nonisoopts}}
% Version info.
% \begin{macrocode}
\expandafter\def\csname ver@tracklang.tex\endcsname{%
- 2019/08/31 v1.3.7 (NLCT) Track Languages Generic Code}
+ 2019/10/06 v1.3.8 (NLCT) Track Languages Generic Code}
% \end{macrocode}
% Define a long command for determining the existence of a control
% sequence by its name. (\cs{relax} is considered undefined.)
@@ -5273,7 +5299,7 @@ and~\ref{tab:nonisoopts}}
%\begin{definition}
%\cs{AddTrackedLanguageIsoCodes}\marg{language}
%\end{definition}
-%Adds the ISO 639-1 and 639-2 ISO codes for the given language,
+%Adds the ISO 639-1, 639-2 and 639-3 ISO codes for the given language,
%which must have previously been declared using
%\cs{TrackLangNewLanguage}.
% \begin{macrocode}
@@ -7714,6 +7740,15 @@ and~\ref{tab:nonisoopts}}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@tracklang@add@undetermined}
+%\changes{1.3.8}{2019-10-06}{new}
+%Undetermined language (ISO~636-2 code `und') for unknown languages.
+%There's no ISO 639-1 language code for this language.
+% \begin{macrocode}
+\TrackLangDeclareLanguageOption{undetermined}{}{und}{}{}{}{Latn}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@tracklang@add@urdu}
% \begin{macrocode}
\TrackLangDeclareLanguageOption{urdu}{ur}{urd}{}{}{}{Arab}
@@ -8714,6 +8749,14 @@ and~\ref{tab:nonisoopts}}
\TrackLangDeclareDialectOption{GBwelsh}{welsh}{GB}{}{}{}{}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\@tracklang@add@nil}
+%\changes{1.3.8}{2019-10-06}{new}
+%Add \sty{babel}'s \texttt{nil} as a dialect of undetermined
+%language.
+% \begin{macrocode}
+\TrackLangDeclareDialectOption{nil}{undetermined}{}{}{}{}{}
+% \end{macrocode}
+%\end{macro}
%
%\subsection{Dialect Option Synonyms}
%\label{sec:dialectsyns}
@@ -10066,7 +10109,7 @@ and~\ref{tab:nonisoopts}}
% Version info.
% \begin{macrocode}
\expandafter\def\csname ver@tracklang-region-codes.tex\endcsname{%
- 2019/08/31 v1.3.7 (NLCT) Track Languages Regions}%
+ 2019/10/06 v1.3.8 (NLCT) Track Languages Regions}%
% \end{macrocode}
%
%\begin{macro}{\TrackLangRegionMap}
@@ -10455,7 +10498,7 @@ and~\ref{tab:nonisoopts}}
%\changes{1.3}{2016-10-07}{added tracklang-scripts.sty}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tracklang-scripts}[2019/08/31 v1.3.7 (NLCT) Track
+\ProvidesPackage{tracklang-scripts}[2019/10/06 v1.3.8 (NLCT) Track
Language Scripts (LaTeX)]
\RequirePackage{tracklang}
\input{tracklang-scripts}
@@ -10497,7 +10540,7 @@ Language Scripts (LaTeX)]
% Version info.
% \begin{macrocode}
\expandafter\def\csname ver@tracklang-scripts.tex\endcsname{%
- 2019/08/31 v1.3.7 (NLCT) Track Languages Scripts (Generic)}%
+ 2019/10/06 v1.3.8 (NLCT) Track Languages Scripts (Generic)}%
% \end{macrocode}
%
%\begin{macro}{\TrackLangScriptsMap}