summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-01 21:36:02 +0000
committerKarl Berry <karl@freefriends.org>2019-12-01 21:36:02 +0000
commit4f2a86ba4239f35f5d8b18c9973150e0143a4d0a (patch)
treebaa656ac0344268a5c6aeb128b42035d49675808 /Master
parent9aeb61680aefe61b97bdf89d656819d75cf3fc28 (diff)
tracklang (1dec19)
git-svn-id: svn://tug.org/texlive/trunk@52991 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/CHANGES19
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/README4
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty14
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-babel.pdfbin14843 -> 14843 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de-poly.pdfbin3817 -> 3821 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de.pdfbin13613 -> 13613 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-poly.pdfbin3555 -> 3556 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.pdfbin12644 -> 12644 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de.pdfbin13613 -> 13613 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de2.pdfbin13613 -> 13613 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de3.pdfbin13595 -> 13595 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de4.pdfbin3818 -> 3817 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-poly.pdfbin3556 -> 3556 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.pdfbin12644 -> 12644 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.pdfbin13148 -> 13148 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-manx.pdfbin19773 -> 19773 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map.pdfbin25988 -> 25988 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map2.pdfbin25840 -> 25840 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map3.pdfbin24912 -> 24912 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-nomap.pdfbin25456 -> 25456 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.pdfbin14704 -> 14704 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdfbin19540 -> 19540 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdfbin19790 -> 19790 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdfbin19802 -> 19802 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdfbin6199 -> 6198 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdfbin16902 -> 16902 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdfbin19885 -> 19885 bytes
-rw-r--r--Master/texmf-dist/doc/generic/tracklang/tracklang.pdfbin678702 -> 738081 bytes
-rw-r--r--Master/texmf-dist/source/latex/tracklang/tracklang.dtx3234
-rw-r--r--Master/texmf-dist/source/latex/tracklang/tracklang.ins2
-rw-r--r--Master/texmf-dist/tex/generic/tracklang/tracklang-region-codes.tex3
-rw-r--r--Master/texmf-dist/tex/generic/tracklang/tracklang-scripts.tex381
-rw-r--r--Master/texmf-dist/tex/generic/tracklang/tracklang.tex1447
-rw-r--r--Master/texmf-dist/tex/latex/tracklang/tracklang-scripts.sty2
-rw-r--r--Master/texmf-dist/tex/latex/tracklang/tracklang.sty2
35 files changed, 4379 insertions, 729 deletions
diff --git a/Master/texmf-dist/doc/generic/tracklang/CHANGES b/Master/texmf-dist/doc/generic/tracklang/CHANGES
index 90d299adc34..452a7d0727d 100644
--- a/Master/texmf-dist/doc/generic/tracklang/CHANGES
+++ b/Master/texmf-dist/doc/generic/tracklang/CHANGES
@@ -1,3 +1,22 @@
+v1.4 (2019-11-30):
+
+ * tracklang.tex:
+
+ - Changed \TrackLangIfFileExists to also include script and
+ variant in file search (search order has changed slightly).
+
+ - Added \TrackLangRedefHook
+
+ - New commands provided to assist integration with language
+ packages:
+
+ \TrackLangAddExtraRegionFile
+ \TrackLangAddExtraScriptFile
+ \TrackLangProvidePredefinedLanguage
+ \TrackLangProvidePredefinedDialect
+
+ - New switch \ifTrackLangShowVerbose for debugging
+
v1.3.9 (2019-11-11):
* tracklang.tex:
diff --git a/Master/texmf-dist/doc/generic/tracklang/README b/Master/texmf-dist/doc/generic/tracklang/README
index 6c9b86401c7..b3e7de27b16 100644
--- a/Master/texmf-dist/doc/generic/tracklang/README
+++ b/Master/texmf-dist/doc/generic/tracklang/README
@@ -1,6 +1,6 @@
-Generic TeX Bundle : tracklang v1.3.9
+Generic TeX Bundle : tracklang v1.4
-Last Modified : 2019-11-11
+Last Modified : 2019-11-30
Author : Nicola Talbot
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty
index 8b14d3b4ee4..6d26c98621b 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty
@@ -1,9 +1,17 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{animals}[2016/10/06 v1.2 (NLCT) Sample package to test tracklang.sty]
+\ProvidesPackage{animals}[2019/11/30 v1.2.1 (NLCT) Sample package to test tracklang.sty]
-\RequirePackage{tracklang}[2016/10/07]
+\RequirePackage{tracklang}[2019/11/30]
-\DeclareOption*{\TrackLanguageTag{\CurrentOption}}
+\DeclareOption*{%
+ \TrackIfKnownLanguage{\CurrentOption}%
+ {\PackageInfo{animals}{Tracking language `\CurrentOption'}}% successful
+ {% failed
+ \PackageError{animals}%
+ {Unknown language specification `\CurrentOption'}%
+ {You need to supply either a known dialect label or a valid language tag}%
+ }%
+}
\ProcessOptions
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-babel.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-babel.pdf
index 330ff6a0262..2485ee53c7f 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-babel.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-babel.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de-poly.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de-poly.pdf
index 509be5eb635..88669915f9d 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de-poly.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de-poly.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de.pdf
index d1448c319d2..07962fd91a5 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-de.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-poly.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-poly.pdf
index 10751349074..476f2f418da 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-poly.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals-poly.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.pdf
index c799fb8f3a6..3ec9a8145cc 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de.pdf
index 07c8bf0ec69..a509e008666 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de2.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de2.pdf
index 292dcd486f0..c6a6e94de9e 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de2.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de3.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de3.pdf
index 095c57d130c..09f9b2eb4d5 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de3.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de4.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de4.pdf
index 86802c70d37..271acfcba43 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de4.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-de4.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-poly.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-poly.pdf
index d0faec29a6d..5f1807767c3 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-poly.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2-poly.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.pdf
index bd3e154a86f..8ef941783ad 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.pdf
index 693d8b75e9c..78c1c87385f 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-manx.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-manx.pdf
index 40eab364f86..83340a0ce7b 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-manx.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-manx.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map.pdf
index 033fec24ce8..635f2c1f798 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map2.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map2.pdf
index 85f8f1f1501..e664c008771 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map2.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map3.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map3.pdf
index bbd85ced7bf..aac08c391da 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map3.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-map3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-nomap.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-nomap.pdf
index 46f836a3e34..df2d0bc468d 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-nomap.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2-nomap.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.pdf
index 6c396808851..0b26023e241 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdf
index a2c23d601b3..aca2dd6c84d 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdf
index b8bad2af522..ef391b99123 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdf
index 61b4f28c70e..fa54737ec55 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdf
index d42a97d7154..ec3ffb3d4d6 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdf
index 8c05bc36f14..48c0ad786bb 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdf
index 47c5c053fd9..037e2dade1b 100644
--- a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/tracklang/tracklang.pdf b/Master/texmf-dist/doc/generic/tracklang/tracklang.pdf
index 5aef4affc33..8f0aeee5fcb 100644
--- a/Master/texmf-dist/doc/generic/tracklang/tracklang.pdf
+++ b/Master/texmf-dist/doc/generic/tracklang/tracklang.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/tracklang/tracklang.dtx b/Master/texmf-dist/source/latex/tracklang/tracklang.dtx
index e7e28decc4b..e071563fe3e 100644
--- a/Master/texmf-dist/source/latex/tracklang/tracklang.dtx
+++ b/Master/texmf-dist/source/latex/tracklang/tracklang.dtx
@@ -1,16 +1,16 @@
%\iffalse
% tracklang.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -section "chapter"
-% -author "Nicola Talbot"
% -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"
+% -section "chapter"
% tracklang
-% Created on 2019/11/11 16:00
+% Created on 2019/12/1 17:41
%\fi
%\iffalse
%<*package>
@@ -59,7 +59,7 @@
pdfauthor={Nicola L.C. Talbot},
pdftitle={tracklang: tracking language options}]{hyperref}
-\CheckSum{3986}
+\CheckSum{6156}
\appto\MacroFont{\scriptsize}
\renewcommand*{\usage}[1]{\textit{\hyperpage{#1}}}
@@ -278,11 +278,11 @@ and~\ref{tab:nonisoopts}}
%
%\MakeShortVerb{"}
%
-%\title{tracklang v1.3.9:
+%\title{tracklang v1.4:
%tracking language options}
%\author{Nicola L. C. Talbot\\\url{http://www.dickimaw-books.com/}}
%
-%\date{2019-11-11}
+%\date{2019-11-30}
%\maketitle
%
%\begin{abstract}
@@ -326,9 +326,14 @@ and~\ref{tab:nonisoopts}}
%hard-coding the various language labels used by different language
%packages.
%
-%Related article: \qt{Localisation of \TeX\ documents:
+%Related articles: \qt{Localisation of \TeX\ documents:
%\styfmt{tracklang}.} TUGBoat, Volume~37 (2016), No.~3
-%(\url{http://www.tug.org/TUGboat/tb37-3/tb117talbot.pdf}).
+%(\url{http://www.tug.org/TUGboat/tb37-3/tb117talbot.pdf}),
+%\href{https://www.dickimaw-books.com/latex/tracklang}{Localisation
+%with \texttt{tracklang.tex}},
+%and
+%\href{https://www.dickimaw-books.com/faq.php?action=view&category=tracklang}{\texttt{tracklang}
+%FAQ}.
%
%\clearpage
%\tableofcontents
@@ -381,10 +386,15 @@ and~\ref{tab:nonisoopts}}
%which is suboptimal but at least provides some information.
%(\sty{polyglossia} now provides \cs{xpg@loaded}, which
%\sty{tracklang} uses to track the root languages, but the language variant
-%command \cs{xpg@vloaded} only seems to be set when the language
+%command \cs{xpg@loaded} only seems to be set when the language
%changes, which doesn't occur until the start of the \env{document}
%environment.)
%
+%I also can't find any way of detecting a list of languages loaded
+%through \sty{babel}'s new \ics{babelprovide} command. As far as I
+%can tell, the only stored list is in \cs{bbl@loaded} which only
+%contains the languages loaded through package options.
+%
%If the \sty{ngerman} package has been loaded, \styfmt{tracklang}
%effectively does
%\begin{verbatim}
@@ -484,11 +494,11 @@ and~\ref{tab:nonisoopts}}
%operating system:
%\begin{verbatim}
%\input texosquery
-%\input tracklang %v1.3
+%\input tracklang % v1.3
%\TrackLangFromEnv
%% load packages that use tracklang for localisation
%\end{verbatim}
-%Or (\sty{texosquery} v1.2 currently pending)
+%Or (\sty{texosquery} v1.2)
%\begin{verbatim}
%\input texosquery % v1.2
%\input tracklang % v1.3
@@ -497,9 +507,10 @@ and~\ref{tab:nonisoopts}}
%\TrackLanguageTag{\langtag}
%% load packages that use tracklang for localisation
%\end{verbatim}
-%Anticipate the release of \styfmt{texosquery} v1.2:
+%Linux user who may or may not have \app{texosquery} setup to run in the
+%shell escape:
%\begin{verbatim}
-%\input texosquery
+%\input texosquery
%\input tracklang % v1.3
%
%\ifx\TeXOSQueryLangTag\undefined
@@ -620,20 +631,23 @@ and~\ref{tab:nonisoopts}}
%
%Let's suppose you are developing a package called
%\texttt{mypackage.sty} or \texttt{mypackage.tex} and you want
-%to find out what languages the document author has requested.
+%to find out what languages the document author has requested. (See also:
+%\href{https://www.dickimaw-books.com/latex/tracklang/otherpkg.shtml}{Using
+%\texttt{tracklang.tex} in Packages with Localisation Features}.)
%
%Generic use:
%\begin{verbatim}
%\input tracklang
%\end{verbatim}
%(Most of the commands used in this section require at least
-%\styfmt{tracklang} version 1.3.)
+%\styfmt{tracklang} version 1.3 but 1.4 is better if you want to
+%include the script tag in the ldf files.)
%Note that \texttt{tracklang.tex} has a check to determine if
%it's already been loaded, so you don't need to worry about that.
%
%\LaTeX\ use:
%\begin{verbatim}
-%\RequirePackage{tracklang}[2016/10/07]% at least v1.3
+%\RequirePackage{tracklang}[2019/11/30]% at least v1.4
%\end{verbatim}
%This will picked up any language options supplied in the document
%class options and will also detect if \sty{babel} or
@@ -648,6 +662,19 @@ and~\ref{tab:nonisoopts}}
%\begin{verbatim}
%\usepackage[hy-Latn-IT-arevela]{mypackage}
%\end{verbatim}
+%With at least version 1.4, it's better to use \ics{TrackIfKnownLanguage}:
+%\begin{verbatim}
+%\DeclareOption*{%
+% \TrackIfKnownLanguage{\CurrentOption}%
+% {\PackageInfo{mypackage}{Tracking language `\CurrentOption'}}% successful
+% {% failed
+% \PackageError{mypackage}%
+% {Unknown language specification `\CurrentOption'}%
+% {You need to supply either a known dialect label or a valid language tag}%
+% }%
+%}
+%\end{verbatim}
+%
%The rest of the example package in this section uses generic code.
%
%If you want to fetch the locale information from the operating
@@ -685,11 +712,14 @@ and~\ref{tab:nonisoopts}}
%\end{verbatim}
%
%Each resource file has the naming scheme \meta{prefix}\texttt{-}
-%\meta{tag}\texttt{.ldf}. In this example, the \meta{prefix} is
-%\texttt{mypackage}. The \meta{tag} may be the language or dialect label
+%\meta{localeid}\texttt{.ldf}. In this example, the \meta{prefix} is
+%\texttt{mypackage}. The \meta{localeid} part may be the language or dialect label
%(for example, \texttt{english} or \texttt{british}) or a combination of the ISO
%language and region codes (for example, \texttt{en-GB} or
-%\texttt{en} or \texttt{GB}).
+%\texttt{en} or \texttt{GB}). As from version 1.4, \meta{localeid} may
+%also include the script or variant. (See the definition of
+%\ics{IfTrackedLanguageFileExists} on page~\pageref{pg:filesearch}
+%for further details.)
%
%The simplest scheme is to use the root language label (not the
%dialect label) for the base language settings and use the ISO
@@ -708,6 +738,11 @@ and~\ref{tab:nonisoopts}}
%found). For other hooks, such as \cs{date\ldots}, use
%\ics{TrackLangAddToHook}\marg{code}\marg{hook type} instead.
%
+%With pre-v1.4 versions of \sty{tracklang}, the script isn't included
+%in the file search. If it's needed then either require at least v1.4
+%or have a base ldf file that tries to load a version for the
+%particular script (which can be accessed with
+%\cs{CurrentTrackedScript}).
%Here's an example for a language with different writing systems.
%The resource file for Serbian \texttt{mypackage-serbian.ldf}:
%\begin{verbatim}
@@ -737,6 +772,9 @@ and~\ref{tab:nonisoopts}}
%}
%\end{verbatim}
%
+%With v1.4+ you would just need \texttt{mypackage-sr-Latn.ldf},
+%\texttt{mypackage-sr-Cyrl.ldf} for the regionless versions.
+%
%\section{Language Packages}
%\label{sec:summary-langpkg}
%
@@ -747,7 +785,9 @@ and~\ref{tab:nonisoopts}}
%the document author has requested. You can use the
%\styfmt{tracklang} package to identify this information
%by tracking the requested localisation, so that other packages
-%can have a consistent way of querying it.
+%can have a consistent way of querying it. (See also:
+%\href{https://www.dickimaw-books.com/latex/tracklang/langpkg.shtml}{Integrating
+%\texttt{tracklang.tex} into Language Packages}.)
%
%Generic use:
%\begin{verbatim}
@@ -755,7 +795,7 @@ and~\ref{tab:nonisoopts}}
%\end{verbatim}
%Alternative \LaTeX\ use:
%\begin{verbatim}
-%\RequirePackage{tracklang}[2016/10/07] % v1.3
+%\RequirePackage{tracklang}[2019/11/30] % v1.4
%\end{verbatim}
%Unlike \cs{input}, \cs{RequirePackage} will allow \styfmt{tracklang}
%to pick up the document class options, but using \cs{RequirePackage}
@@ -795,9 +835,8 @@ and~\ref{tab:nonisoopts}}
%\texttt{british}, but the above method will change that mapping
%to \texttt{UKenglish}.)
%
-%This now means that \cs{TrackLangAddToCaptions} command used
-%at the end of \sectionref{sec:summary-localepkg} above can
-%find your caption hook. You don't need the map if your dialect
+%This now means that \cs{TrackLangAddToHook} and \cs{TrackLangRedefHook} commands can
+%find your language hooks. You don't need the map if your dialect
%label is the same as \styfmt{tracklang}'s root language label
%for that locale. For example:
%\begin{verbatim}
@@ -820,11 +859,13 @@ and~\ref{tab:nonisoopts}}
%tracked with that language. For example:
%\begin{verbatim}
%\def\selectlanguage#1{%
-% % set up hyphenation patterns etc
% \SetCurrentTrackedDialect{#1}%
+% % set up hyphenation patterns etc
%}
%\end{verbatim}
-%See the example in \sectionref{sec:summary-doc}.
+%See the example in \sectionref{sec:summary-doc} or the example in
+%\href{https://www.dickimaw-books.com/latex/tracklang/langpkg.shtml}{Integrating
+%\texttt{tracklang.tex} into Language Packages}.
%
%\chapter{Generic Use}
%\label{sec:generic}
@@ -1342,9 +1383,9 @@ and~\ref{tab:nonisoopts}}
%\end{verbatim}
%will add a new dialect with the label \texttt{xxYYmod} and
%\begin{verbatim}
-%\TrackLanguageTag{xx-YY-Latn}
+%\TrackLanguageTag{xx-Latn-YY}
%\end{verbatim}
-%will add a new dialect with the label \texttt{xxYYLatn}.
+%will add a new dialect with the label \texttt{xxLatnYY}.
%
%\begin{important}
%If \cs{TrackLocale} or \cs{TrackLangFromEnv} find a modifier, the
@@ -1412,8 +1453,8 @@ and~\ref{tab:nonisoopts}}
%\begin{verbatim}
%\input tracklang
%\TrackLanguageTag{en-826}
-%Has en-GB-Latn been tracked?
-%\GetTrackedDialectFromLanguageTag{en-GB-Latn}{\thisdialect}%
+%Has en-Latn-GB been tracked?
+%\GetTrackedDialectFromLanguageTag{en-Latn-GB}{\thisdialect}%
%\ifx\thisdialect\empty
% No!
%\else
@@ -1834,22 +1875,22 @@ and~\ref{tab:nonisoopts}}
%that each language module has a different maintainer will the
%maintainers know what tag to use for their language?
%
-%To help with this, \styfmt{tracklang} provides:
+%\label{pg:filesearch}To help with this, \styfmt{tracklang} provides:
%\begin{definition}
%\ics{IfTrackedLanguageFileExists}\marg{dialect}\marg{prefix}\marg{suffix}\marg{true part}\marg{false part}
%\end{definition}
%This attempts to find the file called
-%\meta{prefix}\meta{tag}\meta{suffix} where \meta{tag} is determined
-%from \meta{dialect}. If the file is found
+%\meta{prefix}\meta{localeid}\meta{suffix} where \meta{localeid} is determined
+%from \meta{dialect} (see below). If the file is found
%\begin{definition}
%\ics{CurrentTrackedTag}
%\end{definition}
-%is set to \meta{tag} and \meta{true part} is done, otherwise
+%is set to \meta{localeid} and \meta{true part} is done, otherwise
%\meta{false part} is done. If this command
%is empty, then the dialect hasn't been detected. If the dialect
%has been detected, but no file can be found, then
%\ics{CurrentTrackedTag} is set to the final attempt at determining
-%\meta{tag}.
+%\meta{localeid}.
%
%There's a convenient shortcut command new to version 1.3:
%\begin{definition}[\DescribeMacro\TrackLangRequireDialect]
@@ -1908,12 +1949,11 @@ and~\ref{tab:nonisoopts}}
%Otherwise it may be empty or it may expand to the
%ISO~639-1 or ISO~639-2 or ISO~639-3 code.
%
-%As from version 1.3, the following are also available, but
-%don't contribute to the tag.
%\begin{definition}
%\ics{CurrentTrackedDialectModifier}
%\end{definition}
-%The dialect's modifier or empty if not set.
+%The dialect's modifier or empty if not set. (This is set but not
+%used in the set of possible \meta{localeid} values.)
%
%\begin{definition}
%\ics{CurrentTrackedDialectVariant}
@@ -1939,83 +1979,110 @@ and~\ref{tab:nonisoopts}}
%\begin{definition}
%\ics{CurrentTrackedDialectScript}
%\end{definition}
-%The dialect's script. If the
-%dialect doesn't have the script set, the default script
-%is used instead. For example, the file \texttt{foo-serbian.ldf}
-%could test for the existence of the file
-%\begin{verbatim}
-%foo-serbian-\CurrentTrackedDialectScript.ldf
-%\end{verbatim}
-%and load it if it exists. The most convenient way is to
-%use \cs{TrackLangRequestResource} (described below):
-%\begin{verbatim}
-%\TrackLangRequestResource
-% {serbian-\CurrentTrackedDialectScript}
-% {}% not found, set default code here
-%\end{verbatim}
-%The Cyrillic settings could then be placed in
-%\texttt{foo-serbian-Cyrl.ldf} and the Latin settings in
-%\texttt{foo-serbian-Latn.ldf}.
+%The dialect's script. If the dialect doesn't have the script set,
+%the default script for the language is used instead.
%
-%The \meta{tag} is determined as follows:
-%\begin{enumerate}
+%\cs{IfTrackedLanguageFileExists} behaves as follows:
+%\begin{itemize}
% \item If no dialect with the given label has been
% detected, the condition evaluates to \emph{false} and
% \ics{CurrentTrackedTag} is empty.
+% \item If a dialect with the given label has been detected, then:
+% \begin{itemize}
+% \item For each possible \meta{localeid} in an ordered set of tags determined by
+% the dialect label (see below), the first file matching
+% \meta{prefix}\meta{localeid}\meta{suffix} that's found on
+% \TeX's path results in the condition evaluating to \emph{true} and
+% \ics{CurrentTrackedTag} is set to the current \meta{localeid} in the
+% set. The rest of the set of possible values of \meta{localeid} is skipped.
+% \item If no file matching \meta{prefix}\meta{localeid}\meta{suffix} is
+% found on \TeX's path, then the condition evaluates to \emph{false}
+% and \ics{CurrentTrackedTag} is set to the final \meta{localeid} in the
+% set (the language label).
+% \end{itemize}
+%\end{itemize}
%
-% \item If there is no language code (ISO~639-1 or 639-2 or 639-3):
-%
-% \begin{enumerate}
-% \item If there's also no ISO~3166-1 code (\ics{CurrentTrackedRegion}
-% is empty), then \meta{tag} (\ics{CurrentTrackedTag}) is set to the
-% root language (\ics{CurrentTrackedLanguage}). If the file
-% \meta{prefix}\meta{tag}\meta{suffix} exists, the condition will evaluate to
-% \emph{true} otherwise it will evaluate to \emph{false}.
-%
-% \item If there is an ISO~3166-1 code, then \meta{tag}
-% (\ics{CurrentTrackedTag}) will be set to \ics{CurrentTrackedRegion}
-% and if the file \meta{prefix}\meta{tag}\meta{suffix} exists,
-% the condition will evaluate to \emph{true} otherwise it will evaluate
-% to \emph{false}.
-% \end{enumerate}
-%
-% \item If \ics{CurrentTrackedRegion} is empty (no ISO~3166-1
-% territory code)
-% then the \meta{tag} (\ics{CurrentTrackedTag}) is set to just
-% \ics{CurrentTrackedIsoCode}.
-%
-% If the file \meta{prefix}\meta{tag}\meta{suffix} exists, the condition will
-% evaluate to \emph{true}. If the file doesn't exist and
-% there are additional ISO language codes available (639-2 or 639-3)
-% then the test will be repeated for the next code.
-% If the test still fails, then the condition evaluates to \emph{false}.
-%
-% \item\label{itm:lang-country} The \meta{tag} (\ics{CurrentTrackedTag}) is then set to
-%\begin{verbatim}
-%\CurrentTrackedIsoCode-\CurrentTrackedRegion
-%\end{verbatim}
-% and if the file \meta{prefix}\meta{tag}\meta{suffix} exists,
-% the condition evaluates to \emph{true}.
-%
-% \item The \meta{tag} (\ics{CurrentTrackedTag}) is then set to
-% just \ics{CurrentTrackedIsoCode}, and if the file
-% \meta{prefix}\meta{tag}\meta{suffix} exists,
-% the condition evaluates to \emph{true}. If the file doesn't exist
-% and there are other ISO codes (639-2 or 639-3),
-% then \ics{CurrentTrackedIsoCode} is set to the next available
-% language code and step~\ref{itm:lang-country} is retried.
-%
-% \item If there is an ISO~3166-1 region code, the
-% \meta{tag} (\ics{CurrentTrackedTag}) is then set to
-% \ics{CurrentTrackedRegion},
-% and if the file \meta{prefix}\meta{tag}\meta{suffix} exists,
-% the condition evaluates to \emph{true}.
-%
-% \item Finally, the \meta{tag} (\ics{CurrentTrackedTag}) is set to
-% the root language label and if the file
-% \meta{prefix}\meta{tag}\meta{suffix} exist the condition
-% evaluates to \emph{true} otherwise it evaluates to \emph{false}.
-%
+%The ordered set of possible values of \meta{localeid} is determined from
+%the given dialect.
+%\begin{important}
+%The ordering has changed in version 1.4, which now also includes the
+%script and variant. This new ordering should typically make the more
+%common combinations closer to the start of the search.
+%\end{important}
+%The possible values of \meta{localeid} are listed below in the order of priority used
+%by \cs{IfTrackedLanguageFileExists}. Note that the set may contain
+%repetitions (for example, if the dialect label is the same as the
+%root language label). If an item contains an element that hasn't
+%been set (such as the ISO~639-3 code or a sub-language \meta{sublang} or variant) then
+%that item is skipped.
+%\begin{enumerate}
+%\item \meta{localeid} is just the value of \ics{CurrentTrackedLanguageTag}.
+%\item \meta{localeid} is just the dialect label.
+%
+%\item \meta{localeid} is
+%\meta{ISO~639-1}\texttt{-}\meta{sublang}\texttt{-}\meta{script}\texttt{-}\meta{region}.
+%\item \meta{localeid} is
+%\meta{ISO~639-1}\texttt{-}\meta{script}\texttt{-}\meta{region}.
+%\item \meta{localeid} is
+%\meta{ISO~639-1}\texttt{-}\meta{sublang}\texttt{-}\meta{region} (if there's no script or if
+%the script is the default for the given language).
+%\meta{ISO~639-1}\texttt{-}\meta{region} (if there's no script or if
+%the script is the default for the given language).
+%\item \meta{localeid} is
+%\meta{ISO~639-1}\texttt{-}\meta{sublang}\texttt{-}\meta{script}.
+%\item \meta{localeid} is
+%\meta{ISO~639-1}\texttt{-}\meta{script}.
+%\item \meta{localeid} is \meta{ISO~639-1}\texttt{-}\meta{sublang}.
+%\item \meta{localeid} is just \meta{ISO~639-1}.
+%
+%\item \meta{localeid} is
+%\meta{ISO~639-2}\texttt{-}\meta{sublang}\texttt{-}\meta{script}\texttt{-}\meta{region}.
+%\item \meta{localeid} is
+%\meta{ISO~639-2}\texttt{-}\meta{script}\texttt{-}\meta{region}.
+%\item \meta{localeid} is
+%\meta{ISO~639-2}\texttt{-}\meta{sublang}\texttt{-}\meta{region} (if there's no script or if
+%the script is the default for the given language).
+%\meta{ISO~639-2}\texttt{-}\meta{region} (if there's no script or if
+%the script is the default for the given language).
+%\item \meta{localeid} is
+%\meta{ISO~639-2}\texttt{-}\meta{sublang}\texttt{-}\meta{script}.
+%\item \meta{localeid} is
+%\meta{ISO~639-2}\texttt{-}\meta{script}.
+%\item \meta{localeid} is \meta{ISO~639-2}\texttt{-}\meta{sublang}.
+%\item \meta{localeid} is just \meta{ISO~639-2}.
+%
+%\item \meta{localeid} is
+%\meta{ISO~639-3}\texttt{-}\meta{sublang}\texttt{-}\meta{script}\texttt{-}\meta{region}.
+%\item \meta{localeid} is
+%\meta{ISO~639-3}\texttt{-}\meta{script}\texttt{-}\meta{region}.
+%\item \meta{localeid} is
+%\meta{ISO~639-3}\texttt{-}\meta{sublang}\texttt{-}\meta{region} (if there's no script or if
+%the script is the default for the given language).
+%\meta{ISO~639-3}\texttt{-}\meta{region} (if there's no script or if
+%the script is the default for the given language).
+%\item \meta{localeid} is
+%\meta{ISO~639-3}\texttt{-}\meta{sublang}\texttt{-}\meta{script}.
+%\item \meta{localeid} is
+%\meta{ISO~639-3}\texttt{-}\meta{script}.
+%\item \meta{localeid} is \meta{ISO~639-3}\texttt{-}\meta{sublang}.
+%\item \meta{localeid} is just \meta{ISO~639-3}.
+%
+%\item \meta{localeid} is just \meta{region}.
+%
+%\item \meta{localeid} is
+%\meta{ISO~639-1}\texttt{-}\meta{sublang}\texttt{-}\meta{variant}
+%or \meta{ISO~639-1}\texttt{-}\meta{variant} if \meta{sublang} is missing.
+%
+%\item \meta{localeid} is
+%\meta{ISO~639-2}\texttt{-}\meta{sublang}\texttt{-}\meta{variant}
+%or \meta{ISO~639-2}\texttt{-}\meta{variant} if \meta{sublang} is missing.
+%
+%\item \meta{localeid} is
+%\meta{ISO~639-3}\texttt{-}\meta{sublang}\texttt{-}\meta{variant}
+%or \meta{ISO~639-3}\texttt{-}\meta{variant} if \meta{sublang} is missing.
+%
+%\item \meta{localeid} is just the value of \ics{CurrentTrackedLanguage}
+%(the root language label).
%\end{enumerate}
%
%For example (pre v1.3):
@@ -2055,35 +2122,82 @@ and~\ref{tab:nonisoopts}}
%If, for example, \ics{ThisDialect} is \texttt{british}, then the file search will
%be in the order:
%\begin{enumerate}
-%\item \texttt{mypackage-british.ldf}
-%\item \texttt{mypackage-en-GB.ldf}
-%\item \texttt{mypackage-eng-GB.ldf}
-%\item \texttt{mypackage-en.ldf}
-%\item \texttt{mypackage-eng.ldf}
-%\item \texttt{mypackage-GB.ldf}
-%\item \texttt{mypackage-english.ldf}
+%\item \texttt{mypackage-en-GB.ldf} (language tag)
+%\item \texttt{mypackage-british.ldf} (dialect label)
+%
+%\item \texttt{mypackage-en-Latn-GB.ldf} (639-1 language code, script, region)
+%\item \texttt{mypackage-en-GB.ldf} (639-1 language code, region)
+%\item \texttt{mypackage-en-Latn.ldf} (639-1 language code, script)
+%\item \texttt{mypackage-en.ldf} (639-1 language code)
+%
+%\item \texttt{mypackage-eng-Latn-GB.ldf} (639-2 language code, script, region)
+%\item \texttt{mypackage-eng-GB.ldf} (639-2 language code, region)
+%\item \texttt{mypackage-eng-Latn.ldf} (639-2 language code, script)
+%\item \texttt{mypackage-eng.ldf} (639-2 language code)
+%
+%\item \texttt{mypackage-GB.ldf} (region)
+%\item \texttt{mypackage-english.ldf} (language label)
+%\end{enumerate}
+%
+%If, for example, \ics{ThisDialect} is \texttt{naustrian}, then the file search will
+%be in the order:
+%\begin{enumerate}
+%\item \texttt{mypackage-de-AT-1996.ldf} (language tag)
+%\item \texttt{mypackage-naustrian.ldf} (dialect label)
+%
+%\item \texttt{mypackage-de-Latn-AT.ldf} (639-1 language code, script, region)
+%\item \texttt{mypackage-de-AT.ldf} (639-1 language code, region)
+%\item \texttt{mypackage-de-Latn.ldf} (639-1 language code, script)
+%\item \texttt{mypackage-de.ldf} (639-1 language code)
+%
+%\item \texttt{mypackage-deu-Latn-AT.ldf} (639-2 language code, script, region)
+%\item \texttt{mypackage-deu-AT.ldf} (639-2 language code, region)
+%\item \texttt{mypackage-deu-Latn.ldf} (639-2 language code, script)
+%\item \texttt{mypackage-deu.ldf} (639-2 language code)
+%
+%\item \texttt{mypackage-AT.ldf} (region)
+%
+%\item \texttt{mypackage-de-1996.ldf} (639-1 language code, variant)
+%\item \texttt{mypackage-deu-1996.ldf} (639-2 language code, variant)
+%
+%\item \texttt{mypackage-german.ldf} (language label)
%\end{enumerate}
%
%If, for example, \ics{ThisDialect} is \texttt{francais}, then the file search will
%be in the order:
%\begin{enumerate}
-%\item \texttt{mypackage-francais.ldf}
-%\item \texttt{mypackage-fr.ldf}
-%\item \texttt{mypackage-fra.ldf}
-%\item \texttt{mypackage-french.ldf}
+%\item \texttt{mypackage-fr.ldf} (language tag)
+%\item \texttt{mypackage-francais.ldf} (dialect label)
+%\item \texttt{mypackage-fr-Latn.ldf} (639-1 language code, script)
+%\item \texttt{mypackage-fr.ldf} (639-1 language code)
+%\item \texttt{mypackage-fra-Latn.ldf} (639-2 language code, script)
+%\item \texttt{mypackage-fra.ldf} (639-2 language code)
+%\item \texttt{mypackage-french.ldf} (language)
%\end{enumerate}
%This is because the predefined \texttt{francais} option has no
%region assigned to it. Be careful if the dialect label is the actual
%root language. For example, if \cs{ThisDialect} is \texttt{french},
%then the file search will be in the order:
%\begin{enumerate}
-%\item \texttt{mypackage-french.ldf}
-%\item \texttt{mypackage-fr.ldf}
-%\item \texttt{mypackage-fra.ldf}
-%\item \texttt{mypackage-french.ldf}
+%\item \texttt{mypackage-fr.ldf} (language tag)
+%\item \texttt{mypackage-french.ldf} (dialect label)
+%\item \texttt{mypackage-fr-Latn.ldf} (639-1 language code, script)
+%\item \texttt{mypackage-fr.ldf} (639-1 language code)
+%\item \texttt{mypackage-fra-Latn.ldf} (639-2 language code, script)
+%\item \texttt{mypackage-fra.ldf} (639-2 language code)
+%\item \texttt{mypackage-french.ldf} (language)
%\end{enumerate}
%Note that the last try will always fail in this case since if the
-%file exists, it will be found on the first try.
+%file exists, it will be found on the second try.
+%
+%If the dialect label is identical to the root language label then it
+%means that all associated information is the default
+%for that language. For example, in the above case of \texttt{french},
+%the script is \texttt{Latn} and the region is unspecified. The root
+%language label can therefore be used as the fallback in the event of
+%no other match but for the specific case where the dialect is
+%identical to the root language then all unnecessary file name checks
+%can be skipped.
%
%If you're only providing support for the root languages (pre v1.3):
%\begin{verbatim}
@@ -2128,7 +2242,7 @@ and~\ref{tab:nonisoopts}}
%input through some other method.
%
%Within the resource file
-%\meta{pkgname}\texttt{-}\meta{tag}\texttt{.ldf},
+%\meta{pkgname}\texttt{-}\meta{localeid}\texttt{.ldf},
%you can identify the file using (new to version 1.3):
%\begin{definition}[\DescribeMacro\TrackLangProvidesResource]
%\cs{TrackLangProvidesResource}\marg{tag}\oarg{version info}
@@ -2139,10 +2253,10 @@ and~\ref{tab:nonisoopts}}
%suitable for other \TeX\ formats.
%
%The resource file can load another resource file
-%\meta{pkgname}\texttt{-}\meta{tag2}\texttt{.ldf},
+%\meta{pkgname}\texttt{-}\meta{localeid2}\texttt{.ldf},
%using (new to version 1.3):
%\begin{definition}[\DescribeMacro\TrackLangRequireResource]
-%\cs{TrackLangRequireResource}\marg{tag2}
+%\cs{TrackLangRequireResource}\marg{localeid2}
%\end{definition}
%For example, the dialect file \texttt{foo-en-GB.ldf} might need to
%load the root language resource file \texttt{foo-english.ldf}:
@@ -2158,13 +2272,13 @@ and~\ref{tab:nonisoopts}}
%\meta{code1} if it's loaded at this point or \meta{code2} if it's
%already been loaded then you can use (new to version 1.3):
%\begin{definition}[\DescribeMacro\TrackLangRequireResourceOrDo]
-%\cs{TrackLangRequireResourceOrDo}\marg{tag2}\marg{code1}\marg{code2}
+%\cs{TrackLangRequireResourceOrDo}\marg{localeid2}\marg{code1}\marg{code2}
%\end{definition}
%
%If you want to load a resource file if it exists (without an
%error if it doesn't exist), then you can use
%\begin{definition}[\DescribeMacro\TrackLangRequestResource]
-%\cs{TrackLangRequestResource}\marg{tag2}\marg{not found code}
+%\cs{TrackLangRequestResource}\marg{localeid2}\marg{not found code}
%\end{definition}
%If the file doesn't exist, \meta{not found code} is done.
%
@@ -2235,6 +2349,16 @@ and~\ref{tab:nonisoopts}}
%This is equivalent to
%\cs{TrackLangAddToHook}\marg{code}\verb|{captions}|.
%
+%There may be some hooks, such as \cs{date}\meta{label}, that need
+%redefining rather than appending to. As from v1.4, there's an
+%analogous command:
+%\begin{definition}[\DescribeMacro\TrackLangRedefHook]
+%\cs{TrackLangRedefHook}\marg{code}\marg{type}
+%\end{definition}
+%which will redefined the hook to do \meta{code}.
+%
+%Note that no expansion is performed on \meta{code} when appending or
+%redefining a hook.
%
%\section{Examples}
%\label{sec:examples}
@@ -2258,10 +2382,20 @@ and~\ref{tab:nonisoopts}}
% \NeedsTeXFormat{LaTeX2e}
% \ProvidesPackage{animals}
%
-% \RequirePackage{tracklang}[2016/10/07] %v1.3
+% \RequirePackage{tracklang}[2019/11/30] %v1.4
%
% % Any undeclared options are language settings:
-% \DeclareOption*{\TrackLanguageTag{\CurrentOption}}
+%
+% \DeclareOption*{%
+% \TrackIfKnownLanguage{\CurrentOption}%
+% {\PackageInfo{animals}{Tracking language `\CurrentOption'}}% successful
+% {% failed
+% \PackageError{animals}%
+% {Unknown language specification `\CurrentOption'}%
+% {You need to supply either a known dialect label or a valid language tag}%
+% }%
+% }
+%
% \ProcessOptions
%
% % Default definitions
@@ -2496,12 +2630,12 @@ and~\ref{tab:nonisoopts}}
%
%Earlier, I~mentioned the search order for
%\ics{IfTrackedLanguageFileExists} where if, for example, the dialect
-%is \texttt{british}, the file search will be:
+%is \texttt{british}, the file search (v1.4+) will be:
%\begin{enumerate}
%\item \texttt{mypackage-british.ldf}
%\item \texttt{mypackage-en-GB.ldf}
-%\item \texttt{mypackage-eng-GB.ldf}
%\item \texttt{mypackage-en.ldf}
+%\item \texttt{mypackage-eng-GB.ldf}
%\item \texttt{mypackage-eng.ldf}
%\item \texttt{mypackage-GB.ldf}
%\item \texttt{mypackage-english.ldf}
@@ -2511,7 +2645,7 @@ and~\ref{tab:nonisoopts}}
%countries have multiple official languages, which means that the country code on its
%own may not indicate the language.
%
-%The reason for including just the country code as the \meta{tag} in the
+%The reason for including just the country code as the \meta{localeid} in the
%file search is to allow for region rather than language dependent
%settings. For example, suppose I~want to write a package that needs
%to know whether to use imperial or metric measurements in the
@@ -2524,7 +2658,7 @@ and~\ref{tab:nonisoopts}}
%
%\cs{TrackLangRequireDialect} has an optional argument for adjusting
%the way the resource files are loaded. Suppose I have
-%\texttt{regions-}\meta{tag}\texttt{.ldf} resource files, then
+%\texttt{regions-}\meta{localeid}\texttt{.ldf} resource files, then
%\begin{verbatim}
%\TrackLangRequireDialect{regions}{\this@dialect}
%\end{verbatim}
@@ -2699,7 +2833,7 @@ and~\ref{tab:nonisoopts}}
%\end{document}
%\end{verbatim}
%
-%This works because the \meta{tag} search looks for the
+%This works because the \meta{localeid} search looks for the
%country code before the root language label. However, this will fail if
%the dialect label is the same as a root language label that has an
%associated territory, marked with \fnregion\ in
@@ -2913,7 +3047,9 @@ and~\ref{tab:nonisoopts}}
%than a package that provides multilingual support if the user has
%already loaded a language package) then you can load \styfmt{tracklang}
%and use the commands below to help other packages track your
-%provided languages.
+%provided languages. (See also:
+%\href{https://www.dickimaw-books.com/latex/tracklang/langpkg.shtml}{Integrating
+%\texttt{tracklang.tex} into Language Packages}.)
%
%The \styfmt{tracklang} package can be loaded using
%\begin{verbatim}
@@ -2927,7 +3063,7 @@ and~\ref{tab:nonisoopts}}
%When using \LaTeX, there's a difference between the two.
%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
+%language packages. This check is redundant since your package is
%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.
@@ -2945,12 +3081,96 @@ and~\ref{tab:nonisoopts}}
%
%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 document has already loaded it.
+%
+%To integrate \sty{tracklang} into your language package, you need to consider the following
+%steps:
+%\begin{enumerate}
+%\item Does \sty{tracklang} define your supported ISO~15924 language
+%scripts in the \texttt{tracklang-scripts.tex} file?
+%
+%If yes, then skip this step. Otherwise create a file with the
+%relevant \ics{TrackLangScriptMap} command for each unknown script and identify
+%this new file with \ics{TrackLangAddExtraScriptFile} (see
+%\sectionref{sec:newscripts}). This usually
+%won't be necessary unless you have a custom script or a child script
+%(a script that's a sub-category of another script).
+%
+%\item Does \sty{tracklang} recognise the root language?
+%
+%If yes, then skip this step.
+%
+%If your package is setting up a language that \sty{tracklang}
+%doesn't recognise then you will need to define the root language
+%using \cs{TrackLangNewLanguage} (see \sectionref{sec:newlanguages}).
+%
+%This usually won't be the case as \sty{tracklang} should support all
+%languages that have an official ISO~639-1 alpha-2 code.
+%
+%If you simply have a different label from \sty{tracklang} identifying the root language,
+%then you can just set up your label as a dialect using
+%\cs{TrackLangProvidePredefinedDialect} (see \sectionref{sec:predefinedlabels}).
+%
+%\item Does \sty{tracklang} define the relevant ISO~3166 region codes
+%in the \texttt{tracklang-region-codes.tex} file?
+%
+%If yes, then skip this step. Otherwise create a file with the
+%relevant \ics{TrackLangRegionMap} command for each new region and
+%identify this new file with \ics{TrackLangAddExtraRegionFile} (see
+%\sectionref{sec:newregions}). This usually won't be necessary as
+%\sty{tracklang} should recognise all countries that have an alpha-2
+%region code, but you may require it if you need a broader region,
+%such as EU.
+%
+%\item Do you want to define some convenient dialect labels that can
+%be used with \ics{TrackPredefinedDialect}?
+%
+%If no, then skip this step. Otherwise you can use
+%\ics{TrackLangProvidePredefinedLanguage} for root languages
+%and \ics{TrackLangProvidePredefinedDialect} for dialects with
+%additional information, such as a region, sub-language or script
+%(see \sectionref{sec:predefinedlabels}).
+%
+%\item In your language initialisation code, add the \sty{tracklang}
+%code to track the particular dialect (for example, use
+%\cs{TrackPredefinedDialect} for recognised dialect labels or
+%use the \cs{AddTracked}\ldots\ set of commands). See
+%\sectionref{sec:initnewlang}.
+%
+%\item In your language selection code (such as \cs{selectlanguage}), add
+%\cs{SetCurrentTrackedDialect}\marg{label} to allow the document
+%author to easily query the current localisation settings (such as
+%the region). See \sectionref{sec:selectlanguage}.
+%\end{enumerate}
+%
+%\section{Initialising a New Language or Dialect}
+%\label{sec:initnewlang}
+%
+%When the user requests a particular dialect through your language
+%package, you can notify \styfmt{tracklang} of this choice using
+%\begin{definition}
+%\cs{TrackPredefinedDialect}\marg{dialect}
+%\end{definition}
+%provided the dialect label is recognised by \styfmt{tracklang} (all those
+%listed in \refoptstables).
+%
+%If there's no matching dialect predefined by \styfmt{tracklang}, you
+%can just use \cs{TrackLocale} or \cs{TrackLanguageTag}
+%(described in \sectionref{sec:generic})
+%with the appropriate ISO codes \emph{if you're not providing caption
+%hooks}.
+%
+%If you are providing a captions hook mechanism
+%in the form \ics{captions\meta{dialect}}, then if \meta{dialect}
+%doesn't match the corresponding \styfmt{tracklang} dialect label,
+%you can provide a mapping using
+%\cs{SetTrackedDialectLabelMap}, described below.
%
-%When the language is set (using commands like \cs{selectlanguage}
-%)
-%it would be convenient to users and other packages if the
-%following command is also used:
+%\section{Switching Language or Dialect}
+%\label{sec:selectlanguage}
+%
+%When the document author switches to a different language or
+%dialect, the current localisation information can be set with:
%\begin{definition}[\DescribeMacro\SetCurrentTrackedDialect]
%\cs{SetCurrentTrackedDialect}\marg{dialect}
%\end{definition}
@@ -2994,25 +3214,118 @@ and~\ref{tab:nonisoopts}}
%to \meta{dialect}. See the accompanying sample file
%\texttt{sample-setlang.tex} for an example.)
%
-%When the user requests a particular dialect through your language
-%package, you can notify \styfmt{tracklang} of this choice using
-%\begin{definition}
-%\cs{TrackPredefinedDialect}\marg{dialect}
+%\section{Defining New Scripts}
+%\label{sec:newscripts}
+%
+%The \texttt{tracklang-scripts.tex} file isn't automatically loaded,
+%but if it is then, as from v1.4, it contains a hook at the end of
+%the file that can be used to load additional files that define
+%supplementary scripts. This entails creating a file called, say,
+%\texttt{mypackage-scripts.tex} that contains:
+%\begin{definition}[\DescribeMacro\TrackLangScriptMap]
+%\cs{TrackLangScriptMap}\marg{alpha code}\marg{numeric
+%code}\marg{name}\marg{direction}\marg{parent}
+%\end{definition}
+%The first argument \meta{alpha code} is the four-letter ISO~15924 code (such as
+%\texttt{Latn}), the second argument is the numeric code (such as
+%215), the third argument \meta{name} is the name of the script (such
+%as \texttt{Latin}), the fourth argument is the direction (such as
+%\texttt{LR} for left-to-right) and the final argument is the parent
+%script (leave blank if there's no parent). Note that this command will override any previous
+%mapping for those codes. No check is performed to determine if they
+%have already been defined.
+%
+%The supplementary file should be identified with:
+%\begin{definition}[\DescribeMacro\TrackLangAddExtraScriptFile]
+%\cs{TrackLangAddExtraScriptFile}\marg{filename}
+%\end{definition}
+%
+%\section{Defining New Regions}
+%\label{sec:newregions}
+%
+%The \texttt{tracklang-region-codes.tex} file isn't automatically loaded,
+%but if it is then, as from v1.4, it contains a hook at the end of
+%the file that can be used to load additional files that define
+%supplementary regions. This entails creating a file called, say,
+%\texttt{mypackage-regions.tex} that contains:
+%\begin{definition}[\DescribeMacro\TrackLangRegionMap]
+%\cs{TrackLangRegionMap}\marg{numeric code}\marg{alpha-2 code}\marg{alpha-3 code}
+%\end{definition}
+%where the first argument is the numeric region code (such as 826),
+%the second argument is the alpha-2 region code (such as \texttt{GB})
+%and the third argument is the alpha-3 region code (such as
+%\texttt{GBR}). Note that this command will override any previous
+%mapping for those codes. No check is performed to determine if they
+%have already been defined.
+%
+%The supplementary file should be identified with:
+%\begin{definition}[\DescribeMacro\TrackLangAddExtraRegionFile]
+%\cs{TrackLangAddExtraRegionFile}\marg{filename}
+%\end{definition}
+%
+%\section{Defining a New Language}
+%\label{sec:newlanguages}
+%
+%(New to version 1.3.)
+%If the root language isn't recognised by \styfmt{tracklang}
+%(not listed in \tableref{tab:rootlangopts}), then
+%it can be defined (but not tracked at this point) using:
+%\begin{definition}[\DescribeMacro\TrackLangNewLanguage]
+%\cs{TrackLangNewLanguage}\marg{language name}\marg{639-1
+%code}\marg{639-2 (T)}\marg{639-2 (B)}\marg{639-3}\marg{3166-1}\marg{default
+%script}
%\end{definition}
-%if the dialect label is recognised by \styfmt{tracklang} (all those
-%listed in \refoptstables).
+%where \meta{language name} is the root language name,
+%\meta{639-1 code} is the ISO 639-1 code for that language (may be
+%empty if there isn't one), \meta{639-2 (T)} is the ISO 639-2 (T)
+%code for that language (may be empty if there isn't one),
+%\meta{639-2 (B)} is the ISO 639-2 (B) code for that language (may be
+%empty if it's the same as \meta{639-2 (T)}), \meta{639-3} is the ISO
+%639-3 code for that language (empty if the same as the 639-2
+%code), \meta{3166-1} is the territory ISO code for languages that are only spoken in one
+%territory (should be empty if the language is spoken in multiple
+%territories), and \meta{default script} is the default script (empty
+%if disputed or varies according to region).
%
-%If there's no matching dialect predefined by \styfmt{tracklang}, you
-%can just use \cs{TrackLocale} or \cs{TrackLanguageTag}
-%(described in \sectionref{sec:generic})
-%with the appropriate ISO codes \emph{if you're not providing caption
-%hooks}.
+%You can then track this language using \cs{AddTrackedDialect} for
+%dialects or, if no regional variant is needed, you can instead use:
+%\begin{definition}[\DescribeMacro\AddTrackedLanguage]
+%\cs{AddTrackedLanguage}\marg{root language label}
+%\end{definition}
+%This is equivalent to \ics{AddTrackedDialect}\marg{root language
+%label}\marg{root language label}.
%
-%If you are providing a captions hook mechanism
-%in the form \ics{captions\meta{dialect}}, then if \meta{dialect}
-%doesn't match the corresponding \styfmt{tracklang} dialect label,
-%you can provide a mapping using
-%\cs{SetTrackedDialectLabelMap}, described below.
+%
+%\section{Defining New \styfmt{tracklang} Labels}
+%\label{sec:predefinedlabels}
+%
+%A dialect label may be predefined with associated information that
+%allows that particular combination to be easily tracked with
+%\cs{TrackPredefinedDialect}. In the case of a dialect label that
+%only requires the information provided in \cs{TrackLangNewLanguage}
+%you can use:
+%\begin{definition}[\DescribeMacro\TrackLangProvidePredefinedLanguage]
+%\cs{TrackLangProvidePredefinedLanguage}\marg{label}
+%\end{definition}
+%where \meta{label} corresponds to the language label used in
+%\cs{TrackLangNewLanguage}. This allows
+%\cs{TrackPredefinedDialect}\marg{label} to not only track the root
+%language but also the associated ISO codes.
+%
+%If the dialect label doesn't match the root language label then use:
+%\begin{definition}[\DescribeMacro\TrackLangProvidePredefinedDialect]
+%\cs{TrackLangProvidePredefinedDialect}\marg{dialect}\marg{language}\marg{region}\marg{modifier}\marg{variant}\marg{map}\marg{script}
+%\end{definition}
+%where \meta{dialect} is the new \sty{tracklang} dialect label,
+%\marg{language} is the \sty{tracklang} root language label,
+%\meta{region} is the ISO~3166-1 region code (may be empty),
+%\meta{modifier} is the modifier (may be empty), \meta{variant}
+%is the variant information (may be empty), \meta{map} is your
+%package's language label that corresponds to the \sty{tracklang}
+%dialect label supplied in the first argument (may be empty if
+%identical), and \meta{script} is the ISO~15914 alpha-4 script code
+%(may be empty if it's the same as the default script for the root
+%language).
%
%For compatibility with pre version 1.3,
%if the dialect isn't predefined by
@@ -3153,34 +3466,7 @@ and~\ref{tab:nonisoopts}}
%where \meta{dialect} is the dialect label and \meta{value} is the
%additional information.
%
-%(New to version 1.3.)
-%If the root language isn't recognised by \styfmt{tracklang}
-%(not listed in \tableref{tab:rootlangopts}), then
-%it can be defined (but not tracked at this point) using:
-%\begin{definition}[\DescribeMacro\TrackLangNewLanguage]
-%\cs{TrackLangNewLanguage}\marg{language name}\marg{639-1
-%code}\marg{639-2 (T)}\marg{639-2 (B)}\marg{639-3}\marg{3166-1}\marg{default
-%script}
-%\end{definition}
-%where \meta{language name} is the root language name,
-%\meta{639-1 code} is the ISO 639-1 code for that language (may be
-%empty if there isn't one), \meta{639-2 (T)} is the ISO 639-2 (T)
-%code for that language (may be empty if there isn't one),
-%\meta{639-2 (B)} is the ISO 639-2 (B) code for that language (may be
-%empty if it's the same as \meta{639-2 (T)}), \meta{639-3} is the ISO
-%639-3 code for that language (empty if the same as the 639-2
-%code), \meta{3166-1} is the territory ISO code for languages that are only spoken in one
-%territory (should be empty if the language is spoken in multiple
-%territories), and \meta{default script} is the default script (empty
-%if disputed or varies according to region).
-%
-%You can then track this language using \cs{AddTrackedDialect} for
-%dialects or, if no regional variant is needed, you can instead use:
-%\begin{definition}[\DescribeMacro\AddTrackedLanguage]
-%\cs{AddTrackedLanguage}\marg{root language label}
-%\end{definition}
-%This is equivalent to \ics{AddTrackedDialect}\marg{root language
-%label}\marg{root language label}.
+%\section{Example}
%
%Suppose I want to create a language package \texttt{alien.sty} that defines the
%\texttt{martian} language with regional dialects
@@ -3227,7 +3513,7 @@ and~\ref{tab:nonisoopts}}
% }
%\end{verbatim}
%The caption commands and language set up are in the files
-%\texttt{alien-}\meta{tag}\texttt{.ldf} as in the examples from
+%\texttt{alien-}\meta{localeid}\texttt{.ldf} as in the examples from
%\sectionref{sec:examples}. This allows for the user having already
%loaded \styfmt{tracklang} before \styfmt{alien} and used \cs{TrackLangFromEnv} to pick up
%the locale from the operating system's environment variables.
@@ -3297,7 +3583,7 @@ and~\ref{tab:nonisoopts}}
% packages such as \styfmt{etoolbox}.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tracklang}[2019/11/11 v1.3.9 (NLCT) Track Languages]
+\ProvidesPackage{tracklang}[2019/11/30 v1.4 (NLCT) Track Languages]
% \end{macrocode}
%\begin{macro}{\@tracklang@declareoption}
% Set up package options.
@@ -3593,7 +3879,7 @@ and~\ref{tab:nonisoopts}}
% Version info.
% \begin{macrocode}
\expandafter\def\csname ver@tracklang.tex\endcsname{%
- 2019/11/11 v1.3.9 (NLCT) Track Languages Generic Code}
+ 2019/11/30 v1.4 (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.)
@@ -3729,6 +4015,29 @@ and~\ref{tab:nonisoopts}}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@tracklang@ifcseqcsname}
+%\changes{1.4}{2019-11-30}{new}
+%\begin{definition}
+%\cs{@tracklang@ifcseqcsname}\marg{cs}\marg{csname}\marg{true}\marg{false}
+%\end{definition}
+%Compares two commands, the first is reference as a control sequence
+%the second is referenced as a control sequence name. Condition is
+%false if the second isn't defined (no check for the existence of
+%the first).
+% \begin{macrocode}
+\def\@tracklang@ifcseqcsname#1#2#3#4{%
+ \@tracklang@ifundef{#2}{#4}%
+ {%
+ \expandafter\ifx\expandafter#1\csname#2\endcsname
+ #3%
+ \else
+ #4%
+ \fi
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@tracklang@sanitize}
%\changes{1.3}{2016-10-07}{new}
% \begin{macrocode}
@@ -3745,15 +4054,17 @@ and~\ref{tab:nonisoopts}}
%
%\begin{macro}{\@tracklang@firstoftwo}
%\changes{1.3}{2016-10-07}{new}
+%\changes{1.4}{2019-11-30}{made long}
% \begin{macrocode}
-\def\@tracklang@firstoftwo#1#2{#1}
+\long\def\@tracklang@firstoftwo#1#2{#1}
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@tracklang@secondoftwo}
%\changes{1.3}{2016-10-07}{new}
+%\changes{1.4}{2019-11-30}{made long}
% \begin{macrocode}
-\def\@tracklang@secondoftwo#1#2{#2}
+\long\def\@tracklang@secondoftwo#1#2{#2}
% \end{macrocode}
%\end{macro}
%
@@ -3842,6 +4153,28 @@ and~\ref{tab:nonisoopts}}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\ifTrackLangShowVerbose}
+%\changes{1.4}{2019-11-30}{new}
+% Allow user to switch verbose (debugging) information messages on or off.
+% Note that verbose information will be off regardless of this
+% switch if the info switch is off.
+% \begin{macrocode}
+\newif\ifTrackLangShowVerbose
+\TrackLangShowVerbosefalse
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@verbose}
+%\changes{1.4}{2019-11-30}{new}
+% \begin{macrocode}
+\def\@tracklang@verbose#1{%
+ \ifTrackLangShowVerbose
+ \@tracklang@info{#1}%
+ \fi
+}%
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@tracklang@IfFileExists}
% \begin{macrocode}
\ifx\IfFileExists\undefined
@@ -5201,9 +5534,11 @@ and~\ref{tab:nonisoopts}}
% \begin{macrocode}
\def\SetCurrentTrackedDialect#1{%
\edef\CurrentTrackedDialect{#1}%
+ \@tracklang@verbose{Setting current tracked dialect `\CurrentTrackedDialect'}%
\IfTrackedDialect{\CurrentTrackedDialect}%
{}%
{%
+ \@tracklang@verbose{Not a recognised tracklang label}%
% \end{macrocode}
% Has a mapping from this dialect to a tracklang dialect been supplied?
% \begin{macrocode}
@@ -5213,6 +5548,7 @@ and~\ref{tab:nonisoopts}}
{%
\edef\CurrentTrackedDialect{\GetTrackedDialectFromMapping
{\CurrentTrackedDialect}}%
+ \@tracklang@verbose{Mapping found to tracklang label `\CurrentTrackedDialect'}%
}%
{%
% \end{macrocode}
@@ -5220,32 +5556,41 @@ and~\ref{tab:nonisoopts}}
% \begin{macrocode}
\IfTrackedLanguage{#1}%
{%
+ \@tracklang@verbose{Supplied label is a root language.
+ Finding last tracked dialect for language `#1'}%
% \end{macrocode}
% Get the last dialect to be tracked with this language.
-% \begin{macrocode}
+% \begin{macrocode}
\edef\@tracklang@dialects{\TrackedDialectsFromLanguage{#1}}%
\@tracklang@for\@tracklang@dialect:=\@tracklang@dialects\do{%
\let\CurrentTrackedDialect\@tracklang@dialect
}%
}%
- {}%
+ {%
+ \@tracklang@verbose{No tracklang dialect found for label `#1'}%
+ }%
}%
}%
{%
+ \@tracklang@verbose{No mapping found}%
% \end{macrocode}
% Has the root language name been supplied?
% \begin{macrocode}
\IfTrackedLanguage{#1}%
{%
+ \@tracklang@verbose{Supplied label is a root language.
+ Finding last tracked dialect for language `#1'}%
% \end{macrocode}
% Get the last dialect to be tracked with this language.
-% \begin{macrocode}
+% \begin{macrocode}
\edef\@tracklang@dialects{\TrackedDialectsFromLanguage{#1}}%
\@tracklang@for\@tracklang@dialect:=\@tracklang@dialects\do{%
\let\CurrentTrackedDialect\@tracklang@dialect
}%
}%
- {}%
+ {%
+ \@tracklang@verbose{No tracklang dialect found for label `#1'}%
+ }%
}%
}%
\IfTrackedDialect{\CurrentTrackedDialect}%
@@ -5308,6 +5653,17 @@ and~\ref{tab:nonisoopts}}
}%
}%
}%
+ \@tracklang@verbose{Current tracked dialect: `\CurrentTrackedDialect'.\MessageBreak
+ Language: `\CurrentTrackedLanguage'.\MessageBreak
+ ISO code: `\CurrentTrackedIsoCode'.\MessageBreak
+ Sub-lang: `\CurrentTrackedDialectSubLang'.\MessageBreak
+ Modifier: `\CurrentTrackedDialectModifier'.\MessageBreak
+ Variant: `\CurrentTrackedDialectVariant'.\MessageBreak
+ Script: `\CurrentTrackedDialectScript'.\MessageBreak
+ Region: `\CurrentTrackedRegion'.\MessageBreak
+ Additional: `\CurrentTrackedDialectAdditional'.\MessageBreak
+ Tag: `\CurrentTrackedLanguageTag'.
+ }%
}%
{%
\@tracklang@warn{Unknown dialect label `#1' passed to
@@ -6157,6 +6513,86 @@ and~\ref{tab:nonisoopts}}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@tracklang@input@extra@region@filelist}
+%\changes{1.4}{2019-11-30}{new}
+% \begin{macrocode}
+\def\@tracklang@extra@region@filelist{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\TrackLangAddExtraRegionFile}
+%\changes{1.4}{2019-11-30}{new}
+% Add a file name to the list of extra region code files that should
+% be input by tracklang-regions-codes.tex
+% \begin{macrocode}
+\def\TrackLangAddExtraRegionFile#1{%
+ \ifx\TrackLangRegionMap\undefined
+ \else
+% \end{macrocode}
+% tracklang-region-codes.tex has already been loaded so input the file
+% now.
+% \begin{macrocode}
+ \@tracklang@input #1\relax
+ \fi
+ \@tracklang@add{#1}{\@tracklang@extra@region@filelist}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@input@extra@region@files}
+%\changes{1.4}{2019-11-30}{new}
+% Iterate through list of extra region files to allow other packages
+% to define new regions.
+% \begin{macrocode}
+\def\@tracklang@input@extra@region@files{%
+ \@tracklang@for\@tracklang@currfile:=\@tracklang@extra@region@filelist\do
+ {%
+ \@tracklang@input\@tracklang@currfile
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@input@extra@script@filelist}
+%\changes{1.4}{2019-11-30}{new}
+% \begin{macrocode}
+\def\@tracklang@extra@script@filelist{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\TrackLangAddExtraScriptFile}
+%\changes{1.4}{2019-11-30}{new}
+% Add the given file name to the list of files that should be
+% automatically loaded by tracklang-scripts.tex
+% \begin{macrocode}
+\def\TrackLangAddExtraScriptFile#1{%
+ \ifx\TrackLangScriptMap\undefined
+ \else
+% \end{macrocode}
+% tracklang-scripts.tex has already been loaded so input the file
+% now.
+% \begin{macrocode}
+ \@tracklang@input #1\relax
+ \fi
+ \@tracklang@add{#1}{\@tracklang@extra@script@filelist}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@input@extra@script@files}
+%\changes{1.4}{2019-11-30}{new}
+% Iterate through list of extra script files to allow other packages
+% to define new scripts.
+% \begin{macrocode}
+\def\@tracklang@input@extra@script@files{%
+ \@tracklang@for\@tracklang@currfile:=\@tracklang@extra@script@filelist\do
+ {%
+ \@tracklang@input\@tracklang@currfile
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\GetTrackedDialectFromLanguageTag}
%\changes{1.3}{2016-10-07}{new}
%\begin{definition}
@@ -6589,6 +7025,21 @@ and~\ref{tab:nonisoopts}}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\TrackLangProvidePredefinedLanguage}
+%\changes{1.4}{2019-11-30}{new}
+% Set up a language label for use with \cs{TrackPredefinedDialect}.
+% Note that this doesn't check if already defined.
+% \begin{macrocode}
+\def\TrackLangProvidePredefinedLanguage#1{%
+ \@tracklang@namedef{@tracklang@add@#1}{%
+ \AddTrackedLanguage{#1}%
+ \AddTrackedLanguageIsoCodes{#1}%
+ \AddTrackedCountryIsoCode{#1}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\TrackLangDeclareLanguageOption}
%\changes{1.3}{2016-10-07}{new}
%\begin{definition}
@@ -6605,11 +7056,7 @@ and~\ref{tab:nonisoopts}}
\@tracklang@ifundef{@tracklang@add@#1}%
{%
\TrackLangNewLanguage{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
- \@tracklang@namedef{@tracklang@add@#1}{%
- \AddTrackedLanguage{#1}%
- \AddTrackedLanguageIsoCodes{#1}%
- \AddTrackedCountryIsoCode{#1}%
- }%
+ \TrackLangProvidePredefinedLanguage{#1}%
\@tracklang@declareoption{#1}%
}%
{%
@@ -7949,21 +8396,20 @@ and~\ref{tab:nonisoopts}}
%\subsection{Predefined Dialects}\label{sec:predefined}
%
% Provide some predefined dialects.
-%\begin{macro}{\TrackLangDeclareDialectOption}
-%\changes{1.3}{2016-10-07}{new}
+%\begin{macro}{\TrackLangProvidePredefinedDialect}
+%\changes{1.4}{2019-11-30}{new}
%\begin{definition}
-%\cs{TrackLangDeclareDialectOption}\marg{dialect}\marg{root
+%\cs{TrackLangProvidePredefinedDialect}\marg{dialect}\marg{root
%language}\marg{3166-1
%code}\marg{modifier}\marg{variant}\marg{map}\marg{script}
%\end{definition}
-%The option name is the same as the dialect name. The arguments
+%This defines a predefined dialect label that can be used
+%by \cs{TrackPredefinedDialect}. The arguments
%must be expanded before use. The final argument \meta{map} is the
%mapping from \meta{dialect} to the closest \styfmt{babel} dialect
-%label. May be empty if no relevant mapping.
+%label.
% \begin{macrocode}
-\def\TrackLangDeclareDialectOption#1#2#3#4#5#6#7{%
- \@tracklang@ifundef{@tracklang@add@#1}%
- {%
+\def\TrackLangProvidePredefinedDialect#1#2#3#4#5#6#7{
\ifx\relax#3\relax
% \end{macrocode}
% No region.
@@ -8108,6 +8554,26 @@ and~\ref{tab:nonisoopts}}
\expandafter\def\csname @tracklang@add@#1\expandafter\endcsname
\expandafter{\@tracklang@tmp\SetTrackedDialectScript{#1}{#7}}%
\fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\TrackLangDeclareDialectOption}
+%\changes{1.3}{2016-10-07}{new}
+%\begin{definition}
+%\cs{TrackLangDeclareDialectOption}\marg{dialect}\marg{root
+%language}\marg{3166-1
+%code}\marg{modifier}\marg{variant}\marg{map}\marg{script}
+%\end{definition}
+%The option name is the same as the dialect name. The arguments
+%must be expanded before use. The final argument \meta{map} is the
+%mapping from \meta{dialect} to the closest \styfmt{babel} dialect
+%label. May be empty if no relevant mapping.
+% \begin{macrocode}
+\def\TrackLangDeclareDialectOption#1#2#3#4#5#6#7{%
+ \@tracklang@ifundef{@tracklang@add@#1}%
+ {%
+ \TrackLangProvidePredefinedDialect{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
\@tracklang@declareoption{#1}%
}%
{%
@@ -9369,21 +9835,20 @@ and~\ref{tab:nonisoopts}}
%part}\marg{false part}
%\end{definition}
% Determines if the file \meta{prefix}\meta{tag}\meta{suffix}
-% exists, where \meta{tag} is an ISO code or ISO codes identifying
+% exists, where \meta{tag} is an ISO code or ISO codes or label identifying
% the language. If \meta{dialect} hasn't been identified
% as a tracked dialect, this just does \meta{false part},
-% otherwise this first tries with \meta{tag} set to
-% \meta{dialect}, then tries with \meta{tag} set to the root
-% language label for \meta{dialect}, then tries with \meta{tag} set to \meta{ISO
-% 639-1 code}\texttt{-}\meta{ISO 3166-1 code}, then tries with
-% \meta{tag} set to \meta{ISO 639-1 code}, then tries with
-% \meta{tag} set to \meta{ISO 639-2 code}\texttt{-}\meta{ISO 3166-1
-% code}, then tries with \meta{tag} set to \meta{ISO 639-2 code}.
+% otherwise this tries various different combinations for \meta{tag}.
% If the file \meta{prefix}\meta{tag}\meta{suffix} exists,
% \cs{CurrentTrackedTag} is set to \meta{tag} and \meta{true part}
% is performed, otherwise \meta{false part} is performed.
+% The order of priority has changed with version 1.4 and now
+% includes a check for variations that include the script. If the
+% original ordering is specifically required, the old behaviour can
+% be obtained with \cs{IfTrackedLanguageFileExists@orig}.
% \begin{macrocode}
\long\def\IfTrackedLanguageFileExists#1#2#3#4#5{%
+ \@tracklang@verbose{Finding file for dialect `#1'}%
% \end{macrocode}
%Initialise.
% \begin{macrocode}
@@ -9395,16 +9860,1756 @@ and~\ref{tab:nonisoopts}}
\IfTrackedDialect{#1}%
{%
% \end{macrocode}
-% Try just the dialect label.
+% Save the three types of language codes to for reference.
% \begin{macrocode}
+ \edef\CurrentTrackedIsoCodeI{\TrackedIsoCodeFromLanguage
+ {639-1}{\CurrentTrackedLanguage}}%
+ \edef\CurrentTrackedIsoCodeII{\TrackedIsoCodeFromLanguage
+ {639-2}{\CurrentTrackedLanguage}}%
+ \edef\CurrentTrackedIsoCodeIII{\TrackedIsoCodeFromLanguage
+ {639-3}{\CurrentTrackedLanguage}}%
+% \end{macrocode}
+%\changes{1.4}{2019-11-30}{added check for scripts}
+% Earlier versions of this had too many nested conditionals, which
+% was confusing and hard to follow. This is a rewrite that removes
+% the nesting and adds extra checks for dialect scripts.
+% \begin{macrocode}
+ \@tracklang@test@if@file@exists@for@tag{#1}{#2}{#3}%
+ \@tracklang@if@file@exists{#4}{#5}%
+ }%
+ {#5}% unknown dialect
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@noop}
+%\changes{1.4}{2019-11-30}{new}
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@noop#1#2#3{}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@tag}
+%\changes{1.4}{2019-11-30}{new}
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@tag#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedLanguageTag
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@secondoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@dialect
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@dialect}
+%\changes{1.4}{2019-11-30}{new}
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@dialect#1#2#3{%
+ \edef\CurrentTrackedTag{#1}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-1}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+ \let\CurrentTrackedIsoCode\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@scriptregion
+ }%
+ }%
+ }%
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIscriptregion}
+%\changes{1.4}{2019-11-30}{new}
+% Test \meta{639-1}-\meta{sublang}-\meta{script}-\meta{region} combination.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIscriptregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeI
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \ifx\CurrentTrackedDialectScript\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \fi
+ \ifx\CurrentTrackedRegion\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedRegion\empty
+ \ifx\CurrentTrackedDialectScript\empty
+% \end{macrocode}
+%No script or region set. If there's a sub-language code then try
+%again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langII
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langII
+ }%
+ \fi
+ \else
+% \end{macrocode}
+%No region set. If there's a sub-language code then try
+%again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscript
+ }%
+ \fi
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectScript\empty
+% \end{macrocode}
+% Region is set but no script. If there's a sub-language code
+% then try again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipregion
+ }%
+ \fi
+ \else
+% \end{macrocode}
+% Region and script set. If there's a sub-language code
+% then try again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript
+ -\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptregion
+ }%
+ \fi
+ \fi
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIscriptregion}
+%\changes{1.4}{2019-11-30}{new}
+% Test \meta{639-2}-\meta{sublang}-\meta{script}-\meta{region} combination.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIscriptregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \ifx\CurrentTrackedDialectScript\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \fi
+ \ifx\CurrentTrackedRegion\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedRegion\empty
+ \ifx\CurrentTrackedDialectScript\empty
+% \end{macrocode}
+%No script or region set. If there's a sub-language code then try
+%again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ }%
+ \fi
+ \else
+% \end{macrocode}
+%No region set. If there's a sub-language code then try
+%again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ }%
+ \fi
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectScript\empty
+% \end{macrocode}
+% Region is set but no script. If there's a sub-language code
+% then try again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ }%
+ \fi
+ \else
+% \end{macrocode}
+% Both region and script are set. If there's a sub-language code
+% then try again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript
+ -\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptregion
+ }%
+ \fi
+ \fi
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIscriptregion}
+%\changes{1.4}{2019-11-30}{new}
+% Test \meta{639-3}-\meta{sublang}-\meta{script}-\meta{region} combination.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIscriptregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \ifx\CurrentTrackedDialectScript\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \fi
+ \ifx\CurrentTrackedRegion\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedRegion\empty
+ \ifx\CurrentTrackedDialectScript\empty
+% \end{macrocode}
+%No script or region set. If there's a sub-language code then try
+%again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ \else
+% \end{macrocode}
+%No region set. If there's a sub-language code then try
+%again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ }%
+ \fi
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectScript\empty
+% \end{macrocode}
+% Region is set but no script. If there's a sub-language code
+% then try again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipregion
+ }%
+ \fi
+ \else
+% \end{macrocode}
+% Both region and script are set. If there's a sub-language code
+% then try again without it.
+% \begin{macrocode}
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript
+ -\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptregion
+ }%
+ \fi
+ \fi
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIskipscript}
+%\changes{1.4}{2019-11-30}{new}
+%No region. Has a script but already tested with 639-1 and script.
+%Just test language code alone.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIskipscript#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscript
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \else
+% \end{macrocode}
+% Try without sub-language code.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscript
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIscript}
+%\changes{1.4}{2019-11-30}{new}
+%No region but has a script.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIscript#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIskipscript}
+%\changes{1.4}{2019-11-30}{new}
+%No region. Has a script but already checked.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIskipscript#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIscript}
+%\changes{1.4}{2019-11-30}{new}
+%No region but has a script.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIscript#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIskipscript}
+%\changes{1.4}{2019-11-30}{new}
+%No region. Has a script but already checked.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIskipscript#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%No script. Has a region but already tested with 639-1 and script.
+%Just test language code alone.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \else
+% \end{macrocode}
+% Try without sub-language code.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIregion}
+%\changes{1.4}{2019-11-30}{new}
+%No script but has a region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%No script. Has a region but already tested with 639-2 and region.
+%Just test language code alone.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \else
+% \end{macrocode}
+% Try without sub-language code.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIregion}
+%\changes{1.4}{2019-11-30}{new}
+%No script but has a region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%No script. Has a region but already tested with 639-3 and region.
+%Just test language code alone.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+% \end{macrocode}
+% Try without sub-language code.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIregion}
+%\changes{1.4}{2019-11-30}{new}
+%No script but has a region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIskipscriptregion}
+%\changes{1.4}{2019-11-30}{new}
+%Already tested script and region. Test without script if the script
+%is the default then without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIskipscriptregion#1#2#3{%
+% \end{macrocode}
+% Is the script the default for this dialect?
+% \begin{macrocode}
+ \@tracklang@ifcseqcsname\CurrentTrackedDialectScript
+ {@tracklang@knowniso@script@\CurrentTrackedLanguage}%
+ {%
+% \end{macrocode}
+% Try just language code and region.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try just language code and script.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptskipregion
+ }%
+ \fi
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Script isn't the default.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptskipregion
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIscriptskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%Test with script and without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try just language code.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIskipscriptskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%Test without script and without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIskipscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try other language codes with script and region.
+% \begin{macrocode}
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+% \end{macrocode}
+% No other language codes. Try just the region.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ }%
+ \else
+% \end{macrocode}
+% Try just language code.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+% \end{macrocode}
+% Try other language codes with script and region.
+% \begin{macrocode}
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+% \end{macrocode}
+% No other language codes. Try just the region.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIskipscriptregion}
+%\changes{1.4}{2019-11-30}{new}
+%Already tested script and region. Test without script if the script
+%is the default then without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIskipscriptregion#1#2#3{%
+% \end{macrocode}
+% Is the script the default for this dialect?
+% \begin{macrocode}
+ \@tracklang@ifcseqcsname\CurrentTrackedDialectScript
+ {@tracklang@knowniso@script@\CurrentTrackedLanguage}%
+ {%
+% \end{macrocode}
+% Try just language code and region.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try just language code and script.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptskipregion
+ }%
+ \fi
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Script isn't the default.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptskipregion
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIscriptskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%Test with script and without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try just language code.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIskipscriptskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%Test without script and without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIskipscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try other language code with script and region.
+% \begin{macrocode}
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+% \end{macrocode}
+% No other language codes. Try just the region.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ \else
+% \end{macrocode}
+% Try just language code.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+% \end{macrocode}
+% Try other language codes with script and region.
+% \begin{macrocode}
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+% \end{macrocode}
+% No other language codes. Try just the region.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIskipscriptregion}
+%\changes{1.4}{2019-11-30}{new}
+%Already tested script and region. Test without script if the script
+%is the default then without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIskipscriptregion#1#2#3{%
+% \end{macrocode}
+% Is the script the default for this dialect?
+% \begin{macrocode}
+ \@tracklang@ifcseqcsname\CurrentTrackedDialectScript
+ {@tracklang@knowniso@script@\CurrentTrackedLanguage}%
+ {%
+% \end{macrocode}
+% Try just language code and region.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try just language code and script.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptskipregion
+ }%
+ \fi
+ }%
+ }%
+ {%
+% \end{macrocode}
+% Script isn't the default.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptskipregion
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIscriptskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%Test with script and without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% Try just language code.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptskipregion
+ \else
+% \end{macrocode}
+% Try without sub-language.
+% \begin{macrocode}
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIskipscriptskipregion}
+%\changes{1.4}{2019-11-30}{new}
+%Test without script and without region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIskipscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+% \end{macrocode}
+% No other language codes. Try just the region.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ \else
+% \end{macrocode}
+% Try just language code.
+% \begin{macrocode}
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+% \end{macrocode}
+% No other language codes. Try just the region.
+% \begin{macrocode}
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langII}
+%\changes{1.4}{2019-11-30}{new}
+%No region or script.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langII#1#2#3{%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ }%
+ \fi
+ }%
+ {%
+ \fi
+ }%
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIII}
+%\changes{1.4}{2019-11-30}{new}
+%No region or script.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIII#1#2#3{%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ }%
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@region}
+%\changes{1.4}{2019-11-30}{new}
+%Test just the region.
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@region#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedRegion
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langvariant}
+%\changes{1.4}{2019-11-30}{new}
+%Test language code and variant
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langvariant#1#2#3{%
+ \ifx\CurrentTrackedDialectVariant\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ \else
+ \IfTrackedLanguageHasIsoCode{639-1}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIvariant
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIvariant
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIvariant
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ }%
+ }%
+ \fi
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIvariant}
+%\changes{1.4}{2019-11-30}{new}
+%Test 639-1 code and variant
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIvariant#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeI
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectVariant}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIvariant
+ }
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIvariant
+ }
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ }%
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIvariant}
+%\changes{1.4}{2019-11-30}{new}
+%Test 639-2 code and variant
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIvariant#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectVariant}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIvariant
+ }
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@langIIIvariant}
+%\changes{1.4}{2019-11-30}{new}
+%Test 639-3 code and variant
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@langIIIvariant#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectVariant}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@test@if@file@exists@for@rootlang}
+%\changes{1.4}{2019-11-30}{new}
+%Test the root language label. (Final test.)
+% \begin{macrocode}
+\def\@tracklang@test@if@file@exists@for@rootlang#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedLanguage
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ }%
+ {}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\IfTrackedLanguageFileExists@orig}
+%\changes{1.4}{2019-11-30}{new}
+%The new definition of \cs{IfTrackedLanguageFileExists} has a
+%different order of priority. If the original behaviour is
+%specifically required, this has the pre version 1.4 definition.
+% \begin{macrocode}
+\long\def\IfTrackedLanguageFileExists@orig#1#2#3#4#5{%
+ \def\CurrentTrackedTag{}%
+ \SetCurrentTrackedDialect{#1}%
+ \IfTrackedDialect{#1}%
+ {%
\edef\CurrentTrackedTag{#1}%
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% No file found for dialect label, try \meta{ISO 639-1}-\meta{ISO
-% 3166-1} next.
-% \begin{macrocode}
\IfTrackedLanguageHasIsoCode
{639-1}{\CurrentTrackedLanguage}
{%
@@ -9412,17 +11617,10 @@ and~\ref{tab:nonisoopts}}
\TrackedIsoCodeFromLanguage
{639-1}{\CurrentTrackedLanguage}}%
\ifx\CurrentTrackedRegion\empty
-% \end{macrocode}
-% No region, just try ISO 639-1 code
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedIsoCode
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}
{%
-% \end{macrocode}
-% No region and file for just \meta{ISO 639-1 code}. Try ISO 639-2 code.
-% (No check for 639-3 since it has 639-1 code.)
-% \begin{macrocode}
\IfTrackedLanguageHasIsoCode
{639-2}{\CurrentTrackedLanguage}
{%
@@ -9433,35 +11631,21 @@ and~\ref{tab:nonisoopts}}
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Try root language.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
}%
}%
{%
-% \end{macrocode}
-% No region, no ISO 639-1 code and no ISO 639-2 code.
-% No file found for dialect label, try root language label next.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
}%
}%
\else
-% \end{macrocode}
-% Has a region so try \meta{ISO 639-1 code}\texttt{-}\meta{region}
-% \begin{macrocode}
\edef\CurrentTrackedTag{%
\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}
{%
-% \end{macrocode}
-% Has a region but \meta{ISO 639-1 code}\texttt{-}\meta{region}
-% not found, so try \meta{ISO 639-2 code}\texttt{-}\meta{region}
-% \begin{macrocode}
\IfTrackedLanguageHasIsoCode
{639-2}{\CurrentTrackedLanguage}
{%
@@ -9474,35 +11658,21 @@ and~\ref{tab:nonisoopts}}
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Has a region but \meta{ISO 639-1 code}\texttt{-}\meta{region} not
-% found and \meta{ISO 639-2 code}\texttt{-}\meta{region} not found,
-% so try just \meta{ISO 639-1 code}
-% \begin{macrocode}
\let\CurrentTrackedTag\org@currenttrackedisocode
\let\org@currenttrackedisocode\CurrentTrackedIsoCode
\let\CurrentTrackedIsoCode\CurrentTrackedTag
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}
{%
-% \end{macrocode}
-% Try just the ISO 639-2 code.
-% \begin{macrocode}
\let\CurrentTrackedIsoCode\org@currenttrackedisocode
\let\CurrentTrackedTag\CurrentTrackedIsoCode
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Try just the region.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedRegion
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Try the root language.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
}%
@@ -9511,24 +11681,14 @@ and~\ref{tab:nonisoopts}}
}%
}%
{%
-% \end{macrocode}
-% Has a region but \meta{ISO 639-1 code}\texttt{-}\meta{region}
-% not found, and no ISO 639-2 code so just try \meta{ISO 639-1 code}
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedIsoCode
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Just try the region
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedRegion
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Try the root language.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
}%
@@ -9538,9 +11698,6 @@ and~\ref{tab:nonisoopts}}
\fi
}%
{%
-% \end{macrocode}
-% No ISO 639-1 code. Try ISO 639-2 code.
-% \begin{macrocode}
\IfTrackedLanguageHasIsoCode
{639-2}{\CurrentTrackedLanguage}
{%
@@ -9549,9 +11706,6 @@ and~\ref{tab:nonisoopts}}
{639-2}{\CurrentTrackedLanguage}}%
}%
{%
-% \end{macrocode}
-% No ISO 639-1 code or ISO 639-2 code. Try 639-3 code.
-% \begin{macrocode}
\IfTrackedLanguageHasIsoCode
{639-3}{\CurrentTrackedLanguage}
{%
@@ -9564,78 +11718,41 @@ and~\ref{tab:nonisoopts}}
}%
}%
\ifx\CurrentTrackedIsoCode\empty
-% \end{macrocode}
-% No ISO 639-1 code or ISO 639-2 code. Try just the region.
-% \begin{macrocode}
\ifx\CurrentTrackedRegion\empty
-% \end{macrocode}
-% No region. Try the root language.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
\else
-% \end{macrocode}
-% Try the region.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedRegion
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Try the root language.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
}%
\fi
\else
-% \end{macrocode}
-% Has ISO 639-2 or 639-3 code.
-% \begin{macrocode}
\ifx\CurrentTrackedRegion\empty
-% \end{macrocode}
-% Has ISO 639-2 or 639-3 code but no region.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedIsoCode
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Try the root language.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
}%
\else
-% \end{macrocode}
-% Has ISO 639-2 or 639-3 code and a region. Try \meta{ISO
-% 639-2 or 639-3}\texttt{-}\meta{region} first.
-% \begin{macrocode}
\edef\CurrentTrackedTag{%
\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Has ISO 639-2 or 639-3 code and a region but \meta{ISO
-% 639-2 or 639-3}\texttt{-}\meta{region} doesn't exist. Try just \meta{ISO
-% 639-2 or 639-3}
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedIsoCode
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Has ISO 639-2 or 639-3 code and a region but \meta{ISO
-% 639-2 or 639-3} doesn't exist. Try just \meta{region}
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedRegion
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
{#4}%
{%
-% \end{macrocode}
-% Try the root language.
-% \begin{macrocode}
\let\CurrentTrackedTag\CurrentTrackedLanguage
\@tracklang@IfFileExists{#2\CurrentTrackedTag#3}{#4}{#5}%
}%
@@ -9838,6 +11955,102 @@ and~\ref{tab:nonisoopts}}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\TrackLangRedefHook}
+%\changes{1.4}{2019-11-30}{new}
+%\begin{definition}
+%\cs{TrackLangRedefHook}\marg{code}\marg{type}
+%\end{definition}
+% Similar to \cs{TrackLangAddToHook} but redefines the hook rather
+% than appending to it.
+% This command is not permitted outside resource files.
+% \begin{macrocode}
+\def\TrackLangRedefHook{\noop@TrackLangRedefHook}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\noop@TrackLangRedefHook}
+% \begin{macrocode}
+\def\noop@TrackLangRedefHook#1#2{%
+ \@tracklang@err{\string\TrackLangRedefHook\space
+ only permitted within resource files}
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@TrackLangRedefHook}
+% \begin{macrocode}
+\def\@TrackLangRedefHook#1#2{%
+% \end{macrocode}
+% \sty{babel} check first.
+% \begin{macrocode}
+ \@tracklang@ifundef{#2\CurrentTrackedDialect}%
+ {%
+% \end{macrocode}
+% Does the dialect label have a mapping?
+% \begin{macrocode}
+ \IfTrackedDialectHasMapping{\CurrentTrackedDialect}%
+ {%
+% \end{macrocode}
+% Try the mapping label next.
+% \begin{macrocode}
+ \edef\@tracklang@tmp{%
+ \csname @tracklang@dialectmap@tohook@\CurrentTrackedDialect\endcsname}%
+ \@tracklang@ifundef{#2\@tracklang@tmp}%
+ {%
+% \end{macrocode}
+% No captions hook. Try \sty{polyglossia}.
+% \begin{macrocode}
+ \@tracklang@ifundef{#2\CurrentTrackedLanguage}%
+ {%
+% \end{macrocode}
+% No captions hook. Do the code now.
+% \begin{macrocode}
+ #1%
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\CurrentTrackedLanguage}{#1}%
+ }%
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\@tracklang@tmp}{#1}%
+ }%
+ }%
+ {%
+% \end{macrocode}
+% \sty{polyglossia} check next.
+% \begin{macrocode}
+ \@tracklang@ifundef{#2\CurrentTrackedLanguage}%
+ {%
+% \end{macrocode}
+% No captions hook.
+% \begin{macrocode}
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\CurrentTrackedLanguage}{#1}%
+ }%
+ }%
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\CurrentTrackedDialect}{#1}%
+ }%
+% \end{macrocode}
+% Do the code now in case the hook has already been used.
+% \begin{macrocode}
+ #1%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@tracklang@redefhook}
+%\changes{1.4}{2019-11-30}{new}
+%\begin{definition}
+%\cs{@tracklang@redefhook}\marg{type}\marg{label}\marg{code}
+%\end{definition}
+% \begin{macrocode}
+\def\@tracklang@redefhook#1#2#3{%
+ \expandafter\gdef\csname#1#2\endcsname{#3}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\SetTrackedDialectLabelMap}
%\changes{1.3}{2016-10-07}{new}
%\begin{definition}
@@ -10193,7 +12406,7 @@ and~\ref{tab:nonisoopts}}
% Version info.
% \begin{macrocode}
\expandafter\def\csname ver@tracklang-region-codes.tex\endcsname{%
- 2019/11/11 v1.3.9 (NLCT) Track Languages Regions}%
+ 2019/11/30 v1.4 (NLCT) Track Languages Regions}%
% \end{macrocode}
%
%\begin{macro}{\TrackLangRegionMap}
@@ -10560,6 +12773,10 @@ and~\ref{tab:nonisoopts}}
\TrackLangRegionMap{894}{ZM}{ZMB}%
\TrackLangRegionMap{716}{ZW}{ZWE}%
% \end{macrocode}
+%\changes{1.4}{2019-11-30}{input extra regions if provided}
+% \begin{macrocode}
+\@tracklang@input@extra@region@files
+% \end{macrocode}
%
%Restore category code of \texttt{@}.
% \begin{macrocode}
@@ -10582,7 +12799,7 @@ and~\ref{tab:nonisoopts}}
%\changes{1.3}{2016-10-07}{added tracklang-scripts.sty}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tracklang-scripts}[2019/11/11 v1.3.9 (NLCT) Track
+\ProvidesPackage{tracklang-scripts}[2019/11/30 v1.4 (NLCT) Track
Language Scripts (LaTeX)]
\RequirePackage{tracklang}
\input{tracklang-scripts}
@@ -10624,7 +12841,7 @@ Language Scripts (LaTeX)]
% Version info.
% \begin{macrocode}
\expandafter\def\csname ver@tracklang-scripts.tex\endcsname{%
- 2019/11/11 v1.3.9 (NLCT) Track Languages Scripts (Generic)}%
+ 2019/11/30 v1.4 (NLCT) Track Languages Scripts (Generic)}%
% \end{macrocode}
%
%\begin{macro}{\TrackLangScriptsMap}
@@ -10785,202 +13002,197 @@ Language Scripts (LaTeX)]
%\end{macro}
%
%Define mappings. The parent information is currently missing.
-% \begin{macrocode}
-\TrackLangScriptMap{Adlm}{166}{Adlam}{RL}{}
-\TrackLangScriptMap{Afak}{439}{Afaka}{varies}{}
-\TrackLangScriptMap{Aghb}{239}{Caucasian Albanian}{LR}{}
-\TrackLangScriptMap{Ahom}{338}{Ahom, Tai Ahom}{LR}{}
-\TrackLangScriptMap{Arab}{160}{Arabic}{RL}{}
-\TrackLangScriptMap{Aran}{161}{Arabic (Nastaliq variant)}{RL}{}
-\TrackLangScriptMap{Armi}{124}{Imperial Aramaic}{RL}{}
-\TrackLangScriptMap{Armn}{230}{Armenian}{LR}{}
-\TrackLangScriptMap{Avst}{134}{Avestan}{RL}{}
-\TrackLangScriptMap{Bali}{360}{Balinese}{LR}{}
-\TrackLangScriptMap{Bamu}{435}{Bamum}{LR}{}
-\TrackLangScriptMap{Bass}{259}{Bassa Vah}{LR}{}
-\TrackLangScriptMap{Batk}{365}{Batak}{LR}{}
-\TrackLangScriptMap{Beng}{334}{Bhaiksuki}{LR}{}
-\TrackLangScriptMap{Blis}{550}{Blissymbols}{varies}{}
-\TrackLangScriptMap{Bopo}{285}{Bopomofo}{LR}{}
-\TrackLangScriptMap{Brah}{300}{Brahmi}{LR}{}
-\TrackLangScriptMap{Brai}{570}{Braille}{LR}{}
-\TrackLangScriptMap{Bugi}{367}{Buginese}{LR}{}
-\TrackLangScriptMap{Buhd}{372}{Buhid}{LR}{}
-\TrackLangScriptMap{Cakm}{349}{Chakma}{LR}{}
-\TrackLangScriptMap{Cans}{440}{Unified Canadian Aboriginal Syllabics}{LR}{}
-\TrackLangScriptMap{Cari}{201}{Carian}{LR}{}
-\TrackLangScriptMap{Cham}{358}{Cham}{LR}{}
-\TrackLangScriptMap{Cher}{445}{Cherokee}{LR}{}
-\TrackLangScriptMap{Cirt}{291}{Cirth}{varies}{}
-\TrackLangScriptMap{Copt}{204}{Coptic}{LR}{}
-\TrackLangScriptMap{Cprt}{403}{Cypriot}{RL}{}
-\TrackLangScriptMap{Cyrl}{220}{Cyrillic}{LR}{}
-\TrackLangScriptMap{Cyrs}{221}{Cyrillic (Old Church Slavonic{}
-variant)}{varies}{}
-\TrackLangScriptMap{Deva}{315}{Devanagari (Nagari)}{LR}{}
-\TrackLangScriptMap{Dsrt}{250}{Deseret (Mormon)}{LR}{}
-\TrackLangScriptMap{Dupl}{755}{Duployan shorthand, Duployan{}
-stenography}{LR}{}
-\TrackLangScriptMap{Egyd}{070}{Egyptian demotic}{RL}{}
-\TrackLangScriptMap{Egyh}{060}{Egyptian hieratic}{RL}{}
-\TrackLangScriptMap{Egyp}{050}{Egyptian hieroglyphs}{LR}{}
-\TrackLangScriptMap{Elba}{226}{Elbasan}{LR}{}
-\TrackLangScriptMap{Ethi}{430}{Ethiopic (Ge'ez)}{LR}{}
-\TrackLangScriptMap{Geok}{241}{Khutsuri (Asomtavruli and{}
-Nuskhuri)}{LR}{}
-\TrackLangScriptMap{Geor}{240}{Georgian (Mkhedruli)}{LR}{}
-\TrackLangScriptMap{Glag}{225}{Glagolitic}{LR}{}
-\TrackLangScriptMap{Goth}{206}{Gothic}{LR}{}
-\TrackLangScriptMap{Gran}{343}{Grantha}{LR}{}
-\TrackLangScriptMap{Grek}{200}{Greek}{LR}{}
-\TrackLangScriptMap{Gujr}{320}{Gujarati}{LR}{}
-\TrackLangScriptMap{Guru}{310}{Gurmukhi}{LR}{}
-\TrackLangScriptMap{Hanb}{503}{Han with Bopomofo (alias for Han +{}
-Bopomofo)}{LR}{}
-\TrackLangScriptMap{Hang}{286}{Hangul}{LR}{}
-\TrackLangScriptMap{Hani}{500}{Han (Hanzi, Kanji, Hanja)}{LR}{}
-\TrackLangScriptMap{Hano}{371}{Hanunoo}{LR}{}
-\TrackLangScriptMap{Hans}{501}{Han (Simplified variant)}{varies}{}
-\TrackLangScriptMap{Hant}{502}{Han (Traditional variant)}{varies}{}
-\TrackLangScriptMap{Hatr}{127}{Hatran}{RL}{}
-\TrackLangScriptMap{Hebr}{125}{Hebrew}{RL}{}
-\TrackLangScriptMap{Hira}{410}{Hiragana}{LR}{}
-\TrackLangScriptMap{Hluw}{080}{Anatolian Hieroglyphs (Luwian{}
-Hieroglyphs, Hittite Hieroglyphs)}{LR}{}
-\TrackLangScriptMap{Hmng}{450}{Pahawh Hmong}{LR}{}
-\TrackLangScriptMap{Hrkt}{412}{Japanese syllabaries (alias for{}
-Hiragana + Katakana)}{varies}{}
-\TrackLangScriptMap{Hung}{176}{Old Hungarian (Hungarian Runic)}{RL}{}
-\TrackLangScriptMap{Inds}{610}{Indus (Harappan)}{RL}{}
-\TrackLangScriptMap{Ital}{210}{Old Italic (Etruscan, Oscan, etc.)}{LR}{}
-\TrackLangScriptMap{Jamo}{284}{Jamo (alias for Jamo subset of{}
-Hangul)}{LR}{}
-\TrackLangScriptMap{Java}{361}{Javanese}{LR}{}
-\TrackLangScriptMap{Jpan}{413}{Japanese (alias for Han + Hiragana +{}
-Katakana)}{varies}{}
-\TrackLangScriptMap{Jurc}{510}{Jurchen}{LR}{}
-\TrackLangScriptMap{Kali}{357}{Kayah Li}{LR}{}
-\TrackLangScriptMap{Kana}{411}{Katakana}{LR}{}
-\TrackLangScriptMap{Khar}{305}{Kharoshthi}{RL}{}
-\TrackLangScriptMap{Khmr}{355}{Khmer}{LR}{}
-\TrackLangScriptMap{Khoj}{322}{Khojki}{LR}{}
-\TrackLangScriptMap{Kitl}{505}{Khitan large script}{LR}{}
-\TrackLangScriptMap{Kits}{288}{Khitan small script}{TB}{}
-\TrackLangScriptMap{Knda}{345}{Kannada}{LR}{}
-\TrackLangScriptMap{Kore}{287}{Korean (alias for Hangul + Han)}{LR}{}
-\TrackLangScriptMap{Kpel}{436}{Kpelle}{LR}{}
-\TrackLangScriptMap{Kthi}{317}{Kaithi}{LR}{}
-\TrackLangScriptMap{Lana}{351}{Tai Tham (Lanna)}{LR}{}
-\TrackLangScriptMap{Laoo}{356}{Lao}{LR}{}
-\TrackLangScriptMap{Latf}{217}{Latin (Fraktur variant)}{varies}{}
-\TrackLangScriptMap{Latg}{216}{Latin (Gaelic variant)}{LR}{}
-\TrackLangScriptMap{Latn}{215}{Latin}{LR}{}
-\TrackLangScriptMap{Leke}{364}{Leke}{LR}{}
-\TrackLangScriptMap{Lepc}{335}{Lepcha}{LR}{}
-\TrackLangScriptMap{Limb}{336}{Limbu}{LR}{}
-\TrackLangScriptMap{Lina}{400}{Linear A}{LR}{}
-\TrackLangScriptMap{Linb}{401}{Linear B}{LR}{}
-\TrackLangScriptMap{Lisu}{399}{Lisu (Fraser)}{LR}{}
-\TrackLangScriptMap{Loma}{437}{Loma}{LR}{}
-\TrackLangScriptMap{Lyci}{202}{Lycian}{LR}{}
-\TrackLangScriptMap{Lydi}{116}{Lydian}{RL}{}
-\TrackLangScriptMap{Mahj}{314}{Mahajani}{LR}{}
-\TrackLangScriptMap{Mand}{140}{Mandaic, Mandaean}{RL}{}
-\TrackLangScriptMap{Mani}{139}{Manichaean}{RL}{}
-\TrackLangScriptMap{Marc}{332}{Marchen}{LR}{}
-\TrackLangScriptMap{Maya}{090}{Mayan hieroglyphs}{varies}{}
-\TrackLangScriptMap{Mend}{438}{Mende Kikakui}{RL}{}
-\TrackLangScriptMap{Merc}{101}{Meroitic Cursive}{RL}{}
-\TrackLangScriptMap{Mero}{100}{Meroitic Hieroglyphs}{RL}{}
-\TrackLangScriptMap{Mlym}{347}{Malayalam}{LR}{}
-\TrackLangScriptMap{Modi}{324}{Modi}{LR}{}
-\TrackLangScriptMap{Mong}{145}{Mongolian}{TB}{}
-\TrackLangScriptMap{Moon}{218}{Moon (Moon code, Moon script, Moon{}
-type)}{varies}{}
-\TrackLangScriptMap{Mroo}{199}{Mro, Mru}{LR}{}
-\TrackLangScriptMap{Mtei}{337}{Meitei Mayek (Meithei, Meetei)}{LR}{}
-\TrackLangScriptMap{Mult}{323}{Multani}{LR}{}
-\TrackLangScriptMap{Mymr}{350}{Myanmar (Burmese)}{LR}{}
-\TrackLangScriptMap{Narb}{106}{Old North Arabian (Ancient North{}
-Arabian)}{RL}{}
-\TrackLangScriptMap{Nbat}{159}{Nabataean}{RL}{}
-\TrackLangScriptMap{Newa}{333}{Newa, Newar, Newari}{LR}{}
-\TrackLangScriptMap{Nkgb}{420}{Nakhi Geba}{LR}{}
-\TrackLangScriptMap{Nkoo}{165}{N'Ko}{RL}{}
-\TrackLangScriptMap{Nshu}{499}{Nushu}{LR}{}
-\TrackLangScriptMap{Ogam}{212}{Ogham}{varies}{}
-\TrackLangScriptMap{Olck}{261}{Ol Chiki}{LR}{}
-\TrackLangScriptMap{Orkh}{175}{Old Turkic, Orkhon Runic}{RL}{}
-\TrackLangScriptMap{Orya}{327}{Oriya}{LR}{}
-\TrackLangScriptMap{Osge}{219}{Osage}{LR}{}
-\TrackLangScriptMap{Osma}{260}{Osmanya}{LR}{}
-\TrackLangScriptMap{Palm}{126}{Palmyrene}{RL}{}
-\TrackLangScriptMap{Pauc}{263}{Pau Cin Hau}{LR}{}
-\TrackLangScriptMap{Perm}{227}{Old Permic}{LR}{}
-\TrackLangScriptMap{Phag}{331}{Phags-pa}{TB}{}
-\TrackLangScriptMap{Phli}{131}{Inscriptional Pahlavi}{RL}{}
-\TrackLangScriptMap{Phlp}{132}{Psalter Pahlavi}{RL}{}
-\TrackLangScriptMap{Phlv}{133}{Book Pahlavi}{RL}{}
-\TrackLangScriptMap{Phnx}{115}{Phoenician}{RL}{}
-\TrackLangScriptMap{Piqd}{293}{Klingon (KLI plqaD)}{LR}{}
-\TrackLangScriptMap{Plrd}{282}{Miao (Pollard)}{LR}{}
-\TrackLangScriptMap{Prti}{130}{Inscriptional Parthian}{RL}{}
-\TrackLangScriptMap{Qaaa}{900}{Reserved for private use{}
-(start)}{varies}{}
-\TrackLangScriptMap{Qaai}{908}{Private use}{varies}{}
-\TrackLangScriptMap{Qabx}{949}{Reserved for private use{}
-(end)}{varies}{}
-\TrackLangScriptMap{Rjng}{363}{Rejang (Redjang, Kaganga)}{LR}{}
-\TrackLangScriptMap{Roro}{620}{Rongorongo}{varies}{}
-\TrackLangScriptMap{Runr}{211}{Runic}{LR}{}
-\TrackLangScriptMap{Samr}{123}{Samaritan}{RL}{}
-\TrackLangScriptMap{Sara}{292}{Sarati}{varies}{}
-\TrackLangScriptMap{Sarb}{105}{Old South Arabian}{RL}{}
-\TrackLangScriptMap{Saur}{344}{Saurashtra}{LR}{}
-\TrackLangScriptMap{Sgnw}{095}{SignWriting}{TB}{}
-\TrackLangScriptMap{Shaw}{281}{Shavian (Shaw)}{LR}{}
-\TrackLangScriptMap{Shrd}{319}{Sharada}{LR}{}
-\TrackLangScriptMap{Sidd}{302}{Siddham}{LR}{}
-\TrackLangScriptMap{Sind}{318}{Khudawadi, Sindhi}{LR}{}
-\TrackLangScriptMap{Sinh}{348}{Sinhala}{LR}{}
-\TrackLangScriptMap{Sora}{398}{Sora Sompeng}{LR}{}
-\TrackLangScriptMap{Sund}{362}{Sundanese}{LR}{}
-\TrackLangScriptMap{Sylo}{316}{Syloti Nagri}{LR}{}
-\TrackLangScriptMap{Syrc}{135}{Syriac}{RL}{}
-\TrackLangScriptMap{Syre}{138}{Syriac (Estrangelo variant)}{RL}{}
-\TrackLangScriptMap{Syrj}{137}{Syriac (Western variant)}{RL}{}
-\TrackLangScriptMap{Syrn}{136}{Syriac (Eastern variant)}{RL}{}
-\TrackLangScriptMap{Tagb}{373}{Tagbanwa}{LR}{}
-\TrackLangScriptMap{Takr}{321}{Takri}{LR}{}
-\TrackLangScriptMap{Tale}{353}{Tai Le}{LR}{}
-\TrackLangScriptMap{Talu}{354}{New Tai Lue}{LR}{}
-\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}
-\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}
-\TrackLangScriptMap{Tang}{520}{Tangut}{LR}{}
-\TrackLangScriptMap{Tavt}{359}{Tai Viet}{LR}{}
-\TrackLangScriptMap{Telu}{340}{Telugu}{LR}{}
-\TrackLangScriptMap{Teng}{290}{Tengwar}{LR}{}
-\TrackLangScriptMap{Tfng}{120}{Tifinagh (Berber)}{LR}{}
-\TrackLangScriptMap{Tglg}{370}{Tagalog (Baybayin, Alibata)}{LR}{}
-\TrackLangScriptMap{Thaa}{170}{Thaana}{RL}{}
-\TrackLangScriptMap{Thai}{352}{Thai}{LR}{}
-\TrackLangScriptMap{Tibt}{330}{Tibetan}{LR}{}
-\TrackLangScriptMap{Tirh}{326}{Tirhuta}{LR}{}
-\TrackLangScriptMap{Ugar}{040}{Ugaritic}{LR}{}
-\TrackLangScriptMap{Vaii}{470}{Vai}{LR}{}
-\TrackLangScriptMap{Visp}{280}{Visible Speech}{LR}{}
-\TrackLangScriptMap{Wara}{262}{Warang Citi (Varang Kshiti)}{LR}{}
-\TrackLangScriptMap{Wole}{480}{Woleai}{RL}{}
-\TrackLangScriptMap{Xpeo}{030}{Old Persian}{LR}{}
-\TrackLangScriptMap{Xsux}{020}{Cuneiform, Sumero-Akkadian}{LR}{}
-\TrackLangScriptMap{Yiii}{460}{Yi}{LR}{}
-\TrackLangScriptMap{Zinh}{994}{Inherited script}{inherited}{}
-\TrackLangScriptMap{Zmth}{995}{Mathematical notation}{LR}{}
-\TrackLangScriptMap{Zsym}{996}{Symbols}{varies}{}
-\TrackLangScriptMap{Zsye}{993}{Symbols (emoji variant)}{varies}{}
-\TrackLangScriptMap{Zxxx}{997}{Unwritten documents}{varies}{}
-\TrackLangScriptMap{Zyyy}{998}{Undetermined script}{varies}{}
-\TrackLangScriptMap{Zzzz}{999}{Uncoded script}{varies}{}
+%\changes{1.4}{2019-11-30}{removed some spurious empty braces and commented
+%out EOL}
+% \begin{macrocode}
+\TrackLangScriptMap{Adlm}{166}{Adlam}{RL}{}%
+\TrackLangScriptMap{Afak}{439}{Afaka}{varies}{}%
+\TrackLangScriptMap{Aghb}{239}{Caucasian Albanian}{LR}{}%
+\TrackLangScriptMap{Ahom}{338}{Ahom, Tai Ahom}{LR}{}%
+\TrackLangScriptMap{Arab}{160}{Arabic}{RL}{}%
+\TrackLangScriptMap{Aran}{161}{Arabic (Nastaliq variant)}{RL}{}%
+\TrackLangScriptMap{Armi}{124}{Imperial Aramaic}{RL}{}%
+\TrackLangScriptMap{Armn}{230}{Armenian}{LR}{}%
+\TrackLangScriptMap{Avst}{134}{Avestan}{RL}{}%
+\TrackLangScriptMap{Bali}{360}{Balinese}{LR}{}%
+\TrackLangScriptMap{Bamu}{435}{Bamum}{LR}{}%
+\TrackLangScriptMap{Bass}{259}{Bassa Vah}{LR}{}%
+\TrackLangScriptMap{Batk}{365}{Batak}{LR}{}%
+\TrackLangScriptMap{Beng}{334}{Bhaiksuki}{LR}{}%
+\TrackLangScriptMap{Blis}{550}{Blissymbols}{varies}{}%
+\TrackLangScriptMap{Bopo}{285}{Bopomofo}{LR}{}%
+\TrackLangScriptMap{Brah}{300}{Brahmi}{LR}{}%
+\TrackLangScriptMap{Brai}{570}{Braille}{LR}{}%
+\TrackLangScriptMap{Bugi}{367}{Buginese}{LR}{}%
+\TrackLangScriptMap{Buhd}{372}{Buhid}{LR}{}%
+\TrackLangScriptMap{Cakm}{349}{Chakma}{LR}{}%
+\TrackLangScriptMap{Cans}{440}{Unified Canadian Aboriginal Syllabics}{LR}{}%
+\TrackLangScriptMap{Cari}{201}{Carian}{LR}{}%
+\TrackLangScriptMap{Cham}{358}{Cham}{LR}{}%
+\TrackLangScriptMap{Cher}{445}{Cherokee}{LR}{}%
+\TrackLangScriptMap{Cirt}{291}{Cirth}{varies}{}%
+\TrackLangScriptMap{Copt}{204}{Coptic}{LR}{}%
+\TrackLangScriptMap{Cprt}{403}{Cypriot}{RL}{}%
+\TrackLangScriptMap{Cyrl}{220}{Cyrillic}{LR}{}%
+\TrackLangScriptMap{Cyrs}{221}{Cyrillic (Old Church Slavonic variant)}{varies}{}%
+\TrackLangScriptMap{Deva}{315}{Devanagari (Nagari)}{LR}{}%
+\TrackLangScriptMap{Dsrt}{250}{Deseret (Mormon)}{LR}{}%
+\TrackLangScriptMap{Dupl}{755}{Duployan shorthand, Duployan stenography}{LR}{}%
+\TrackLangScriptMap{Egyd}{070}{Egyptian demotic}{RL}{}%
+\TrackLangScriptMap{Egyh}{060}{Egyptian hieratic}{RL}{}%
+\TrackLangScriptMap{Egyp}{050}{Egyptian hieroglyphs}{LR}{}%
+\TrackLangScriptMap{Elba}{226}{Elbasan}{LR}{}%
+\TrackLangScriptMap{Ethi}{430}{Ethiopic (Ge'ez)}{LR}{}%
+\TrackLangScriptMap{Geok}{241}{Khutsuri (Asomtavruli and Nuskhuri)}{LR}{}%
+\TrackLangScriptMap{Geor}{240}{Georgian (Mkhedruli)}{LR}{}%
+\TrackLangScriptMap{Glag}{225}{Glagolitic}{LR}{}%
+\TrackLangScriptMap{Goth}{206}{Gothic}{LR}{}%
+\TrackLangScriptMap{Gran}{343}{Grantha}{LR}{}%
+\TrackLangScriptMap{Grek}{200}{Greek}{LR}{}%
+\TrackLangScriptMap{Gujr}{320}{Gujarati}{LR}{}%
+\TrackLangScriptMap{Guru}{310}{Gurmukhi}{LR}{}%
+\TrackLangScriptMap{Hanb}{503}{Han with Bopomofo (alias for Han + Bopomofo)}{LR}{}%
+\TrackLangScriptMap{Hang}{286}{Hangul}{LR}{}%
+\TrackLangScriptMap{Hani}{500}{Han (Hanzi, Kanji, Hanja)}{LR}{}%
+\TrackLangScriptMap{Hano}{371}{Hanunoo}{LR}{}%
+\TrackLangScriptMap{Hans}{501}{Han (Simplified variant)}{varies}{}%
+\TrackLangScriptMap{Hant}{502}{Han (Traditional variant)}{varies}{}%
+\TrackLangScriptMap{Hatr}{127}{Hatran}{RL}{}%
+\TrackLangScriptMap{Hebr}{125}{Hebrew}{RL}{}%
+\TrackLangScriptMap{Hira}{410}{Hiragana}{LR}{}%
+\TrackLangScriptMap{Hluw}{080}{Anatolian Hieroglyphs (Luwian Hieroglyphs, Hittite Hieroglyphs)}{LR}{}%
+\TrackLangScriptMap{Hmng}{450}{Pahawh Hmong}{LR}{}%
+\TrackLangScriptMap{Hrkt}{412}{Japanese syllabaries (alias for Hiragana + Katakana)}{varies}{}%
+\TrackLangScriptMap{Hung}{176}{Old Hungarian (Hungarian Runic)}{RL}{}%
+\TrackLangScriptMap{Inds}{610}{Indus (Harappan)}{RL}{}%
+\TrackLangScriptMap{Ital}{210}{Old Italic (Etruscan, Oscan, etc.)}{LR}{}%
+\TrackLangScriptMap{Jamo}{284}{Jamo (alias for Jamo subset of Hangul)}{LR}{}%
+\TrackLangScriptMap{Java}{361}{Javanese}{LR}{}%
+\TrackLangScriptMap{Jpan}{413}{Japanese (alias for Han + Hiragana + Katakana)}{varies}{}%
+\TrackLangScriptMap{Jurc}{510}{Jurchen}{LR}{}%
+\TrackLangScriptMap{Kali}{357}{Kayah Li}{LR}{}%
+\TrackLangScriptMap{Kana}{411}{Katakana}{LR}{}%
+\TrackLangScriptMap{Khar}{305}{Kharoshthi}{RL}{}%
+\TrackLangScriptMap{Khmr}{355}{Khmer}{LR}{}%
+\TrackLangScriptMap{Khoj}{322}{Khojki}{LR}{}%
+\TrackLangScriptMap{Kitl}{505}{Khitan large script}{LR}{}%
+\TrackLangScriptMap{Kits}{288}{Khitan small script}{TB}{}%
+\TrackLangScriptMap{Knda}{345}{Kannada}{LR}{}%
+\TrackLangScriptMap{Kore}{287}{Korean (alias for Hangul + Han)}{LR}{}%
+\TrackLangScriptMap{Kpel}{436}{Kpelle}{LR}{}%
+\TrackLangScriptMap{Kthi}{317}{Kaithi}{LR}{}%
+\TrackLangScriptMap{Lana}{351}{Tai Tham (Lanna)}{LR}{}%
+\TrackLangScriptMap{Laoo}{356}{Lao}{LR}{}%
+\TrackLangScriptMap{Latf}{217}{Latin (Fraktur variant)}{varies}{}%
+\TrackLangScriptMap{Latg}{216}{Latin (Gaelic variant)}{LR}{}%
+\TrackLangScriptMap{Latn}{215}{Latin}{LR}{}%
+\TrackLangScriptMap{Leke}{364}{Leke}{LR}{}%
+\TrackLangScriptMap{Lepc}{335}{Lepcha}{LR}{}%
+\TrackLangScriptMap{Limb}{336}{Limbu}{LR}{}%
+\TrackLangScriptMap{Lina}{400}{Linear A}{LR}{}%
+\TrackLangScriptMap{Linb}{401}{Linear B}{LR}{}%
+\TrackLangScriptMap{Lisu}{399}{Lisu (Fraser)}{LR}{}%
+\TrackLangScriptMap{Loma}{437}{Loma}{LR}{}%
+\TrackLangScriptMap{Lyci}{202}{Lycian}{LR}{}%
+\TrackLangScriptMap{Lydi}{116}{Lydian}{RL}{}%
+\TrackLangScriptMap{Mahj}{314}{Mahajani}{LR}{}%
+\TrackLangScriptMap{Mand}{140}{Mandaic, Mandaean}{RL}{}%
+\TrackLangScriptMap{Mani}{139}{Manichaean}{RL}{}%
+\TrackLangScriptMap{Marc}{332}{Marchen}{LR}{}%
+\TrackLangScriptMap{Maya}{090}{Mayan hieroglyphs}{varies}{}%
+\TrackLangScriptMap{Mend}{438}{Mende Kikakui}{RL}{}%
+\TrackLangScriptMap{Merc}{101}{Meroitic Cursive}{RL}{}%
+\TrackLangScriptMap{Mero}{100}{Meroitic Hieroglyphs}{RL}{}%
+\TrackLangScriptMap{Mlym}{347}{Malayalam}{LR}{}%
+\TrackLangScriptMap{Modi}{324}{Modi}{LR}{}%
+\TrackLangScriptMap{Mong}{145}{Mongolian}{TB}{}%
+\TrackLangScriptMap{Moon}{218}{Moon (Moon code, Moon script, Moon type)}{varies}{}%
+\TrackLangScriptMap{Mroo}{199}{Mro, Mru}{LR}{}%
+\TrackLangScriptMap{Mtei}{337}{Meitei Mayek (Meithei, Meetei)}{LR}{}%
+\TrackLangScriptMap{Mult}{323}{Multani}{LR}{}%
+\TrackLangScriptMap{Mymr}{350}{Myanmar (Burmese)}{LR}{}%
+\TrackLangScriptMap{Narb}{106}{Old North Arabian (Ancient North Arabian)}{RL}{}%
+\TrackLangScriptMap{Nbat}{159}{Nabataean}{RL}{}%
+\TrackLangScriptMap{Newa}{333}{Newa, Newar, Newari}{LR}{}%
+\TrackLangScriptMap{Nkgb}{420}{Nakhi Geba}{LR}{}%
+\TrackLangScriptMap{Nkoo}{165}{N'Ko}{RL}{}%
+\TrackLangScriptMap{Nshu}{499}{Nushu}{LR}{}%
+\TrackLangScriptMap{Ogam}{212}{Ogham}{varies}{}%
+\TrackLangScriptMap{Olck}{261}{Ol Chiki}{LR}{}%
+\TrackLangScriptMap{Orkh}{175}{Old Turkic, Orkhon Runic}{RL}{}%
+\TrackLangScriptMap{Orya}{327}{Oriya}{LR}{}%
+\TrackLangScriptMap{Osge}{219}{Osage}{LR}{}%
+\TrackLangScriptMap{Osma}{260}{Osmanya}{LR}{}%
+\TrackLangScriptMap{Palm}{126}{Palmyrene}{RL}{}%
+\TrackLangScriptMap{Pauc}{263}{Pau Cin Hau}{LR}{}%
+\TrackLangScriptMap{Perm}{227}{Old Permic}{LR}{}%
+\TrackLangScriptMap{Phag}{331}{Phags-pa}{TB}{}%
+\TrackLangScriptMap{Phli}{131}{Inscriptional Pahlavi}{RL}{}%
+\TrackLangScriptMap{Phlp}{132}{Psalter Pahlavi}{RL}{}%
+\TrackLangScriptMap{Phlv}{133}{Book Pahlavi}{RL}{}%
+\TrackLangScriptMap{Phnx}{115}{Phoenician}{RL}{}%
+\TrackLangScriptMap{Piqd}{293}{Klingon (KLI plqaD)}{LR}{}%
+\TrackLangScriptMap{Plrd}{282}{Miao (Pollard)}{LR}{}%
+\TrackLangScriptMap{Prti}{130}{Inscriptional Parthian}{RL}{}%
+\TrackLangScriptMap{Qaaa}{900}{Reserved for private use (start)}{varies}{}%
+\TrackLangScriptMap{Qaai}{908}{Private use}{varies}{}%
+\TrackLangScriptMap{Qabx}{949}{Reserved for private use (end)}{varies}{}%
+\TrackLangScriptMap{Rjng}{363}{Rejang (Redjang, Kaganga)}{LR}{}%
+\TrackLangScriptMap{Roro}{620}{Rongorongo}{varies}{}%
+\TrackLangScriptMap{Runr}{211}{Runic}{LR}{}%
+\TrackLangScriptMap{Samr}{123}{Samaritan}{RL}{}%
+\TrackLangScriptMap{Sara}{292}{Sarati}{varies}{}%
+\TrackLangScriptMap{Sarb}{105}{Old South Arabian}{RL}{}%
+\TrackLangScriptMap{Saur}{344}{Saurashtra}{LR}{}%
+\TrackLangScriptMap{Sgnw}{095}{SignWriting}{TB}{}%
+\TrackLangScriptMap{Shaw}{281}{Shavian (Shaw)}{LR}{}%
+\TrackLangScriptMap{Shrd}{319}{Sharada}{LR}{}%
+\TrackLangScriptMap{Sidd}{302}{Siddham}{LR}{}%
+\TrackLangScriptMap{Sind}{318}{Khudawadi, Sindhi}{LR}{}%
+\TrackLangScriptMap{Sinh}{348}{Sinhala}{LR}{}%
+\TrackLangScriptMap{Sora}{398}{Sora Sompeng}{LR}{}%
+\TrackLangScriptMap{Sund}{362}{Sundanese}{LR}{}%
+\TrackLangScriptMap{Sylo}{316}{Syloti Nagri}{LR}{}%
+\TrackLangScriptMap{Syrc}{135}{Syriac}{RL}{}%
+\TrackLangScriptMap{Syre}{138}{Syriac (Estrangelo variant)}{RL}{}%
+\TrackLangScriptMap{Syrj}{137}{Syriac (Western variant)}{RL}{}%
+\TrackLangScriptMap{Syrn}{136}{Syriac (Eastern variant)}{RL}{}%
+\TrackLangScriptMap{Tagb}{373}{Tagbanwa}{LR}{}%
+\TrackLangScriptMap{Takr}{321}{Takri}{LR}{}%
+\TrackLangScriptMap{Tale}{353}{Tai Le}{LR}{}%
+\TrackLangScriptMap{Talu}{354}{New Tai Lue}{LR}{}%
+\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}%
+\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}%
+\TrackLangScriptMap{Tang}{520}{Tangut}{LR}{}%
+\TrackLangScriptMap{Tavt}{359}{Tai Viet}{LR}{}%
+\TrackLangScriptMap{Telu}{340}{Telugu}{LR}{}%
+\TrackLangScriptMap{Teng}{290}{Tengwar}{LR}{}%
+\TrackLangScriptMap{Tfng}{120}{Tifinagh (Berber)}{LR}{}%
+\TrackLangScriptMap{Tglg}{370}{Tagalog (Baybayin, Alibata)}{LR}{}%
+\TrackLangScriptMap{Thaa}{170}{Thaana}{RL}{}%
+\TrackLangScriptMap{Thai}{352}{Thai}{LR}{}%
+\TrackLangScriptMap{Tibt}{330}{Tibetan}{LR}{}%
+\TrackLangScriptMap{Tirh}{326}{Tirhuta}{LR}{}%
+\TrackLangScriptMap{Ugar}{040}{Ugaritic}{LR}{}%
+\TrackLangScriptMap{Vaii}{470}{Vai}{LR}{}%
+\TrackLangScriptMap{Visp}{280}{Visible Speech}{LR}{}%
+\TrackLangScriptMap{Wara}{262}{Warang Citi (Varang Kshiti)}{LR}{}%
+\TrackLangScriptMap{Wole}{480}{Woleai}{RL}{}%
+\TrackLangScriptMap{Xpeo}{030}{Old Persian}{LR}{}%
+\TrackLangScriptMap{Xsux}{020}{Cuneiform, Sumero-Akkadian}{LR}{}%
+\TrackLangScriptMap{Yiii}{460}{Yi}{LR}{}%
+\TrackLangScriptMap{Zinh}{994}{Inherited script}{inherited}{}%
+\TrackLangScriptMap{Zmth}{995}{Mathematical notation}{LR}{}%
+\TrackLangScriptMap{Zsym}{996}{Symbols}{varies}{}%
+\TrackLangScriptMap{Zsye}{993}{Symbols (emoji variant)}{varies}{}%
+\TrackLangScriptMap{Zxxx}{997}{Unwritten documents}{varies}{}%
+\TrackLangScriptMap{Zyyy}{998}{Undetermined script}{varies}{}%
+\TrackLangScriptMap{Zzzz}{999}{Uncoded script}{varies}{}%
+% \end{macrocode}
+%\changes{1.4}{2019-11-30}{new}
+%Load additional script files.
+% \begin{macrocode}
+\@tracklang@input@extra@script@files
% \end{macrocode}
%
%Restore category code of \texttt{@}.
diff --git a/Master/texmf-dist/source/latex/tracklang/tracklang.ins b/Master/texmf-dist/source/latex/tracklang/tracklang.ins
index 19adb1e4f4a..019b391cd1f 100644
--- a/Master/texmf-dist/source/latex/tracklang/tracklang.ins
+++ b/Master/texmf-dist/source/latex/tracklang/tracklang.ins
@@ -1,4 +1,4 @@
-% tracklang.ins generated using makedtx version 1.2 2019/11/11 16:00
+% tracklang.ins generated using makedtx version 1.2 2019/12/1 17:41
\input docstrip
\preamble
diff --git a/Master/texmf-dist/tex/generic/tracklang/tracklang-region-codes.tex b/Master/texmf-dist/tex/generic/tracklang/tracklang-region-codes.tex
index 4572e43960a..ceb4dbc9ab4 100644
--- a/Master/texmf-dist/tex/generic/tracklang/tracklang-region-codes.tex
+++ b/Master/texmf-dist/tex/generic/tracklang/tracklang-region-codes.tex
@@ -64,7 +64,7 @@
\expandafter\endinput
\fi
\expandafter\def\csname ver@tracklang-region-codes.tex\endcsname{%
- 2019/11/11 v1.3.9 (NLCT) Track Languages Regions}%
+ 2019/11/30 v1.4 (NLCT) Track Languages Regions}%
\def\TrackLangRegionMap#1#2#3{%
\@tracklang@enamedef{@tracklang@region@numtoalphaii@#1}{#2}%
\@tracklang@enamedef{@tracklang@region@numtoalphaiii@#1}{#3}%
@@ -349,6 +349,7 @@
\TrackLangRegionMap{887}{YE}{YEM}%
\TrackLangRegionMap{894}{ZM}{ZMB}%
\TrackLangRegionMap{716}{ZW}{ZWE}%
+\@tracklang@input@extra@region@files
\@tracklang@regions@restore@at
\endinput
%%
diff --git a/Master/texmf-dist/tex/generic/tracklang/tracklang-scripts.tex b/Master/texmf-dist/tex/generic/tracklang/tracklang-scripts.tex
index 1d6733ac84d..bd9e454eb83 100644
--- a/Master/texmf-dist/tex/generic/tracklang/tracklang-scripts.tex
+++ b/Master/texmf-dist/tex/generic/tracklang/tracklang-scripts.tex
@@ -64,7 +64,7 @@
\expandafter\endinput
\fi
\expandafter\def\csname ver@tracklang-scripts.tex\endcsname{%
- 2019/11/11 v1.3.9 (NLCT) Track Languages Scripts (Generic)}%
+ 2019/11/30 v1.4 (NLCT) Track Languages Scripts (Generic)}%
\def\TrackLangScriptMap#1#2#3#4#5{%
\@tracklang@enamedef{TrackLangScript#1}{#1}%
\@tracklang@enamedef{@tracklang@script@numtoalpha@#2}{#1}%
@@ -109,201 +109,190 @@
{#3}%
{#2}%
}%
-\TrackLangScriptMap{Adlm}{166}{Adlam}{RL}{}
-\TrackLangScriptMap{Afak}{439}{Afaka}{varies}{}
-\TrackLangScriptMap{Aghb}{239}{Caucasian Albanian}{LR}{}
-\TrackLangScriptMap{Ahom}{338}{Ahom, Tai Ahom}{LR}{}
-\TrackLangScriptMap{Arab}{160}{Arabic}{RL}{}
-\TrackLangScriptMap{Aran}{161}{Arabic (Nastaliq variant)}{RL}{}
-\TrackLangScriptMap{Armi}{124}{Imperial Aramaic}{RL}{}
-\TrackLangScriptMap{Armn}{230}{Armenian}{LR}{}
-\TrackLangScriptMap{Avst}{134}{Avestan}{RL}{}
-\TrackLangScriptMap{Bali}{360}{Balinese}{LR}{}
-\TrackLangScriptMap{Bamu}{435}{Bamum}{LR}{}
-\TrackLangScriptMap{Bass}{259}{Bassa Vah}{LR}{}
-\TrackLangScriptMap{Batk}{365}{Batak}{LR}{}
-\TrackLangScriptMap{Beng}{334}{Bhaiksuki}{LR}{}
-\TrackLangScriptMap{Blis}{550}{Blissymbols}{varies}{}
-\TrackLangScriptMap{Bopo}{285}{Bopomofo}{LR}{}
-\TrackLangScriptMap{Brah}{300}{Brahmi}{LR}{}
-\TrackLangScriptMap{Brai}{570}{Braille}{LR}{}
-\TrackLangScriptMap{Bugi}{367}{Buginese}{LR}{}
-\TrackLangScriptMap{Buhd}{372}{Buhid}{LR}{}
-\TrackLangScriptMap{Cakm}{349}{Chakma}{LR}{}
-\TrackLangScriptMap{Cans}{440}{Unified Canadian Aboriginal Syllabics}{LR}{}
-\TrackLangScriptMap{Cari}{201}{Carian}{LR}{}
-\TrackLangScriptMap{Cham}{358}{Cham}{LR}{}
-\TrackLangScriptMap{Cher}{445}{Cherokee}{LR}{}
-\TrackLangScriptMap{Cirt}{291}{Cirth}{varies}{}
-\TrackLangScriptMap{Copt}{204}{Coptic}{LR}{}
-\TrackLangScriptMap{Cprt}{403}{Cypriot}{RL}{}
-\TrackLangScriptMap{Cyrl}{220}{Cyrillic}{LR}{}
-\TrackLangScriptMap{Cyrs}{221}{Cyrillic (Old Church Slavonic{}
-variant)}{varies}{}
-\TrackLangScriptMap{Deva}{315}{Devanagari (Nagari)}{LR}{}
-\TrackLangScriptMap{Dsrt}{250}{Deseret (Mormon)}{LR}{}
-\TrackLangScriptMap{Dupl}{755}{Duployan shorthand, Duployan{}
-stenography}{LR}{}
-\TrackLangScriptMap{Egyd}{070}{Egyptian demotic}{RL}{}
-\TrackLangScriptMap{Egyh}{060}{Egyptian hieratic}{RL}{}
-\TrackLangScriptMap{Egyp}{050}{Egyptian hieroglyphs}{LR}{}
-\TrackLangScriptMap{Elba}{226}{Elbasan}{LR}{}
-\TrackLangScriptMap{Ethi}{430}{Ethiopic (Ge'ez)}{LR}{}
-\TrackLangScriptMap{Geok}{241}{Khutsuri (Asomtavruli and{}
-Nuskhuri)}{LR}{}
-\TrackLangScriptMap{Geor}{240}{Georgian (Mkhedruli)}{LR}{}
-\TrackLangScriptMap{Glag}{225}{Glagolitic}{LR}{}
-\TrackLangScriptMap{Goth}{206}{Gothic}{LR}{}
-\TrackLangScriptMap{Gran}{343}{Grantha}{LR}{}
-\TrackLangScriptMap{Grek}{200}{Greek}{LR}{}
-\TrackLangScriptMap{Gujr}{320}{Gujarati}{LR}{}
-\TrackLangScriptMap{Guru}{310}{Gurmukhi}{LR}{}
-\TrackLangScriptMap{Hanb}{503}{Han with Bopomofo (alias for Han +{}
-Bopomofo)}{LR}{}
-\TrackLangScriptMap{Hang}{286}{Hangul}{LR}{}
-\TrackLangScriptMap{Hani}{500}{Han (Hanzi, Kanji, Hanja)}{LR}{}
-\TrackLangScriptMap{Hano}{371}{Hanunoo}{LR}{}
-\TrackLangScriptMap{Hans}{501}{Han (Simplified variant)}{varies}{}
-\TrackLangScriptMap{Hant}{502}{Han (Traditional variant)}{varies}{}
-\TrackLangScriptMap{Hatr}{127}{Hatran}{RL}{}
-\TrackLangScriptMap{Hebr}{125}{Hebrew}{RL}{}
-\TrackLangScriptMap{Hira}{410}{Hiragana}{LR}{}
-\TrackLangScriptMap{Hluw}{080}{Anatolian Hieroglyphs (Luwian{}
-Hieroglyphs, Hittite Hieroglyphs)}{LR}{}
-\TrackLangScriptMap{Hmng}{450}{Pahawh Hmong}{LR}{}
-\TrackLangScriptMap{Hrkt}{412}{Japanese syllabaries (alias for{}
-Hiragana + Katakana)}{varies}{}
-\TrackLangScriptMap{Hung}{176}{Old Hungarian (Hungarian Runic)}{RL}{}
-\TrackLangScriptMap{Inds}{610}{Indus (Harappan)}{RL}{}
-\TrackLangScriptMap{Ital}{210}{Old Italic (Etruscan, Oscan, etc.)}{LR}{}
-\TrackLangScriptMap{Jamo}{284}{Jamo (alias for Jamo subset of{}
-Hangul)}{LR}{}
-\TrackLangScriptMap{Java}{361}{Javanese}{LR}{}
-\TrackLangScriptMap{Jpan}{413}{Japanese (alias for Han + Hiragana +{}
-Katakana)}{varies}{}
-\TrackLangScriptMap{Jurc}{510}{Jurchen}{LR}{}
-\TrackLangScriptMap{Kali}{357}{Kayah Li}{LR}{}
-\TrackLangScriptMap{Kana}{411}{Katakana}{LR}{}
-\TrackLangScriptMap{Khar}{305}{Kharoshthi}{RL}{}
-\TrackLangScriptMap{Khmr}{355}{Khmer}{LR}{}
-\TrackLangScriptMap{Khoj}{322}{Khojki}{LR}{}
-\TrackLangScriptMap{Kitl}{505}{Khitan large script}{LR}{}
-\TrackLangScriptMap{Kits}{288}{Khitan small script}{TB}{}
-\TrackLangScriptMap{Knda}{345}{Kannada}{LR}{}
-\TrackLangScriptMap{Kore}{287}{Korean (alias for Hangul + Han)}{LR}{}
-\TrackLangScriptMap{Kpel}{436}{Kpelle}{LR}{}
-\TrackLangScriptMap{Kthi}{317}{Kaithi}{LR}{}
-\TrackLangScriptMap{Lana}{351}{Tai Tham (Lanna)}{LR}{}
-\TrackLangScriptMap{Laoo}{356}{Lao}{LR}{}
-\TrackLangScriptMap{Latf}{217}{Latin (Fraktur variant)}{varies}{}
-\TrackLangScriptMap{Latg}{216}{Latin (Gaelic variant)}{LR}{}
-\TrackLangScriptMap{Latn}{215}{Latin}{LR}{}
-\TrackLangScriptMap{Leke}{364}{Leke}{LR}{}
-\TrackLangScriptMap{Lepc}{335}{Lepcha}{LR}{}
-\TrackLangScriptMap{Limb}{336}{Limbu}{LR}{}
-\TrackLangScriptMap{Lina}{400}{Linear A}{LR}{}
-\TrackLangScriptMap{Linb}{401}{Linear B}{LR}{}
-\TrackLangScriptMap{Lisu}{399}{Lisu (Fraser)}{LR}{}
-\TrackLangScriptMap{Loma}{437}{Loma}{LR}{}
-\TrackLangScriptMap{Lyci}{202}{Lycian}{LR}{}
-\TrackLangScriptMap{Lydi}{116}{Lydian}{RL}{}
-\TrackLangScriptMap{Mahj}{314}{Mahajani}{LR}{}
-\TrackLangScriptMap{Mand}{140}{Mandaic, Mandaean}{RL}{}
-\TrackLangScriptMap{Mani}{139}{Manichaean}{RL}{}
-\TrackLangScriptMap{Marc}{332}{Marchen}{LR}{}
-\TrackLangScriptMap{Maya}{090}{Mayan hieroglyphs}{varies}{}
-\TrackLangScriptMap{Mend}{438}{Mende Kikakui}{RL}{}
-\TrackLangScriptMap{Merc}{101}{Meroitic Cursive}{RL}{}
-\TrackLangScriptMap{Mero}{100}{Meroitic Hieroglyphs}{RL}{}
-\TrackLangScriptMap{Mlym}{347}{Malayalam}{LR}{}
-\TrackLangScriptMap{Modi}{324}{Modi}{LR}{}
-\TrackLangScriptMap{Mong}{145}{Mongolian}{TB}{}
-\TrackLangScriptMap{Moon}{218}{Moon (Moon code, Moon script, Moon{}
-type)}{varies}{}
-\TrackLangScriptMap{Mroo}{199}{Mro, Mru}{LR}{}
-\TrackLangScriptMap{Mtei}{337}{Meitei Mayek (Meithei, Meetei)}{LR}{}
-\TrackLangScriptMap{Mult}{323}{Multani}{LR}{}
-\TrackLangScriptMap{Mymr}{350}{Myanmar (Burmese)}{LR}{}
-\TrackLangScriptMap{Narb}{106}{Old North Arabian (Ancient North{}
-Arabian)}{RL}{}
-\TrackLangScriptMap{Nbat}{159}{Nabataean}{RL}{}
-\TrackLangScriptMap{Newa}{333}{Newa, Newar, Newari}{LR}{}
-\TrackLangScriptMap{Nkgb}{420}{Nakhi Geba}{LR}{}
-\TrackLangScriptMap{Nkoo}{165}{N'Ko}{RL}{}
-\TrackLangScriptMap{Nshu}{499}{Nushu}{LR}{}
-\TrackLangScriptMap{Ogam}{212}{Ogham}{varies}{}
-\TrackLangScriptMap{Olck}{261}{Ol Chiki}{LR}{}
-\TrackLangScriptMap{Orkh}{175}{Old Turkic, Orkhon Runic}{RL}{}
-\TrackLangScriptMap{Orya}{327}{Oriya}{LR}{}
-\TrackLangScriptMap{Osge}{219}{Osage}{LR}{}
-\TrackLangScriptMap{Osma}{260}{Osmanya}{LR}{}
-\TrackLangScriptMap{Palm}{126}{Palmyrene}{RL}{}
-\TrackLangScriptMap{Pauc}{263}{Pau Cin Hau}{LR}{}
-\TrackLangScriptMap{Perm}{227}{Old Permic}{LR}{}
-\TrackLangScriptMap{Phag}{331}{Phags-pa}{TB}{}
-\TrackLangScriptMap{Phli}{131}{Inscriptional Pahlavi}{RL}{}
-\TrackLangScriptMap{Phlp}{132}{Psalter Pahlavi}{RL}{}
-\TrackLangScriptMap{Phlv}{133}{Book Pahlavi}{RL}{}
-\TrackLangScriptMap{Phnx}{115}{Phoenician}{RL}{}
-\TrackLangScriptMap{Piqd}{293}{Klingon (KLI plqaD)}{LR}{}
-\TrackLangScriptMap{Plrd}{282}{Miao (Pollard)}{LR}{}
-\TrackLangScriptMap{Prti}{130}{Inscriptional Parthian}{RL}{}
-\TrackLangScriptMap{Qaaa}{900}{Reserved for private use{}
-(start)}{varies}{}
-\TrackLangScriptMap{Qaai}{908}{Private use}{varies}{}
-\TrackLangScriptMap{Qabx}{949}{Reserved for private use{}
-(end)}{varies}{}
-\TrackLangScriptMap{Rjng}{363}{Rejang (Redjang, Kaganga)}{LR}{}
-\TrackLangScriptMap{Roro}{620}{Rongorongo}{varies}{}
-\TrackLangScriptMap{Runr}{211}{Runic}{LR}{}
-\TrackLangScriptMap{Samr}{123}{Samaritan}{RL}{}
-\TrackLangScriptMap{Sara}{292}{Sarati}{varies}{}
-\TrackLangScriptMap{Sarb}{105}{Old South Arabian}{RL}{}
-\TrackLangScriptMap{Saur}{344}{Saurashtra}{LR}{}
-\TrackLangScriptMap{Sgnw}{095}{SignWriting}{TB}{}
-\TrackLangScriptMap{Shaw}{281}{Shavian (Shaw)}{LR}{}
-\TrackLangScriptMap{Shrd}{319}{Sharada}{LR}{}
-\TrackLangScriptMap{Sidd}{302}{Siddham}{LR}{}
-\TrackLangScriptMap{Sind}{318}{Khudawadi, Sindhi}{LR}{}
-\TrackLangScriptMap{Sinh}{348}{Sinhala}{LR}{}
-\TrackLangScriptMap{Sora}{398}{Sora Sompeng}{LR}{}
-\TrackLangScriptMap{Sund}{362}{Sundanese}{LR}{}
-\TrackLangScriptMap{Sylo}{316}{Syloti Nagri}{LR}{}
-\TrackLangScriptMap{Syrc}{135}{Syriac}{RL}{}
-\TrackLangScriptMap{Syre}{138}{Syriac (Estrangelo variant)}{RL}{}
-\TrackLangScriptMap{Syrj}{137}{Syriac (Western variant)}{RL}{}
-\TrackLangScriptMap{Syrn}{136}{Syriac (Eastern variant)}{RL}{}
-\TrackLangScriptMap{Tagb}{373}{Tagbanwa}{LR}{}
-\TrackLangScriptMap{Takr}{321}{Takri}{LR}{}
-\TrackLangScriptMap{Tale}{353}{Tai Le}{LR}{}
-\TrackLangScriptMap{Talu}{354}{New Tai Lue}{LR}{}
-\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}
-\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}
-\TrackLangScriptMap{Tang}{520}{Tangut}{LR}{}
-\TrackLangScriptMap{Tavt}{359}{Tai Viet}{LR}{}
-\TrackLangScriptMap{Telu}{340}{Telugu}{LR}{}
-\TrackLangScriptMap{Teng}{290}{Tengwar}{LR}{}
-\TrackLangScriptMap{Tfng}{120}{Tifinagh (Berber)}{LR}{}
-\TrackLangScriptMap{Tglg}{370}{Tagalog (Baybayin, Alibata)}{LR}{}
-\TrackLangScriptMap{Thaa}{170}{Thaana}{RL}{}
-\TrackLangScriptMap{Thai}{352}{Thai}{LR}{}
-\TrackLangScriptMap{Tibt}{330}{Tibetan}{LR}{}
-\TrackLangScriptMap{Tirh}{326}{Tirhuta}{LR}{}
-\TrackLangScriptMap{Ugar}{040}{Ugaritic}{LR}{}
-\TrackLangScriptMap{Vaii}{470}{Vai}{LR}{}
-\TrackLangScriptMap{Visp}{280}{Visible Speech}{LR}{}
-\TrackLangScriptMap{Wara}{262}{Warang Citi (Varang Kshiti)}{LR}{}
-\TrackLangScriptMap{Wole}{480}{Woleai}{RL}{}
-\TrackLangScriptMap{Xpeo}{030}{Old Persian}{LR}{}
-\TrackLangScriptMap{Xsux}{020}{Cuneiform, Sumero-Akkadian}{LR}{}
-\TrackLangScriptMap{Yiii}{460}{Yi}{LR}{}
-\TrackLangScriptMap{Zinh}{994}{Inherited script}{inherited}{}
-\TrackLangScriptMap{Zmth}{995}{Mathematical notation}{LR}{}
-\TrackLangScriptMap{Zsym}{996}{Symbols}{varies}{}
-\TrackLangScriptMap{Zsye}{993}{Symbols (emoji variant)}{varies}{}
-\TrackLangScriptMap{Zxxx}{997}{Unwritten documents}{varies}{}
-\TrackLangScriptMap{Zyyy}{998}{Undetermined script}{varies}{}
-\TrackLangScriptMap{Zzzz}{999}{Uncoded script}{varies}{}
+\TrackLangScriptMap{Adlm}{166}{Adlam}{RL}{}%
+\TrackLangScriptMap{Afak}{439}{Afaka}{varies}{}%
+\TrackLangScriptMap{Aghb}{239}{Caucasian Albanian}{LR}{}%
+\TrackLangScriptMap{Ahom}{338}{Ahom, Tai Ahom}{LR}{}%
+\TrackLangScriptMap{Arab}{160}{Arabic}{RL}{}%
+\TrackLangScriptMap{Aran}{161}{Arabic (Nastaliq variant)}{RL}{}%
+\TrackLangScriptMap{Armi}{124}{Imperial Aramaic}{RL}{}%
+\TrackLangScriptMap{Armn}{230}{Armenian}{LR}{}%
+\TrackLangScriptMap{Avst}{134}{Avestan}{RL}{}%
+\TrackLangScriptMap{Bali}{360}{Balinese}{LR}{}%
+\TrackLangScriptMap{Bamu}{435}{Bamum}{LR}{}%
+\TrackLangScriptMap{Bass}{259}{Bassa Vah}{LR}{}%
+\TrackLangScriptMap{Batk}{365}{Batak}{LR}{}%
+\TrackLangScriptMap{Beng}{334}{Bhaiksuki}{LR}{}%
+\TrackLangScriptMap{Blis}{550}{Blissymbols}{varies}{}%
+\TrackLangScriptMap{Bopo}{285}{Bopomofo}{LR}{}%
+\TrackLangScriptMap{Brah}{300}{Brahmi}{LR}{}%
+\TrackLangScriptMap{Brai}{570}{Braille}{LR}{}%
+\TrackLangScriptMap{Bugi}{367}{Buginese}{LR}{}%
+\TrackLangScriptMap{Buhd}{372}{Buhid}{LR}{}%
+\TrackLangScriptMap{Cakm}{349}{Chakma}{LR}{}%
+\TrackLangScriptMap{Cans}{440}{Unified Canadian Aboriginal Syllabics}{LR}{}%
+\TrackLangScriptMap{Cari}{201}{Carian}{LR}{}%
+\TrackLangScriptMap{Cham}{358}{Cham}{LR}{}%
+\TrackLangScriptMap{Cher}{445}{Cherokee}{LR}{}%
+\TrackLangScriptMap{Cirt}{291}{Cirth}{varies}{}%
+\TrackLangScriptMap{Copt}{204}{Coptic}{LR}{}%
+\TrackLangScriptMap{Cprt}{403}{Cypriot}{RL}{}%
+\TrackLangScriptMap{Cyrl}{220}{Cyrillic}{LR}{}%
+\TrackLangScriptMap{Cyrs}{221}{Cyrillic (Old Church Slavonic variant)}{varies}{}%
+\TrackLangScriptMap{Deva}{315}{Devanagari (Nagari)}{LR}{}%
+\TrackLangScriptMap{Dsrt}{250}{Deseret (Mormon)}{LR}{}%
+\TrackLangScriptMap{Dupl}{755}{Duployan shorthand, Duployan stenography}{LR}{}%
+\TrackLangScriptMap{Egyd}{070}{Egyptian demotic}{RL}{}%
+\TrackLangScriptMap{Egyh}{060}{Egyptian hieratic}{RL}{}%
+\TrackLangScriptMap{Egyp}{050}{Egyptian hieroglyphs}{LR}{}%
+\TrackLangScriptMap{Elba}{226}{Elbasan}{LR}{}%
+\TrackLangScriptMap{Ethi}{430}{Ethiopic (Ge'ez)}{LR}{}%
+\TrackLangScriptMap{Geok}{241}{Khutsuri (Asomtavruli and Nuskhuri)}{LR}{}%
+\TrackLangScriptMap{Geor}{240}{Georgian (Mkhedruli)}{LR}{}%
+\TrackLangScriptMap{Glag}{225}{Glagolitic}{LR}{}%
+\TrackLangScriptMap{Goth}{206}{Gothic}{LR}{}%
+\TrackLangScriptMap{Gran}{343}{Grantha}{LR}{}%
+\TrackLangScriptMap{Grek}{200}{Greek}{LR}{}%
+\TrackLangScriptMap{Gujr}{320}{Gujarati}{LR}{}%
+\TrackLangScriptMap{Guru}{310}{Gurmukhi}{LR}{}%
+\TrackLangScriptMap{Hanb}{503}{Han with Bopomofo (alias for Han + Bopomofo)}{LR}{}%
+\TrackLangScriptMap{Hang}{286}{Hangul}{LR}{}%
+\TrackLangScriptMap{Hani}{500}{Han (Hanzi, Kanji, Hanja)}{LR}{}%
+\TrackLangScriptMap{Hano}{371}{Hanunoo}{LR}{}%
+\TrackLangScriptMap{Hans}{501}{Han (Simplified variant)}{varies}{}%
+\TrackLangScriptMap{Hant}{502}{Han (Traditional variant)}{varies}{}%
+\TrackLangScriptMap{Hatr}{127}{Hatran}{RL}{}%
+\TrackLangScriptMap{Hebr}{125}{Hebrew}{RL}{}%
+\TrackLangScriptMap{Hira}{410}{Hiragana}{LR}{}%
+\TrackLangScriptMap{Hluw}{080}{Anatolian Hieroglyphs (Luwian Hieroglyphs, Hittite Hieroglyphs)}{LR}{}%
+\TrackLangScriptMap{Hmng}{450}{Pahawh Hmong}{LR}{}%
+\TrackLangScriptMap{Hrkt}{412}{Japanese syllabaries (alias for Hiragana + Katakana)}{varies}{}%
+\TrackLangScriptMap{Hung}{176}{Old Hungarian (Hungarian Runic)}{RL}{}%
+\TrackLangScriptMap{Inds}{610}{Indus (Harappan)}{RL}{}%
+\TrackLangScriptMap{Ital}{210}{Old Italic (Etruscan, Oscan, etc.)}{LR}{}%
+\TrackLangScriptMap{Jamo}{284}{Jamo (alias for Jamo subset of Hangul)}{LR}{}%
+\TrackLangScriptMap{Java}{361}{Javanese}{LR}{}%
+\TrackLangScriptMap{Jpan}{413}{Japanese (alias for Han + Hiragana + Katakana)}{varies}{}%
+\TrackLangScriptMap{Jurc}{510}{Jurchen}{LR}{}%
+\TrackLangScriptMap{Kali}{357}{Kayah Li}{LR}{}%
+\TrackLangScriptMap{Kana}{411}{Katakana}{LR}{}%
+\TrackLangScriptMap{Khar}{305}{Kharoshthi}{RL}{}%
+\TrackLangScriptMap{Khmr}{355}{Khmer}{LR}{}%
+\TrackLangScriptMap{Khoj}{322}{Khojki}{LR}{}%
+\TrackLangScriptMap{Kitl}{505}{Khitan large script}{LR}{}%
+\TrackLangScriptMap{Kits}{288}{Khitan small script}{TB}{}%
+\TrackLangScriptMap{Knda}{345}{Kannada}{LR}{}%
+\TrackLangScriptMap{Kore}{287}{Korean (alias for Hangul + Han)}{LR}{}%
+\TrackLangScriptMap{Kpel}{436}{Kpelle}{LR}{}%
+\TrackLangScriptMap{Kthi}{317}{Kaithi}{LR}{}%
+\TrackLangScriptMap{Lana}{351}{Tai Tham (Lanna)}{LR}{}%
+\TrackLangScriptMap{Laoo}{356}{Lao}{LR}{}%
+\TrackLangScriptMap{Latf}{217}{Latin (Fraktur variant)}{varies}{}%
+\TrackLangScriptMap{Latg}{216}{Latin (Gaelic variant)}{LR}{}%
+\TrackLangScriptMap{Latn}{215}{Latin}{LR}{}%
+\TrackLangScriptMap{Leke}{364}{Leke}{LR}{}%
+\TrackLangScriptMap{Lepc}{335}{Lepcha}{LR}{}%
+\TrackLangScriptMap{Limb}{336}{Limbu}{LR}{}%
+\TrackLangScriptMap{Lina}{400}{Linear A}{LR}{}%
+\TrackLangScriptMap{Linb}{401}{Linear B}{LR}{}%
+\TrackLangScriptMap{Lisu}{399}{Lisu (Fraser)}{LR}{}%
+\TrackLangScriptMap{Loma}{437}{Loma}{LR}{}%
+\TrackLangScriptMap{Lyci}{202}{Lycian}{LR}{}%
+\TrackLangScriptMap{Lydi}{116}{Lydian}{RL}{}%
+\TrackLangScriptMap{Mahj}{314}{Mahajani}{LR}{}%
+\TrackLangScriptMap{Mand}{140}{Mandaic, Mandaean}{RL}{}%
+\TrackLangScriptMap{Mani}{139}{Manichaean}{RL}{}%
+\TrackLangScriptMap{Marc}{332}{Marchen}{LR}{}%
+\TrackLangScriptMap{Maya}{090}{Mayan hieroglyphs}{varies}{}%
+\TrackLangScriptMap{Mend}{438}{Mende Kikakui}{RL}{}%
+\TrackLangScriptMap{Merc}{101}{Meroitic Cursive}{RL}{}%
+\TrackLangScriptMap{Mero}{100}{Meroitic Hieroglyphs}{RL}{}%
+\TrackLangScriptMap{Mlym}{347}{Malayalam}{LR}{}%
+\TrackLangScriptMap{Modi}{324}{Modi}{LR}{}%
+\TrackLangScriptMap{Mong}{145}{Mongolian}{TB}{}%
+\TrackLangScriptMap{Moon}{218}{Moon (Moon code, Moon script, Moon type)}{varies}{}%
+\TrackLangScriptMap{Mroo}{199}{Mro, Mru}{LR}{}%
+\TrackLangScriptMap{Mtei}{337}{Meitei Mayek (Meithei, Meetei)}{LR}{}%
+\TrackLangScriptMap{Mult}{323}{Multani}{LR}{}%
+\TrackLangScriptMap{Mymr}{350}{Myanmar (Burmese)}{LR}{}%
+\TrackLangScriptMap{Narb}{106}{Old North Arabian (Ancient North Arabian)}{RL}{}%
+\TrackLangScriptMap{Nbat}{159}{Nabataean}{RL}{}%
+\TrackLangScriptMap{Newa}{333}{Newa, Newar, Newari}{LR}{}%
+\TrackLangScriptMap{Nkgb}{420}{Nakhi Geba}{LR}{}%
+\TrackLangScriptMap{Nkoo}{165}{N'Ko}{RL}{}%
+\TrackLangScriptMap{Nshu}{499}{Nushu}{LR}{}%
+\TrackLangScriptMap{Ogam}{212}{Ogham}{varies}{}%
+\TrackLangScriptMap{Olck}{261}{Ol Chiki}{LR}{}%
+\TrackLangScriptMap{Orkh}{175}{Old Turkic, Orkhon Runic}{RL}{}%
+\TrackLangScriptMap{Orya}{327}{Oriya}{LR}{}%
+\TrackLangScriptMap{Osge}{219}{Osage}{LR}{}%
+\TrackLangScriptMap{Osma}{260}{Osmanya}{LR}{}%
+\TrackLangScriptMap{Palm}{126}{Palmyrene}{RL}{}%
+\TrackLangScriptMap{Pauc}{263}{Pau Cin Hau}{LR}{}%
+\TrackLangScriptMap{Perm}{227}{Old Permic}{LR}{}%
+\TrackLangScriptMap{Phag}{331}{Phags-pa}{TB}{}%
+\TrackLangScriptMap{Phli}{131}{Inscriptional Pahlavi}{RL}{}%
+\TrackLangScriptMap{Phlp}{132}{Psalter Pahlavi}{RL}{}%
+\TrackLangScriptMap{Phlv}{133}{Book Pahlavi}{RL}{}%
+\TrackLangScriptMap{Phnx}{115}{Phoenician}{RL}{}%
+\TrackLangScriptMap{Piqd}{293}{Klingon (KLI plqaD)}{LR}{}%
+\TrackLangScriptMap{Plrd}{282}{Miao (Pollard)}{LR}{}%
+\TrackLangScriptMap{Prti}{130}{Inscriptional Parthian}{RL}{}%
+\TrackLangScriptMap{Qaaa}{900}{Reserved for private use (start)}{varies}{}%
+\TrackLangScriptMap{Qaai}{908}{Private use}{varies}{}%
+\TrackLangScriptMap{Qabx}{949}{Reserved for private use (end)}{varies}{}%
+\TrackLangScriptMap{Rjng}{363}{Rejang (Redjang, Kaganga)}{LR}{}%
+\TrackLangScriptMap{Roro}{620}{Rongorongo}{varies}{}%
+\TrackLangScriptMap{Runr}{211}{Runic}{LR}{}%
+\TrackLangScriptMap{Samr}{123}{Samaritan}{RL}{}%
+\TrackLangScriptMap{Sara}{292}{Sarati}{varies}{}%
+\TrackLangScriptMap{Sarb}{105}{Old South Arabian}{RL}{}%
+\TrackLangScriptMap{Saur}{344}{Saurashtra}{LR}{}%
+\TrackLangScriptMap{Sgnw}{095}{SignWriting}{TB}{}%
+\TrackLangScriptMap{Shaw}{281}{Shavian (Shaw)}{LR}{}%
+\TrackLangScriptMap{Shrd}{319}{Sharada}{LR}{}%
+\TrackLangScriptMap{Sidd}{302}{Siddham}{LR}{}%
+\TrackLangScriptMap{Sind}{318}{Khudawadi, Sindhi}{LR}{}%
+\TrackLangScriptMap{Sinh}{348}{Sinhala}{LR}{}%
+\TrackLangScriptMap{Sora}{398}{Sora Sompeng}{LR}{}%
+\TrackLangScriptMap{Sund}{362}{Sundanese}{LR}{}%
+\TrackLangScriptMap{Sylo}{316}{Syloti Nagri}{LR}{}%
+\TrackLangScriptMap{Syrc}{135}{Syriac}{RL}{}%
+\TrackLangScriptMap{Syre}{138}{Syriac (Estrangelo variant)}{RL}{}%
+\TrackLangScriptMap{Syrj}{137}{Syriac (Western variant)}{RL}{}%
+\TrackLangScriptMap{Syrn}{136}{Syriac (Eastern variant)}{RL}{}%
+\TrackLangScriptMap{Tagb}{373}{Tagbanwa}{LR}{}%
+\TrackLangScriptMap{Takr}{321}{Takri}{LR}{}%
+\TrackLangScriptMap{Tale}{353}{Tai Le}{LR}{}%
+\TrackLangScriptMap{Talu}{354}{New Tai Lue}{LR}{}%
+\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}%
+\TrackLangScriptMap{Taml}{346}{Tamil}{LR}{}%
+\TrackLangScriptMap{Tang}{520}{Tangut}{LR}{}%
+\TrackLangScriptMap{Tavt}{359}{Tai Viet}{LR}{}%
+\TrackLangScriptMap{Telu}{340}{Telugu}{LR}{}%
+\TrackLangScriptMap{Teng}{290}{Tengwar}{LR}{}%
+\TrackLangScriptMap{Tfng}{120}{Tifinagh (Berber)}{LR}{}%
+\TrackLangScriptMap{Tglg}{370}{Tagalog (Baybayin, Alibata)}{LR}{}%
+\TrackLangScriptMap{Thaa}{170}{Thaana}{RL}{}%
+\TrackLangScriptMap{Thai}{352}{Thai}{LR}{}%
+\TrackLangScriptMap{Tibt}{330}{Tibetan}{LR}{}%
+\TrackLangScriptMap{Tirh}{326}{Tirhuta}{LR}{}%
+\TrackLangScriptMap{Ugar}{040}{Ugaritic}{LR}{}%
+\TrackLangScriptMap{Vaii}{470}{Vai}{LR}{}%
+\TrackLangScriptMap{Visp}{280}{Visible Speech}{LR}{}%
+\TrackLangScriptMap{Wara}{262}{Warang Citi (Varang Kshiti)}{LR}{}%
+\TrackLangScriptMap{Wole}{480}{Woleai}{RL}{}%
+\TrackLangScriptMap{Xpeo}{030}{Old Persian}{LR}{}%
+\TrackLangScriptMap{Xsux}{020}{Cuneiform, Sumero-Akkadian}{LR}{}%
+\TrackLangScriptMap{Yiii}{460}{Yi}{LR}{}%
+\TrackLangScriptMap{Zinh}{994}{Inherited script}{inherited}{}%
+\TrackLangScriptMap{Zmth}{995}{Mathematical notation}{LR}{}%
+\TrackLangScriptMap{Zsym}{996}{Symbols}{varies}{}%
+\TrackLangScriptMap{Zsye}{993}{Symbols (emoji variant)}{varies}{}%
+\TrackLangScriptMap{Zxxx}{997}{Unwritten documents}{varies}{}%
+\TrackLangScriptMap{Zyyy}{998}{Undetermined script}{varies}{}%
+\TrackLangScriptMap{Zzzz}{999}{Uncoded script}{varies}{}%
+\@tracklang@input@extra@script@files
\@tracklang@scripts@restore@at
\endinput
diff --git a/Master/texmf-dist/tex/generic/tracklang/tracklang.tex b/Master/texmf-dist/tex/generic/tracklang/tracklang.tex
index dbbd25175a0..edac76e31be 100644
--- a/Master/texmf-dist/tex/generic/tracklang/tracklang.tex
+++ b/Master/texmf-dist/tex/generic/tracklang/tracklang.tex
@@ -64,7 +64,7 @@
\expandafter\endinput
\fi
\expandafter\def\csname ver@tracklang.tex\endcsname{%
- 2019/11/11 v1.3.9 (NLCT) Track Languages Generic Code}
+ 2019/11/30 v1.4 (NLCT) Track Languages Generic Code}
\long\def\@tracklang@ifundef#1#2#3{%
\ifcsname#1\endcsname
\expandafter\ifx\csname #1\endcsname\relax
@@ -145,6 +145,16 @@
\def\@tracklang@nameuse#1{%
\@tracklang@ifundef{#1}{}{\csname#1\endcsname}%
}
+\def\@tracklang@ifcseqcsname#1#2#3#4{%
+ \@tracklang@ifundef{#2}{#4}%
+ {%
+ \expandafter\ifx\expandafter#1\csname#2\endcsname
+ #3%
+ \else
+ #4%
+ \fi
+ }%
+}
\ifx\@onelevel@sanitize\undefined
\def\@tracklang@sanitize#1{%
\edef#1{\expandafter\@tracklang@strip@prefix\meaning#1}%
@@ -153,8 +163,8 @@
\else
\let\@tracklang@sanitize\@onelevel@sanitize
\fi
-\def\@tracklang@firstoftwo#1#2{#1}
-\def\@tracklang@secondoftwo#1#2{#2}
+\long\def\@tracklang@firstoftwo#1#2{#1}
+\long\def\@tracklang@secondoftwo#1#2{#2}
\ifx\PackageError\undefined
\def\@tracklang@err#1#2{%
\errhelp{#2}%
@@ -201,6 +211,13 @@
\fi
}%
\fi
+\newif\ifTrackLangShowVerbose
+\TrackLangShowVerbosefalse
+\def\@tracklang@verbose#1{%
+ \ifTrackLangShowVerbose
+ \@tracklang@info{#1}%
+ \fi
+}%
\ifx\IfFileExists\undefined
\long\def\@tracklang@IfFileExists#1#2#3{%
\openin0=#1 %
@@ -820,36 +837,48 @@
}
\def\SetCurrentTrackedDialect#1{%
\edef\CurrentTrackedDialect{#1}%
+ \@tracklang@verbose{Setting current tracked dialect `\CurrentTrackedDialect'}%
\IfTrackedDialect{\CurrentTrackedDialect}%
{}%
{%
+ \@tracklang@verbose{Not a recognised tracklang label}%
\IfHookHasMappingFromTrackedDialect{\CurrentTrackedDialect}%
{%
\IfTrackedDialect{\GetTrackedDialectFromMapping\CurrentTrackedDialect}%
{%
\edef\CurrentTrackedDialect{\GetTrackedDialectFromMapping
{\CurrentTrackedDialect}}%
+ \@tracklang@verbose{Mapping found to tracklang label `\CurrentTrackedDialect'}%
}%
{%
\IfTrackedLanguage{#1}%
{%
+ \@tracklang@verbose{Supplied label is a root language.
+ Finding last tracked dialect for language `#1'}%
\edef\@tracklang@dialects{\TrackedDialectsFromLanguage{#1}}%
\@tracklang@for\@tracklang@dialect:=\@tracklang@dialects\do{%
\let\CurrentTrackedDialect\@tracklang@dialect
}%
}%
- {}%
+ {%
+ \@tracklang@verbose{No tracklang dialect found for label `#1'}%
+ }%
}%
}%
{%
+ \@tracklang@verbose{No mapping found}%
\IfTrackedLanguage{#1}%
{%
+ \@tracklang@verbose{Supplied label is a root language.
+ Finding last tracked dialect for language `#1'}%
\edef\@tracklang@dialects{\TrackedDialectsFromLanguage{#1}}%
\@tracklang@for\@tracklang@dialect:=\@tracklang@dialects\do{%
\let\CurrentTrackedDialect\@tracklang@dialect
}%
}%
- {}%
+ {%
+ \@tracklang@verbose{No tracklang dialect found for label `#1'}%
+ }%
}%
}%
\IfTrackedDialect{\CurrentTrackedDialect}%
@@ -903,6 +932,17 @@
}%
}%
}%
+ \@tracklang@verbose{Current tracked dialect: `\CurrentTrackedDialect'.\MessageBreak
+ Language: `\CurrentTrackedLanguage'.\MessageBreak
+ ISO code: `\CurrentTrackedIsoCode'.\MessageBreak
+ Sub-lang: `\CurrentTrackedDialectSubLang'.\MessageBreak
+ Modifier: `\CurrentTrackedDialectModifier'.\MessageBreak
+ Variant: `\CurrentTrackedDialectVariant'.\MessageBreak
+ Script: `\CurrentTrackedDialectScript'.\MessageBreak
+ Region: `\CurrentTrackedRegion'.\MessageBreak
+ Additional: `\CurrentTrackedDialectAdditional'.\MessageBreak
+ Tag: `\CurrentTrackedLanguageTag'.
+ }%
}%
{%
\@tracklang@warn{Unknown dialect label `#1' passed to
@@ -1352,6 +1392,34 @@
\let\@TrackLangEnvAdditional\@tracklang@split@post
\fi
}%
+\def\@tracklang@extra@region@filelist{}
+\def\TrackLangAddExtraRegionFile#1{%
+ \ifx\TrackLangRegionMap\undefined
+ \else
+ \@tracklang@input #1\relax
+ \fi
+ \@tracklang@add{#1}{\@tracklang@extra@region@filelist}%
+}
+\def\@tracklang@input@extra@region@files{%
+ \@tracklang@for\@tracklang@currfile:=\@tracklang@extra@region@filelist\do
+ {%
+ \@tracklang@input\@tracklang@currfile
+ }%
+}
+\def\@tracklang@extra@script@filelist{}
+\def\TrackLangAddExtraScriptFile#1{%
+ \ifx\TrackLangScriptMap\undefined
+ \else
+ \@tracklang@input #1\relax
+ \fi
+ \@tracklang@add{#1}{\@tracklang@extra@script@filelist}%
+}
+\def\@tracklang@input@extra@script@files{%
+ \@tracklang@for\@tracklang@currfile:=\@tracklang@extra@script@filelist\do
+ {%
+ \@tracklang@input\@tracklang@currfile
+ }%
+}
\def\GetTrackedDialectFromLanguageTag#1#2{%
\def#2{}%
\def\TrackedDialectClosestSubMatch{}%
@@ -1552,15 +1620,18 @@
\ifx\@tracklang@declareoption\undefined
\def\@tracklang@declareoption#1{}
\fi
+\def\TrackLangProvidePredefinedLanguage#1{%
+ \@tracklang@namedef{@tracklang@add@#1}{%
+ \AddTrackedLanguage{#1}%
+ \AddTrackedLanguageIsoCodes{#1}%
+ \AddTrackedCountryIsoCode{#1}%
+ }%
+}
\def\TrackLangDeclareLanguageOption#1#2#3#4#5#6#7{%
\@tracklang@ifundef{@tracklang@add@#1}%
{%
\TrackLangNewLanguage{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
- \@tracklang@namedef{@tracklang@add@#1}{%
- \AddTrackedLanguage{#1}%
- \AddTrackedLanguageIsoCodes{#1}%
- \AddTrackedCountryIsoCode{#1}%
- }%
+ \TrackLangProvidePredefinedLanguage{#1}%
\@tracklang@declareoption{#1}%
}%
{%
@@ -1765,9 +1836,7 @@
\TrackLangDeclareLanguageOption{yoruba}{yo}{yor}{}{}{}{Latn}
\TrackLangDeclareLanguageOption{zhuang}{za}{zha}{}{}{CN}{Hani}
\TrackLangDeclareLanguageOption{zulu}{zu}{zul}{}{}{}{Latn}
-\def\TrackLangDeclareDialectOption#1#2#3#4#5#6#7{%
- \@tracklang@ifundef{@tracklang@add@#1}%
- {%
+\def\TrackLangProvidePredefinedDialect#1#2#3#4#5#6#7{
\ifx\relax#3\relax
\ifx\relax#4\relax
\ifx\relax#5\relax
@@ -1855,6 +1924,11 @@
\expandafter\def\csname @tracklang@add@#1\expandafter\endcsname
\expandafter{\@tracklang@tmp\SetTrackedDialectScript{#1}{#7}}%
\fi
+}
+\def\TrackLangDeclareDialectOption#1#2#3#4#5#6#7{%
+ \@tracklang@ifundef{@tracklang@add@#1}%
+ {%
+ \TrackLangProvidePredefinedDialect{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
\@tracklang@declareoption{#1}%
}%
{%
@@ -2080,6 +2154,1310 @@
\fi
}
\long\def\IfTrackedLanguageFileExists#1#2#3#4#5{%
+ \@tracklang@verbose{Finding file for dialect `#1'}%
+ \def\CurrentTrackedTag{}%
+ \SetCurrentTrackedDialect{#1}%
+ \IfTrackedDialect{#1}%
+ {%
+ \edef\CurrentTrackedIsoCodeI{\TrackedIsoCodeFromLanguage
+ {639-1}{\CurrentTrackedLanguage}}%
+ \edef\CurrentTrackedIsoCodeII{\TrackedIsoCodeFromLanguage
+ {639-2}{\CurrentTrackedLanguage}}%
+ \edef\CurrentTrackedIsoCodeIII{\TrackedIsoCodeFromLanguage
+ {639-3}{\CurrentTrackedLanguage}}%
+ \@tracklang@test@if@file@exists@for@tag{#1}{#2}{#3}%
+ \@tracklang@if@file@exists{#4}{#5}%
+ }%
+ {#5}% unknown dialect
+}
+\def\@tracklang@test@if@file@exists@noop#1#2#3{}
+\def\@tracklang@test@if@file@exists@for@tag#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedLanguageTag
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@secondoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@dialect
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@dialect#1#2#3{%
+ \edef\CurrentTrackedTag{#1}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-1}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+ \let\CurrentTrackedIsoCode\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@scriptregion
+ }%
+ }%
+ }%
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIscriptregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeI
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \ifx\CurrentTrackedDialectScript\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \fi
+ \ifx\CurrentTrackedRegion\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedRegion\empty
+ \ifx\CurrentTrackedDialectScript\empty
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langII
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langII
+ }%
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscript
+ }%
+ \fi
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectScript\empty
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipregion
+ }%
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript
+ -\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptregion
+ }%
+ \fi
+ \fi
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIscriptregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \ifx\CurrentTrackedDialectScript\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \fi
+ \ifx\CurrentTrackedRegion\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedRegion\empty
+ \ifx\CurrentTrackedDialectScript\empty
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ }%
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ }%
+ \fi
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectScript\empty
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ }%
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript
+ -\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptregion
+ }%
+ \fi
+ \fi
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIscriptregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \ifx\CurrentTrackedDialectScript\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \fi
+ \ifx\CurrentTrackedRegion\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedRegion\empty
+ \ifx\CurrentTrackedDialectScript\empty
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ }%
+ \fi
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectScript\empty
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipregion
+ }%
+ \fi
+ \else
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript
+ -\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptregion
+ }%
+ \fi
+ \fi
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIskipscript#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscript
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscript
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIscript#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscript
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIskipscript#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscript
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIscript#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscript
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIskipscript#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIregion#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIskipscriptregion#1#2#3{%
+ \@tracklang@ifcseqcsname\CurrentTrackedDialectScript
+ {@tracklang@knowniso@script@\CurrentTrackedLanguage}%
+ {%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptskipregion
+ }%
+ \fi
+ }%
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIscriptskipregion
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIskipscriptskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIskipscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ }%
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-2}{\CurrentTrackedLanguage}
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptregion
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIskipscriptregion#1#2#3{%
+ \@tracklang@ifcseqcsname\CurrentTrackedDialectScript
+ {@tracklang@knowniso@script@\CurrentTrackedLanguage}%
+ {%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptskipregion
+ }%
+ \fi
+ }%
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIscriptskipregion
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIskipscriptskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIskipscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode
+ {639-3}{\CurrentTrackedLanguage}
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptregion
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIskipscriptregion#1#2#3{%
+ \@tracklang@ifcseqcsname\CurrentTrackedDialectScript
+ {@tracklang@knowniso@script@\CurrentTrackedLanguage}%
+ {%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedRegion}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptskipregion
+ }%
+ \fi
+ }%
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIscriptskipregion
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptskipregion
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectScript}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIskipscriptskipregion
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIskipscriptskipregion#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@region
+ }%
+ \fi
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langII#1#2#3{%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ }%
+ \fi
+ }%
+ {%
+ \fi
+ }%
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIII
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIII#1#2#3{%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedIsoCode-\CurrentTrackedDialectSubLang}%
+ \fi
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ \else
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \fi
+ }%
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@region#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedRegion
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langvariant
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langvariant#1#2#3{%
+ \ifx\CurrentTrackedDialectVariant\empty
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ \else
+ \IfTrackedLanguageHasIsoCode{639-1}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIvariant
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIvariant
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIvariant
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ }%
+ }%
+ \fi
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIvariant#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeI
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectVariant}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-2}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIvariant
+ }
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIvariant
+ }
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ }%
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIvariant#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectVariant}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \IfTrackedLanguageHasIsoCode{639-3}{\CurrentTrackedLanguage}%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@langIIIvariant
+ }
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@langIIIvariant#1#2#3{%
+ \let\CurrentTrackedIsoCode\CurrentTrackedIsoCodeIII
+ \let\CurrentTrackedTag\CurrentTrackedIsoCode
+ \ifx\CurrentTrackedDialectSubLang\empty
+ \else
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectSubLang}%
+ \fi
+ \edef\CurrentTrackedTag{\CurrentTrackedTag-\CurrentTrackedDialectVariant}%
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@noop
+ }%
+ {%
+ \let\@tracklang@test@if@file@exists@next\@tracklang@test@if@file@exists@for@rootlang
+ }%
+ \@tracklang@test@if@file@exists@next{#1}{#2}{#3}%
+}
+\def\@tracklang@test@if@file@exists@for@rootlang#1#2#3{%
+ \let\CurrentTrackedTag\CurrentTrackedLanguage
+ \@tracklang@verbose{Testing tag `\CurrentTrackedTag'}%
+ \@tracklang@IfFileExists{#2\CurrentTrackedTag#3}%
+ {%
+ \let\@tracklang@if@file@exists\@tracklang@firstoftwo
+ }%
+ {}%
+}
+\long\def\IfTrackedLanguageFileExists@orig#1#2#3#4#5{%
\def\CurrentTrackedTag{}%
\SetCurrentTrackedDialect{#1}%
\IfTrackedDialect{#1}%
@@ -2330,6 +3708,49 @@
\gdef\csname#1#2\expandafter\endcsname\expandafter{\@tracklang@hook#3}%
}
\def\TrackLangAddToCaptions#1{\TrackLangAddToHook{#1}{captions}}
+\def\TrackLangRedefHook{\noop@TrackLangRedefHook}
+\def\noop@TrackLangRedefHook#1#2{%
+ \@tracklang@err{\string\TrackLangRedefHook\space
+ only permitted within resource files}
+}
+\def\@TrackLangRedefHook#1#2{%
+ \@tracklang@ifundef{#2\CurrentTrackedDialect}%
+ {%
+ \IfTrackedDialectHasMapping{\CurrentTrackedDialect}%
+ {%
+ \edef\@tracklang@tmp{%
+ \csname @tracklang@dialectmap@tohook@\CurrentTrackedDialect\endcsname}%
+ \@tracklang@ifundef{#2\@tracklang@tmp}%
+ {%
+ \@tracklang@ifundef{#2\CurrentTrackedLanguage}%
+ {%
+ #1%
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\CurrentTrackedLanguage}{#1}%
+ }%
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\@tracklang@tmp}{#1}%
+ }%
+ }%
+ {%
+ \@tracklang@ifundef{#2\CurrentTrackedLanguage}%
+ {%
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\CurrentTrackedLanguage}{#1}%
+ }%
+ }%
+ }%
+ {%
+ \@tracklang@redefhook{#2}{\CurrentTrackedDialect}{#1}%
+ }%
+ #1%
+}
+\def\@tracklang@redefhook#1#2#3{%
+ \expandafter\gdef\csname#1#2\endcsname{#3}%
+}
\def\SetTrackedDialectLabelMap#1#2{%
\@tracklang@enamedef{@tracklang@dialectmap@tohook@#1}{#2}%
\@tracklang@enamedef{@tracklang@dialectmap@fromhook@#2}{#1}%
diff --git a/Master/texmf-dist/tex/latex/tracklang/tracklang-scripts.sty b/Master/texmf-dist/tex/latex/tracklang/tracklang-scripts.sty
index 8b195dbc77d..63bbe797e9c 100644
--- a/Master/texmf-dist/tex/latex/tracklang/tracklang-scripts.sty
+++ b/Master/texmf-dist/tex/latex/tracklang/tracklang-scripts.sty
@@ -51,7 +51,7 @@
%% do code now to initialise
%% Pass all options to tracklang:
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tracklang-scripts}[2019/11/11 v1.3.9 (NLCT) Track
+\ProvidesPackage{tracklang-scripts}[2019/11/30 v1.4 (NLCT) Track
Language Scripts (LaTeX)]
\RequirePackage{tracklang}
\input{tracklang-scripts}
diff --git a/Master/texmf-dist/tex/latex/tracklang/tracklang.sty b/Master/texmf-dist/tex/latex/tracklang/tracklang.sty
index 842c179739b..91a9b7a31f5 100644
--- a/Master/texmf-dist/tex/latex/tracklang/tracklang.sty
+++ b/Master/texmf-dist/tex/latex/tracklang/tracklang.sty
@@ -51,7 +51,7 @@
%% do code now to initialise
%% Pass all options to tracklang:
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tracklang}[2019/11/11 v1.3.9 (NLCT) Track Languages]
+\ProvidesPackage{tracklang}[2019/11/30 v1.4 (NLCT) Track Languages]
\providecommand*{\@tracklang@declareoption}[1]{%
\DeclareOption{#1}{\TrackPredefinedDialect{#1}}%
}