texlive[47286] Master/texmf-dist: exercisebank (4apr18)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 4 22:17:27 CEST 2018


Revision: 47286
          http://tug.org/svn/texlive?view=revision&revision=47286
Author:   karl
Date:     2018-04-04 22:17:27 +0200 (Wed, 04 Apr 2018)
Log Message:
-----------
exercisebank (4apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt
    trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip
    trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.pdf
    trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.pdf
    trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex

Modified: trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt	2018-04-04 20:15:26 UTC (rev 47285)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/README.txt	2018-04-04 20:17:27 UTC (rev 47286)
@@ -5,7 +5,8 @@
 - exercisebank.sty : The exercise bank
 - exercisebank.pdf : Description of how the package works
 - example.zip : containing example
-  |-- example.tex : example of use
+  |-- example.tex : example of use texfile
+  |-- exampe.pdf  : example of use output
   |-- exercises/ : Directory containing exercises that could be use
   |---| -- firstexercise.tex: example exercise
   |---| -- secondexercise.tex: example exercise
@@ -18,7 +19,7 @@
 
 Licence:
 
-The LaTeX package exercisebank - version 0.0.2-1 (2018/04/01)
+The LaTeX package exercisebank - version v0.0.6 (2018/04/03)
 exercisebank.sty: Exercise bank
 -------------------------------------------------------------------------------------------
 Copyright (c) 2018 by Andreas Storvik Strauman

Modified: trunk/Master/texmf-dist/doc/latex/exercisebank/example.zip
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.pdf	2018-04-04 20:15:26 UTC (rev 47285)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.pdf	2018-04-04 20:17:27 UTC (rev 47286)

Property changes on: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.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-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank-doc.tex	2018-04-04 20:17:27 UTC (rev 47286)
@@ -0,0 +1,325 @@
+%% exercisebank v0.0.6b47 - 2018/04/03
+%% The LaTeX package exercisebank - version v0.0.6 (2018/04/03) build 47
+%% exercisebank.sty
+%% -------------------------------------------------------------------------------------------
+%% 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.txt
+
+\documentclass{article}
+\usepackage[all]{tcolorbox}
+\usepackage{needspace}
+\usepackage{tabularx}
+\makeatletter
+\lstdefinestyle{mydocumentation}{style=tcbdocumentation,
+  classoffset=0,
+  texcsstyle=*\color{blue},
+  moretexcs={arrayrulecolor,draw,includegraphics,ifthenelse,isodd,lipsum,path,pgfkeysalso},
+  classoffset=1,
+  moretexcs={% core
+    makeset,phead,buildset,select,exclude,Trigger,At,translateExBank
+  },
+  texcsstyle=*\color{Definition}\bfseries,
+  classoffset=0,% restore default
+  }
+\newtcolorbox{marker}[1][]{enhanced,
+    before skip=2mm,after skip=3mm,
+    boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,
+    colback=yellow!50,
+    colframe=yellow!20!black,
+    sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
+    underlay={%
+      \path[fill=tcbcol at back!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+      \path[draw=tcbcol at frame,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+      \path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west);
+      },
+    drop fuzzy shadow,#1}
+ \title{Exercise bank - Manual\\{\normalsize v0.0.6}}
+ \makeatother
+\let\dac\docAuxCommand
+\tcbset{documentation listing style=mydocumentation}
+% Give section some space
+\let\oldsection\section
+\gdef\section{\needspace{0.3\paperheight}\oldsection}
+\let\oldsubsection\subsection
+\gdef\subsection{\needspace{0.2\paperheight}\oldsubsection}
+
+
+\setlength{\parindent}{0pt}
+\title{{Handin - manual\\ v0.0.6{\\[-0.5em]\footnotesize(build 47)}}}
+\author{Andreas Strauman}
+\begin{document}
+\maketitle
+ 
+If you found any bugs or want new functionality, to contribute, view the commented source, get latest version of this package or get in touch with me, you can do all of that at \url{https://github.com/Strauman/exerciseBank/}
+\tableofcontents
+\clearpage
+\section{Motivation}
+Exercises are saved as separate files containing part problems. These files can be used to make sets, and you can cherry-pick or exclude certain part problems as you see fit. This makes it easier to maintain and keep your exercises flexible as the syllabus changes.
+
+\section{Flow/Moderate start}
+I suspect that working with this package will break you current flow. So let's go throught it.
+
+This package assumes you put all of your exercises within the folder named \texttt{exercises} (you can change the default folder using \refCom{setExercisesDir})
+\begin{dispListing*}{title=exercises/myexercise.tex}
+\begin{intro}
+  This introduces our problem
+\end{intro}
+\begin{problem}
+  This is a partproblem 1,
+  and will be hidden (just wait, you'll see)
+\end{problem}
+\begin{problem}
+  This is a partproblem 2.
+  This will not be hidden, but become part problem a!
+\end{problem}
+\end{dispListing*}
+Let's build all of them first. In the main file, (the one where you include this package):
+\begin{dispListing*}{title=main.tex}
+  \documentclass{article}
+  \usepackage{exercisebank}
+  \makeset{myExerciseSet}{myexercise}
+  \begin{document}
+    \buildset{myExerciseSet}
+  \end{document}
+\end{dispListing*}
+This builds the entire set, and adds Problem header and partproblem counters ( (1a) and (1b) ) by default.
+\subsection{Select}
+Now, let's build only the second problem.
+\begin{dispListing*}{title=main.tex}
+  \documentclass{article}
+  \usepackage{exercisebank}
+  \makeset{myExerciseSet}{\select{myexercise}{2}}
+  \begin{document}
+    \buildset{myExerciseSet}
+  \end{document}
+\end{dispListing*}
+This should only build the intro and the one exercise you \refCom*{select}ed!
+
+Now, say you want to hide the intro. Well all you have to do in this case is
+make the package treat the intro as a problem in regards to what is \refCom*{select}ed.
+Just add the optional argument \oarg{intro} to \dac{make}. That is switch
+\begin{dispListing}
+\makeset{myExerciseSet}{\select{myexercise}{2}}
+\end{dispListing}
+with
+\begin{dispListing}
+\makeset[intro]{myExerciseSet}{\select{myexercise}{3}}
+\end{dispListing}
+Notice that there are 3 `partproblems' now since we have to count the intro!
+
+\subsection{Exclude}
+But what if you have an exercise with 12 partproblems, and you only want to exclude the 7th partproblem? Well, then \dac{Exclude} is here to rescue the day for you.
+\begin{dispListing}
+  \makeset{myExerciseSet}{\exclude{soManyExercises}{7}}
+\end{dispListing}
+Here it's important to note that the [intro] argument would not make the intros disappear. If we wanted to only exclude the intro from our previous example file \texttt{exercises/myexercise.tex} we would do
+\begin{dispListing}
+\makeset[intro]{myExerciseSet}{\exclude{myexercise}{1}}
+\end{dispListing}
+So we're excluding the partproblem 1. But that's the intro when we send the [intro] optional argument
+\subsection{Multiple}
+In \dac{makeset} you can just separate exercises with commas! Here is an example:
+
+Let's say you have two files with exercises. One located in \texttt{exercises/circuits/RLC.tex} and one in \texttt{exercises/ohm/ohmsGeneralLaw.tex}, and you want to include partproblem 1 through 5 from \texttt{RLC.tex} and all of the exercises from \texttt{ohmsGeneralLaw.tex}.
+
+\begin{dispListing}
+\makeset{\select{circuits/RLC}{1,...,5}, ohmsGeneralLaw}
+\end{dispListing}
+This will divide it up with problem headers. So that what is in the \texttt{RLC.tex}-file will be Problem 1, and \texttt{ohmsGeneralLaw.tex} Problem 2.
+\subsection{Mixnmatch}
+What if you want to make both of them the same exercise? Well, then you pass the [nohead] argument to \dac{makeset}:
+\begin{dispListing}
+\makeset[nohead]{\phead, \select{circuits/RLC}{1,...,5}, ohmsGeneralLaw}
+\end{dispListing}
+The \dac{phead} command makes a problem header. You can pass them as much as you want:
+
+\begin{dispListing}
+\makeset[nohead]{\phead, \select{circuits/RLC}{1,...,5},
+              ohmsGeneralLaw, \phead, someOtherExercise, moreExercises}
+\end{dispListing}
+
+\subsection{Solutions}
+The last thing to cover then is solutions. In your exercise files you just use the solution environment
+\begin{dispListing}
+\begin{solution}
+Solution goes here
+\end{solution}
+\end{dispListing}
+They are hidden by default, so you would have to use \dac{DisplaySolutions} in
+your main file to display them.
+
+\subsection{Using \dac{At}}
+\subsubsection{Making your own front page for a set}
+To create your own front page for each set, you'd use\\ \dac{At}\dac{StartBuildset}\brackets{\meta{FrontPageContents}}. Anyhing you send in to \dac{At}\dac{StartBuildset} will be executed before the first problem starts:
+\begin{dispListing}
+  \At\StartBuildset{
+    \input{myFrontpage}
+  }
+\end{dispListing}
+\subsubsection{Printing the file name beneath the problem header}
+Maybe you want to see what files are what problems. One way to do that is hook into the \dac{At}\dac{VeryBeginProblem} and use \refCom{exerciseFile}.This is the command that the headers call, so anything you put in there will be executed right after the headers.
+
+\begin{dispListing}
+  \At\VeryBeginProblem{
+    \exerciseFile\\
+  }
+\end{dispListing}
+
+Note that the \dac{At}{BeginProblem} is executed \emph{before} the headers.
+
+That covers the basics. Enjoy
+\begin{marker}
+\dac{begin}\{problem\},\dac{end}\{problem\},\\
+\dac{begin}\{solution\},\dac{end}\{solution\},\\
+\dac{begin}\{intro\} and \dac{end}\{intro\} has to be on their own line without any spaces!
+\end{marker}
+ \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.
+\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.
+\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}
+The Norwegian translation would then be done with
+\begin{dispListing}
+\translateExBank{Problem=Oppgave, Solution=Løsning}
+\end{dispListing}
+\end{docCommand}
+\subsection{Triggers}
+\begin{docCommand}{Trigger}{\marg{Any Macro}}
+ See \refCom{At}\\
+ Available triggers:\\
+\dac{Trigger}\dac{BeginPartproblem}:\\ Triggers before a partproblem is inserted\\
+\dac{Trigger}\dac{VeryBeginPartproblem}:\\ Triggers right after \dac{BeginPartproblem}. This is so that the user can do stuff before the actual headers start. The partproblem headers are invoked by \dac{At}\dac{VeryBeginPartproblem}
+\dac{Trigger}\dac{InputExercise}:\\ Triggers before a file is included\\\
+\dac{Trigger}\dac{BeginProblem}:\\ Triggers before a file is included, but only if problem headers are to be written (no [nohead] given)\\
+\dac{Trigger}\dac{EndProblem}:\\ Triggers right after problem is included if [nohead] \dac{emph}\{not\} given\\
+\dac{Trigger}\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{Trigger}\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.\\
+\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}.
+\begin{dispListing}
+ \At\BeginSomething{DoSomething}
+ Which is triggered with
+ \Trigger\BeginSomething, this evaluates to DoSomething
+\end{dispListing}
+\end{docCommand}
+\begin{docCommand}{isin}{\marg{haystack}\marg{needle}\marg{True}\marg{False}}
+ \meta{haystack} is a comma separated list of integers\\
+ \meta{needle} is an integer\\
+ Executes \meta{True} if \meta{needle} is found in \meta{haystack}
+ else executes \meta{False}
+\end{docCommand}
+\begin{docCommand}{exerciseFile}{}
+This is a `read-only' macro that contains the name of the current exerciseFile
+\end{docCommand}
+\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
+\begin{dispListing}
+ \makeset[nohead]\{\phead, \select{myexercise}{1,2,3}}
+\end{dispListing}
+\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}{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}{setName}{}
+This variable prints out the name of your set that you sent to \dac{buildset}.
+The following example prints "Exercise set number 1" and "Exercise set number 2" on the top of each set
+\begin{dispListing}
+\At\StartBuildset{
+ Exercise set number \setName
+}
+ %... \makesets here ...%
+\begin{document}
+ \buildset{1}{myexercise}
+ \buildset{2}{myexercise}
+\end{document}
+\end{dispListing}
+\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}.
+
+\section{Changelog}
+%!TEX root = exercisebank-doc.tex
+\begin{tabularx}{\textwidth}{llX}
+  Version&Date&Change\\
+  v0.0.2b11&2018/04/02&Updated documentation syntax.\\
+  v0.0.3b38&2018/04/03&\nobreak\begin{itemize}
+    \item Updated triggers doc
+    \item added trigger \dac{VeryBeginPartproblem}
+  \end{itemize}\\
+  v0.0.3b40&2018/04/03&\begin{itemize}
+    \item Added examples that uses the \dac{At} command.
+      Making front page and other snacks
+  \end{itemize}\\
+  v0.0.4b44&2018/04/03&\begin{itemize}
+    \item Changed design of part problems. (Looks much better now!)
+  \end{itemize}\\
+  v0.0.5b46&2018/04/03&\begin{itemize}
+    \item Fixed partproblems and solutions to fit on pages using \dac{filbreak}.
+  \end{itemize}\\
+\end{tabularx}
+ \end{document}


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

Deleted: trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex	2018-04-04 20:15:26 UTC (rev 47285)
+++ trunk/Master/texmf-dist/doc/latex/exercisebank/exercisebank.tex	2018-04-04 20:17:27 UTC (rev 47286)
@@ -1,170 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% 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}

Modified: trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty	2018-04-04 20:15:26 UTC (rev 47285)
+++ trunk/Master/texmf-dist/tex/latex/exercisebank/exercisebank.sty	2018-04-04 20:17:27 UTC (rev 47286)
@@ -1,5 +1,5 @@
 % Source (with comments) can be found at https://github.com/Strauman/exerciseBank
-%% The LaTeX package exercisebank - version 0.0.2-1 (2018/04/01)
+%% The LaTeX package exercisebank - version v0.0.6 (2018/04/03) - build 47
 %% exercisebank.sty: Exercise bank
 %% -------------------------------------------------------------------------------------------
 %% Copyright (c) 2018 by Andreas Storvik Strauman <andreas dot s dot strauman at uit dot no>
@@ -13,20 +13,20 @@
 %% 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}}
+\ProvidesPackage{exercisebank}[2018/04/03 v0.0.6 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 \@backslashchar 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}
+\RequirePackage{xstring}
+\RequirePackage{pgffor}
+\RequirePackage{scrextend}
+\RequirePackage{comment}
+\RequirePackage{calc}
+\RequirePackage{pgfpages}
+\RequirePackage{geometry}
 \pgfkeys{ /exbanki18n/.is family, /exbanki18n,
   default/.style = {Problem = Problem, Solution = Solution},
   Problem/.estore in = \@tr at Problem,
@@ -52,39 +52,60 @@
   \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}
+\newlength{\ppLeading}
+\newlength{\pMarginBelow}
+\newlength{\pMarginAbove}
+\newlength{\pMarginLeft}
+\newlength{\ppMarginBelow}
+\newlength{\ppMarginAbove}
+\newlength{\ppMargin}
+\newlength{\ppPullback}
+\setlength{\ppLeading}{4em}
+\setlength{\pMarginBelow}{1em}
+\setlength{\pMarginAbove}{1em}
+\setlength{\pMarginLeft}{-1.5em}
+\setlength{\ppMarginBelow}{2em}
+\setlength{\ppMarginAbove}{2em}
+\setlength{\ppMargin}{2em}
+\setlength{\ppPullback}{3.5em}
+\def\solMargin{\dimexpr\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\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\EndProblem{	\filbreak
 }
-\At\EndPartproblem{\hfill
-\end{addmargin}\vspace*{0.5em}
+\At\VeryBeginPartproblem{%
+	\stepcounter{partproblemcounter}%
+	\def\@pproblemHead{\large\textbf{(\theproblemcounter\alph{partproblemcounter})}}
+	\begin{addmargin}{\ppMargin}
+		\filbreak
+		\begin{itemize}
+			\item[\@pproblemHead]
 }
-\At\BeginSolution{  \vspace*{1em}
-  \begin{addmargin}{\solMargin}%
-\hspace*{-\solMargin}\large{\textbf{\@tr{Solution}:}}\normalsize
+\At\EndPartproblem{		\end{itemize}
+	\end{addmargin}
+	\vspace*{\pMarginBelow}%
 }
-\At\EndSolution{  \end{addmargin}\vspace*{1em}
+\At\BeginSolution{	\vspace*{1em}
+	\def\@solutionHead{\large{\textbf{\@tr{Solution}:}}}
+	\begin{addmargin}{\solMargin}
+		\filbreak
+		\begin{itemize}
+			\item[\@solutionHead]
 }
+\At\EndSolution{		\end{itemize}
+	\end{addmargin}
+}
 \gdef\isFalse{0}
 \gdef\isTrue{1}
 \gdef\DisplayProblem{\isTrue}
@@ -101,6 +122,7 @@
   \if\@displayMetaCounter\isTrue%
     {P:\Large\themetacounter}
     \Trigger\BeginPartproblem
+    \Trigger\VeryBeginPartproblem
     \gdef\DisplayProblem{\isTrue}
   \else
     \if\DisplayProblem\isFalse
@@ -113,7 +135,9 @@
 \generalcomment{problem}{  \edef\DisplaySolution{\@DisplaySolutions}
   \Trigger\DecideProblemDisplay
   \begingroup
-     \showhideproblem{\Trigger\BeginPartproblem}
+     \showhideproblem{      \Trigger\BeginPartproblem
+      \Trigger\VeryBeginPartproblem
+}
 }{    \if\DisplayProblem\isFalse\else
       \Trigger\EndPartproblem
     \fi
@@ -147,6 +171,7 @@
     \Trigger\EndIntro
     \endgroup
   \fi
+  \vspace*{1em}
 }
 \gdef\isin#1#2#3#4{  \def\needle{#2}
   \def\haystack{#1}



More information about the tex-live-commits mailing list