diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex index 9e8d9faf667..25dd1be0929 100644 --- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex +++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex @@ -62,6 +62,10 @@ } , gobble = 1 } +\makeatletter +\edef\trnsltversion{\@trnslt@version} +\edef\cntfmtsversion{\@cntfmts@version} +\makeatother \cnpkgusecolorscheme{friendly} \usepackage[biblatex]{embrac}[2012/06/29] @@ -104,10 +108,16 @@ % translations: \newcommand*\translations{{\scshape\textcolor{main}{translations}}\xspace} \addcmds{ - cuisine, DeclareLanguage, DeclareLanguageAlias, DeclareTranslation, - GetTranslation, GetTranslationFor, kitchen, LoadDictionary, - LoadDictionaryFor, NewTranslation, ProvideDictionaryFor, - RenewTranslation, SaveTranslation, SaveTranslationFor, selectlanguage + cuisine, + DeclareLanguage, DeclareLanguageAlias, DeclareLanguageDialect, + DeclareTranslation, + GetTranslation, GetTranslationFor, + kitchen, + LoadDictionary, LoadDictionaryFor, + NewTranslation, + ProvideDictionaryFor, + RenewTranslation, + SaveTranslation, SaveTranslationFor, selectlanguage } % cntformats: @@ -227,6 +237,8 @@ \DeclareTranslation{German}{Kueche}{K\"uche} \DeclareTranslation{Spanish}{Kueche}{cocina} \DeclareTranslation{French}{Kueche}{cuisine} +\DeclareTranslation{English}{foo}{foo} +\DeclareTranslation{British}{foo}{bar} \usepackage{alphalph} \makeatletter @@ -1008,11 +1020,11 @@ purpose \ExSheets provides the following commands: is initially set to \code{2}. \Befehl{variant}{<num>}\newline Choose the active variant. The argument must be a number between \code{1} - and the number set with \cmd*{variations}. Initially set to \code{1}. + and the number set with \cmd*{SetVariations}. Initially set to \code{1}. \Befehl{vary}{<variant 1>}\ma{<variant 2>}\newline This command is the one actually used in the document. It has a number of - required arguments equal to the number set with \cmd*{variations}. All of its - arguments are discarded except the one specified with \cmd*{variant}. + required arguments equal to the number set with \cmd*{SetVariations}. All of + its arguments are discarded except the one specified with \cmd*{variant}. \end{beschreibung} \begin{beispiel} @@ -2167,7 +2179,8 @@ will be loaded \cmd*{AtBeginDocument}. \secidx*{Custom Configurations} \secidx*{\ExSheets}[ExSheets] -\part{The \translations package}\label{part:translations}\secidx{\translations}[translations] +\part{The \translations package (\trnsltversion)} +\label{part:translations}\secidx{\translations}[translations] \section{Motivation}\secidx[Motivation]{\translations}[translations] I wrote this package when I was in need for an expandable version of \paket*{translator}'s \cmd{translate}. If you don't need that then there is no @@ -2185,6 +2198,11 @@ These are the commands provided by \translations: Declares \code{<lang2>} to be an alias of \code{<lang1>}. If \code{<lang1>} doesn't exist yet a warning will be raised and it will be defined. This command can only be used in the preamble. + \Befehl{DeclareLanguageDialect}{<dialect>}\ma{<lang>}\newline + Declares \code{<dialect>} to be a dialect of language \code{<lang>}. If a + translation for \code{<dialect>} is provided it is used by the translation + macros. If there is none the corresponding translation for \code{<lang>} is + used instead. \Befehl{NewTranslation}{<lang>}\ma{<key>}\ma{<translation>}\newline Defines a translation of key \code{<key>} for the language \code{<lang>}. An error will be raised if a translation of \code{<key>} already exists. @@ -2197,6 +2215,11 @@ These are the commands provided by \translations: Defines a translation of key \code{<key>} for the language \code{<lang>}. No error will be raised if a translation of \code{<key>} already exists. This command can only be used in the preamble. + \Befehl{DeclareTranslationFallback}{<key>}\ma{<fallback>}\newline + Defines a fallback translation for key \code{<key>} that is used in case no + translation of \code{<key>} for the currently active language has been provided. + No error will be raised if a fallback for \code{<key>} already exists. + This command can only be used in the preamble. \expandable\Befehl{GetTranslationFor}{<lang>}\ma{<key>}\newline Fetches and prints the translation of \code{<key>} for the language \code{<lang>}. This command is expandable. @@ -2207,7 +2230,7 @@ These are the commands provided by \translations: Fetches and saves the translation of \code{<key>} for the language \code{<lang>} in the macro \code{<cmd>}. \Befehl{SaveTranslation}{<cmd>}\ma{<key>}\newline - Fetches and saves the translation of \code{<key>} or the currently active + Fetches and saves the translation of \code{<key>} for the currently active language (as for example set by \paket{babel}) in the macro \code{<cmd>}. \Befehl{LoadDictionary}{<name>}\newline Loads a file named \code{<name>-<lang>.trsl} where \code{<lang>} corresponds @@ -2238,6 +2261,17 @@ Here is a small example of usage: \cuisine \end{beispiel} +There is also preliminary support for dialects: +\begin{beispiel} + % in the preamble: + % \DeclareTranslation{English}{foo}{foo} + % \DeclareTranslation{British}{foo}{bar} + \GetTranslationFor{English}{foo} \\ + \GetTranslationFor{British}{foo} \\ + \GetTranslationFor{American}{foo} +\end{beispiel} + + A typical dictionary file should look as follows: \begin{beispiel}[code only] % this is file housing-german.trsl @@ -2251,7 +2285,8 @@ A typical dictionary file should look as follows: \end{beispiel} \secidx*{\translations}[translations] -\part{The \cntformats package}\label{part:cntformats}\secidx{\cntformats}[cntformats] +\part{The \cntformats package (\cntfmtsversion)} +\label{part:cntformats}\secidx{\cntformats}[cntformats] \section{Motivation}\secidx[Motivation]{\cntformats}[cntformats] \cntformats provides a way to format counters with what I will call patterns. This does not in any way effect the usual \LaTeXe\ way of treating counters and |