diff options
author | Karl Berry <karl@freefriends.org> | 2014-09-30 00:04:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-09-30 00:04:37 +0000 |
commit | 805c9c1fe26d5bd3dacaba4bc6d38ed7787aea38 (patch) | |
tree | 017e56c8381e854675ac3fb11bc7bb00258cc50e /Master/texmf-dist/doc/generic/tracklang | |
parent | bfcb5e953985804589a2a55b1f1f80bd00c34763 (diff) |
tracklang (29sep14)
git-svn-id: svn://tug.org/texlive/trunk@35283 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/tracklang')
59 files changed, 774 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/tracklang/CHANGES b/Master/texmf-dist/doc/generic/tracklang/CHANGES new file mode 100644 index 00000000000..7beadaefe86 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/CHANGES @@ -0,0 +1,3 @@ +v1.0 (2014/09/29): + + * Initial release diff --git a/Master/texmf-dist/doc/generic/tracklang/README b/Master/texmf-dist/doc/generic/tracklang/README new file mode 100644 index 00000000000..4af2f7a89ec --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/README @@ -0,0 +1,24 @@ +Generic TeX Bundle : tracklang v1.0 + +Last Modified : 2014-09-29 + +Author : Nicola Talbot + +LaTeX usage: \usepackage{tracklang} + +TeX usage: \input tracklang + +LaTeX code is in tracklang.sty. Generic TeX code is in +tracklang.tex (category code of @ must be 11 on input). + +The tracklang package is provided for package developers who want a +simple interface to find out which languages the user has requested +through packages such as babel and polyglossia. *This package +doesn't provide any translations.* Its purpose is simply to track +which languages have been requested by the user. + +This material is subject to the LaTeX Project Public License. +See http://www.ctan.org/license/lppl1.3 for the details of that license. + +http://www.dickimaw-books.com/ + diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-en-GB.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-en-GB.ldf new file mode 100644 index 00000000000..b306547956a --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-en-GB.ldf @@ -0,0 +1,8 @@ +\input{animals-english.ldf} + +\providecommand*{\englishGBanimals}{% + \englishanimals + \renewcommand*{\ladybirdname}{ladybird}% +} + +\englishGBanimals diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-en-US.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-en-US.ldf new file mode 100644 index 00000000000..fbef2a4a02d --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-en-US.ldf @@ -0,0 +1,8 @@ +\input{animals-english.ldf} + +\providecommand*{\englishUSanimals}{% + \englishanimals + \renewcommand*{\ladybirdname}{ladybug}% +} + +\englishUSanimals diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-english.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-english.ldf new file mode 100644 index 00000000000..56edbe73d70 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals-english.ldf @@ -0,0 +1,7 @@ +\providecommand*{\englishanimals}{% + \renewcommand*{\catname}{cat}% + \renewcommand*{\dogname}{dog}% + \renewcommand*{\ladybirdname}{bishy-barney-bee}% +} + +\englishanimals diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty new file mode 100644 index 00000000000..1fbbf0d28b0 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals.sty @@ -0,0 +1,30 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{animals}[2014/09/28 v1.0 (NLCT) Sample package to test tracklang.sty] + +\RequirePackage{tracklang} + +\newcommand\catname{cat} +\newcommand\dogname{dog} +\newcommand\ladybirdname{bishy-barney-bee} + +\AnyTrackedLanguages +{% + \ForEachTrackedDialect{\this@dialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {animals-}% prefix + {.ldf}% + {% + \PackageInfo{tracklang}{Loading `animals-\CurrentTrackedTag.ldf' + for language `\this@dialect'}% + \input{animals-\CurrentTrackedTag.ldf}% + }% + {% + \PackageWarning{animals}% + {No support for language `\this@dialect'}% + }% + }% +} +{% no tracked languages, default already set up +} + +\endinput diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-en-GB.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-en-GB.ldf new file mode 100644 index 00000000000..60ca9bf6892 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-en-GB.ldf @@ -0,0 +1,10 @@ +\ProvidesAnimalsLang{en-GB} + +\RequireAnimalsLang{english}% + +\providecommand*{\englishGBanimals}{% + \englishanimals + \renewcommand*{\ladybirdname}{ladybird}% +} + +\englishGBanimals diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-en-US.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-en-US.ldf new file mode 100644 index 00000000000..b2117ce38f8 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-en-US.ldf @@ -0,0 +1,10 @@ +\ProvidesAnimalsLang{en-US} + +\RequireAnimalsLang{english}% + +\providecommand*{\englishUSanimals}{% + \englishanimals + \renewcommand*{\ladybirdname}{ladybug}% +} + +\englishUSanimals diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-english.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-english.ldf new file mode 100644 index 00000000000..120c1617780 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2-english.ldf @@ -0,0 +1,9 @@ +\ProvidesAnimalsLang{english} + +\providecommand*{\englishanimals}{% + \renewcommand*{\catname}{cat}% + \renewcommand*{\dogname}{dog}% + \renewcommand*{\ladybirdname}{bishy-barney-bee}% +} + +\englishanimals diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2.sty b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2.sty new file mode 100644 index 00000000000..ba8a3295a72 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals2.sty @@ -0,0 +1,38 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{animals2}[2014/09/28 v1.0 (NLCT) Sample package to test tracklang.sty] + +\RequirePackage{tracklang} + +% default definitions +\newcommand\catname{cat} +\newcommand\dogname{dog} +\newcommand\ladybirdname{bishy-barney-bee} + + +\newcommand*{\RequireAnimalsLang}[1]{% + \@ifundefined{ver@animals2-#1.ldf}{\input{animals2-#1.ldf}}{}% +} + +\newcommand*{\ProvidesAnimalsLang}[1]{% + \ProvidesFile{animals2-#1.ldf}% +} + +\AnyTrackedLanguages +{% + \ForEachTrackedDialect{\this@dialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {animals2-}% prefix + {.ldf}% + {% + \RequireAnimalsLang{\CurrentTrackedTag}% + }% + {% + \PackageWarning{animals2}% + {No support for language `\this@dialect'}% + }% + }% +} +{% no tracked languages, default already set up +} + +\endinput diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-en-GB.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-en-GB.ldf new file mode 100644 index 00000000000..3bd31cf3425 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-en-GB.ldf @@ -0,0 +1,23 @@ +\ProvidesAnimalsLang{en-GB} + +\RequireAnimalsLang{english}% + +\providecommand*{\englishGBanimals}{% + \englishanimals + \renewcommand*{\ladybirdname}{ladybird}% +} + +\englishGBanimals + +\@ifundefined{captions\CurrentTrackedDialect} +{% + \@ifundefined{captions\CurrentTrackedLanguage}{}% + {% + \expandafter\g@addto@macro + \csname captions\CurrentTrackedLanguage\endcsname{\englishGBanimals}% + } +}% +{% + \expandafter\g@addto@macro + \csname captions\CurrentTrackedDialect\endcsname{\englishGBanimals}% +} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-en-US.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-en-US.ldf new file mode 100644 index 00000000000..d9a81bf3fc8 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-en-US.ldf @@ -0,0 +1,23 @@ +\ProvidesAnimalsLang{en-US} + +\RequireAnimalsLang{english}% + +\providecommand*{\englishUSanimals}{% + \englishanimals + \renewcommand*{\ladybirdname}{ladybug}% +} + +\englishUSanimals + +\@ifundefined{captions\CurrentTrackedDialect}% +{% + \@ifundefined{captions\CurrentTrackedLanguage}{}% + {% + \expandafter\g@addto@macro + \csname captions\CurrentTrackedLanguage\endcsname{\englishUSanimals}% + } +}% +{% + \expandafter\g@addto@macro + \csname captions\CurrentTrackedDialect\endcsname{\englishUSanimals}% +} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-english.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-english.ldf new file mode 100644 index 00000000000..8760b373527 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-english.ldf @@ -0,0 +1,21 @@ +\ProvidesAnimalsLang{english} + +\providecommand*{\englishanimals}{% + \renewcommand*{\catname}{cat}% + \renewcommand*{\dogname}{dog}% + \renewcommand*{\ladybirdname}{bishy-barney-bee}% +} + +\englishanimals + +\@ifundefined{captionsenglish}% +{% + \@ifundefined{captions\CurrentTrackedDialect}{}% + {% + \expandafter\g@addto@macro + \csname captions\CurrentTrackedDialect\endcsname{\englishanimals}% + } +}% +{% + \g@addto@macro\captionsenglish{\englishanimals}% +} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-german.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-german.ldf new file mode 100644 index 00000000000..209e96ea29f --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3-german.ldf @@ -0,0 +1,21 @@ +\ProvidesAnimalsLang{german} + +\providecommand*{\germananimals}{% + \renewcommand*{\catname}{Katze}% + \renewcommand*{\dogname}{Hund}% + \renewcommand*{\ladybirdname}{Marienk\"afer}% +} + +\germananimals + +\@ifundefined{captionsgerman}% +{% + \@ifundefined{captions\CurrentTrackedDialect}{}% + {% + \expandafter\g@addto@macro + \csname captions\CurrentTrackedDialect\endcsname{\germananimals}% + } +}% +{% + \g@addto@macro\captionsgerman{\germananimals}% +} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3.sty b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3.sty new file mode 100644 index 00000000000..dc2f06d528e --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/animals3.sty @@ -0,0 +1,41 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{animals3}[2014/09/28 v1.0 (NLCT) Sample package to test tracklang.sty] + +\RequirePackage{tracklang} + +% default definitions +\newcommand\catname{cat} +\newcommand\dogname{dog} +\newcommand\ladybirdname{bishy-barney-bee} + +\newcommand*{\RequireAnimalsDialect}[1]{% + \IfTrackedLanguageFileExists{#1}% + {animals3-}% prefix + {.ldf}% + {% + \RequireAnimalsLang{\CurrentTrackedTag}% + }% + {% + \PackageWarning{animals3}% + {No support for language `#1'}% + }% +} + +\newcommand*{\RequireAnimalsLang}[1]{% + \@ifundefined{ver@animals3-#1.ldf}{\input{animals3-#1.ldf}}{}% +} + +\newcommand*{\ProvidesAnimalsLang}[1]{% + \ProvidesFile{animals3-#1.ldf}% +} + +\AnyTrackedLanguages +{% + \ForEachTrackedDialect{\this@dialect}{% + \RequireAnimalsDialect\this@dialect + }% +} +{% no tracked languages, default already set up +} + +\endinput 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 Binary files differnew file mode 100644 index 00000000000..93f6e03b533 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.tex new file mode 100644 index 00000000000..a0aa2667419 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals.tex @@ -0,0 +1,12 @@ +% arara: pdflatex +\documentclass[british,a4paper]{article} + +\usepackage{animals} + +\begin{document} + +\catname. +\dogname. +\ladybirdname. + +\end{document} 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 Binary files differnew file mode 100644 index 00000000000..9cf7f443b17 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.tex new file mode 100644 index 00000000000..206afeb5cf8 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals2.tex @@ -0,0 +1,20 @@ +% arara: pdflatex +\documentclass[british,american,a4paper]{article} + +\usepackage{animals2} + +\begin{document} + +\englishGBanimals + +\catname. +\dogname. +\ladybirdname. + +\englishUSanimals + +\catname. +\dogname. +\ladybirdname. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de.pdf Binary files differnew file mode 100644 index 00000000000..87f3a3bfdba --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de.tex new file mode 100644 index 00000000000..2ac5fb79e05 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de.tex @@ -0,0 +1,14 @@ +% arara: pdflatex +\documentclass[a4paper]{article} + +\usepackage[ngerman]{babel} + +\usepackage{animals3} + +\begin{document} + +\catname. +\dogname. +\ladybirdname. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de2.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de2.pdf Binary files differnew file mode 100644 index 00000000000..408dcc43e00 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de2.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de2.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de2.tex new file mode 100644 index 00000000000..2540d318730 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de2.tex @@ -0,0 +1,14 @@ +% arara: pdflatex +\documentclass[a4paper]{article} + +\usepackage{ngerman} + +\usepackage{animals3} + +\begin{document} + +\catname. +\dogname. +\ladybirdname. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de3.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de3.pdf Binary files differnew file mode 100644 index 00000000000..9abfe0079fc --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de3.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de3.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de3.tex new file mode 100644 index 00000000000..5def7f9a232 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de3.tex @@ -0,0 +1,14 @@ +% arara: pdflatex +\documentclass[a4paper]{article} + +\usepackage[ngerman]{translator} + +\usepackage{animals3} + +\begin{document} + +\catname. +\dogname. +\ladybirdname. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de4.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de4.pdf Binary files differnew file mode 100644 index 00000000000..0d99003c60c --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de4.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de4.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de4.tex new file mode 100644 index 00000000000..f43249ac4f9 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-de4.tex @@ -0,0 +1,15 @@ +% arara: xelatex +\documentclass[a4paper]{article} + +\usepackage{polyglossia} +\setmainlanguage{german} + +\usepackage{animals3} + +\begin{document} + +\catname. +\dogname. +\ladybirdname. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-poly.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-poly.pdf Binary files differnew file mode 100644 index 00000000000..8584d6d24e7 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-poly.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-poly.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-poly.tex new file mode 100644 index 00000000000..3a9e6c5be79 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3-poly.tex @@ -0,0 +1,15 @@ +% arara: xelatex +\documentclass[british,a4paper]{article} + +\usepackage{polyglossia} +\setmainlanguage[variant=british]{english} + +\usepackage{animals3} + +\begin{document} + +\catname. +\dogname. +\ladybirdname. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3.pdf Binary files differnew file mode 100644 index 00000000000..20a2e6171d2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3.tex b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3.tex new file mode 100644 index 00000000000..0ff5bd16d79 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/animals/sample-animals3.tex @@ -0,0 +1,22 @@ +% arara: pdflatex +\documentclass[a4paper]{article} + +\usepackage[british,american]{babel} + +\usepackage{animals3} + +\begin{document} + +\selectlanguage{british} + +\catname. +\dogname. +\ladybirdname. + +\selectlanguage{american} + +\catname. +\dogname. +\ladybirdname. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-BE.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-BE.ldf new file mode 100644 index 00000000000..6a5e0d87b14 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-BE.ldf @@ -0,0 +1,7 @@ +\providecommand*{\BEunits}{% + \renewcommand*{\weightunit}{kg}% + \renewcommand*{\lengthunit}{mm}% + \renewcommand*{\currencyunit}{EUR}% +} + +\BEunits diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-CA.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-CA.ldf new file mode 100644 index 00000000000..cfef4759bd5 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-CA.ldf @@ -0,0 +1,7 @@ +\providecommand*{\CAunits}{% + \renewcommand*{\weightunit}{kg}% + \renewcommand*{\lengthunit}{mm}% + \renewcommand*{\currencyunit}{CAD}% +} + +\CAunits diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-GB.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-GB.ldf new file mode 100644 index 00000000000..aea04a1a8ee --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-GB.ldf @@ -0,0 +1,7 @@ +\providecommand*{\GBunits}{% + \renewcommand*{\weightunit}{kg}% + \renewcommand*{\lengthunit}{mm}% + \renewcommand*{\currencyunit}{GBP}% +} + +\GBunits diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-US.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-US.ldf new file mode 100644 index 00000000000..51c574578af --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-US.ldf @@ -0,0 +1,7 @@ +\providecommand*{\USunits}{% + \renewcommand*{\weightunit}{lb}% + \renewcommand*{\lengthunit}{in}% + \renewcommand*{\currencyunit}{USD}% +} + +\USunits diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-dutch.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-dutch.ldf new file mode 100644 index 00000000000..6a3cf7a3639 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-dutch.ldf @@ -0,0 +1,5 @@ +\providecommand*{\dutchnames}{% + \renewcommand*{\unitname}{meeteenheden}% +} + +\dutchnames diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-english.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-english.ldf new file mode 100644 index 00000000000..7f5d7a41e8f --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-english.ldf @@ -0,0 +1,5 @@ +\providecommand*{\englishnames}{% + \renewcommand*{\unitname}{units}% +} + +\englishnames diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-french.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-french.ldf new file mode 100644 index 00000000000..51100a3e6fd --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-french.ldf @@ -0,0 +1,5 @@ +\providecommand*{\frenchnames}{% + \renewcommand*{\unitname}{unit\'es}% +} + +\frenchnames diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-german.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-german.ldf new file mode 100644 index 00000000000..b76cbb07fcf --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-german.ldf @@ -0,0 +1,5 @@ +\providecommand*{\germannames}{% + \renewcommand*{\unitname}{Ma\ss einheiten}% +} + +\germannames diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-italian.ldf b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-italian.ldf new file mode 100644 index 00000000000..afeaedab9fd --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions-italian.ldf @@ -0,0 +1,5 @@ +\providecommand*{\italiannames}{% + \renewcommand*{\unitname}{unit\`a di misura}% +} + +\italiannames diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions.sty b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions.sty new file mode 100644 index 00000000000..6245ce686b1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions.sty @@ -0,0 +1,38 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{regions}[2014/09/29 v1.0 (NLCT) Sample package to test tracklang.sty] + +\RequirePackage{tracklang} + +\newcommand*{\weightunit}{kg} +\newcommand*{\lengthunit}{mm} +\newcommand*{\currencyunit}{} + +\newcommand*{\unitname}{units} + +\AnyTrackedLanguages +{% + \ForEachTrackedDialect{\this@dialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {regions-}% prefix + {.ldf}% + {% + \PackageInfo{tracklang}{Loading `regions-\CurrentTrackedTag.ldf' + for language `\this@dialect'}% + \input{regions-\CurrentTrackedTag.ldf}% + \InputIfFileExists{regions-\CurrentTrackedLanguage.ldf}% + {}% + {% + \PackageWarning{regions}{No support for language + `\CurrentTrackedLanguage'}% + }% + }% + {% + \PackageWarning{regions}% + {No support for language `\this@dialect'}% + }% + }% +} +{% no tracked languages, default already set up +} + +\endinput diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions2.sty b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions2.sty new file mode 100644 index 00000000000..2a886b38046 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/regions2.sty @@ -0,0 +1,48 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{regions2}[2014/09/29 v1.0 (NLCT) Sample package to test tracklang.sty] + +\RequirePackage{tracklang} + +\newcommand*{\weightunit}{kg} +\newcommand*{\lengthunit}{mm} +\newcommand*{\currencyunit}{EUR} + +\newcommand*{\unitname}{units} + +\newcommand*{\defaultunits}{% + \renewcommand*{\weightunit}{kg}% + \renewcommand*{\lengthunit}{mm}% + \renewcommand*{\currencyunit}{EUR}% +} + +\AnyTrackedLanguages +{% + \ForEachTrackedDialect{\this@dialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {regions-}% prefix + {.ldf}% + {% + \PackageInfo{tracklang}{Loading `regions-\CurrentTrackedTag.ldf' + for language `\this@dialect'}% + \input{regions-\CurrentTrackedTag.ldf}% + \ifx\CurrentTrackedTag\CurrentTrackedLanguage + \defaultunits + \else + \InputIfFileExists{regions-\CurrentTrackedLanguage.ldf}% + {}% + {% + \PackageWarning{regions}{No support for language + `\CurrentTrackedLanguage'}% + }% + \fi + }% + {% + \PackageWarning{regions}% + {No support for language `\this@dialect'}% + }% + }% +} +{% no tracked languages, default already set up +} + +\endinput 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 Binary files differnew file mode 100644 index 00000000000..a0f751d9c23 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.tex b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.tex new file mode 100644 index 00000000000..533a842e58d --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions.tex @@ -0,0 +1,12 @@ +% arara: pdflatex +%\documentclass[USenglish]{article} +%\documentclass[canadian]{article} +\documentclass[canadien]{article} + +\usepackage{regions} + +\begin{document} + +\unitname: \weightunit, \lengthunit, \currencyunit. + +\end{document} 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 Binary files differnew file mode 100644 index 00000000000..fac3c37d080 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.tex b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.tex new file mode 100644 index 00000000000..fbfa8f6dad8 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/regions/sample-regions2.tex @@ -0,0 +1,10 @@ +% arara: pdflatex +\documentclass[ngerman]{article} + +\usepackage{regions2} + +\begin{document} + +\unitname: \weightunit, \lengthunit, \currencyunit. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdf Binary files differnew file mode 100644 index 00000000000..1f8c4c094aa --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.tex b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.tex new file mode 100644 index 00000000000..982982afdf2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang.tex @@ -0,0 +1,42 @@ +% arara: pdflatex +\documentclass[british,francais,american,canadian,canadien,dutch,a4paper]{article} + +\usepackage{tracklang} + +\begin{document} + +Languages: +\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage\space +(ISO \TwoLetterIsoLanguageCode: ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}''). } + +Dialects: \ForEachTrackedDialect{\ThisDialect}{\ThisDialect\space +(\IfTrackedLanguageHasIsoCode{\TwoLetterIsoCountryCode}{\ThisDialect}% + {ISO \TwoLetterIsoCountryCode: + ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}''}% + {no specific region}; +root: \TrackedLanguageFromDialect{\ThisDialect}). } + +``english'' \IfTrackedDialect{english}{has}{hasn't} been specified. + +``british'' \IfTrackedDialect{british}{has}{hasn't} been specified. + +``flemish'' \IfTrackedDialect{flemish}{has}{hasn't} been specified. + +``dutch'' \IfTrackedDialect{dutch}{has}{hasn't} been specified. + +``english'' or an English variant +\IfTrackedLanguage{english}{has}{hasn't} been specified. + +Language for ISO \TwoLetterIsoCountryCode\ ``GB'': +\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{GB}. + +Language for ISO \TwoLetterIsoCountryCode\ ``CA'': +\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{CA}. + +Country ISO \TwoLetterIsoCountryCode\ code for ``canadian'': +\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{canadian}. + +Dialects for language ``english'': +\TrackedDialectsFromLanguage{english}. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdf Binary files differnew file mode 100644 index 00000000000..48da3424e5e --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.tex b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.tex new file mode 100644 index 00000000000..67867a4237c --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang2.tex @@ -0,0 +1,44 @@ +% arara: pdflatex +\documentclass[a4paper]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +\usepackage[francais,american,canadian,canadien,dutch,british]{babel} + +\usepackage{tracklang} + +\begin{document} + +Languages: +\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage\space +(ISO \TwoLetterIsoLanguageCode: ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}''). } + +Dialects: \ForEachTrackedDialect{\ThisDialect}{\ThisDialect\space +(\IfTrackedLanguageHasIsoCode{\TwoLetterIsoCountryCode}{\ThisDialect}% + {ISO \TwoLetterIsoCountryCode: + ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}''}% + {no specific region}; +root: \TrackedLanguageFromDialect{\ThisDialect}). } + +``english'' \IfTrackedDialect{english}{has}{hasn't} been specified. + +``british'' \IfTrackedDialect{british}{has}{hasn't} been specified. + +``flemish'' \IfTrackedDialect{flemish}{has}{hasn't} been specified. + +``dutch'' \IfTrackedDialect{dutch}{has}{hasn't} been specified. + +``english'' or an English variant +\IfTrackedLanguage{english}{has}{hasn't} been specified. + +Language for ISO \TwoLetterIsoCountryCode\ ``GB'': +\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{GB}. + +Language for ISO \TwoLetterIsoCountryCode\ ``CA'': +\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{CA}. + +Country ISO \TwoLetterIsoCountryCode\ code for ``canadian'': +\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{canadian}. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdf Binary files differnew file mode 100644 index 00000000000..5585edf428f --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.tex b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.tex new file mode 100644 index 00000000000..414901bd551 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang3.tex @@ -0,0 +1,44 @@ +% arara: pdflatex +\documentclass[a4paper]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +\usepackage[francais,american,canadian,canadien,dutch,british]{translator} + +\usepackage{tracklang} + +\begin{document} + +Languages: +\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage\space +(ISO \TwoLetterIsoLanguageCode: ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}''). } + +Dialects: \ForEachTrackedDialect{\ThisDialect}{\ThisDialect\space +(\IfTrackedLanguageHasIsoCode{\TwoLetterIsoCountryCode}{\ThisDialect}% + {ISO \TwoLetterIsoCountryCode: + ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}''}% + {no specific region}; +root: \TrackedLanguageFromDialect{\ThisDialect}). } + +``english'' \IfTrackedDialect{english}{has}{hasn't} been specified. + +``british'' \IfTrackedDialect{british}{has}{hasn't} been specified. + +``flemish'' \IfTrackedDialect{flemish}{has}{hasn't} been specified. + +``dutch'' \IfTrackedDialect{dutch}{has}{hasn't} been specified. + +``english'' or an English variant +\IfTrackedLanguage{english}{has}{hasn't} been specified. + +Language for ISO \TwoLetterIsoCountryCode\ ``GB'': +\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{GB}. + +Language for ISO \TwoLetterIsoCountryCode\ ``CA'': +\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{CA}. + +Country ISO \TwoLetterIsoCountryCode\ code for ``canadian'': +\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{canadian}. + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdf Binary files differnew file mode 100644 index 00000000000..895a1e0ba8a --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.tex b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.tex new file mode 100644 index 00000000000..5c382234a29 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang4.tex @@ -0,0 +1,27 @@ +% arara: xelatex +\documentclass[a4paper]{article} + +\usepackage{fontspec} + +\usepackage{polyglossia} + +\setotherlanguages{french,dutch} +\setmainlanguage[variant=british]{english} + +\usepackage{tracklang} + +\begin{document} + +Languages: +\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage\space +(ISO \TwoLetterIsoLanguageCode: ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}''). } + +Dialects: \ForEachTrackedDialect{\ThisDialect}{\ThisDialect\space +(\IfTrackedLanguageHasIsoCode{\TwoLetterIsoCountryCode}{\ThisDialect}% + {ISO \TwoLetterIsoCountryCode: + ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}''}% + {no specific region}; +root: \TrackedLanguageFromDialect{\ThisDialect}). } + +Variants aren't detected with polyglossia. +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdf Binary files differnew file mode 100644 index 00000000000..1fb564c5fca --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.tex b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.tex new file mode 100644 index 00000000000..5428700b677 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang5.tex @@ -0,0 +1,24 @@ +% arara: pdflatex +\documentclass[a4paper]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +\usepackage{ngerman} + +\usepackage{tracklang} + +\begin{document} + +Languages: +\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage\space +(ISO \TwoLetterIsoLanguageCode: ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}''). } + +Dialects: \ForEachTrackedDialect{\ThisDialect}{\ThisDialect\space +(\IfTrackedLanguageHasIsoCode{\TwoLetterIsoCountryCode}{\ThisDialect}% + {ISO \TwoLetterIsoCountryCode: + ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}''}% + {no specific region}; +root: \TrackedLanguageFromDialect{\ThisDialect}). } + +\end{document} diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdf b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdf Binary files differnew file mode 100644 index 00000000000..9fd80620ddf --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.pdf diff --git a/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.tex b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.tex new file mode 100644 index 00000000000..82c07ab69a9 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/samples/sample-tracklang6.tex @@ -0,0 +1,30 @@ +% arara: pdftex + +\catcode `\@11\relax +\input tracklang +\catcode `\@12\relax + +\TrackPredefinedDialect{british} +\TrackPredefinedDialect{american} +\TrackPredefinedDialect{canadian} +\TrackPredefinedDialect{canadien} +\TrackPredefinedDialect{belgique} + +Dialect Regions: + +\ForEachTrackedDialect{\ThisDialect}{\ThisDialect: + \TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}. } + +Language Codes: + +\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage: + \TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}. } + +\ForEachTrackedDialect{\ThisDialect} +{% + \IfTrackedLanguageFileExists{\ThisDialect}{animals-}{.ldf}% + {Found ``animals-\CurrentTrackedTag.ldf''\par}% + {No file found for dialect ``\ThisDialect''\par} +} + +\bye diff --git a/Master/texmf-dist/doc/generic/tracklang/tracklang.pdf b/Master/texmf-dist/doc/generic/tracklang/tracklang.pdf Binary files differnew file mode 100644 index 00000000000..9f478bae4c2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/tracklang/tracklang.pdf |