texlive[47223] Master: exercisebank (2apr18)

commits+karl at tug.org commits+karl at tug.org
Mon Apr 2 00:20:16 CEST 2018


Revision: 47223
          http://tug.org/svn/texlive?view=revision&revision=47223
Author:   karl
Date:     2018-04-02 00:20:15 +0200 (Mon, 02 Apr 2018)
Log Message:
-----------
exercisebank (2apr18)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/exercisebank/
    trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt
    trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip
    trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.pdf
    trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex
    trunk/Master/texmf-dist/tex/latex/exercisebank/
    trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty
    trunk/Master/tlpkg/tlpsrc/exercisebank.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt	2018-04-01 22:20:15 UTC (rev 47223)
@@ -0,0 +1,34 @@
+Exercisebank:
+A tool for creating and managing exercise sets in maths, physics, statistics and the like.
+
+Files:
+- exercisebank.sty : The exercise bank
+- exercisebank.pdf : Description of how the package works
+- example.zip : containing example
+  |-- example.tex : example of use
+  |-- exercises/ : Directory containing exercises that could be use
+  |---| -- firstexercise.tex: example exercise
+  |---| -- secondexercise.tex: example exercise
+  |---| -- thirdexercise.tex: example exercise
+
+Author: Storvik Strauman, Andreas
+
+For bug report, inquires, contributed or anything else:
+https://github.com/Strauman/exerciseBank
+
+Licence:
+
+The LaTeX package exercisebank - version 0.0.2-1 (2018/04/01)
+exercisebank.sty: Exercise bank
+-------------------------------------------------------------------------------------------
+Copyright (c) 2018 by Andreas Storvik Strauman
+-------------------------------------------------------------------------------------------
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+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.3c or later is part of all distributions of LaTeX
+version 2008/05/04 or later.
+This work has the LPPL maintenance status `author-maintained'.
+This work consists of all files listed in README


Property changes on: trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip	2018-04-01 07:40:11 UTC (rev 47222)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip	2018-04-01 22:20:15 UTC (rev 47223)

Property changes on: trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.pdf	2018-04-01 07:40:11 UTC (rev 47222)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.pdf	2018-04-01 22:20:15 UTC (rev 47223)

Property changes on: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex	2018-04-01 22:20:15 UTC (rev 47223)
@@ -0,0 +1,170 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This is a generated file %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass{article}
+\usepackage[all]{tcolorbox}
+\input{styling}
+\input{preamble}
+\let\dac\docAuxCommand
+\tcbset{documentation listing style=mydocumentation}
+
+\setlength{\parindent}{0pt}
+\author{Andreas Strauman}
+\begin{document}
+\maketitle
+\tableofcontents
+\clearpage
+\input{intro}
+\section{Reference}
+\subsection{Environments}
+\begin{docEnvironment}[]{problem}{}
+ Inside the exercises folder, you keep your exercises. Inside there you'd use a problem environment to write your partproblems. It might be a little confusing that you're using \dac{begin}\{problem\} instead of \dac{begin}\{partproblem\} when you're writing a partproblem, but it's less typing.
+\begin{marker}\dac{end}\{problem\} has to be on it's own line without any leading spaces!\end{marker}
+
+\end{docEnvironment}
+
+\begin{docEnvironment}[]{solution}{}
+ Things inside here is only visible if \refCom{DisplaySolutions} are given before \dac{begin}\{document\}
+\begin{marker}\dac{end}\{solution\} has to be on it's own line without any leading spaces!\end{marker}
+
+\end{docEnvironment}
+
+\begin{docCommand}[]{DisplaySolutions}{}
+ Turns on the solutions, so they are shown.
+
+\end{docCommand}
+
+\begin{docEnvironment}[]{intro}{}
+ Sometimes you'd want to introcude your exercises and tell a little bit about it. Maybe have a figure there also. Those things should go inside this environment. This can be treated as a problem in terms of counting. See \refCom{makeset} for more info.
+\begin{marker}\dac{end}\{intro\} has to be on it's own line without any leading spaces!\end{marker}
+
+\end{docEnvironment}
+
+\subsection{Internationalization}
+\begin{docCommand}[]{translateExBank}{\marg{Translation key/vals}}
+ This is to translate the text inside the package. As of now the available key/values are
+\begin{itemize}
+\item Problem
+\item Solution
+\end{itemize}
+
+\end{docCommand}
+
+ The Norwegian translation would then be done with
+
+
+\begin{dispListing}
+ \translateExBank{Problem=Oppgave, Solution=Løsning}
+
+\end{dispListing}
+
+\subsection{Triggers}
+\begin{docCommand}[]{Trigger}{\marg{Any Macro}}
+ See \refCom{At}\\
+Available triggers:\\
+ \dac{At}\dac{InputExercise}\\ Triggers before a file is included\\
+\dac{At}\dac{BeginProblem}\\ Triggers before a file is included, but only if problem headers are to be written (no [nohead] given)\\
+\dac{At}\dac{EndProblem}\\ Triggers right after problem is included if [nohead] \emph{not} given\\
+\dac{At}\dac{BeginBuildset}\\ Triggers right before a set has begun building (not if \dac{sprite} is used). You might want to put your set-header here\\
+\dac{At}\dac{EndBuildset}\\ Triggers when a set has stopped building (not if \dac{sprite} is used)\\
+
+
+\end{docCommand}
+
+\subsection{General reference}
+\begin{docCommand}[]{ownLineNoSpacesGotIt}{}
+ This is to annoy the user enough to get his attention about the requirements of the \refEnv{problem}, \refEnv{solution} and \refEnv{intro} environments.\\
+ Compilation wont work unless \dac{end}\{problem\}, \dac{end}\{solution\} and \dac{end}\{intro\} are on their own lines and without any spaces. This warning can be removed by doing \dac{def}\dac{ownLineNoSpacesGotIt}{} before \dac{usepackage}\{exbank\}.
+
+\end{docCommand}
+
+\begin{docCommand}[]{setExercisesDir}{\marg{directory}}
+ This is the directory, relative to the file you included the package,
+ where the package should be looking for exercises. Default is \texttt{exercises}
+
+\end{docCommand}
+
+
+
+ This package also includes some extra stuff. For example the \dac{At} and \dac{Trigger}
+
+
+\begin{docCommand}[]{At}{\marg{AnyMacro}}
+Here you can send any macro because it isn't evaluated! For example \dac{At}\dac{BeginSomething} is fine and even if \dac{BeginSomething} is not defined. Also and when using \dac{Trigger} it just ignores it if it didn't exist. It's pretty similar in function as to \dac{AtBeginDocument}.
+
+\end{docCommand}
+
+\begin{dispListing}
+\At\BeginSomething{DoSomething}
+ Which is triggered with
+ \Trigger\BeginSomething, this evaluates to DoSomething
+
+\end{dispListing}
+
+\subsection{Making sets}
+\begin{docCommand}[]{makeset}{\oarg{intro,nohead}\marg{filable}}
+ This command is the one you use to make a set! Later you use \dac{buildset} to build the sets you make. The \meta{filable} argument is either the name of the file relative to the \dac{exerciseDir}-path (default its in the root called exercises), or you could use the \dac{select} or \dac{exclude} to  respectively cherry pick or exclude exercises. (See their docs).\\
+ \oarg{intro} this counts the intro environment as a part problem, so that you can \dac{select} or \dac{exclude} the intro\\
+ \oarg{nohead} prevents the builder from adding a problem header. This is handy if you want to create an exercise that is composed of multiple parts. You can use the \dac{phead} to insert the problem header where you want it
+
+\end{docCommand}
+
+\begin{dispListing}
+ \makeset[nohead]\{\phead, \select{myexercise}{1,2,3}}
+
+\end{dispListing}
+
+\begin{docCommand}[]{exclude}{\marg{exerciseFileName}\marg{Comma separated numbers}}
+As you can see in the intro section of the documentation, this is for excluding partproblems
+To be used in \refCom{makeset}
+
+\end{docCommand}
+
+\begin{docCommand}[]{select}{\marg{exerciseFileName}\marg{Comma separated numbers}}
+As you can see in the intro section of the documentation, this is for cherry picking partproblems
+To be used in \refCom{makeset}
+
+\end{docCommand}
+
+
+
+\begin{docCommand}[]{about}{\marg{text}}
+ This contains information about an exercise set. It is intended to be on the top of an
+ exercise, explaining short what the exercise is about. It's only visible when using \dac{sprite}
+
+\end{docCommand}
+
+\begin{docCommand}[]{sprite}{\oarg{PiP}}
+ This is a way to visualize all exercises. It takes one optional argument which is how many pages
+ inside one page. Defaults to 4
+ \begin{marker}If \dac{sprite} is used, it should be the only command in \dac{begin}\{document\}\dac{end}\{document\}\end{marker}
+
+\end{docCommand}
+
+
+
+\begin{docCommand}[]{pplabel}{\marg{label}}
+ Labels a partproblem. You can reference to it later using \dac{ppref}\{\meta{label\}}
+
+\end{docCommand}
+
+\begin{docCommand}[]{ppref}{\marg{label}}
+ Reference a partproblem created by \dac{pplabel}\{\meta{label\}}. This prints e.g. 1c)
+
+\end{docCommand}
+
+\begin{docCommand}[]{ppref}{\marg{label}}
+ Reference a partproblem created by \dac{pplabel}\{\meta{label\}}. This prints e.g. 1
+
+\end{docCommand}
+
+\subsection{Counters}
+
+
+\docCounter{problemcounter}-counter holds the current problem number and
+\docCounter{partproblemcounter}-counter holds the current partproblem \emph{number}.
+
+
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty	2018-04-01 22:20:15 UTC (rev 47223)
@@ -0,0 +1,336 @@
+% Source (with comments) can be found at https://github.com/Strauman/exerciseBank
+%% The LaTeX package exercisebank - version 0.0.2-1 (2018/04/01)
+%% exercisebank.sty: Exercise bank
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2018 by Andreas Storvik Strauman <andreas dot s dot strauman at uit dot no>
+%% -------------------------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% 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.3c or later is part of all distributions of LaTeX
+%% version 2008/05/04 or later.
+%% This work has the LPPL maintenance status `author-maintained'.
+%% This work consists of all files listed in README
+\ProvidesPackage{exercisebank}[2018/04/01 v0.0.2-1 Creates a setup that gives freedom in making sets and exercises.]
+\@ifundefined{ownLineNoSpacesGotIt}{\@latex at warning{Compilation wont work unless \string\end{problem} and \string\end{solution} are on their own lines and without any spaces. This warning can be removed by doing \string\def\string\ownLineNoSpacesGotIt{} before \string\usepackage{exbank}}
+}{}
+\gdef\setExercisesDir#1{\gdef\exercisesDir{#1}}
+\@ifundefined{exercisesDir}{\gdef\exercisesDir{exercises}
+}{}
+\global\let\incl = \input
+\usepackage{xstring}
+\usepackage{pgffor}
+\usepackage{scrextend}
+\usepackage{comment}
+\usepackage{calc}
+\usepackage{pgfpages}
+\usepackage{geometry}
+\pgfkeys{ /exbanki18n/.is family, /exbanki18n,
+  default/.style = {Problem = Problem, Solution = Solution},
+  Problem/.estore in = \@tr at Problem,
+  Solution/.estore in = \@tr at Solution
+}
+\newcommand{\translateExBank}[1]{  \pgfkeys{/exbanki18n, default, #1}%
+}
+\translateExBank{}
+\gdef\@tr#1{\@ifundefined{@tr@#1}{#1}{  \csname @tr@#1\endcsname
+}
+}
+\let\ea = \expandafter
+\def\removebs#1{\if#1\@backslashchar\else#1\fi}
+\newcommand{\At}[2]{  \def\macname{\expandafter\removebs\detokenize{#1}}
+  \let\mname = \macname
+  \ifcsname At@\mname\endcsname
+    \ea\g at addto@macro\csname At@\mname\endcsname{#2}
+  \else
+    \ea\gdef\csname At@\mname\endcsname{#2}
+  \fi
+}
+\newcommand{\Trigger}[1]{  \def\macname{\expandafter\removebs\detokenize{#1}}
+  \let\mname = \macname
+  \@ifundefined{At@\mname}{}{\csname At@\mname\endcsname}
+}
+\def\ppLeading{4em}
+\def\pMarginBelow{1em}
+\def\pMarginAbove{1em}
+\def\pMarginLeft{-1.5em}
+\def\ppMargin{1em}
+\def\solMargin{\dimexpr\ppMargin+\ppMargin\relax}
+\def\vsSize{1em}
+\def\vs{\vspace{\vsSize}}
+\newcounter{problemcounter}
+\setcounter{problemcounter}{0}
+\newcounter{partproblemcounter}
+\At\VeryBeginProblem{  \stepcounter{problemcounter}
+  \setcounter{partproblemcounter}{1}
+  \vspace*{\pMarginAbove}
+  \begin{addmargin}{\pMarginLeft}
+    {\normalfont\Large\bfseries\@tr{Problem}~\theproblemcounter}
+  \end{addmargin}
+  \vspace*{\pMarginBelow}
+}
+\At\BeginPartproblem{	\vspace{\ppMargin}%
+	 \begin{addmargin}{\ppMargin}%
+\large\hspace*{-\ppMargin}\textbf{(\theproblemcounter\alph{partproblemcounter})}\normalsize
+  \stepcounter{partproblemcounter}
+}
+\At\EndPartproblem{\hfill
+\end{addmargin}\vspace*{0.5em}
+}
+\At\BeginSolution{  \vspace*{1em}
+  \begin{addmargin}{\solMargin}%
+\hspace*{-\solMargin}\large{\textbf{\@tr{Solution}:}}\normalsize
+}
+\At\EndSolution{  \end{addmargin}\vspace*{1em}
+}
+\gdef\isFalse{0}
+\gdef\isTrue{1}
+\gdef\DisplayProblem{\isTrue}
+\gdef\@displayMetaCounter{\isFalse}
+\gdef\ShowNumbers{\gdef\@displayMetaCounter{\isTrue}}
+\gdef\@DisplaySolutions{\isFalse}
+\gdef\DisplaySolutions{\xdef\@DisplaySolutions{\isTrue}\@latex at warning{Showing solutions}}
+\AtBeginDocument{  \if\@DisplaySolutions\isFalse
+    \@latex at warning{Hiding solutions. Show them with \string\DisplaySolutions}
+  \fi
+}
+\global\let\do at ProcessCutFile = \ProcessCutFile
+\gdef\showhideproblem#1{%
+  \if\@displayMetaCounter\isTrue%
+    {P:\Large\themetacounter}
+    \Trigger\BeginPartproblem
+    \gdef\DisplayProblem{\isTrue}
+  \else
+    \if\DisplayProblem\isFalse
+      \def\ProcessCutFile{}
+    \else
+      #1
+    \fi
+  \fi
+}
+\generalcomment{problem}{  \edef\DisplaySolution{\@DisplaySolutions}
+  \Trigger\DecideProblemDisplay
+  \begingroup
+     \showhideproblem{\Trigger\BeginPartproblem}
+}{    \if\DisplayProblem\isFalse\else
+      \Trigger\EndPartproblem
+    \fi
+  \endgroup
+}
+\generalcomment{solution}
+{\Trigger\AtBeginSolutionHard
+\begingroup
+  \if\@DisplaySolutions\isTrue
+    \if\DisplayProblem\isFalse
+      \xdef\DisplaySolution{\isFalse}
+    \fi
+  \fi
+  \if\DisplaySolution\isTrue
+    \Trigger\BeginSolution
+  \else
+    \def\ProcessCutFile{}
+  \fi
+}{\if\DisplaySolution\isTrue
+\Trigger\EndSolution
+\fi
+\Trigger\EndSolutionHard
+\endgroup
+}
+\generalcomment{intro}{  \if\@countIntros\isTrue
+    \Trigger\DecideProblemDisplay
+    \begingroup
+    \showhideproblem{\Trigger\BeginIntro}
+  \fi
+}{  \if\@countIntros\isTrue
+    \Trigger\EndIntro
+    \endgroup
+  \fi
+}
+\gdef\isin#1#2#3#4{  \def\needle{#2}
+  \def\haystack{#1}
+  \def\isFalse{0}
+  \let\isInList = \isFalse
+  \IfInteger{\haystack}{    \if\haystack\needle
+    #3
+    \else
+    #4
+    \fi
+}{  \foreach\pp in #1{    \if\pp\needle
+      \gdef\isInList{1}
+      #3
+    \fi
+}
+  \if\isInList\isFalse
+    #4
+  \fi
+}
+}
+\def\squeeze{  \newlength{\marginw}
+  \setlength{\marginw}{1.5cm}
+  \newgeometry{margin=\marginw}
+  \renewcommand{\topfraction}{0.85}
+  \renewcommand{\bottomfraction}{0.85}
+  \renewcommand{\textfraction}{0.1}
+  \renewcommand{\floatpagefraction}{0.85}
+  \renewcommand{\dbltopfraction}{0.85}
+  \renewcommand{\dblfloatpagefraction}{.85}
+  \setcounter{topnumber}{25}
+  \setcounter{bottomnumber}{25}
+  \setcounter{totalnumber}{25}
+  \setcounter{dbltopnumber}{25}
+  \renewcommand{\baselinestretch}{0.9}
+  \let\markeverypar\everypar
+  \newtoks\everypar
+  \everypar\markeverypar
+  \markeverypar{\the\everypar\looseness=-1\relax}
+  \g at addto@macro\define at newfont{%
+    \fontdimen2\font at name=0.8\fontdimen2\font at name
+}%
+  \fontdimen2\font at name=0.8\fontdimen2\font at name
+    \thinmuskip=0mu plus 3mu
+    \medmuskip=1mu plus 4mu
+    \thickmuskip=2mu plus 5mu
+    \abovedisplayskip=0pt plus 3pt
+    \belowdisplayskip=0pt plus 3pt
+    \abovedisplayshortskip=0pt plus 3pt
+    \belowdisplayshortskip=0pt plus 3pt
+}
+\let\ea = \expandafter
+\newcounter{metacounter}
+\def\emptyList{-1}
+\begingroup\lccode`\|=`\\
+\lowercase{\endgroup\def\removebs#1{\if#1|\else#1\fi}}
+\newcommand{\macroname}[1]{\expandafter\removebs\string#1}
+\gdef\ifppMode#1{  \def\mname{\macroname{#1}}
+  \if\mname\ppMode
+}
+\gdef\isppMode#1#2{  \edef\mname{\macroname{#1}}
+  \if{\macroname{#1}}\ppMode#2\fi
+}
+\gdef\@noneofone#1{}
+\gdef\@noneOfTwo#1#2{}
+\gdef\@ifppMode#1{%
+\ifnum\pdfstrcmp{\macroname{#1}}{\ppMode}=\z@%
+\expandafter\@firstofone%
+\else%
+\expandafter\@noneofone%
+\fi%
+}%
+\def\pm at Exclude{exclude}
+\def\pm at Select{select}
+\let\ipm\@ifppMode
+\let\T@\isTrue
+\let\F@\isFalse
+\At\DecideProblemDisplay{  \if\ppList\emptyList
+    \xdef\DisplayProblem{\ipm\exclude\T@\ipm\select\F@}
+  \else
+    \isin{\ppList}{\themetacounter}{      \xdef\DisplayProblem{\ipm\exclude\F@\ipm\select\T@\ipm\normal\T@}
+}{      \xdef\DisplayProblem{\ipm\exclude\T@\ipm\select\F@\ipm\normal\T@}
+}
+  \fi
+  \stepcounter{metacounter}
+}
+\pgfkeys{ /makeset/.is family, /makeset,
+ default/.style = {noheadarg=\isFalse, introarg=\isFalse},
+ intro/.style = {introarg=\isTrue},
+ nohead/.style = {noheadarg=\isTrue},
+ introarg/.estore in = \introarg,
+ noheadarg/.estore in = \noheadarg
+}
+\gdef\@listOfSets{}
+\gdef\@spriteMode{\isFalse}
+\newcommand\makeset[3][]{  \pgfkeys{/makeset, default, #1}%
+  \if\introarg\isTrue%
+    \ea\gdef\csname setlist@#2 at intro\endcsname{\isTrue}
+  \fi
+  \if\noheadarg\isTrue%
+    \ea\gdef\csname setlist@#2 at nohead\endcsname{\isTrue}
+  \fi
+  \ea\gdef\csname setlist@#2\endcsname{#3}
+  \def\setmacro{\unexpanded\expandafter{\csname setlist@#2\endcsname}}
+  \g at addto@macro\@listOfSets{#2}
+}
+\long\gdef\about#1{}
+\newcommand\sprite[1][4]{\squeeze
+\gdef\@spriteMode{\isTrue}
+\long\def\about##1{{\Large\textbf{About}:\\[1.1em]##1\\[1.5em]}}
+\pgfpagesuselayout{#1 on 1}[a4paper,border shrink=5mm]
+  \foreach\set in \@listOfSets{    \buildset{\set}
+}
+}
+\newcommand{\redef}[3][{-1}]{  \if\@spriteMode\isFalse%
+    \gdef\ppList{#1}
+    \gdef\exerciseFile{#2}
+    \gdef\ppMode{#3}
+  \else
+    \gdef\ppList{}
+    \gdef\exerciseFile{#2}
+    \gdef\ppMode{exclude}
+\fi
+}
+\newcommand{\exclude}[2]{[{#2}]{#1}{exclude}}
+\newcommand{\select}[2]{[{#2}]{#1}{select}}
+\gdef\buildex#1{  \makeset{#1}{#1}
+  \buildset{#1}
+}
+\gdef\@countIntros{\isFalse}
+\gdef\phead{?\noexpand\Trigger\noexpand\VeryBeginProblem}
+\newcommand\buildset[2][]{  \def\oarg{#1}
+  \@ifundefined{setlist@#2 at intro}{\gdef\@countIntros{\isFalse}}{\gdef\@countIntros{\isTrue}\@latex at warning{Counting intros}}
+  \@ifundefined{setlist@#2 at nohead}{\gdef\nohead{\isFalse}}{\gdef\nohead{\isTrue}}
+  \xdef\setName{#2}
+  \@ifundefined{setlist@#2}{    \@latex at error{Couldn't find set #2. Did you remember to do \string\makeset{#2}{}?}
+    \stop
+}{}
+  \edef\setlist{\csname setlist@#2\endcsname}
+  \if\@spriteMode\isFalse
+    \Trigger\StartBuildset
+  \fi
+  \foreach\exerciseFileInfo in \setlist{    \def\continueLoop{\isTrue}
+    \gdef\ppList{-1}
+    \setcounter{metacounter}{1}
+    \StrLeft{\exerciseFileInfo}{1}[\firstchar]%
+    \if[\firstchar
+      \ea\redef\exerciseFileInfo\relax
+      \def\continueLoop{\isTrue}
+    \else\if?\firstchar
+        \expandafter\@secondoftwo\exerciseFileInfo
+      \def\continueLoop{\isFalse}
+    \else
+        \redef{\exerciseFileInfo}{normal}
+        \def\continueLoop{\isTrue}
+    \fi\fi
+    \if\continueLoop\isTrue
+    \Trigger\InputExercise
+    \if\nohead\isFalse
+      \if\@spriteMode\isFalse
+        \Trigger\BeginProblem
+      \fi
+    \fi
+    \if\nohead\isFalse\Trigger\VeryBeginProblem\fi
+    \if\@spriteMode\isTrue\textbf{\exerciseFile.tex\\}\fi
+    \incl{\exercisesDir/\exerciseFile}
+    \if\nohead\isFalse\Trigger\EndProblem\fi
+    \fi
+}
+  \if\@spriteMode\isFalse
+    \Trigger\EndBuildset
+  \fi
+}
+\newcommand\refcounter[1]{\edef\@currentlabel{#1}%
+}
+\DeclareRobustCommand{\pplabel}[1]{	\refcounter{\theproblemcounter}\label{pr:\exerciseFile:#1}
+	\refcounter{\thepartproblemcounter}\label{pp:\exerciseFile:#1}
+}
+\let\pptag = \pplabel
+\newcommand\pppref[1]{%
+(\ref{pp:\exerciseFile:#1})\relax%
+}
+\newcommand\ppref[1]{%
+\ref{pr:\exerciseFile:#1}\ref{pp:\exerciseFile:#1}\relax%
+}
+\newcommand\pref[1]{%
+\ref{pr:\exerciseFile:#1}\relax%
+}


Property changes on: trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-04-01 07:40:11 UTC (rev 47222)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-04-01 22:20:15 UTC (rev 47223)
@@ -253,7 +253,7 @@
     euler eulerpx eulervm euro euro-ce europasscv europecv eurosym
     everyhook everypage
     exam exam-n examdesign example examplep
-    exceltex excludeonly exercise exercises exp-testopt
+    exceltex excludeonly exercise exercisebank exercises exp-testopt
     expdlist expex export expressg exsheets exsol extarrows exteps
     extpfeil extract extsizes
   facsimile factura facture faktor

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2018-04-01 07:40:11 UTC (rev 47222)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2018-04-01 22:20:15 UTC (rev 47223)
@@ -379,6 +379,7 @@
 depend exceltex
 depend excludeonly
 depend exercise
+depend exercisebank
 depend exercises
 depend exp-testopt
 depend expdlist

Added: trunk/Master/tlpkg/tlpsrc/exercisebank.tlpsrc
===================================================================


More information about the tex-live-commits mailing list