diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/README | 34 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/cntformats_en.pdf | bin | 0 -> 423275 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/cntformats_en.tex | 407 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf | bin | 690078 -> 693353 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex | 114 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/tasks_en.pdf | bin | 0 -> 430673 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/tasks_en.tex | 564 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/translations_en.pdf | bin | 0 -> 408785 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/exsheets/translations_en.tex | 335 |
9 files changed, 1412 insertions, 42 deletions
diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README index 55317f7c961..9f89fe0d396 100644 --- a/Master/texmf-dist/doc/latex/exsheets/README +++ b/Master/texmf-dist/doc/latex/exsheets/README @@ -1,14 +1,14 @@ -------------------------------------------------------------------------- -EXSHEETS v0.9c - 2013/04/21 +EXSHEETS 2013/04/25 bundled packages: -the EXSHEETS package +the EXSHEETS package v0.9d Yet another package for the creation of exercise sheets -the TRANSLATIONS package v0.9a +the TRANSLATIONS package v0.9d a simple translator -the CNTFORMATS package v0.4 +the CNTFORMATS package v0.5 A different way to read counters. -the TASKS package v0.9 +the TASKS package v0.9d Horizontal columned lists. All mentioned packages are described in exsheets_en.pdf @@ -31,21 +31,23 @@ This work has the LPPL maintenance status `maintained'. The Current Maintainer of this work is Clemens Niederberger. -------------------------------------------------------------------------- -The exsheets package consists of the files +The exsheets bundle consists of the files - exsheets.sty, exsheets_headings.def, exsheets_headings.cfg, exsheets_configurations.cfg, - - exsheets_en.tex, exsheets_en.pdf, grading-table.tex, + exsheets_en.tex, exsheets_en.pdf + + - 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 -------------------------------------------------------------------------- -The translations package consists of the files - - translations.sty --------------------------------------------------------------------------- -The cntformats package consists of the files - - cntformats.sty --------------------------------------------------------------------------- -The tasks package consists of the files - - tasks.sty, tasks.cfg --------------------------------------------------------------------------- If you have any ideas, questions, suggestions or bugs to report, please feel free to contact me. --------------------------------------------------------------------------
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/exsheets/cntformats_en.pdf b/Master/texmf-dist/doc/latex/exsheets/cntformats_en.pdf Binary files differnew file mode 100644 index 00000000000..8af9557974d --- /dev/null +++ b/Master/texmf-dist/doc/latex/exsheets/cntformats_en.pdf diff --git a/Master/texmf-dist/doc/latex/exsheets/cntformats_en.tex b/Master/texmf-dist/doc/latex/exsheets/cntformats_en.tex new file mode 100644 index 00000000000..98a1605aa48 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exsheets/cntformats_en.tex @@ -0,0 +1,407 @@ +% arara: pdflatex +% arara: biber +% arara: pdflatex +% arara: pdflatex +% -------------------------------------------------------------------------- +% the TRANSLATIONS package +% +% +% +% -------------------------------------------------------------------------- +% 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' and `biber' for compilation +% +\PassOptionsToPackage{supstfm=libertinesups}{superiors} +\documentclass[toc=index,toc=bib,numbers=noendperiod]{cnpkgdoc} +% ---------------------------------------------------------------------------- +% document layout and typographic features +\docsetup{ + pkg = {cntformats} , + url = {https://bitbucket.org/cgnieder/exsheets/} , + subtitle = {{\small part of the \href{exsheets_en.pdf}{\ExSheets} bundle}\\[\baselineskip]a different way to read counters} , + language = en , + modules = true , + code-box = { + backgroundcolor = gray!7!white , + skipbelow = .6\baselineskip plus .5ex minus .5ex , + skipabove = .6\baselineskip plus .5ex minus .5ex + } , + 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{ + @cntfmts@parsed@pattern, AddCounterPattern, alphalph, + cs, eSaveCounterPattern, ExplSyntaxOff, ExplSyntaxOn, int, + myoddnumber, NewCounterPattern, NewPatternFormat, numexpr, ordinalnum, + ReadCounterFrom, ReadCounterPattern, ReadCounterPatternFrom, relax, + SaveCounterPattern, somesetupcommand, + tmpa, tmpb, the +} + +% ---------------------------------------------------------------------------- +% 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,columnsep=1em] + +\usepackage{csquotes} +\usepackage[backend=biber,style=alphabetic]{biblatex} + + +% ---------------------------------------------------------------------------- +% example definitions that have to be done in the preamble: +\usepackage{alphalph} +\NewPatternFormat{aa}{\alphalph} +\usepackage{fmtcount} +\NewPatternFormat{o}{\ordinalnum} +\newcommand*\myoddnumber[1]{\the\numexpr2*(#1)-1\relax} +\NewPatternFormat{x}{\myoddnumber} +\NewCounterPattern{testa}{ta} + +% ---------------------------------------------------------------------------- +% 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} +\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 +does not use \cmd*{the<counter>} nor is it affected by the redefinition of them. + +This package is aimed at package or class authors and probably not very useful +for document authors. + +When I first had the idea for this package the idea of what it does already +existed as part of the \ExSheets package. I can't recall why I came up with +the idea in the first place or why I originally wanted a new syntax for +formatting the \code{question} counter. Anyway, here we are. +\secidx*{Motivation} + +\section{License and Requirements}\label{sec:license}\secidx{Requirements} +\cntformats 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.'' + +\cntformats requires the \paket{etoolbox} package. +\secidx*{Requirements} + +\section{Example}\secidx{Example} +A use case typically looks as follows: +\begin{beispiel} + \ReadCounterPattern{se.sse} +\end{beispiel} +where the key \code{se} stands for the current value of the \code{section} counter +and \code{sse} for \code{subsection}, respectively. \code{se.sse} is an example +for what will be called \emph{pattern}. The keys for the counters can have optional +arguments that specify the format: +\begin{beispiel} + \stepcounter{subsection} + \ReadCounterPattern{se[A](sse[r])} +\end{beispiel} +\code{A} stands for \cmd{Alph} and \code{r} for \cmd{roman}. A complete list can +be found in table~\ref{tab:predefined:formats} on page~\pageref{tab:predefined:formats}. +As you can see you can insert arbitrary other tokens in a pattern that won't be +changed. It is important to notice, though, that the patterns are only replaced +if they're \emph{not} placed in a braced group! + +\begin{beispiel} + \ReadCounterPattern{{se[A](sse[r])}} +\end{beispiel} + +I would imagine that the argument to \cmd{ReadCounterPattern} is usually +supplied by a user setting an option \ldots +\begin{beispiel}[code only] + \somesetupcommand{ + counter-format = se[A](sse[r]) + } +\end{beispiel} +\ldots{} and then internally used by the corresponding package or class. +\secidx*{Example} + +\section{Usage}\secidx{Usage} +In the following description of the available commands the symbol \expsign{} +means that the command is expandable, \unexpsign{} means that it isn't. + +In order to make counters known to \cntformats the following commands are used: +\begin{beschreibung} + \Befehl{AddCounterPattern}*[<module>]{<counter>}\ma{<pattern>}\newline + This command will make the (existing) counter \code{<counter>} known to + \cntformats and assign the pattern \code{<pattern>} to it. + \Befehl{NewCounterPattern}*[<module>]{<counter>}\ma{<pattern>}\newline + This command will create a new counter \code{<counter>}, make it known to + \cntformats and assign the pattern \code{<pattern>} to it. + \Befehl{ReadCounterFrom}[<module>]{<counter>}\ma{<internal cmd>}\newline + If you use one of the commands above with the starred version the number for + the pattern is not automatically fetched from the internal \cmd*{c@<counter>}. + This can now be assigned with \cmd{ReadCounterFrom} where \code{<internal cmd>} + is the macro that holds the number. +\end{beschreibung} +The commands above can only be used in the document preamble. + +After the creation of these pattern markers one wants to be able to use them. +There are a number of macros that allow different aspects of usage. +\begin{beschreibung} + \Befehl{ReadCounterPattern}[<module>]{<pattern>}\newline + Reads, interprets and prints a pattern. + \expandable\Befehl{@cntfmts@parsed@pattern}\newline + After \cmd{ReadCounterPattern} has been used the current pattern interpretation + is stored in this macro. The \emph{interpretation} is \emph{not} what is printed. + See the examples below for details. + \Befehl{ReadCounterPatternFrom}[<module>]{<macro that holds pattern>}\newline + Reads, interprets and prints a pattern that's stored in a macro.\\ + Otherwise the same as \cmd{ReadCounterPattern}. + \Befehl{SaveCounterPattern}{<cmd a>}\ma{<cmd b>}\ma{<pattern>}\newline + Saves the \code{<pattern>} in \code{<cmd a>} and the interpreted pattern in + \code{<cmd b>}. + \Befehl{eSaveCounterPattern}[<module>]{<cmd a>}\ma{<cmd b>}\ma{<pattern>}\newline + Saves the \code{<pattern>} in \code{<cmd a>} and the expanded pattern in + \code{<cmd b>}. + \Befehl{SaveCounterPatternFrom}[<module>]{<cmd a>}\ma{<cmd b>}\ma{<macro that + holds pattern>}\newline + Like \cmd{SaveCounterPattern} but reads the pattern from a macro. + \Befehl{eSaveCounterPatternFrom}[<module>]{<cmd a>}\ma{<cmd b>}\ma{<macro that + holds pattern>}\newline + Like \cmd{eSaveCounterPattern} but reads the pattern from a macro. +\end{beschreibung} + +The optional argument \code{<module>} should be specific for a package, say, so +that different patterns for the \code{section} for example don't interfer with +each other. If you leave the argument the default module \code{cntfmts} is used. + +The \ExSheets packages uses the commands with the module \code{exsheets}. +You can find the following lines in \ExSheets' code: +\begin{beispiel}[code only] + \AddCounterPattern*[exsheets]{section}{se} + \ReadCounterFrom[exsheets]{section} \l__exsheets_counter_sec_int + \NewCounterPattern*[exsheets]{question}{qu} + \ReadCounterFrom[exsheets]{question} \l__exsheets_counter_qu_int +\end{beispiel} + +Now let's see a short example that hopefully explains what the macros do: +\begin{beispiel} + % preamble + % \NewCounterPattern{testa}{ta} + \setcounter{testa}{11} + \ReadCounterPattern{ta} + \ReadCounterPattern{ta[a]} \\ + \ttfamily\makeatletter + \meaning\@cntfmts@parsed@pattern + + \bigskip + \SaveCounterPattern\tmpa\tmpb{ta[a]} + \meaning\tmpa \\ + \meaning\tmpb + + \bigskip + \eSaveCounterPattern\tmpa\tmpb{ta[a]} + \meaning\tmpa \\ + \meaning\tmpb +\end{beispiel} +You can see that somehow additional (empty) groups and a \cmd*{relax} found their +way into the interpreted and thus the expanded pattern. This is due to the fact +that reading optional arguments expandably isn't easy and must have some safety +net. +\secidx*{Usage} + +\section{Predefined and New Patterns and Format Keys}\secidx{Predefined Patterns} +\subsection{Predefined Patterns and Format Keys} +\cntformats predefines a number of pattern keys. These are listed in +table~\ref{tab:predefined:patterns}. + +\begin{multicols}{2} +\begin{center} + \centering + \captionof{table}{Predefined Patterns for the module \code{cntfmts}.}\label{tab:predefined:patterns} + \begin{tabular}{>{\ttfamily}l>{\ttfamily}l} + \toprule + \normalfont\bfseries counter & \normalfont\bfseries pattern \\ + \midrule + chapter & ch \\ + section & se \\ + subsection & sse \\ + subsubsection & ssse \\ + paragraph & pg \\ + \bottomrule + \end{tabular} + + \captionof{table}{Predefined Format Keys}\label{tab:predefined:formats} + \begin{tabular}{>{\ttfamily}ll} + \toprule + \normalfont\bfseries key & \normalfont\bfseries format \\ + \midrule + 1 & \cmd{arabic} \\ + a & \cmd{alph} \\ + A & \cmd{Alph} \\ + r & \cmd{roman} \\ + R & \cmd{Roman} \\ + \bottomrule + \end{tabular} +\end{center} +\end{multicols} + +\subsection{New Patterns and Format Keys} +Table~\ref{tab:predefined:formats} lists the predefined formats. If you want you +can add own formats. +\begin{beschreibung} + \Befehl{NewPatternFormat}{<pattern>}\ma{<format>}\newline + \code{<format>} is a number presentation command like \cmd{@alph}, \textit{i.e.}, + it needs a mandatory argument that takes a number. It is used in \code{<format>} + \emph{without} its argument. This command can only be used in the preamble. +\end{beschreibung} + +Here are now a few examples of possible new patterns. Suppose the following code +in the preamble: +\begin{beispiel}[code only] + \usepackage{alphalph,fmtcount} + \newcommand*\myoddnumber[1]{\the\numexpr2*(#1)-1\relax} + + \NewPatternFormat{aa}{\alphalph} + \NewPatternFormat{o}{\ordinalnum} + \NewPatternFormat{x}{\myoddnumber} + + \newcounter{testa} + \NewCounterPattern{testa}{ta} + \setcounter{testa}{4} +\end{beispiel} + +Then we can use the new pattern and the new formats as follows:\setcounter{testa}{4} +\begin{beispiel} + \ReadCounterPattern{ta[aa]} + \ReadCounterPattern{ta[o]} + \ReadCounterPattern{ta[x]} +\end{beispiel} +\secidx*{Predefined Patterns} + +\section{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}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf Binary files differindex 50be4c19ddc..b70f61851f6 100644 --- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf +++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex index 74ed6fdc596..d71603bff11 100644 --- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex +++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex @@ -26,10 +26,21 @@ % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- -% The exsheets package consists of the files +% The exsheets bundle consists of the files % - exsheets.sty, exsheets_headings.def, exsheets_headings.cfg, % exsheets_configurations.cfg, -% - exsheets_en.tex, exsheets_en.pdf, +% exsheets_en.tex, exsheets_en.pdf +% +% - 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 % -------------------------------------------------------------------------- % If you have any ideas, questions, suggestions or bugs to report, please @@ -41,8 +52,9 @@ % https://bitbucket.org/cgnieder/cnpkgdoc/ % the class is licensed LPPL 1.3 or later % -% use `xelatex' and `biber' for compilation +% use `pdflatex' and `biber' for compilation % +\PassOptionsToPackage{supstfm=libertinesups}{superiors} \documentclass[DIV10,toc=index,toc=bib,numbers=noendperiod]{cnpkgdoc} % ---------------------------------------------------------------------------- % document layout and typographic features @@ -50,9 +62,13 @@ pkg = {[load-headings,load-tasks]exsheets} , url = {https://bitbucket.org/cgnieder/exsheets/} , title = the ExSheets bundle , - subtitle = {the packages \ExSheets, \Tasks, \translations and \cntformats\\ + subtitle = {% + the packages \ExSheets, \href{tasks_en.pdf}{\Tasks}, + \href{translations_en.pdf}{\translations} and + \href{cntformats_en.pdf}{\cntformats}\\ \emph{or}\\ - Yet another package for the creation of exercise sheets and exams.} , + Yet another package for the creation of exercise sheets and exams.% + } , name = ExSheets , language = en , modules = true , @@ -170,7 +186,7 @@ \makeindex[options={-s \jobname.ist},intoc,columns=3] \usepackage{csquotes} -\usepackage[backend=biber]{biblatex} +\usepackage[backend=biber,style=alphabetic]{biblatex} \addbibresource{biblatex-examples.bib} \addbibresource{\jobname.bib} @@ -181,49 +197,56 @@ maintainer = {Joseph Wright}, date = {2010-10-11}, version = {2.13}, - url = {http://www.ctan.org/pkg/answers/} + url = {http://mirror.ctan.org/macros/latex/contrib/answers/} } @package{enumitem, title = {enumitem}, author = {Javier Bezos}, date = {2011-09-28}, version = {3.5.2}, - url = {http://www.ctan.org/pkg/enumitem/} + url = {http://mirror.ctan.org/macros/latex/contrib/enumitem/} +} +@package{eqexam, + title = {eqexam}, + author = {D. P. Story}, + date = {2011-09-01}, + version = {3.0k}, + url = {http://mirror.ctan.org/macros/latex/contrib/eqexam/} } @package{exam, title = {exam}, author = {Philip Hirschhorn}, date = {2011-05-22}, version = {2.4}, - url = {http://www.ctan.org/pkg/exam/} + url = {http://mirror.ctan.org/macros/latex/contrib/exam/} } @package{examdesign, title = {examdesign}, author = {Jason Alexander}, date = {2001-03-26}, version = {1.1}, - url = {http://www.ctan.org/pkg/examdesign/} + url = {http://mirror.ctan.org/macros/latex/contrib/examdesign/} } @package{exercise, title = {exercise}, author = {Paul Pichaureau}, date = {2012-05-08}, version = {1.58}, - url = {http://www.ctan.org/pkg/answers/} + url = {http://mirror.ctan.org/macros/latex/contrib/answers/} } @package{multienum, title = {multienum}, author = {Dennis Kletzing}, date = {2005-05-19}, version = {n.n.}, - url = {http://www.ctan.org/pkg/multienum/} + url = {http://mirror.ctan.org/macros/latex/contrib/multienum/} } @package{probsoln, title = {probsoln}, author = {Nicola L. C. Talbot}, - date = {2011-12-10}, - version = {3.02}, - url = {http://www.ctan.org/pkg/probsolns/} + date = {2012-08-23}, + version = {3.04}, + url = {http://mirror.ctan.org/macros/latex/contrib/probsoln/} } \end{filecontents} @@ -338,10 +361,11 @@ It has the status ``maintained.'' \section{Motivation}\secidx[Motivation]{Preliminary} There are already quite a number of packages that allow the creation of exercise -sheets or written exams. Just to name the most common ones: \paket{exam}~\cite{exam}, -\paket{examdesign}~\cite{examdesign}, \paket{exercise}~\cite{exercise}, -\paket{probsoln}~\cite{probsoln}, \paket{answers}~\cite{answers} (and -\href{http://www.ctan.org/characterization/primary/document-types/exams-exercise-sets-and-answers/}{many more}). +sheets or written exams. Just to name the most common ones: +\paket*{eqexam}~\cite{eqexam}, \paket*{exam}~\cite{exam}, +\paket*{examdesign}~\cite{examdesign}, \paket*{exercise}~\cite{exercise}, +\paket*{probsoln}~\cite{probsoln}, \paket*{answers}~\cite{answers} (and many more% +\footnote{see \url{http://www.ctan.org/characterization/primary/document-types/exams-exercise-sets-and-answers/}}). One thing I missed in all packages that I've tried out\footnote{Well, probably I didn't try hard enough\ldots} was a high flexibility in choosing which questions @@ -367,14 +391,14 @@ the \paket*{multienum} package~\cite{multienum}.}. On the other hand \ExSheets doesn't --~and probably won't~-- offer a real possibility for creating multiple choice questions. As a fact it doesn't provide many (if any) means to specify the \emph{type} of question or the structure. If -these are your needs take a look at \paket{examdesign}, for example. Or exploit -the possibilities \paket{enumitem}~\cite{enumitem} gives you. +these are your needs take a look at \paket{examdesign}~\cite{examdesign}, for +example. Or exploit the possibilities \paket{enumitem}~\cite{enumitem} gives you. -I had the idea for this package in 2008. Back then my \TeX\ skills were by far +I had the idea for this package in 2008. Back then my \TeX{} skills were by far not good enough to write it. Actually, even today I wouldn't have been able to realize it without all the l3 packages like \paket*{l3kernel} and \paket*{l3packages}. -I actively began to develop \ExSheets in spring 2011 but it wasn't until now -(September 2012) that I consider it stable enough for wider usage. At the time +I actively began to develop \ExSheets in spring~2011 but it wasn't until now +(September~2012) that I consider it stable enough for 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. @@ -428,6 +452,19 @@ actually lead to the most annoying changes. In this case say 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 \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), though. Right now (April~25th~2013) the separate +documentations do not contain much more information than is written here but they +might, in time, get more details about the corresponding package. + +\section{Thanks} +I need to thank the many users who gave me feedback so far! For one thing this +shows me that \ExSheets is useful to people. It also led to many improvements +like new features and countless bug fixes. \secidx*{Preliminary} \part{The \ExSheets package}\label{part:exsheets}\secidx{\ExSheets}[ExSheets] @@ -814,6 +851,9 @@ You have two possibilities to display and count them: option allows to set an extra word for it. \Option[points]{use-name}{\default{true}|false}\Default{true} Don't display the name at all. Or do. + \Option[points]{format}{<code>}\Default{\cmd*{@firtsofone}} + \sinceversion{0.9d}Format number plus name as a whole. Ideally \code{<code>} would + end with a command that takes an argument. Else number plus name will be braced. \Option[points]{number-format}{<any code>}\Default{} This option allows formatting of the number, \eg italics: \key{number-format}{\cmd{textit}}. @@ -2118,6 +2158,11 @@ will be loaded \cmd*{AtBeginDocument}. \part{The \Tasks package (\tasksversion)}\label{part:tasks} \secidx{\Tasks}[tasks] +\section{About the Documentation} +\noindent\sinceversion{0.9a}The \Tasks package got its own documentation -- +\url{tasks_en.pdf}. This effectively means that the following part won't be +updated any more. Updates will go in the linked file instead. + \section{Motivation}\secidx[Motivation]{\Tasks}[tasks] \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 @@ -2255,6 +2300,11 @@ The environment itself has some more options, namely these: Sets the width of the item labels. \Option{label-offset}{<dim>}\Default{.3333em} \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). \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} @@ -2467,6 +2517,11 @@ This is rather brief this time: \part{The \translations package (\trnsltversion)} \label{part:translations}\secidx{\translations}[translations] +\section{About the Documentation} +\noindent\sinceversion{0.9a}The \translations package got its own documentation -- +\url{translations_en.pdf}. This effectively means that the following part won't be +updated any more. Updates will go in the linked file instead. + \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 @@ -2528,7 +2583,9 @@ These are the commands provided by \translations: specified language. \Befehl{LoadDictionaryFor}{<lang>}\ma{<name>}\newline Loads a file named \code{<name>-<lang>.trsl}. - \Befehl{DeclareDictTranslation}{<key>}\ma{<translation>}% TODO: beschreibung +\Befehl{DeclareDictTranslation}{<key>}\ma{<translation>}\newline + This command is to be used in a dictionary file and picks up the language + of that file. \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 in \code{translations.sty} @@ -2577,6 +2634,11 @@ A typical dictionary file should look as follows: \part{The \cntformats package (\cntfmtsversion)} \label{part:cntformats}\secidx{\cntformats}[cntformats] +\section{About the Documentation} +\noindent\sinceversion{0.5}The \cntformats{} package got its own documentation -- +\url{cntformats_en.pdf}. This effectively means that the following part won't be +updated any more. Updates will go in the linked file instead. + \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 @@ -2601,7 +2663,7 @@ arguments that specify the format: \stepcounter{subsection} \ReadCounterPattern{se[R](sse[a])} \end{beispiel} -\code{A} stands for \cmd{Alph} and \code{r} for \cmd{roman}. A complete list can +\code{R} stands for \cmd{Roman} and \code{a} for \cmd{alph}. A complete list can be found in table~\ref{tab:predefined:formats} on page~\pageref{tab:predefined:formats}. As you can see you can insert arbitrary other tokens in a pattern that won't be changed. diff --git a/Master/texmf-dist/doc/latex/exsheets/tasks_en.pdf b/Master/texmf-dist/doc/latex/exsheets/tasks_en.pdf Binary files differnew file mode 100644 index 00000000000..877e59b6538 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exsheets/tasks_en.pdf diff --git a/Master/texmf-dist/doc/latex/exsheets/tasks_en.tex b/Master/texmf-dist/doc/latex/exsheets/tasks_en.tex new file mode 100644 index 00000000000..7bc73eaac63 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exsheets/tasks_en.tex @@ -0,0 +1,564 @@ +% arara: pdflatex +% arara: biber +% arara: pdflatex +% arara: pdflatex +% -------------------------------------------------------------------------- +% the TASKS package +% +% horizontal columned lists +% +% -------------------------------------------------------------------------- +% 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 tasks 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' and `biber' for compilation +% +\PassOptionsToPackage{supstfm=libertinesups}{superiors} +\documentclass[DIV9,toc=index,toc=bib,numbers=noendperiod]{cnpkgdoc} +% ---------------------------------------------------------------------------- +% document layout and typographic features +\docsetup{ + 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} , + name = tasks , + 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 +\newcommand*\Tasks{{\scshape\textcolor{main}{tasks}}\xspace} +\newcommand*\ExSheets{{\scshape\textcolor{main}{ExSheets}}\xspace} + +\addcmds{ + choice, correct, + DeclareInstance, DeclareTemplateInterface, + leftthumbsup, NewTasks, + s, sample, settasks, task +} + +% ---------------------------------------------------------------------------- +% 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: +\usepackage{exsheets} +\usepackage{dingbat} +\NewTasks[style=multiplechoice]{choices}[\choice](3) +\newcommand*\correct{\PrintSolutionsTF{\checkedchoicebox}{\choicebox}} + +% ---------------------------------------------------------------------------- +% 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} + +\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}{% +% }% +% } + +\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} + +\begin{document} + +\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. +\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.'' + +\Tasks requires packages \paket{l3kernel} ,\paket{xparse}, \paket{l3keys2e}, +\paket{epic}, \paket*{cntformats}\footnote{Part of the \ExSheets bundle}, +\paket{xtemplate} and \paket{environ}. +\secidx*{Requirements} + +\section{How it works} +\subsection{The Basics} +The \code{tasks} environment is similar to a list like \code{enumerate} but not +the same: +\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}. +\end{itemize} + +\begin{beschreibung} + \Umg{tasks}[<options>]{\unskip\da{<num of columns>} \cmd{task}\ldots} +\end{beschreibung} +Let's see an example: +\begin{beispiel}[code only] + % \sample is defined to contain some sample text: + % \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} + Some text before the list. + \begin{tasks} + \task \sample + \task \sample + \task \sample + \end{tasks} + And also some text after it. +\end{beispiel} +Some text before the list. +\begin{tasks} + \task \sample + \task \sample + \task \sample +\end{tasks} +And also some text after it. + +The environment takes the optional argument \da{<num of columns>} with which the +number of columns used by the environment is specified. +\begin{beispiel}[code only] + \begin{tasks}(2) + \task \sample + \task \s\ \s + \task \s + \task \sample + \task \s\par\s + \end{tasks} +\end{beispiel} +\begin{tasks}(2) + \task \sample + \task \s\ \s + \task \s + \task \sample + \task \s\par\s +\end{tasks} + +\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 +with the following command: +\begin{beschreibung} + \Befehl{startnewitemline} +\end{beschreibung} +\begin{beispiel}[code only] + \begin{tasks}(4) + \task the first + \task the second + \task the third + \task the fourth + \task \rlap{the fifth item is way too long for this so we start a new row} \startnewitemline + \task the sixth + \task the seventh + \task \rlap{the eighth item also is too long} \startnewitemline + \task the nineth + \task the tenth + \end{tasks} +\end{beispiel} +\begin{tasks}(4) + \task the first + \task the second + \task the third + \task the fourth + \task \rlap{the fifth item is way too long for this so we start a new row} \startnewitemline + \task the sixth + \task the seventh + \task \rlap{the eighth item also is too long} \startnewitemline + \task the nineth + \task the tenth +\end{tasks} + +\section{Available Options}\secidx{Options}\label{sec:tasks:options} +The \Tasks package has one package option which also is called when you load +\ExSheets with the \key{load-tasks} option. +\begin{beschreibung} + \Option{more}\newline + load additional instances for the \code{tasks} object, details are explained + later in section~\ref{sec:tasks:instances}. +\end{beschreibung} + +The environment itself has some more options, namely these: +\begin{beschreibung} + \Option{style}{<instance>}\Default{} + Choose the instance to be used. Read more on this in section~\ref{sec:tasks}. + \Option{counter-format}{<counter specs>}\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}. + \Option{label-format}{<code>}\Default{} + \changedversion{0.9}Can be used to apply a formatting like, \emph{e.g.}, + \cmd*{bfseries} to the labels. + \Option{label}{<code>}\Default{} + \changedversion{0.9}Overwrite the automatic label to a custom one. + \Option{label-width}{<dim>}\Default{1em} + Sets the width of the item labels. + \Option{label-offset}{<dim>}\Default{.3333em} + \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). + \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} + \Option{before-skip}{<skip>}\Default{0pt} + Sets the skip before the list. + \Option{after-skip}{<skip>}\Default{0pt} + Sets the skip after the list. + \Option{after-item-skip}{<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. +\end{beschreibung} +These options can also be set using a setup command: +\begin{beschreibung} + \Befehl{settasks}{<options>} +\end{beschreibung} + +Now the same list as above but with three columns and a different label: +\begin{beispiel}[code only] + \begin{tasks}[counter-format=(tsk[r]),label-width=4ex](3) + \task \sample + \task \s\ \s + \task \s + \task \sample + \task \s\par\s + \end{tasks} +\end{beispiel} +\begin{tasks}[counter-format=(tsk[r]),label-width=4ex](3) + \task \sample + \task \s\ \s + \task \s + \task \sample + \task \s\par\s +\end{tasks} + +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; + \settasks{ + counter-format = qu.tsk , + item-indent = 2em , + label-width = 2em , + label-offset = 0pt + } + \begin{question}[type=exam]{4} + I have these two tasks for you. Shall we begin? + \begin{tasks}(2) + \task The first task: easy! + \task The second task: even more so! + \end{tasks} + \end{question} + \begin{solution}[print] + Now, let's see\ldots\ ah, yes: + \begin{tasks} + \task This is the first solution. Told you it was easy. + \task This is the second solution. And of course you knew that! + \end{tasks} + \end{solution} +\end{beispiel} +\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: +\begin{description} + \item[itemize] uses \cmd{labelitemi} as labels. + \item[enumerate] enumerates the items with 1., 2., \ldots + \item[multiplechoice] a --~well~-- `multiple choice' list. +\end{description} +\begin{beispiel} + \begin{tasks}[style=itemize](2) + \task that's just how\ldots + \task \ldots we expected + \end{tasks} + \begin{tasks}[style=enumerate](2) + \task that's just how\ldots + \task \ldots we expected + \end{tasks} + \begin{tasks}[style=multiplechoice](2) + \task that's just how\ldots + \task \ldots we expected + \end{tasks} +\end{beispiel} + +\section{Custom Labels}\secidx{Custom Labels} +If you want to change a single label inside a list, you can use the optional +argument of \cmd{task}. This will temporarily overwrite the default label. +\begin{beispiel} + \begin{tasks}[style=itemize] + \task a standard item + \task another one + \task[+] a different one + \task and another one + \end{tasks} +\end{beispiel} +\secidx*{Custom Labels} + +\section{New Tasks}\secidx{Own Environments} +It is possible to add custom environments that work like the \code{tasks} environment. +\begin{beschreibung} + \Befehl{NewTasks}[<options>]{<name>}\oa{<separator}\da{<cols>}\newline + Define environment \ma{<name>} that uses \code{<separator>} to introduce a + new item. Default for \code{<separator>} is \cmd{task}, default for + \code{<cols>} is \code{1}. The \code{<options>} are the ones described in + section~\ref{sec:tasks:options}. + \Befehl{RenewTasks}[<options>]{<name>}\oa{<separator}\da{<cols>}\newline + Renew environment previously defined with \cmd{NewTasks}. +\end{beschreibung} +The \code{tasks} environment is defined as follows: +\begin{beispiel}[code only] + \NewTasks{tasks} +\end{beispiel} + +The separator does not have to be a control sequence: +\begin{beispiel} + % preamble: + % \usepackage{dingbat} + \NewTasks[label=\footnotesize\leftthumbsup,label-width=1.3em]{done}[*] + \begin{done} + * First task + * Second Task + \end{done} +\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 +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 +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: +\begin{beispiel} + % preamble: + % \NewTasks[style=multiplechoice]{choices}[\choice](3) + % \newcommand*\correct{\PrintSolutionsTF{\checkedchoicebox}{\choicebox}} + % + % \PrintSolutionsTF and the {question} environment are provided + % by the ExSheets package + \begin{question} + \begin{choices} + \choice First choice + \choice Second choice + \choice[\correct] Third choice + \end{choices} + \end{question} + \begin{solution}[print] + \begin{choices} + \choice First choice + \choice Second choice + \choice[\correct] Third choice + \end{choices} + \end{solution} +\end{beispiel} + +The last example shows you two additional commands: +\begin{beschreibung} + \Befehl{choicebox} \choicebox + \Befehl{checkedchoicebox} \checkedchoicebox +\end{beschreibung} +\secidx*{Own Environments} + +\section{Styling \Tasks} +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. + +\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 their usage. + +\begin{beispiel}[code only] + \DeclareTemplateInterface{tasks}{default}{3} + { + % option : type = default + enumerate : boolean = true , + label : tokenlist , + indent : length = 2.5em , + counter-format : tokenlist = tsk[a]) , + label-format : tokenlist , + label-width : length = 1em , + label-offset : length = .3333em , + after-item-skip : skip = 1ex plus 1ex minus 1ex + } +\end{beispiel} + +\subsubsection{Predefined Instances} +This is rather brief this time: +\begin{beispiel}[code only] + % ALPHABETIZE: a) b) c) + \DeclareInstance{tasks}{alphabetize}{default}{} + % available when `load-tasks=true': + % ITEMIZE: + \DeclareInstance{tasks}{itemize}{default} + { + enumerate = false , + label-width = 1.125em + } + % ENUMERATE: + \DeclareInstance{tasks}{enumerate}{default} + { counter-format = tsk. } + % MULTIPLECHOICE: + \DeclareInstance{tasks}{multiplechoice}{default} + { + enumerate = false , + label = \choicebox , + } +\end{beispiel} +\secidx*{The `tasks' Object} + +\printindex + +\end{document} diff --git a/Master/texmf-dist/doc/latex/exsheets/translations_en.pdf b/Master/texmf-dist/doc/latex/exsheets/translations_en.pdf Binary files differnew file mode 100644 index 00000000000..8252b58e4de --- /dev/null +++ b/Master/texmf-dist/doc/latex/exsheets/translations_en.pdf diff --git a/Master/texmf-dist/doc/latex/exsheets/translations_en.tex b/Master/texmf-dist/doc/latex/exsheets/translations_en.tex new file mode 100644 index 00000000000..81dd771c158 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exsheets/translations_en.tex @@ -0,0 +1,335 @@ +% 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}{foo}{foo} +\DeclareTranslation{British}{foo}{bar} + +% ---------------------------------------------------------------------------- +% 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} +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 +very likely no need whatsoever for this package as \paket*{translator} from the +\paket{beamer} bundle provides very similar functionality \translations does +(except for: \paket{translator}'s \cmd{translate} isn't expandable, +\cmd{GetTranslation} is.). +\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}{<lang>}\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}{<lang2>}\ma{<lang1>}\newline + 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. + This command can only be used in the preamble. + \Befehl{RenewTranslation}{<lang>}\ma{<key>}\ma{<translation>}\newline + Redefines a translation of key \code{<key>} for the language \code{<lang>}. + An error will be raised if no translation of \code{<key>} exists. + This command can only be used in the preamble. + \Befehl{DeclareTranslation}{<lang>}\ma{<key>}\ma{<translation>}\newline + 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. + \expandable\Befehl{GetTranslation}{<key>}\newline + Fetches and prints the translation of \code{<key>} for the currently active + language (as for example set by \paket{babel}). This command is expandable. + \Befehl{SaveTranslationFor}{<cmd>}\ma{<lang>}\ma{<key>}\newline + 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>} 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 + 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}{<lang>}\ma{<name>}\newline + Loads a file named \code{<name>-<lang>.trsl}. + \Befehl{DeclareDictTranslation}{<key>}\ma{<translation>}\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 in \code{translations.sty} +if the language doesn't already exist. + +\subsection{A Small Example} +Here is a small example of usage: +\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} + +There is also 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} + +\subsection{Usage in Packages} +In package 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} + + +\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}[<version info>] + \DeclareDictTranslation{kitchen (housing)}{K\"uche} + \DeclareDictTranslation{bathroom (housing)}{Bad} + \DeclareDictTranslation{living room (housing)}{Wohnzimmer} + \DeclareDictTranslation{bedroom (housing)}{Schlafzimmer} + ... + \endinput +\end{beispiel} + +\secidx*{Usage} + +\section{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}
\ No newline at end of file |