From f4ee7dde5f0c6c40a915cab1611912f70c73df3f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 17 Jul 2013 22:11:15 +0000 Subject: exsheets (17jul13) git-svn-id: svn://tug.org/texlive/trunk@31218 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/exsheets/README | 8 - .../texmf-dist/doc/latex/exsheets/exsheets_en.pdf | Bin 639328 -> 638882 bytes .../texmf-dist/doc/latex/exsheets/exsheets_en.tex | 106 ++--- Master/texmf-dist/doc/latex/exsheets/tasks_en.tex | 133 +++--- .../doc/latex/exsheets/translations_en.pdf | Bin 425157 -> 0 bytes .../doc/latex/exsheets/translations_en.tex | 394 ----------------- .../translations-basic-dictionary-english.trsl | 87 ---- .../translations-basic-dictionary-french.trsl | 87 ---- .../translations-basic-dictionary-german.trsl | 87 ---- .../translations-basic-dictionary-spanish.trsl | 87 ---- Master/texmf-dist/tex/latex/exsheets/exsheets.sty | 160 +++---- .../texmf-dist/tex/latex/exsheets/translations.sty | 475 --------------------- 12 files changed, 176 insertions(+), 1448 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/exsheets/translations_en.pdf delete mode 100644 Master/texmf-dist/doc/latex/exsheets/translations_en.tex delete mode 100644 Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl delete mode 100644 Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl delete mode 100644 Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl delete mode 100644 Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl delete mode 100644 Master/texmf-dist/tex/latex/exsheets/translations.sty diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README index ccb7a57df5a..c679481cec6 100644 --- a/Master/texmf-dist/doc/latex/exsheets/README +++ b/Master/texmf-dist/doc/latex/exsheets/README @@ -3,8 +3,6 @@ EXSHEETS 2013/06/28 bundled packages: the EXSHEETS package v0.9h Yet another package for the creation of exercise sheets -the TRANSLATIONS package v0.10 - a simple translator the CNTFORMATS package v0.5 A different way to read counters. the TASKS package v0.9d @@ -37,12 +35,6 @@ The exsheets bundle consists of the files - tasks.sty, tasks.cfg, tasks_en.tex, task_en.pdf - - translations.sty, translations_en.tex, translations_en.pdf, - translations-basic-dictionary-english.trsl, - translations-basic-dictionary-french.trsl, - translations-basic-dictionary-german.trsl, - translations-basic-dictionary-spanish.trsl - - cntformats.sty, cntformats_en.tex, cntformats_en.pdf - README diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf index 5805105ab7f..43e3d50d569 100644 Binary files a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf and b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf differ diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex index deb80de722d..338a78b0912 100644 --- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex +++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex @@ -1,6 +1,6 @@ % arara: pdflatex -% arara: biber -% arara: pdflatex +% !arara: biber +% !arara: pdflatex % arara: pdflatex % -------------------------------------------------------------------------- % the EXSHEETS package @@ -33,12 +33,6 @@ % % - tasks.sty, tasks.cfg, tasks_en.tex, task_en.pdf % -% - translations.sty, translations_en.tex, translations_en.pdf, -% translations-basic-dictionary-english.trsl, -% translations-basic-dictionary-french.trsl, -% translations-basic-dictionary-german.trsl, -% translations-basic-dictionary-spanish.trsl -% % - cntformats.sty, cntformats_en.tex, cntformats_en.pdf % % - README @@ -63,8 +57,7 @@ url = {https://bitbucket.org/cgnieder/exsheets/} , title = the ExSheets bundle , subtitle = {% - the packages \ExSheets, \href{tasks_en.pdf}{\Tasks}, - \href{translations_en.pdf}{\translations} and + the packages \ExSheets, \href{tasks_en.pdf}{\Tasks} and \href{cntformats_en.pdf}{\cntformats}\\ \emph{or}\\ Yet another package for the creation of exercise sheets and exams.% @@ -82,14 +75,11 @@ gobble = 1 } \makeatletter -\edef\trnsltversion{\@trnslt@version} \edef\cntfmtsversion{\@cntfmts@version} \edef\tasksversion{v\@tasks@version} \makeatother -% this messes with the solutions headings in the appendix: -% \usepackage{libertinehologopatch} -% => figure out why +\usepackage{libertinehologopatch} \cnpkgusecolorscheme{friendly} @@ -132,21 +122,6 @@ variant, vary } -% translations: -\newcommand*\translations{{\scshape\textcolor{main}{translations}}\xspace} -\addcmds{ - cuisine, - DeclareDictTranslation, DeclareLanguage, DeclareLanguageAlias, - DeclareLanguageDialect, DeclareTranslation, - GetTranslation, GetTranslationFor, - kitchen, - LoadDictionary, LoadDictionaryFor, - NewTranslation, - ProvideDictionaryFor, - RenewTranslation, - SaveTranslation, SaveTranslationFor, selectlanguage -} - % cntformats: \newcommand*\cntformats{{\scshape\textcolor{main}{cntformats}}\xspace} \addcmds{ @@ -171,6 +146,13 @@ pdfstring = ID , accsupp = ID } +\DeclareAcronym{ctan}{ + short = ctan , + long = Comprehensive \TeX\ Archive Network , + format = \scshape , + pdfstring = CTAN , + accsupp = CTAN +} \usepackage{filecontents} \usepackage{imakeidx} @@ -296,13 +278,6 @@ \NewTasks[style=multiplechoice]{choices}[\choice](3) \newcommand*\correct{\PrintSolutionsTF{\checkedchoicebox}{\choicebox}} -\DeclareTranslation{English}{Kueche}{kitchen} -\DeclareTranslation{German}{Kueche}{K\"uche} -\DeclareTranslation{Spanish}{Kueche}{cocina} -\DeclareTranslation{French}{Kueche}{cuisine} -\DeclareTranslation{English}{foo}{foo} -\DeclareTranslation{British}{foo}{bar} - \usepackage{alphalph} \NewPatternFormat{aa}{\alphalph} \NewCounterPattern{testa}{ta} @@ -311,16 +286,6 @@ \robustify\code % ---------------------------------------------------------------------------- -% custom commands -\newcommand*\Default[1]{% - \hfill\llap - {% - \ifblank{#1}% - {(initially~empty)}% - {Default:~\code{#1}}% - }% - \newline -} \newcommand*\required{\hfill\llap{required}\newline} \newcommand*\optional{\hfill\llap{optional}\newline} @@ -334,22 +299,6 @@ \expsign \gdef\cnpkgdoctriangle{\unexpsign}}} -\usepackage{marginnote} -\makeatletter -\newcommand*\sinceversion[1]{% - \@bsphack - \marginnote{% - \footnotesize\sffamily\RaggedRight - \textcolor{black!75}{Introduced in version~#1}}% - \@esphack} -\newcommand*\changedversion[1]{% - \@bsphack - \marginnote{% - \footnotesize\sffamily\RaggedRight - \textcolor{black!75}{Changed in version~#1}}% - \@esphack} -\makeatother - \pdfstringdefDisableCommands{\def\llap#1{#1\space}\def\bigstar{*}} % ---------------------------------------------------------------------------- @@ -429,14 +378,17 @@ wider usage. At the time of writing (\today) there still are probably lots of rough edges let alone bugs so I am very interested in all kinds of feedback. \section{Additional Packages} -\ExSheets actually bundles four packages: \ExSheets, \Tasks, \translations and -\cntformats. \Tasks is described in part~\ref{part:tasks}, \translations is -described in part~\ref{part:translations} and \cntformats in +\ExSheets actually bundles three packages: \ExSheets, \Tasks\ and \cntformats. +\Tasks is described in part~\ref{part:tasks} and \cntformats in part~\ref{part:cntformats}. These packages provide functionality that is used by \ExSheets. They can, however, be used independently from \ExSheets. -The packages \translations and \cntformats both aren't really useful on a -user-level but maybe for package writers. +The package \cntformats\ is probably not really useful on a user-level but +maybe for package writers. + +\changedversion{0.9i}\ExSheets\ used to bundle the \paket*{translations} +package, too, but doesn't any more. You can find the \paket*{translations} +package as a package of it's own on the \ac{ctan}. \section{Installation and Documentation}\secidx[Installation]{Preliminary} If you install \ExSheets manually beware to put the files @@ -446,9 +398,9 @@ If you install \ExSheets manually beware to put the files \end{itemize} in the same directory as the \code{exsheets.sty} file\footnote{That is, a directory like \code{texmf-local/tex/latex/exsheets}, probably}. You -\emph{can} install the other packages, \Tasks, \translations and \cntformats, -in different locations but since they belong to \ExSheets they probably should -be placed in the same directory. +\emph{can} install the other packages, \Tasks and \cntformats, in different +locations but since they belong to \ExSheets they probably should be placed in +the same directory. You should put the file \code{tasks.cfg} in the same directory as the \code{tasks.sty} file. @@ -482,8 +434,7 @@ I am very sorry for any inconvenience! I am trying to keep such changes as minimal and rare as possibly. However, it is not always avoidable when a package is new and still a child. It will grow up eventually. -\ExSheets' other packages -- \href{tasks_en.pdf}{\Tasks}, -\href{translations_en.pdf}{\translations} and +\ExSheets' other packages -- \href{tasks_en.pdf}{\Tasks} and \href{cntformats_en.pdf}{\cntformats} -- have gotten their own documentation which are essentially extracted from this very document you're reading now. They still will be documented in the main documentation (this document), @@ -807,8 +758,8 @@ for Danish) and try if it works: {Opl\o{}sning} \end{beispiel} If this isn't working it means that the language you're using is unknown to -the \translations package (see part~\ref{part:translations}). In this case -please notify me, too. You then can still use the \key{name} options. +the \paket*{translations} package. In this case please notify me, too. You +then can still use the \key{name} options. \secidx*{Language Settings} @@ -1970,6 +1921,7 @@ The following examples use a sample text defined as follows: A `runin-nr' heading. \sample \end{question} +\newpage \subsubsection{The `runin-fixed-nr' Instance} \begin{beispiel}[code only] \DeclareInstance{exsheets-heading}{runin-fixed-nr}{default} @@ -2229,12 +2181,6 @@ will be loaded \cmd*{AtBeginDocument}. \noindent\sinceversion{0.9a}The \Tasks package has got its own documentation -- \url{tasks_en.pdf}. Please read that file for details on the package. -\part{The \translations package (\trnsltversion)} -\label{part:translations}\secidx{\translations}[translations] -\section{About the Documentation} -\noindent\sinceversion{0.9a}The \translations package has got its own documentation -- -\url{translations_en.pdf}. Please read that file for details on the package. - \part{The \cntformats package (\cntfmtsversion)} \label{part:cntformats}\secidx{\cntformats}[cntformats] \section{About the Documentation} diff --git a/Master/texmf-dist/doc/latex/exsheets/tasks_en.tex b/Master/texmf-dist/doc/latex/exsheets/tasks_en.tex index 7bc73eaac63..62967bad831 100644 --- a/Master/texmf-dist/doc/latex/exsheets/tasks_en.tex +++ b/Master/texmf-dist/doc/latex/exsheets/tasks_en.tex @@ -47,7 +47,12 @@ pkg = {[more]tasks} , url = {https://bitbucket.org/cgnieder/exsheets/} , title = \Tasks , - subtitle = {{\small part of the \href{exsheets_en.pdf}{\ExSheets} bundle}\\[\baselineskip]create horizontal columned lists} , + subtitle = {% + {\small + part of the \href{exsheets_en.pdf}{\ExSheets} bundle% + }\\[\baselineskip] + create horizontal columned lists% + } , name = tasks , language = en , modules = true , @@ -175,12 +180,6 @@ \pdfstringdefDisableCommands{\def\llap#1{#1\space}\def\bigstar{*}} % ---------------------------------------------------------------------------- -% title page -% \TitlePicture{% -% \parbox{.8\linewidth}{% -% }% -% } - \def\s{This is some sample text we will use to create a somewhat longer text spanning a few lines.} \def\sample{\s\ \s\par\s} @@ -189,22 +188,23 @@ \section{Motivation}\secidx{Motivation} \noindent\changedversion{0.7}Originally \Tasks has been an integral part of -\ExSheets. However, users told me that it indeed could be useful to have it as a -stand-alone package not having to load the whole \ExSheets beast just for having -the \code{tasks} environment available. Since I agree with this the environment -has been extracted into a package if its own, \Tasks. - -The reason for the \code{tasks} environment is an unwritten agreement in German -maths textbooks (in (junior) high school, especially) to organize exercises in -columns counting horizontally rather than vertically. That is what \code{tasks} -primarily is for. If you don't need this feature you're better off using traditional -\LaTeX{} lists and the \paket{enumitem} package for customization. +\ExSheets. However, users told me that it indeed could be useful to have it +as a stand-alone package not having to load the whole \ExSheets beast just for +having the \code{tasks} environment available. Since I agree with this the +environment has been extracted into a package if its own, \Tasks. + +The reason for the \code{tasks} environment is an unwritten agreement in +German maths textbooks (in (junior) high school, especially) to organize +exercises in columns counting horizontally rather than vertically. That is +what \code{tasks} primarily is for. If you don't need this feature you're +better off using traditional \LaTeX{} lists and the \paket{enumitem} package +for customization. \secidx*{Motivation} \section{License and Requirements}\label{sec:license}\secidx{Requirements} \Tasks is placed under the terms of the \LaTeX{} Project Public License, -version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}). It has the -status ``maintained.'' +version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}). It has +the status ``maintained.'' \Tasks requires packages \paket{l3kernel} ,\paket{xparse}, \paket{l3keys2e}, \paket{epic}, \paket*{cntformats}\footnote{Part of the \ExSheets bundle}, @@ -214,19 +214,20 @@ status ``maintained.'' \section{How it works} \subsection{The Basics} The \code{tasks} environment is similar to a list like \code{enumerate} but not -the same: +the same. Here are some of the differences: \begin{itemize} - \item The first difference: there is no pagebreak possible inside an item but - only between items. - \item The second difference: the enumeration default is a), b), c) \ldots - \item The third difference: there is a split at \emph{every} occurrence of the - item separator. For this reason the default separator is not \cmd*{item} but - \cmd{task} so it is unique to this environment only. - \item The fourth difference: the \code{tasks} environment cannot be nested. You - can, however, use an \code{itemize} environment or something in it. - \item The fifth difference: verbatim material cannot be used in it. You'll - have to use \cmd*{string}, \cmd*{texttt} or \cmd*{detokenize}. If this won't - suffice then don't use \code{tasks}. +\item A first difference: there is no pagebreak possible inside an item but + only between items. +\item A second difference: the enumeration default is a), b), c) \ldots +\item A third difference: there is a split at \emph{every} occurrence of the + item separator. For this reason the default separator is not \cmd*{item} + but \cmd{task} so it is unique to this environment only. +\item A fourth difference: the \code{tasks} environment cannot be nested. + You can, however, use an \code{itemize} environment or something in it. +\item A fifth difference: verbatim material cannot be used in it. You'll + have to use \cmd*{string}, \cmd*{texttt} or \cmd*{detokenize}. If this + won't suffice then don't use \code{tasks}. +\item A sixth difference: %footnotes \end{itemize} \begin{beschreibung} @@ -254,8 +255,8 @@ Some text before the list. \end{tasks} And also some text after it. -The environment takes the optional argument \da{} with which the -number of columns used by the environment is specified. +The environment takes the optional argument \da{} with which +the number of columns used by the environment is specified. \begin{beispiel}[code only] \begin{tasks}(2) \task \sample @@ -275,7 +276,7 @@ number of columns used by the environment is specified. \subsection{Introducing a New Row} \noindent\sinceversion{0.9}Sometimes it may come in handy if the current -row of items could be terminated and a new one is started. This is possible +row of items could be terminated and a new one is started. This is possible with the following command: \begin{beschreibung} \Befehl{startnewitemline} @@ -319,12 +320,14 @@ The \Tasks package has one package option which also is called when you load The environment itself has some more options, namely these: \begin{beschreibung} \Option{style}{}\Default{} - Choose the instance to be used. Read more on this in section~\ref{sec:tasks}. + Choose the instance to be used. Read more on this in + section~\ref{sec:tasks}. \Option{counter-format}{}\Default{} - \sinceversion{0.9}Sets a custom label. The letters \code{tsk} are replaced - with the task-counter. An optional argument directly following these letters - specifies the counter format: \code{1}: \cmd{arabic}, \code{a}: \cmd{alph}, - \code{A}: \cmd{Alph}, \code{r}: \cmd{roman} and \code{R}: \cmd{Roman}. + \sinceversion{0.9}Sets a custom label. The letters \code{tsk} are replaced + with the task-counter. An optional argument directly following these + letters specifies the counter format: \code{1}: \cmd{arabic}, \code{a}: + \cmd{alph}, \code{A}: \cmd{Alph}, \code{r}: \cmd{roman} and \code{R}: + \cmd{Roman}. \Option{label-format}{}\Default{} \changedversion{0.9}Can be used to apply a formatting like, \emph{e.g.}, \cmd*{bfseries} to the labels. @@ -333,15 +336,16 @@ The environment itself has some more options, namely these: \Option{label-width}{}\Default{1em} Sets the width of the item labels. \Option{label-offset}{}\Default{.3333em} - \sinceversion{0.7}Sets the offset, \emph{i.e.}, the distance between label and item. + \sinceversion{0.7}Sets the offset, \emph{i.e.}, the distance between label + and item. \Option{item-indent}\Default{2.5em} - \sinceversion{0.9a}The indent of an item, \textit{i.e.}, the horizontal space - available for both label and label-offset. If \code{indent = label-width + label=offset} - the label will align with the textblock above (if \key{label-align}{left} is - set). + \sinceversion{0.9a}The indent of an item, \textit{i.e.}, the horizontal + space available for both label and label-offset. If \code{indent = + label-width + label=offset} the label will align with the textblock above + (if \key{label-align}{left} is set). \Option{label-align}{left|right|center}\Default{left} - \sinceversion{0.7}Determines how the labels are aligned within the label-box - whose width is set with \key{label-width} + \sinceversion{0.7}Determines how the labels are aligned within the + label-box whose width is set with \key{label-width}. \Option{before-skip}{}\Default{0pt} Sets the skip before the list. \Option{after-skip}{}\Default{0pt} @@ -349,9 +353,9 @@ The environment itself has some more options, namely these: \Option{after-item-skip}{}\Default{1ex plus 1ex minus 1ex} \sinceversion{0.9}This vertical skip is inserted between rows of items. \Option{resume}{\default{true}|false}\Default{false} - The enumeration will resume from a previous \code{tasks} environment. In order - to use this option properly you shouldn't mix different \code{tasks} environments - that both count their items. + The enumeration will resume from a previous \code{tasks} environment. In + order to use this option properly you shouldn't mix different \code{tasks} + environments that both count their items. \end{beschreibung} These options can also be set using a setup command: \begin{beschreibung} @@ -376,8 +380,8 @@ Now the same list as above but with three columns and a different label: \task \s\par\s \end{tasks} -Let's use it inside a question, \textit{i.e.}, inside \ExSheets' \code{question} -environment: +Let's use it inside a question, \textit{i.e.}, inside \ExSheets' +\code{question} environment: \begin{beispiel} % since settings are local the following ones will be lost % outside this example; @@ -405,9 +409,9 @@ environment: \secidx*{Options} \section{Available Instances}\label{sec:tasks:instances} -When you use the package option \key{more} of the \Tasks package or load \ExSheets -with the \key{load-tasks} option there are currently three additional instances -for the \code{tasks} object available: +When you use the package option \key{more} of the \Tasks package or load +\ExSheets with the \key{load-tasks} option there are currently three +additional instances for the \code{tasks} object available: \begin{description} \item[itemize] uses \cmd{labelitemi} as labels. \item[enumerate] enumerates the items with 1., 2., \ldots @@ -442,12 +446,13 @@ argument of \cmd{task}. This will temporarily overwrite the default label. \secidx*{Custom Labels} \section{New Tasks}\secidx{Own Environments} -It is possible to add custom environments that work like the \code{tasks} environment. +It is possible to add custom environments that work like the \code{tasks} +environment. \begin{beschreibung} \Befehl{NewTasks}[]{}\oa{}\newline Define environment \ma{} that uses \code{} to introduce a - new item. Default for \code{} is \cmd{task}, default for - \code{} is \code{1}. The \code{} are the ones described in + new item. Default for \code{} is \cmd{task}, default for + \code{} is \code{1}. The \code{} are the ones described in section~\ref{sec:tasks:options}. \Befehl{RenewTasks}[]{}\oa{}\newline Renew environment previously defined with \cmd{NewTasks}. @@ -469,13 +474,13 @@ The separator does not have to be a control sequence: \end{beispiel} Although this might seem handy or even nice I strongly advice against using something different than a command sequence. Remember that the items will be -split at \emph{every} occurrence of the separator. So in order to use the +split at \emph{every} occurrence of the separator. So in order to use the separator (here for example for a starred variant of a command) within an item -it has to be hidden in braces. This is avoided of you use a command sequence +it has to be hidden in braces. This is avoided of you use a command sequence which even doesn't have to be defined. Let's say you want a \code{choices} environment that has three columns in its -default state. You could do something like this: +default state. You could do something like this: \begin{beispiel} % preamble: % \NewTasks[style=multiplechoice]{choices}[\choice](3) @@ -511,13 +516,13 @@ Equivalent to the styling of \ExSheets{} \Tasks uses \paket{xtemplate} to declare additional instances for the lists. \subsection{The \code{tasks} Object}\label{sec:tasks}\secidx{The `tasks' Object} -The object that's defined by \Tasks is the `tasks' object. -This time there are four instances available for the one template (again -`default') that was defined. +The object that's defined by \Tasks is the `tasks' object. This time there +are four instances available for the one template (again `default') that was +defined. \subsubsection{Available Options} This section only lists the options that can be used when defining an instance -of the `default' template. The following subsections will give some examples +of the `default' template. The following subsections will give some examples of their usage. \begin{beispiel}[code only] diff --git a/Master/texmf-dist/doc/latex/exsheets/translations_en.pdf b/Master/texmf-dist/doc/latex/exsheets/translations_en.pdf deleted file mode 100644 index a22816860e0..00000000000 Binary files a/Master/texmf-dist/doc/latex/exsheets/translations_en.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/exsheets/translations_en.tex b/Master/texmf-dist/doc/latex/exsheets/translations_en.tex deleted file mode 100644 index 5d7f0feaf46..00000000000 --- a/Master/texmf-dist/doc/latex/exsheets/translations_en.tex +++ /dev/null @@ -1,394 +0,0 @@ -% arara: pdflatex -% arara: pdflatex -% -------------------------------------------------------------------------- -% the TRANSLATIONS package -% -% a simple translator -% -% -------------------------------------------------------------------------- -% Clemens Niederberger -% Web: https://bitbucket.org/cgnieder/exsheets/ -% E-Mail: contact@mychemistry.eu -% -------------------------------------------------------------------------- -% Copyright 2011-2013 Clemens Niederberger -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status `maintained'. -% -% The Current Maintainer of this work is Clemens Niederberger. -% -------------------------------------------------------------------------- -% The translations package is part of the exsheets bundle -% -------------------------------------------------------------------------- -% If you have any ideas, questions, suggestions or bugs to report, please -% feel free to contact me. -% -------------------------------------------------------------------------- -% -% if you want to compile this documentation you'll need the document class -% `cnpkgdoc' which you can get here: -% https://bitbucket.org/cgnieder/cnpkgdoc/ -% the class is licensed LPPL 1.3 or later -% -% use `pdflatex' for compilation -% -\PassOptionsToPackage{supstfm=libertinesups}{superiors} -\documentclass[DIV9,toc=index,toc=bib,numbers=noendperiod]{cnpkgdoc} -% ---------------------------------------------------------------------------- -% document layout and typographic features -\docsetup{ - pkg = {translations} , - url = {https://bitbucket.org/cgnieder/exsheets/} , - subtitle = {{\small part of the \href{exsheets_en.pdf}{\ExSheets} bundle}\\[\baselineskip]a simple translator} , - language = en , - modules = true , - code-box = { - backgroundcolor = gray!7!white , - skipbelow = .6\baselineskip plus .5ex minus .5ex , - skipabove = .6\baselineskip plus .5ex minus .5ex , - innerleftmargin = 1.5em , - innerrightmargin = 2.5em - } , - gobble = 1 -} -\usepackage{libertinehologopatch} -\cnpkgusecolorscheme{friendly} - -\usepackage[biblatex]{embrac}[2012/06/29] - \ChangeEmph{[}[,.02em]{]}[.055em,-.08em] - \ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em] -\usepackage{microtype} -\usepackage[multiple]{fnpct} - -\renewcommand*\othersectionlevelsformat[3]{\textcolor{main}{#3\autodot}\enskip} -\renewcommand*\partformat{\textcolor{main}{\partname~\thepart\autodot}} - -\pagestyle{headings} - -\setcapindent{1.5em} -\setkomafont{caption}{\normalfont\footnotesize\sffamily} -\setkomafont{captionlabel}{\normalfont\footnotesize\sffamily\scshape} - -\usepackage{booktabs,array,ragged2e} - -% ---------------------------------------------------------------------------- -% code examples -\addcmds{ - cuisine, - DeclareDictTranslation, DeclareLanguage, DeclareLanguageAlias, - DeclareLanguageDialect, DeclareTranslation, DeclareTranslationFallback, - GetTranslation, GetTranslationFor, - kitchen, - LoadDictionary, LoadDictionaryFor, - mypackage@title, - NewTranslation, - ProvideDictionaryFor, - RenewTranslation,RequirePackage, - SaveTranslation, SaveTranslationFor, selectlanguage -} - -% ---------------------------------------------------------------------------- -% other packages, bibliography, index -\usepackage{xcoffins,wasysym,enumitem,booktabs,siunitx} -\usepackage[accsupp]{acro} -\DeclareAcronym{id}{ - short = id , - long = Identifier , - format = \scshape , - pdfstring = ID , - accsupp = ID -} - -\usepackage{filecontents} -\usepackage{imakeidx} -\begin{filecontents*}{\jobname.ist} - heading_prefix "{\\bfseries " - heading_suffix "\\hfil}\\nopagebreak\n" - headings_flag 1 - delim_0 "\\dotfill\\hyperpage{" - delim_1 "\\dotfill\\hyperpage{" - delim_2 "\\dotfill\\hyperpage{" - delim_r "}\\textendash\\hyperpage{" - delim_t "}" - suffix_2p "\\nohyperpage{\\,f.}" - suffix_3p "\\nohyperpage{\\,ff.}" -\end{filecontents*} -\indexsetup{othercode=\footnotesize} -\makeindex[options={-s \jobname.ist},intoc,columns=3] - -\usepackage{csquotes} -\usepackage[backend=biber,style=alphabetic]{biblatex} - - -% ---------------------------------------------------------------------------- -% example definitions that have to be done in the preamble: -\DeclareTranslation{English}{Kueche}{kitchen} -\DeclareTranslation{German}{Kueche}{K\"uche} -\DeclareTranslation{Spanish}{Kueche}{cocina} -\DeclareTranslation{French}{Kueche}{cuisine} -\DeclareTranslation{English}{farbe}{color} -\DeclareTranslation{British}{farbe}{colour} - -% ---------------------------------------------------------------------------- -% custom commands -\newcommand*\ExSheets{{\scshape\textcolor{main}{ExSheets}}\xspace} -\newcommand*\Default[1]{% - \hfill\llap - {% - \ifblank{#1}% - {(initially~empty)}% - {Default:~\code{#1}}% - }% - \newline -} -\newcommand*\required{\hfill\llap{required}\newline} -\newcommand*\optional{\hfill\llap{optional}\newline} - -\newcommand*\nooption[2]{\item[\code{\textcolor{key}{#1} = #2}] \cnpkgdocarrow\ } - -\newcommand*\unexpsign{$\RHD$} -\newcommand*\expsign{\textcolor{red}{$\rhd$}} -\renewcommand*\cnpkgdoctriangle{\unexpsign} -\newcommand*\expandable{% - \def\cnpkgdoctriangle{% - \expsign - \gdef\cnpkgdoctriangle{\unexpsign}}} - -\usepackage{marginnote} -\makeatletter -\newcommand*\sinceversion[1]{% - \@bsphack - \marginnote{% - \footnotesize\sffamily\RaggedRight - \textcolor{black!75}{Introduced in version~#1}}% - \@esphack} -\newcommand*\changedversion[1]{% - \@bsphack - \marginnote{% - \footnotesize\sffamily\RaggedRight - \textcolor{black!75}{Changed in version~#1}}% - \@esphack} -\makeatother - -\pdfstringdefDisableCommands{\def\llap#1{#1\space}\def\bigstar{*}} - -% ---------------------------------------------------------------------------- -% title page -% \TitlePicture{% -% \parbox{.8\linewidth}{% -% }% -% } - -\begin{document} - -\section{Motivation}\secidx{Motivation} -This package provides means for package authors to have an easy interface for -internationalization of their packages. The functionality of this package is -in many parts also covered by the package \paket*{translator} (part of the -\paket{beamer} bundle). Internationalization is also possible with -\paket{babel} and it's \cmd*{addto}\cmd{captions} mechanism or -\KOMAScript's \cmd{providecaptionname}. However, I believe that \translations -is more flexible than all of these. Unlike \paket*{translator} it detects the -used (\paket{babel} or \paket{polyglossia}) language itself and provides -expandable retrieving of the translated key. \translations also provides -support for language dialects which means package authors can distinguish -between British, Australian, Canadian and US English, say. -\secidx*{Motivation} - -\section{License and Requirements}\label{sec:license}\secidx{Requirements} -\translations is placed under the terms of the \LaTeX{} Project Public License, -version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}). It has the -status ``maintained.'' - -\translations requires the \paket{etoolbox} package. -\secidx*{Requirements} - -\section{Usage}\secidx{Usage} -\subsection{Available Commands} -Below the commands provided by \translations are explained. The symbol \expsign{} -means that the command is expandable, \unexpsign{} means that it isn't. -\begin{beschreibung} - \Befehl{DeclareLanguage}{}\newline - Declare a language that can be used by \translations. If the language already - exists it will be silently redefined. This command can only be used in the preamble. - \Befehl{DeclareLanguageAlias}{}\ma{}\newline - Declares \code{} to be an alias of \code{}. If \code{} - 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}{}\ma{}\newline - Declares \code{} to be a dialect of language \code{}. If a - translation for \code{} is provided it is used by the translation - macros. If there is none the corresponding translation for \code{} is - used instead. - \Befehl{NewTranslation}{}\ma{}\ma{}\newline - Defines a translation of key \code{} for the language \code{}. - An error will be raised if a translation of \code{} already exists. - This command can only be used in the preamble. - \Befehl{RenewTranslation}{}\ma{}\ma{}\newline - Redefines a translation of key \code{} for the language \code{}. - An error will be raised if no translation of \code{} exists. - This command can only be used in the preamble. - \Befehl{DeclareTranslation}{}\ma{}\ma{}\newline - Defines a translation of key \code{} for the language \code{}. - No error will be raised if a translation of \code{} already exists. - This command can only be used in the preamble. - \Befehl{DeclareTranslationFallback}{}\ma{}\newline - Defines a fallback translation for key \code{} that is used in case no - translation of \code{} for the currently active language has been provided. - No error will be raised if a fallback for \code{} already exists. - This command can only be used in the preamble. - \expandable\Befehl{GetTranslationFor}{}\ma{}\newline - Fetches and prints the translation of \code{} for the language \code{}. - This command is expandable. - \expandable\Befehl{GetTranslation}{}\newline - Fetches and prints the translation of \code{} for the currently active - language (as for example set by \paket{babel}). This command is expandable. - \Befehl{SaveTranslationFor}{}\ma{}\ma{}\newline - Fetches and saves the translation of \code{} for the language \code{} - in the macro \code{}. - \Befehl{SaveTranslation}{}\ma{}\newline - Fetches and saves the translation of \code{} for the currently active - language (as for example set by \paket{babel}) in the macro \code{}. - \Befehl{LoadDictionary}{}\newline - Loads a file named \code{-.trsl} where \code{} corresponds - to the lowercase name of the current language as defined with - \cmd{DeclareLanguage}. This file should contain the translations for the - specified language. - \Befehl{LoadDictionaryFor}{}\ma{}\newline - Loads a file named \code{-.trsl}. - \Befehl{DeclareDictTranslation}{}\ma{}\newline - This command is to be used in a dictionary file and picks up the language - of that file, see section~\ref{sec:dictionaries} for an example. -\end{beschreibung} -Quite a number of languages already are defined, either directly or via an alias. -So, before you define a language you should take a look at -section~\ref{sec:languages} if the language doesn't already exist. - -\subsection{A Small Example} -This section demonstrates with two short examples how the macros are used. -The first example covers the basics: dlaring of translations and then -retrieving and typesetting them. - -\begin{beispiel} - % in the preamble: - % \DeclareTranslation{English}{Kueche}{kitchen} - % \DeclareTranslation{German}{Kueche}{K\"uche} - % \DeclareTranslation{Spanish}{Kueche}{cocina} - % \DeclareTranslation{French}{Kueche}{cuisine} - - \GetTranslation{Kueche} - \SaveTranslation\kitchen{Kueche} - \SaveTranslationFor\cuisine{french}{Kueche} - - \selectlanguage{ngerman} - \GetTranslation{Kueche} \kitchen\ \GetTranslationFor{spanish}{Kueche} - \cuisine -\end{beispiel} - -The next example demonstrates the use of dialects and how they fall back to -the translation for the main language if no extra translation was declared: - -\begin{beispiel} - % in the preamble: - % \DeclareTranslation{English}{farbe}{color} - % \DeclareTranslation{British}{farbe}{colour} - - \GetTranslationFor{English}{farbe} \\ - \GetTranslationFor{British}{farbe} \\ - \GetTranslationFor{American}{farbe} -\end{beispiel} - -\subsection{Usage in Packages} -A typical usage in a package would look as follows: -\begin{beispiel}[code only] - \RequirePackage{translations} - \DeclareTranslationFallback{mypackage-title}{Nice Title} - \DeclareTranslation{English}{mypackage-title}{Nice Title} - \DeclareTranslation{French}{mypackage-title}{Beau Titre} - \DeclareTranslation{German}{mypackage-title}{Sch\"{o}ner Titel} - ... - \def\mypackage@title{\GetTranslation{mypackage-title}} -\end{beispiel} - -That is, a package defines some unique key for an expression and at least -defines a fallback translation. Additionally translations for as many -languages as the author wants are defined. A user then may add -\cmd{DeclareTranslation}\ma{}\ma{} if they find their -translation missing. - -\subsection{Dictionaries}\label{sec:dictionaries} -A typical dictionary file should look as follows: -\begin{beispiel}[code only] - % this is file housing-german.trsl - \ProvideDictionaryFor{German}{housing}[] - \DeclareDictTranslation{kitchen (housing)}{K\"uche} - \DeclareDictTranslation{bathroom (housing)}{Bad} - \DeclareDictTranslation{living room (housing)}{Wohnzimmer} - \DeclareDictTranslation{bedroom (housing)}{Schlafzimmer} - ... - \endinput -\end{beispiel} - -The usage is similar to the one in a package: unique keys are given -translations, this time for the language the dictionary file is declared for -only. - -\secidx*{Usage} - -\section{Defined Languages}\label{sec:languages}\secidx{Languages} -\translations currently has these languages defined, ``fallback'' being a -dummy language used for fallback translations: - -\begin{quote} - \makeatletter\raggedright - \def\comma{\gdef\comma{,\quad}}% - \def\do#1{\comma #1}% - \dolistloop\@trnslt@languages -\end{quote} - -To every one of these languages at least one alias exists, the uppercase -variant. This is due to the fact that it is common to write language names -uppercased. The defined aliases are these (in parentheses the base language -name is given): - -\begin{quote} - \makeatletter\raggedright - \def\comma{\gdef\comma{,\quad}} - \def\aliases#1#2{\comma #1 (#2)} - \def\do#1{\aliases#1} - \dolistloop\@trnslt@aliases@pair -\end{quote} - -\translations also defines a few dialects. The language to which the dialect -belongs to is given in paretheses: - -\begin{quote} - \makeatletter\raggedright - \def\comma{\gdef\comma{,\quad}} - \def\aliases#1#2{\comma #1 (#2)} - \def\do#1{\aliases#1} - \dolistloop\@trnslt@dialects@pair -\end{quote} -\secidx*{Languages} - -These languages should cover all languages which are currently covered by -\paket{babel} and \paket{polyglossia}. - -\section{Implementation}\index{Implementation@\textbf{Implementation}} -In the following code the lines 1--30 have been omitted. They only repeat the -license statement which has already been mentioned in section~\ref{sec:license}. - -\implementation[linerange={31-1000},firstnumber=31] - -\indexprologue{\noindent Section titles are indicated \textbf{bold}, packages -\textsf{sans serif}, commands \code{\textbackslash\textcolor{code}{brown}} - and options \textcolor{key}{\code{yellow}}.\par\bigskip} - -\printindex - -\end{document} diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl deleted file mode 100644 index 47dbcbeb39a..00000000000 --- a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl +++ /dev/null @@ -1,87 +0,0 @@ -\ProvideDictionaryFor{English}{translations-basic-dictionary} - -\DeclareDictTranslation{Abstract}{Abstract} -\DeclareDictTranslation{Addresses}{Addresses} -\DeclareDictTranslation{addresses}{addresses} -\DeclareDictTranslation{Address}{Address} -\DeclareDictTranslation{address}{address} -\DeclareDictTranslation{and}{and} -\DeclareDictTranslation{Appendix}{Appendix} -\DeclareDictTranslation{Authors}{Authors} -\DeclareDictTranslation{authors}{authors} -\DeclareDictTranslation{Author}{Author} -\DeclareDictTranslation{author}{author} -\DeclareDictTranslation{Bibliography}{Bibliography} -\DeclareDictTranslation{cc}{cc} -\DeclareDictTranslation{Chapters}{Chapters} -\DeclareDictTranslation{chapters}{chapters} -\DeclareDictTranslation{Chapter}{Chapter} -\DeclareDictTranslation{chapter}{chapter} -\DeclareDictTranslation{Conclusion}{Conclusion} -\DeclareDictTranslation{conclusion}{conclusion} -\DeclareDictTranslation{Contents}{Contents} -\DeclareDictTranslation{Continuation}{Continuation} -\DeclareDictTranslation{continuation}{continuation} -\DeclareDictTranslation{cont}{cont} -\DeclareDictTranslation{encl (plural)}{encl} -\DeclareDictTranslation{encl (singular)}{encl} -\DeclareDictTranslation{encl}{encl} -\DeclareDictTranslation{Figures}{Figures} -\DeclareDictTranslation{figures}{figures} -\DeclareDictTranslation{Figure}{Figure} -\DeclareDictTranslation{figure}{figure} -\DeclareDictTranslation{From}{From} -\DeclareDictTranslation{from}{from} -\DeclareDictTranslation{Glossary}{Glossary} -\DeclareDictTranslation{Index}{Index} -\DeclareDictTranslation{Introduction}{Introduction} -\DeclareDictTranslation{introduction}{introduction} -\DeclareDictTranslation{List of Figures and Tables}{List of Figures and Tables} -\DeclareDictTranslation{List of Figures}{List of Figures} -\DeclareDictTranslation{List of Tables}{List of Tables} -\DeclareDictTranslation{or}{or} -\DeclareDictTranslation{Outline}{Outline} -\DeclareDictTranslation{Overview}{Overview} -\DeclareDictTranslation{Pages}{Pages} -\DeclareDictTranslation{pages}{pages} -\DeclareDictTranslation{Page}{Page} -\DeclareDictTranslation{page}{page} -\DeclareDictTranslation{Paragraphs}{Paragraphs} -\DeclareDictTranslation{paragraphs}{paragraphs} -\DeclareDictTranslation{Paragraph}{Paragraph} -\DeclareDictTranslation{paragraph}{paragraph} -\DeclareDictTranslation{Parts}{Parts} -\DeclareDictTranslation{parts}{parts} -\DeclareDictTranslation{Part}{Part} -\DeclareDictTranslation{part}{part} -\DeclareDictTranslation{Preface}{Preface} -\DeclareDictTranslation{Proofs}{Proofs} -\DeclareDictTranslation{proofs}{proofs} -\DeclareDictTranslation{Proof}{Proof} -\DeclareDictTranslation{proof}{proof} -\DeclareDictTranslation{References}{References} -\DeclareDictTranslation{Related work}{Related work} -\DeclareDictTranslation{Related Work}{Related Work} -\DeclareDictTranslation{Sections}{Sections} -\DeclareDictTranslation{sections}{sections} -\DeclareDictTranslation{Section}{Section} -\DeclareDictTranslation{section}{section} -\DeclareDictTranslation{See also}{See also} -\DeclareDictTranslation{see also}{see also} -\DeclareDictTranslation{See}{See} -\DeclareDictTranslation{see}{see} -\DeclareDictTranslation{Sketch of Proofs}{Sketch of Proofs} -\DeclareDictTranslation{Sketch of proofs}{Sketch of proofs} -\DeclareDictTranslation{Sketch of Proof}{Sketch of Proof} -\DeclareDictTranslation{Sketch of proof}{Sketch of proof} -\DeclareDictTranslation{Subsections}{Subsections} -\DeclareDictTranslation{subsections}{subsections} -\DeclareDictTranslation{Subsection}{Subsection} -\DeclareDictTranslation{subsection}{subsection} -\DeclareDictTranslation{Summary}{Summary} -\DeclareDictTranslation{Tables}{Tables} -\DeclareDictTranslation{tables}{tables} -\DeclareDictTranslation{Table}{Table} -\DeclareDictTranslation{table}{table} -\DeclareDictTranslation{To}{To} -\DeclareDictTranslation{to}{to} diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl deleted file mode 100644 index ce4965a5475..00000000000 --- a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl +++ /dev/null @@ -1,87 +0,0 @@ -\ProvideDictionaryFor{French}{translations-basic-dictionary} - -\DeclareDictTranslation{Abstract}{R\'{e}sum\'{e}} -\DeclareDictTranslation{Addresses}{Adresses} -\DeclareDictTranslation{addresses}{adresses} -\DeclareDictTranslation{Address}{Adresse} -\DeclareDictTranslation{address}{adresse} -\DeclareDictTranslation{and}{et} -\DeclareDictTranslation{Appendix}{Annexe} -\DeclareDictTranslation{Authors}{Auteurs} -\DeclareDictTranslation{authors}{auteur} -\DeclareDictTranslation{Author}{Auteur} -\DeclareDictTranslation{author}{auteur} -\DeclareDictTranslation{Bibliography}{Bibliographie} -\DeclareDictTranslation{cc}{Copie \`{a} } -\DeclareDictTranslation{Chapters}{Chapitres} -\DeclareDictTranslation{chapters}{chapitres} -\DeclareDictTranslation{Chapter}{Chapitre} -\DeclareDictTranslation{chapter}{chapitre} -\DeclareDictTranslation{Conclusion}{Conclusion} -\DeclareDictTranslation{conclusion}{conclusion} -\DeclareDictTranslation{Contents}{Contenu} -\DeclareDictTranslation{Continuation}{Suite} -\DeclareDictTranslation{continuation}{suite} -\DeclareDictTranslation{cont}{suite} % FIXME: unsure -\DeclareDictTranslation{encl (plural)}{P.~J.} -\DeclareDictTranslation{encl (singular)}{P.~J.} -\DeclareDictTranslation{encl}{P.~J.} -\DeclareDictTranslation{Figures}{Figures} -\DeclareDictTranslation{figures}{figures} -\DeclareDictTranslation{Figure}{Figure} -\DeclareDictTranslation{figure}{figure} -\DeclareDictTranslation{From}{De} -\DeclareDictTranslation{from}{de} -\DeclareDictTranslation{Glossary}{Glossaire} -\DeclareDictTranslation{Index}{Index} -\DeclareDictTranslation{Introduction}{Introduction} -\DeclareDictTranslation{introduction}{introduction} -\DeclareDictTranslation{List of Figures and Tables}{Liste des figures et des tableaux} -\DeclareDictTranslation{List of Figures}{Liste des figures} -\DeclareDictTranslation{List of Tables}{Liste des tableaux} -\DeclareDictTranslation{or}{ou} -\DeclareDictTranslation{Outline}{Plan} -\DeclareDictTranslation{Overview}{Sommaire} -\DeclareDictTranslation{Pages}{Pages} -\DeclareDictTranslation{pages}{pages} -\DeclareDictTranslation{Page}{Page} -\DeclareDictTranslation{page}{page} -\DeclareDictTranslation{Paragraphs}{Paragraphes} -\DeclareDictTranslation{paragraphs}{paragraphes} -\DeclareDictTranslation{Paragraph}{Paragraphe} -\DeclareDictTranslation{paragraph}{paragraphe} -\DeclareDictTranslation{Parts}{Parties} -\DeclareDictTranslation{parts}{parties} -\DeclareDictTranslation{Part}{Partie} -\DeclareDictTranslation{part}{partie} -\DeclareDictTranslation{Preface}{Pr\'{e}face} -\DeclareDictTranslation{Proofs}{D\'{e}monstrations} -\DeclareDictTranslation{proofs}{d\'{e}monstrations} -\DeclareDictTranslation{Proof}{D\'{e}monstration} -\DeclareDictTranslation{proof}{d\'{e}monstration} -\DeclareDictTranslation{References}{R\'{e}f\'{e}rences} -\DeclareDictTranslation{Related work}{travaux connexes} -\DeclareDictTranslation{Related Work}{Travaux connexes} -\DeclareDictTranslation{Sections}{Sections} -\DeclareDictTranslation{sections}{sections} -\DeclareDictTranslation{Section}{Section} -\DeclareDictTranslation{section}{section} -\DeclareDictTranslation{See also}{Voir aussi} -\DeclareDictTranslation{see also}{voir aussi} -\DeclareDictTranslation{See}{Voir} -\DeclareDictTranslation{see}{voir} -\DeclareDictTranslation{Sketch of Proofs}{Esquisse de preuves} -\DeclareDictTranslation{Sketch of proofs}{Esquisse de preuves} -\DeclareDictTranslation{Sketch of Proof}{Esquisse de preuve} -\DeclareDictTranslation{Sketch of proof}{Esquisse de preuve} -\DeclareDictTranslation{Subsections}{Sous-sections} -\DeclareDictTranslation{subsections}{sous-sections} -\DeclareDictTranslation{Subsection}{Sous-section} -\DeclareDictTranslation{subsection}{sous-section} -\DeclareDictTranslation{Summary}{R\'{e}sum\'{e}} -\DeclareDictTranslation{Tables}{Tables} -\DeclareDictTranslation{tables}{tables} -\DeclareDictTranslation{Table}{Table} -\DeclareDictTranslation{table}{table} -\DeclareDictTranslation{To}{Vers}%?? -\DeclareDictTranslation{to}{vers}%?? diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl deleted file mode 100644 index 95732490944..00000000000 --- a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl +++ /dev/null @@ -1,87 +0,0 @@ -\ProvideDictionaryFor{German}{translations-basic-dictionary} - -\DeclareDictTranslation{Abstract}{Zusammenfassung} -\DeclareDictTranslation{Addresses}{Adressen} -\DeclareDictTranslation{addresses}{Adressen} -\DeclareDictTranslation{Address}{Adresse} -\DeclareDictTranslation{address}{Adresse} -\DeclareDictTranslation{and}{und} -\DeclareDictTranslation{Appendix}{Anhang} -\DeclareDictTranslation{Authors}{Autoren} -\DeclareDictTranslation{authors}{Autoren} -\DeclareDictTranslation{Author}{Autor} -\DeclareDictTranslation{author}{Autor} -\DeclareDictTranslation{Bibliography}{Literaturverzeichnis} -\DeclareDictTranslation{cc}{Verteiler} -\DeclareDictTranslation{Chapters}{Kapitel} -\DeclareDictTranslation{chapters}{Kapitel} -\DeclareDictTranslation{Chapter}{Kapitel} -\DeclareDictTranslation{chapter}{Kapitel} -\DeclareDictTranslation{Conclusion}{Zusammenfassung} -\DeclareDictTranslation{conclusion}{Zusammenfassung} -\DeclareDictTranslation{Contents}{Inhaltsverzeichnis} -\DeclareDictTranslation{Continuation}{Fortsetzung} -\DeclareDictTranslation{continuation}{Fortsetzung} -\DeclareDictTranslation{cont}{Forts} -\DeclareDictTranslation{encl (plural)}{Anlagen} -\DeclareDictTranslation{encl (singular)}{Anlage} -\DeclareDictTranslation{encl}{Anlage(n)} -\DeclareDictTranslation{Figures}{Abbildungen} -\DeclareDictTranslation{figures}{Abbildungen} -\DeclareDictTranslation{Figure}{Abbildung} -\DeclareDictTranslation{figure}{Abbildung} -\DeclareDictTranslation{From}{Von} -\DeclareDictTranslation{from}{von} -\DeclareDictTranslation{Glossary}{Glossar} -\DeclareDictTranslation{Index}{Index} -\DeclareDictTranslation{Introduction}{Einleitung} -\DeclareDictTranslation{introduction}{Einleitung} -\DeclareDictTranslation{List of Figures and Tables}{Abbildungs- und Tabellenverzeichnis} -\DeclareDictTranslation{List of Figures}{Abbildungsverzeichnis} -\DeclareDictTranslation{List of Tables}{Tabellenverzeichnis} -\DeclareDictTranslation{or}{oder} -\DeclareDictTranslation{Outline}{Gliederung} -\DeclareDictTranslation{Overview}{\"Uber\-sicht} -\DeclareDictTranslation{Pages}{Seiten} -\DeclareDictTranslation{pages}{Seiten} -\DeclareDictTranslation{Page}{Seite} -\DeclareDictTranslation{page}{Seite} -\DeclareDictTranslation{Paragraphs}{Ab\-s\"at\-ze} -\DeclareDictTranslation{paragraphs}{Ab\-s\"at\-ze} -\DeclareDictTranslation{Paragraph}{Absatz} -\DeclareDictTranslation{paragraph}{Absatz} -\DeclareDictTranslation{Parts}{Teile} -\DeclareDictTranslation{parts}{Teile} -\DeclareDictTranslation{Part}{Teil} -\DeclareDictTranslation{part}{Teil} -\DeclareDictTranslation{Preface}{Vorwort} -\DeclareDictTranslation{Proofs}{Beweise} -\DeclareDictTranslation{proofs}{Beweise} -\DeclareDictTranslation{Proof}{Beweis} -\DeclareDictTranslation{proof}{Beweis} -\DeclareDictTranslation{References}{Literatur} -\DeclareDictTranslation{Related work}{Verwandte Arbeiten} -\DeclareDictTranslation{Related Work}{Verwandte Arbeiten} -\DeclareDictTranslation{Sections}{Abschnitte} -\DeclareDictTranslation{sections}{Abschnitte} -\DeclareDictTranslation{Section}{Abschnitt} -\DeclareDictTranslation{section}{Abschnitt} -\DeclareDictTranslation{See also}{Siehe auch} -\DeclareDictTranslation{see also}{siehe auch} -\DeclareDictTranslation{See}{Siehe} -\DeclareDictTranslation{see}{siehe} -\DeclareDictTranslation{Sketch of Proofs}{Beweisskizzen} -\DeclareDictTranslation{Sketch of proofs}{Beweisskizzen} -\DeclareDictTranslation{Sketch of Proof}{Beweisskizze} -\DeclareDictTranslation{Sketch of proof}{Beweisskizze} -\DeclareDictTranslation{Subsections}{Unterabschnitte} -\DeclareDictTranslation{subsections}{Unterabschnitte} -\DeclareDictTranslation{Subsection}{Unterabschnitt} -\DeclareDictTranslation{subsection}{Unterabschnitt} -\DeclareDictTranslation{Summary}{Zusammenfassung} -\DeclareDictTranslation{Tables}{Tabellen} -\DeclareDictTranslation{tables}{Tabellen} -\DeclareDictTranslation{Table}{Tabelle} -\DeclareDictTranslation{table}{Tabelle} -\DeclareDictTranslation{To}{An} -\DeclareDictTranslation{to}{an} diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl deleted file mode 100644 index 69e0824b103..00000000000 --- a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl +++ /dev/null @@ -1,87 +0,0 @@ -\ProvideDictionaryFor{Spanish}{translations-basic-dictionary} - -\DeclareDictTranslation{Abstract}{Resumen} -\DeclareDictTranslation{Addresses}{Direcciones} -\DeclareDictTranslation{addresses}{direcciones} -\DeclareDictTranslation{Address}{Direcci\'{o}n} -\DeclareDictTranslation{address}{direcci\'{o}n} -\DeclareDictTranslation{and}{y} -\DeclareDictTranslation{Appendix}{Ap\'{e}ndice} -\DeclareDictTranslation{Authors}{Autores} -\DeclareDictTranslation{authors}{autores} -\DeclareDictTranslation{Author}{Autor} -\DeclareDictTranslation{author}{autor} -\DeclareDictTranslation{Bibliography}{Bibliograf\'{\i}a} -\DeclareDictTranslation{cc}{c.c.} -\DeclareDictTranslation{Chapters}{Cap\'{\i}tulos} -\DeclareDictTranslation{chapters}{cap\'{\i}tulos} -\DeclareDictTranslation{Chapter}{Cap\'{\i}tulo} -\DeclareDictTranslation{chapter}{cap\'{\i}tulo} -\DeclareDictTranslation{Conclusion}{Conclusi\'{o}n} -\DeclareDictTranslation{conclusion}{conclusi\'{o}n} -\DeclareDictTranslation{Contents}{Contenido} -\DeclareDictTranslation{Continuation}{Continuaci\'{o}n} -\DeclareDictTranslation{continuation}{continuaci\'{o}n} -\DeclareDictTranslation{cont}{cont} -\DeclareDictTranslation{encl (plural)}{adj.} -\DeclareDictTranslation{encl (singular)}{adj.} -\DeclareDictTranslation{encl}{adj.} -\DeclareDictTranslation{Figures}{Figuras} -\DeclareDictTranslation{figures}{figuras} -\DeclareDictTranslation{Figure}{Figura} -\DeclareDictTranslation{figure}{figura} -\DeclareDictTranslation{From}{Desde} -\DeclareDictTranslation{from}{desde} -\DeclareDictTranslation{Glossary}{Glosario} -\DeclareDictTranslation{Index}{\'{I}ndice} -\DeclareDictTranslation{Introduction}{Introducci\'{o}n} -\DeclareDictTranslation{introduction}{introducci\'{o}n} -\DeclareDictTranslation{List of Figures and Tables}{Lista de Figuras y Tablas} -\DeclareDictTranslation{List of Figures}{Lista de Figuras} -\DeclareDictTranslation{List of Tables}{Lista de Tablas} -\DeclareDictTranslation{or}{o} -\DeclareDictTranslation{Outline}{Esbozo} -\DeclareDictTranslation{Overview}{Visi\'{o}n General} -\DeclareDictTranslation{Pages}{P\'{a}ginas} -\DeclareDictTranslation{pages}{p\'{a}ginas} -\DeclareDictTranslation{Page}{P\'{a}gina} -\DeclareDictTranslation{page}{p\'{a}gina} -\DeclareDictTranslation{Paragraphs}{P\'{a}rrafos} -\DeclareDictTranslation{paragraphs}{p\'{a}rrafos} -\DeclareDictTranslation{Paragraph}{P\'{a}rrafo} -\DeclareDictTranslation{paragraph}{p\'{a}rrafo} -\DeclareDictTranslation{Parts}{Partes} -\DeclareDictTranslation{parts}{partes} -\DeclareDictTranslation{Part}{Parte} -\DeclareDictTranslation{part}{parte} -\DeclareDictTranslation{Preface}{Prefacio} -\DeclareDictTranslation{Proofs}{Demostraciones} -\DeclareDictTranslation{proofs}{demostraciones} -\DeclareDictTranslation{Proof}{Demostraci\'{o}n} -\DeclareDictTranslation{proof}{demostraci\'{o}n} -\DeclareDictTranslation{References}{Referencias} -\DeclareDictTranslation{Related work}{Trabajo relacionado} -\DeclareDictTranslation{Related Work}{Trabajo Relacionado} -\DeclareDictTranslation{Sections}{Secciones} -\DeclareDictTranslation{sections}{secciones} -\DeclareDictTranslation{Section}{Secci\'{o}n} -\DeclareDictTranslation{section}{secci\'{o}n} -\DeclareDictTranslation{See also}{Ver tambi\'{e}n} -\DeclareDictTranslation{see also}{ver tambi\'{e}n} -\DeclareDictTranslation{See}{Ver} -\DeclareDictTranslation{see}{ver} -\DeclareDictTranslation{Sketch of Proofs}{Esbozo de Demostraciones} -\DeclareDictTranslation{Sketch of proofs}{Esbozo de demostraciones} -\DeclareDictTranslation{Sketch of Proof}{Esbozo de Demostraci\'{o}n} -\DeclareDictTranslation{Sketch of proof}{Esbozo de demostraci\'{o}n} -\DeclareDictTranslation{Subsections}{Subsecciones} -\DeclareDictTranslation{subsections}{subsecciones} -\DeclareDictTranslation{Subsection}{Subsecci\'{o}n} -\DeclareDictTranslation{subsection}{subsecci\'{o}n} -\DeclareDictTranslation{Summary}{Resumen} -\DeclareDictTranslation{Tables}{Tablas} -\DeclareDictTranslation{tables}{tablas} -\DeclareDictTranslation{Table}{Tabla} -\DeclareDictTranslation{table}{tabla} -\DeclareDictTranslation{To}{Hasta} -\DeclareDictTranslation{to}{hasta} diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty index 9d899f2d815..64ce0f3e650 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty @@ -22,17 +22,11 @@ % % The Current Maintainer of this work is Clemens Niederberger. % ---------------------------------------------------------------------------- -% The exsheets package consists of the files -% - exsheets.sty, exsheets_headings.def, exsheets_headings.cfg, -% exsheets_tasks.def, exsheets_tasks.cfg, exsheets_configurations.cfg, -% - exsheets_en.tex, exsheets_en.pdf, -% - README -% ---------------------------------------------------------------------------- % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % ---------------------------------------------------------------------------- -\def\exsheets@date{2013/06/28} -\def\exsheets@version{0.9h} +\def\exsheets@date{2013/07/17} +\def\exsheets@version{0.9i} \RequirePackage { expl3 , xparse } \ProvidesExplPackage @@ -269,10 +263,12 @@ \fp_new:N \l__exsheets_points_default_fp \fp_set:Nn \l__exsheets_points_default_fp { 1 } \fp_new:N \l__exsheets_question_points_fp -\fp_new:N \g__exsheets_total_points_fp +% this one should be public: +\fp_new:N \g_exsheets_total_points_fp \fp_new:N \g__exsheets_bonus_sum_fp \fp_new:N \l__exsheets_question_bonus_fp -\fp_new:N \g__exsheets_total_bonus_fp +% this one should be public +\fp_new:N \g_exsheets_total_bonus_fp \tl_new:N \l__exsheets_points_name_tl \tl_set:Nn \l__exsheets_points_name_tl { P. } @@ -333,10 +329,10 @@ \cs_generate_variant:Nn \exsheets_add_bonus:n { V } \cs_new_protected_nopar:Npn \exsheets@sum@of@points #1 - { \fp_gset:Nn \g__exsheets_total_points_fp { #1 } } + { \fp_gset:Nn \g_exsheets_total_points_fp { #1 } } \cs_new_protected_nopar:Npn \exsheets@sum@of@bonus #1 - { \fp_gset:Nn \g__exsheets_total_bonus_fp { #1 } } + { \fp_gset:Nn \g_exsheets_total_bonus_fp { #1 } } \cs_new_nopar:Npn \exsheets_parse_points:n #1 { @@ -477,8 +473,8 @@ \bool_if:NTF \l__exsheets_parse_points_bool { \IfBooleanTF { #1 } - { \exsheets_parse_points:n { \g__exsheets_total_points_fp } } - { \exsheets_print_points:n { \g__exsheets_total_points_fp } } + { \exsheets_parse_points:n { \g_exsheets_total_points_fp } } + { \exsheets_print_points:n { \g_exsheets_total_points_fp } } } { \msg_warning:nnn { exsheets } { parse-points } { \pointssum } } } @@ -488,8 +484,8 @@ \bool_if:NTF \l__exsheets_parse_points_bool { \IfBooleanTF { #1 } - { \exsheets_parse_bonus:n { \g__exsheets_total_bonus_fp } } - { \exsheets_print_bonus:n { \g__exsheets_total_bonus_fp } } + { \exsheets_parse_bonus:n { \g_exsheets_total_bonus_fp } } + { \exsheets_print_bonus:n { \g_exsheets_total_bonus_fp } } } { \msg_warning:nnn { exsheets } { parse-points } { \bonussum } } } @@ -524,20 +520,20 @@ \bool_if:nT { \l__exsheets_points_separate_bonus_bool || - \fp_compare_p:n { \g__exsheets_total_bonus_fp = 0 } + \fp_compare_p:n { \g_exsheets_total_bonus_fp = 0 } } - { \exsheets_points_name:n { \g__exsheets_total_points_fp } } + { \exsheets_points_name:n { \g_exsheets_total_points_fp } } } \exsheets_totalbonus: \IfBooleanF { #1 } { - \fp_compare:nF { \g__exsheets_total_bonus_fp = 0 } + \fp_compare:nF { \g_exsheets_total_bonus_fp = 0 } { \bool_if:NTF \l__exsheets_points_separate_bonus_bool - { \exsheets_bonus_name:n { \g__exsheets_total_bonus_fp } } + { \exsheets_bonus_name:n { \g_exsheets_total_bonus_fp } } { \exsheets_points_name:n - { \g__exsheets_total_points_fp + \g__exsheets_total_bonus_fp } + { \g_exsheets_total_points_fp + \g_exsheets_total_bonus_fp } } } } @@ -549,11 +545,11 @@ { \bool_if:NTF \l__exsheets_parse_points_bool { - \fp_compare:nTF { \g__exsheets_total_points_fp = 0 } + \fp_compare:nTF { \g_exsheets_total_points_fp = 0 } { ?? \, \exsheets_points_name:n { ?? } } { \exsheets_parse_points:n - { \g__exsheets_total_points_fp } + { \g_exsheets_total_points_fp } } } { \msg_warning:nn { exsheets } { totalpoints } } @@ -563,12 +559,12 @@ { \bool_if:NT \l__exsheets_parse_points_bool { - \fp_compare:nF { \g__exsheets_total_bonus_fp = 0 } + \fp_compare:nF { \g_exsheets_total_bonus_fp = 0 } { \tl_use:N \c_space_tl \tl_use:N \l__exsheets_points_pre_bonus_marker_tl \exsheets_parse_bonus:n - { \g__exsheets_total_bonus_fp } + { \g_exsheets_total_bonus_fp } \tl_use:N \l__exsheets_points_post_bonus_marker_tl } } @@ -703,7 +699,7 @@ \bool_if:NTF { \l__exsheets_grades_half_bool } { \__exsheets_fp_round_to_half:n } { \__exsheets_grades_round:n } - { \g__exsheets_total_points_fp * \l__exsheets_tmpa_fp } + { \g_exsheets_total_points_fp * \l__exsheets_tmpa_fp } } \cs_new:Npn \exsheets_strip_braces:N #1 @@ -742,11 +738,11 @@ \bool_if:NTF \l__exsheets_parse_points_bool { \exsheets_parse_points:n - { min( \__exsheets_grade_rounded: , \g__exsheets_total_points_fp ) } + { min( \__exsheets_grade_rounded: , \g_exsheets_total_points_fp ) } \int_compare:nT { #1 = 1 } { \exsheets_points_name:n - { min( \__exsheets_grade_rounded: , \g__exsheets_total_points_fp ) } + { min( \__exsheets_grade_rounded: , \g_exsheets_total_points_fp ) } } } { \msg_warning:nnn { exsheets } { grade-parse } { #1 } \textbf{??} } @@ -2442,23 +2438,19 @@ { \par \tex_penalty:D -100 \scan_stop: -% \group_begin: - \dim_set:Nn \l__exsheets_tmpa_dim { #2 } - \dim_set:Nn \l__exsheets_tmpb_dim { \pagegoal - \pagetotal - \baselineskip } - \dim_show:N \l__exsheets_tmpa_dim - \dim_show:N \l__exsheets_tmpb_dim - \dim_compare:nTF { \l__exsheets_tmpa_dim > \l__exsheets_tmpb_dim } - { - \dim_compare:nT { \l__exsheets_tmpb_dim > 0pt } { \vfil } - \break - \IfBooleanF { #1 } - { - \dim_sub:Nn \l__exsheets_tmpa_dim { \l__exsheets_tmpb_dim } - \vspace* { \l__exsheets_tmpa_dim } - } - } - { \skip_vertical:N \l__exsheets_tmpa_dim } -% \group_end: + \dim_set:Nn \l__exsheets_tmpa_dim { #2 } + \dim_set:Nn \l__exsheets_tmpb_dim { \pagegoal - \pagetotal - \baselineskip } + \dim_compare:nTF { \l__exsheets_tmpa_dim > \l__exsheets_tmpb_dim } + { + \dim_compare:nT { \l__exsheets_tmpb_dim > 0pt } { \vfil } + \break + \IfBooleanF { #1 } + { + \dim_sub:Nn \l__exsheets_tmpa_dim { \l__exsheets_tmpb_dim } + \vspace* { \l__exsheets_tmpa_dim } + } + } + { \skip_vertical:N \l__exsheets_tmpa_dim } } \NewDocumentCommand \examspace { sm } { \__exsheets_examspace:nn { #1 } { #2 } } @@ -2579,38 +2571,41 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HISTORY: 2011/11/23 v0.1pre - first upload to bitbucket and all changes until - considered stable enough/ready to be called 0.1alpha. - There'll be no further descriptions until then. + considered stable enough/ready to be called + 0.1alpha. There'll be no further descriptions until + then. 2012/06/08 v0.1alpha - first hopefully stable version 2012/06/11 v0.1alpha-a - added headings instances, slightly rewritten `exercises-tasks' object and `tasks' environment -2012/06/11 v0.1alpha-b - added `multiplechoice' instance and `load-tasks' option +2012/06/11 v0.1alpha-b - added `multiplechoice' instance and `load-tasks' + option 2012/06/12 v0.1alpha-c - renamed from `exercises' into `ExSheets' 2012/06/15 v0.1alpha-d - added more flexible solution printing method -2012/06/15 v0.1beta - filled in some blanks in the documentation, now we need - some testing! +2012/06/15 v0.1beta - filled in some blanks in the documentation, now we + need some testing! 2012/09/07 v0.1beta-a - adjustments to the updated l3kernel 2012/09/08 v0.1beta-b - sort solutions printed with the `byID' key 2012/09/16 v0.1beta-c - renamed option `questions-counter-format' into `counter-format' -2012/09/19 v0.1beta-d - added `topic' key, provide \includequestions with options - `all' and `IDs' -2012/09/24 v0.1beta-e - added question properties and improved random question - selection -2012/09/27 v0.1 - added two headings instances, new option `headings-format' - - small changes in the definition of the `exsheets-headings' - object +2012/09/19 v0.1beta-d - added `topic' key, provide \includequestions with + options `all' and `IDs' +2012/09/24 v0.1beta-e - added question properties and improved random + question selection +2012/09/27 v0.1 - added two headings instances, new option + `headings-format' + - small changes in the definition of the + `exsheets-headings' object - preliminary version of totoc options. Unfortunatly \exsheets@recover@number is not expandable => no hyperref support -2012/09/30 v0.2beta - version numbering gone crazy! this will now stay 0.2beta - until upload to CTAN (v0.2) +2012/09/30 v0.2beta - version numbering gone crazy! this will now stay + 0.2beta until upload to CTAN (v0.2) - integrated packages `translations' and `cntformats': trnslt: provide expandable version of `translator's \translate - cntfmts: outsourced previous counter formatting commands; - should now be usable in other packages, too, and - simplified definitions in `ExSheets' + cntfmts: outsourced previous counter formatting + commands; should now be usable in other packages, + too, and simplified definitions in `ExSheets' - thanks to `translations' and `cntformats' the `totoc' option now works with `hyperref' 2012/10/05 v0.2 - removed \sumpoints and moved the functionality to @@ -2625,8 +2620,8 @@ HISTORY: using \exsheets@save@number and \QuestionNumber 2012/10/08 v0.2b - improved the reference to chapter/solution numbers in \printsolutions - - resolved bug in \printsolutions introduced in the last - update + - resolved bug in \printsolutions introduced in the + last update - upload to CTAN 2012/10/23 v0.3 - bugfix in \exref @@ -2643,17 +2638,17 @@ HISTORY: 2012/12/02 v0.5 - added \CurrentQuestionID 2012/12/06 v0.5a - bug fix: solutions had wrong numbers with counter-format=se.qu and [print] option -2012/12/18 v0.6 - variations, Hungarian translations, corrected Catalanian - translations -2012/12/23 v0.6a - bug fix: labels and items of {tasks} weren't joined at - their baselines +2012/12/18 v0.6 - variations, Hungarian translations, corrected + Catalanian translations +2012/12/23 v0.6a - bug fix: labels and items of {tasks} weren't joined + at their baselines 2013/01/06 v0.6b - bug fix: ID counting fixed in \includequestions -2013/01/19 v0.7 - extracted `tasks' environment into standalone package; - this also lead to a slightly new syntax and a few new - options for it +2013/01/19 v0.7 - extracted `tasks' environment into standalone + package; this also lead to a slightly new syntax and + a few new options for it - changed internals for random selection of questions: - uses `pgf' instead of `lcg' and seems to be more reliable - than before + uses `pgf' instead of `lcg' and seems to be more + reliable than before 2013/01/21 v0.7a - added option `auto-label' and questions key `label', also added question properties `ref' and `pageref' 2013/02/17 v0.7b - bug fix: question selection by ID now works again @@ -2686,19 +2681,26 @@ HISTORY: 2013/04/25 v0.9d - bug fix: \includequestions works correctly when used multiple times together with ordinary instances of the {question} environment - - bug fix: points/parse=false correctly disables parsing - points again - - bug fix: \addpoints didn't add to the question property + - bug fix: points/parse=false correctly disables + parsing points again + - bug fix: \addpoints didn't add to the question + property - new option `points/format' - - \blank now works in math mode, it doesn't do linebreaks - there if `ulem' doesn't allow them (which it doesn't) + - \blank now works in math mode, it doesn't do + linebreaks there if `ulem' doesn't allow them (which + it doesn't) 2013/05/01 v0.9e - corrected erroneous behaviour of \examspace 2013/05/26 v0.9f - fixed incorrectly placed links when the `totoc' option is enabled and questions/solutions are at the top of a new page because there wasn't enough place left at the page before 2013/05/30 v0.9g - obey \if@filesw -2013/06/28 v0.9h - cleaner internal use of \exsheets_set_question_properties:n +2013/06/28 v0.9h - cleaner internal use of + \exsheets_set_question_properties:n +2013/07/17 v0.9i - made \g__exsheets_total_bonus_fp and + \g__exsheets_total_points_fp public + - removed `translations' from the bundle + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO: diff --git a/Master/texmf-dist/tex/latex/exsheets/translations.sty b/Master/texmf-dist/tex/latex/exsheets/translations.sty deleted file mode 100644 index 9f751632426..00000000000 --- a/Master/texmf-dist/tex/latex/exsheets/translations.sty +++ /dev/null @@ -1,475 +0,0 @@ -% -------------------------------------------------------------------------- -% the TRANSLATIONS package -% -% a simple translator -% -% This package is part of the exsheets bundle -% -------------------------------------------------------------------------- -% Clemens Niederberger -% Web: https://bitbucket.org/cgnieder/exsheets/ -% E-Mail: contact@mychemistry.eu -% -------------------------------------------------------------------------- -% Copyright 2012 Clemens Niederberger -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status `maintained'. -% -% The Current Maintainer of this work is Clemens Niederberger. -% -------------------------------------------------------------------------- -% The translations package is part of the exsheets bundle. -% -------------------------------------------------------------------------- -% If you have any ideas, questions, suggestions or bugs to report, please -% feel free to contact me. -% -------------------------------------------------------------------------- -\def\@trnslt@date{2013/06/28} -\def\@trnslt@version{v0.10} - -\ProvidesPackage{translations}[\@trnslt@date\space \@trnslt@version\space a simple translator] -\RequirePackage{etoolbox} - -% -------------------------------------------------------------------------- -% message handling -\def\@trnslt@error@message{% - For details have a look at the `translations' manual.} - -\def\@trnslt@create@message#1{% - \ifstrequal{#1}{Error} - {% - \lowercase{\csdef{@trnslt@#1}}##1{% - \csuse{Package#1}{translations}{##1}{\@trnslt@error@message}}% - }{% - \lowercase{\csdef{@trnslt@#1}}##1{% - \csuse{Package#1}{translations}{##1}}% - }} -\@trnslt@create@message{Error} -\@trnslt@create@message{Warning} -\@trnslt@create@message{WarningNoLine} -\@trnslt@create@message{Info} - -\def\@trnslt@err@unknown@lang#1{% - \@trnslt@error{Unknown language `#1'}} - -\def\@trnslt@warn@unknown@lang#1{% - \@trnslt@warning{Unknown language `#1'}} - -\def\@trnslt@err@already@defined#1#2{% - \@trnslt@error{The #2 translation for `#1' is already defined.}} - -\def\@trnslt@err@not@defined#1#2{% - \@trnslt@error{The \@trnslt@language{#2} translation for `#1' is not defined yet.}} - -% -------------------------------------------------------------------------- -% check if babel or polyglossia is used -\AtEndPreamble{ - \@ifpackageloaded{babel}{}{ - \@ifpackageloaded{polyglossia}{} - {\@trnslt@warning{No language package found. I am going to use `english' - as default language.}} - } - \ifdef\languagename{} - {\def\languagename{english}} - \def\@trnslt@current@language{\languagename} - \ifdef\bbl@afterfi{} - {\long\def\bbl@afterfi#1\fi{\fi#1}} -} - -% book keeping: the following macros will be used as `etoolbox' lists that -% keep record of defined languages, dialects and aliases -\def\@trnslt@languages{} -\def\@trnslt@aliases@pair{} -\def\@trnslt@aliases@single{} -\def\@trnslt@dialects@pair{} -\def\@trnslt@dialects@single{} - -% -------------------------------------------------------------------------- -% \DeclareLanguage and \DeclareLanguageAlias -% #1: language -\newrobustcmd*\DeclareLanguage[1]{% - \@trnslt@declare@language{#1}} -\@onlypreamble\DeclareLanguage - -\def\@trnslt@declare@language#1{% - \@trnslt@if@language{#1} - {}{% - \csdef{@trnslt@language@#1}{#1}% - \listeadd\@trnslt@languages{#1}% - }% -} - -\def\@trnslt@language#1{% - \csuse{@trnslt@language@#1}} - -\def\@trnslt@if@language#1{% - \ifcsundef{@trnslt@language@#1} - {\expandafter\@secondoftwo} - {\expandafter\@firstoftwo}% -} - -% #1: dialect -% #2: language -\newrobustcmd*\DeclareLanguageDialect[2]{% - \@trnslt@declare@languagedialect{#1}{#2}} -\@onlypreamble\DeclareLanguageDialect - -\def\@trnslt@declare@languagedialect#1#2{% - \@trnslt@if@language{#2} - {}{% - \@trnslt@warn@unknown@lang{#2}% - \@trnslt@declare@language{#2}% - }% - \@trnslt@if@dialect{#1} - {% => ist schon als dialect definiert => irgendwelche weiteren checks? - } - {% - \@trnslt@if@alias{#2} - {% - \csedef{@trnslt@dialect@#1}{{\@trnslt@alias{#2}}{#1}}% - \@trnslt@declare@language{#1}% - \listeadd\@trnslt@dialects@single{#1}% - \listeadd\@trnslt@dialects@pair{{#1}{\@trnslt@alias{#2}}}% - } - {% - \csdef{@trnslt@dialect@#1}{{#2}{#1}}% - \@trnslt@declare@language{#1}% - \listeadd\@trnslt@dialects@single{#1}% - \listeadd\@trnslt@dialects@pair{{#1}{#2}}% - }% - }% -} - -\def\@trnslt@dialect#1{% - \csuse{@trnslt@dialect@#1}} - -\def\@trnslt@dialect@of#1{% - \expandafter\expandafter\expandafter - \@trnslt@dialect@of@aux - \csname @trnslt@dialect@#1\endcsname\@empty -} -\def\@trnslt@dialect@of@aux#1#2{\ifx\relax#1\@empty\else#1\fi} - -\def\@trnslt@if@dialect#1{% - \ifcsundef{@trnslt@dialect@#1} - {\expandafter\@secondoftwo} - {\expandafter\@firstoftwo}% -} - -% #1: alias -% #2: language -\newrobustcmd*\DeclareLanguageAlias[2]{% - \@trnslt@declare@languagealias{#1}{#2}} -\@onlypreamble\DeclareLanguageAlias - -\def\@trnslt@declare@languagealias#1#2{% - \@trnslt@if@language{#2} - {}{% - \@trnslt@warn@unknown@lang{#2}% - \@trnslt@declare@language{#2}% - }% - \csletcs{@trnslt@language@#1}{@trnslt@language@#2}% - \@trnslt@if@dialect{#2} - {\csletcs{@trnslt@dialect@#1}{@trnslt@dialect@#2}} - {}% - \ifinlist{#1}\@trnslt@aliases@single - {}{% - \csdef{@trnslt@alias@#1}{#2}% - \listeadd\@trnslt@aliases@pair{{#1}{#2}}% - \listeadd\@trnslt@aliases@single{#1}% - }% -} - -\def\@trnslt@alias#1{% - \csuse{@trnslt@alias@#1}} - -\def\@trnslt@if@alias#1{% - \ifcsundef{@trnslt@alias@#1} - {\expandafter\@secondoftwo} - {\expandafter\@firstoftwo}% -} - -% dummy language: `fallback': -\DeclareLanguage{fallback} -\DeclareLanguageAlias{Fallback}{fallback} - -% -------------------------------------------------------------------------- -% \DeclareTranslation, \NewTranslation and \RenewTranslation -% #1: language -% #2: word -% #3: replacement -\newrobustcmd*\DeclareTranslation[3]{% - \@trnslt@declare@translation{#2}{#1}{#3}} -\@onlypreamble\DeclareTranslation - -\newrobustcmd*\DeclareTranslationFallback[2]{% - \@trnslt@declare@translation{#1}{fallback}{#2}} -\@onlypreamble\DeclareTranslationFallback - -\newrobustcmd*\NewTranslation[3]{% - \@trnslt@new@translation{#2}{#1}{#3}} -\@onlypreamble\NewTranslation - -\newrobustcmd*\RenewTranslation[3]{% - \@trnslt@renew@translation{#2}{#1}{#3}} -\@onlypreamble\RenewTranslation - -% #1: word -% #2: language -% #3: replacement -\def\@trnslt@declare@translation#1#2#3{% - \@trnslt@if@language{#2} - {% - % save the as : - \csdef{@trnslt@word@#1@literal}{#1}% - % check if the language is a dialect: - \@trnslt@if@dialect{#2} - {\csdef{@trnslt@word@#1@\@trnslt@dialect{#2}}{#3}} - {}% - % check if translation already exists: - \@trnslt@if@translation{#1}{#2} - {} - {\csdef{@trnslt@word@#1@\@trnslt@language{#2}}{#3}}% - } - {\@trnslt@err@unknown@lang{#2}}% -} - -\def\@trnslt@if@translation#1#2{% - \ifcsundef{@trnslt@word@#1@\@trnslt@language{#2}} - {% - \@trnslt@if@dialect{#2} - {% - \ifboolexpe{ - test {\ifcsundef{@trnslt@word@#1@\@trnslt@dialect{#2}}} or - test {\ifcsundef{@trnslt@word@#1@\@trnslt@dialect@of{#2}}} - } - {\expandafter\@firstoftwo} - {\expandafter\@secondoftwo}% - } - {\expandafter\@secondoftwo}% - } - {\expandafter\@firstoftwo}% -} - -\def\@trnslt@new@translation#1#2#3{% - \@trnslt@if@translation{#1}{#2} - {\@trnslt@err@already@defined{#1}{#2}} - {\@trnslt@declare@translation{#1}{#2}{#3}}} - -\def\@trnslt@renew@translation#1#2#3{% - \@trnslt@if@translation{#1}{#2} - {\@trnslt@declare@translation{#1}{#2}{#3}} - {\@trnslt@err@not@defined{#1}{#2}}} - -% -------------------------------------------------------------------------- -% \GetTranslationFor and \GetTranslation -% these need to be expandable! -% #1: language -% #2: word -\newcommand*\GetTranslationFor[2]{% - \@trnslt@get@translation@for{#2}{#1}} - -\newcommand*\GetTranslation[1]{% - \@trnslt@get@translation@for{#1}{\@trnslt@current@language}} - -% #1: word #2: language -\def\@trnslt@get@translation@for#1#2{% - \@trnslt@if@dialect{#2} - {% - \ifcsdef{@trnslt@word@#1@\@trnslt@dialect{#2}} - {\csuse{@trnslt@word@#1@\@trnslt@dialect{#2}}} - {\csuse{@trnslt@word@#1@\@trnslt@dialect@of{#2}}}% - } - {\csuse{@trnslt@word@#1@\@trnslt@language{#2}}}% -} - -\def\@trnslt@getandcheck@translation@for#1#2{% - \@trnslt@if@translation{#1}{#2} - {\@trnslt@get@translation@for{#1}{#2}} - {% - \@trnslt@warning{Translation for `#1' in #2 unknown. You may try to use - \string\DeclareTranslation{#2}{#1}{ ... } in your preamble.}% - \@trnslt@if@translation{#1}{fallback} - {% - \@trnslt@info{Using fallback translation for `#1'}% - \csuse{@trnslt@word@#1@fallback} - }% - {\csuse{@trnslt@word@#1@literal}}% - }% -} - -% -------------------------------------------------------------------------- -% \SaveTranslationFor and \SaveTranslation -\newrobustcmd*\SaveTranslationFor[3]{% - \@trnslt@save@translation@for{#1}{#3}{#2}} - -\newrobustcmd*\SaveTranslation[2]{% - \@trnslt@save@translation@for{#1}{#2}{\@trnslt@current@language}} - -\def\@trnslt@save@translation@for#1#2#3{% - \edef#1{% - \@trnslt@if@translation{#2}{#3} - {\csuse{@trnslt@word@#2@\@trnslt@language{#3}}} - {}% - }} - -% -------------------------------------------------------------------------- -% \LoadDictionary and \LoadDictionaryFor -\newrobustcmd*\LoadDictionary[1]{% - \@trnslt@load@dictionary@for{#1}{\@trnslt@current@language}} -\@onlypreamble\LoadDictionary - -\newrobustcmd*\LoadDictionaryFor[2]{% - \@trnslt@load@dictionary@for{#2}{#1}} -\@onlypreamble\LoadDictionaryFor - -% #1: name -% #2: lang -\def\@trnslt@load@dictionary@for#1#2{% - \AtBeginDocument{% - \InputIfFileExists{#1-\@trnslt@language{#2}.trsl} - {\@trnslt@info{loading dictionary `#1' for `#2'.}} - {\@trnslt@warning{File `#1-\@trnslt@language{#2}.trsl' not found.}}% - }} - -\newrobustcmd*\ProvideDictionaryFor[2]{% - \@trnslt@provide@dictionary@for{#1}{#2}} -\@onlypreamble\ProvideDictionaryFor - -\def\@trnslt@provide@dictionary@for#1#2{% - \def\@trnslt@dictionary@name{#2}% - \def\@trnslt@dictionary@lang{#1}% - \@ifnextchar[ - {\@trnslt@provide@dictionary@version} - {\ProvidesFile{#2-#1.trsl}[(#1 translation file `#2')]}} - -\def\@trnslt@provide@dictionary@version[#1]{% - \ProvidesFile - {\@trnslt@dictionary@name-\@trnslt@dictionary@lang.trsl}% - [(\@trnslt@dictionary@lang\space translation file `\@trnslt@dictionary@name') #1]} - -% \@trnslt@dictionary@language -\newrobustcmd*\DeclareDictTranslation[2]{% - \@trnslt@declare@translation{#1}{\@trnslt@dictionary@lang}{#2}} -\@onlypreamble\DeclareDictTranslation - -% -------------------------------------------------------------------------- -% predefined languages -\DeclareLanguage{albanian} -\DeclareLanguage{bulgarian} -\DeclareLanguage{catalan} -\DeclareLanguage{croatian} -\DeclareLanguage{czech} -\DeclareLanguage{danish} -\DeclareLanguage{dutch} -\DeclareLanguage{english} -\DeclareLanguage{finnish} -\DeclareLanguage{french} -\DeclareLanguage{german} -\DeclareLanguage{greek} -\DeclareLanguage{hebrew} -\DeclareLanguage{hungarian} -\DeclareLanguage{icelandic} -\DeclareLanguage{italian} -\DeclareLanguage{norwegian} -\DeclareLanguage{polish} -\DeclareLanguage{portuges} -\DeclareLanguage{romanian} -\DeclareLanguage{russian} -\DeclareLanguage{serbocroatian} -\DeclareLanguage{slovak} -\DeclareLanguage{slovenian} -\DeclareLanguage{spanish} -\DeclareLanguage{swedish} -\DeclareLanguage{turkish} -\DeclareLanguage{ukrainian} - -\DeclareLanguageAlias {Albanian}{albanian} -\DeclareLanguageAlias {Bulgarian}{bulgarian} -\DeclareLanguageAlias {Catalan}{catalan} -\DeclareLanguageAlias {Croatian}{croatian} -\DeclareLanguageAlias {Czech}{czech} -\DeclareLanguageAlias {Danish}{danish} -\DeclareLanguageAlias {Dutch}{dutch} -\DeclareLanguageAlias {Finnish}{finnish} -\DeclareLanguageAlias {francais}{french} -\DeclareLanguageAlias {Francais}{francais} -\DeclareLanguageDialect{canadien}{french} -\DeclareLanguageAlias {Canadien}{canadien} -\DeclareLanguageAlias {French}{french} -\DeclareLanguageDialect{american}{english} -\DeclareLanguageAlias {American}{american} -\DeclareLanguageDialect{australian}{english} -\DeclareLanguageAlias {Australian}{australian} -\DeclareLanguageDialect{british}{english} -\DeclareLanguageAlias {British}{british} -\DeclareLanguageDialect{canadian}{english} -\DeclareLanguageAlias {Canadian}{canadian} -\DeclareLanguageAlias {English}{english} -\DeclareLanguageAlias {UKenglish}{british} -\DeclareLanguageAlias {USenglish}{american} -\DeclareLanguageDialect{austrian}{german} -\DeclareLanguageAlias {Austrian}{austrian} -\DeclareLanguageAlias {German}{german} -\DeclareLanguageAlias {germanb}{german} -\DeclareLanguageDialect{naustrian}{austrian} -\DeclareLanguageAlias {ngerman}{german} -\DeclareLanguageAlias {Greek}{greek} -\DeclareLanguageAlias {polutonikogreek}{greek} -\DeclareLanguageAlias {Hebrew}{hebrew} -\DeclareLanguageAlias {Hungarian}{hungarian} -\DeclareLanguageDialect{magyar}{hungarian} -\DeclareLanguageAlias {Magyar}{magyar} -\DeclareLanguageAlias {Icelandic}{icelandic} -\DeclareLanguageAlias {Italian}{italian} -\DeclareLanguageAlias {norsk}{norwegian} -\DeclareLanguageAlias {Norsk}{norsk} -\DeclareLanguageAlias {Norwegian}{norwegian} -\DeclareLanguageAlias {nynorsk}{norwegian} -\DeclareLanguageAlias {Nynorsk}{nynorsk} -\DeclareLanguageAlias {Polish}{polish} -\DeclareLanguageDialect{brazil}{portuges} -\DeclareLanguageAlias {Brazil}{brazil} -\DeclareLanguageAlias {brazilian}{brazil} -\DeclareLanguageAlias {Brazilian}{brazilian} -\DeclareLanguageAlias {Portuges}{portuges} -\DeclareLanguageAlias {portuguese}{portuges} -\DeclareLanguageAlias {Portuguese}{portuguese} -\DeclareLanguageAlias {Romanian}{romanian} -\DeclareLanguageAlias {Russian}{russian} -\DeclareLanguageAlias {Serbocroatian}{serbocroatian} -\DeclareLanguageAlias {Slovak}{slovak} -\DeclareLanguageAlias {Slovenian}{slovenian} -\DeclareLanguageAlias {Spanish}{spanish} -\DeclareLanguageAlias {Swedish}{swedish} -\DeclareLanguageDialect{swissgerman}{german} -% this maybe should be a language of it's own: -\DeclareLanguageAlias {Swiss}{swissgerman} -\DeclareLanguageAlias {Swissgerman}{swissgerman} -\DeclareLanguageAlias {Turkish}{turkish} -\DeclareLanguageAlias {Ukrainian}{ukrainian} - -\endinput - -% HISTORY: -2012/09/30 v0.2beta - first version (as part of the `exsheets' bundle) -2012/10/05 v0.2 - \LoadDictionary and \LoadDictionaryFor added and loads of - languages defined. -2013/03/10 v0.8 - basic dictionaries for English, German, French and Spanish - - new command \DeclareDictTranslation -2013/04/04 v0.8a - bug fix in \DeclareDictTranslation -2013/04/07 v0.9 - slightly improved messages -2013/04/08 v0.9a - changed fallback warning into info - - synchronized version number with `exsheets' until now but - won't any more -2013/06/22 v0.9b - added Swiss -2013/06/28 v0.10 - declaring aliases of dialects now works as expected - - declarings dialects of an alias now correctly declares - the dialect to the correct base language - - corrected a few erroneous langugae declarations - - -- cgit v1.2.3