diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-13 23:06:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-13 23:06:59 +0000 |
commit | 03542c01781307bd8cb29571d8a39197a4de83e2 (patch) | |
tree | b11e221ce28f24eee3995a8efb51d2e76993472c /Master/texmf-dist/source | |
parent | 04f93eb1202717fcb407f1271d28f4153aaa0ca0 (diff) |
probsoln (10jul17)
git-svn-id: svn://tug.org/texlive/trunk@44783 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/probsoln/probsoln.dtx | 124 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/probsoln/probsoln.ins | 10 |
2 files changed, 97 insertions, 37 deletions
diff --git a/Master/texmf-dist/source/latex/probsoln/probsoln.dtx b/Master/texmf-dist/source/latex/probsoln/probsoln.dtx index 0468d92c632..9b4593b23b0 100644 --- a/Master/texmf-dist/source/latex/probsoln/probsoln.dtx +++ b/Master/texmf-dist/source/latex/probsoln/probsoln.dtx @@ -1,15 +1,15 @@ %\iffalse -% probsoln.dtx generated using makedtx version 0.94b (c) Nicola Talbot +% probsoln.dtx generated using makedtx version 1.1 (c) Nicola Talbot % Command line args: -% -macrocode ".+\.tex" -% -comment ".+\.tex" +% -doc "probsoln-manual.tex" % -src "(.+)\.(sty)\Z=>\1.\2" % -src "(sample.*)\.(tex)\Z=>\1.\2" % -src "(prob-.*)\.(tex)\Z=>\1.\2" -% -doc "probsoln-manual.tex" +% -comment ".+\.tex" +% -macrocode ".+\.tex" % -author "Nicola Talbot" % probsoln -% Created on 2013/3/13 15:28 +% Created on 2017/7/10 11:58 %\fi %\iffalse %<*package> @@ -32,7 +32,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2013 Nicola Talbot, all rights reserved. +% Copyright (C) 2017 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> @@ -54,7 +54,7 @@ \RecordChanges \PageIndex -\CheckSum{1822} +\CheckSum{1830} \newcommand*{\dq}[1]{``#1''} @@ -66,16 +66,12 @@ %\MakeShortVerb{"} %\DeleteShortVerb{\|} % -% \title{probsoln v3.04: +% \title{probsoln v3.05: %creating problem sheets optionally with solutions} -% \author{Nicola L.C. Talbot\\[10pt] -%School of Computing Sciences\\ -%University of East Anglia\\ -%Norwich. Norfolk\\ -%NR4 7TJ. United Kingdom.\\ -%\url{http://theoval.cmp.uea.ac.uk/~nlct/}} -% -% \date{2012-08-23} +% \author{Nicola L.C. Talbot\\ +%\url{http://www.dickimaw-books.com/}} +% +% \date{2017-07-10} % \maketitle %\tableofcontents % @@ -95,6 +91,11 @@ %In this way, one file can either produce the student's version or %the teacher's version. % +%You may want to consider using \sty{datatool} with \app{datatooltk} +%instead of \styfmt{probsoln}. See +%\href{http://www.dickimaw-books.com/latex/admin/html/datatoolexam.shtml}{Using +%the \styfmt{datatool} Package for Exams or Assignment Sheets}. +% %\section{Package Options}\label{sec:pkgopt} %The following options may be passed to this package: %\begin{description} @@ -376,6 +377,11 @@ %\end{onlysolution} %\end{defproblem} %\end{verbatim} +%\begin{important} +%If you don't use \cs{thisproblem} or you don't +%use the package option \pkgopt{usedefaultargs}, then you must supply +%the arguments. +%\end{important} % %\begin{definition}[\DescribeMacro{\newproblem}] %\cs{newproblem}\oarg{n}\oarg{default args}\marg{label}\marg{problem}\marg{solution} @@ -393,11 +399,11 @@ %\end{ttfamily} %For example: %\begin{verbatim} -%\newproblem[1]{diffsin}{% -% \(f(x) = \sin(#1x)\) +%\newproblem[1]{diffcos}{% +% \(f(x) = \cos(#1x)\) %}% %{% -% \(f'(x) = #1\cos(#1x)\) +% \(f'(x) = -#1\sin(#1x)\) %} %\end{verbatim} %is equivalent to @@ -520,18 +526,33 @@ %list}. % %\begin{definition}[\DescribeMacro{\loadrandomproblems}] -%\cs{loadrandomproblems}\oarg{data set}\marg{n}\marg{filename} +%\cs{loadrandomproblems}\oarg{data set}\marg{n}\marg{filenames} %\end{definition} -%This randomly loads \meta{n} problems from \meta{filename} and -%adds them to the given data set. If \meta{data set} is omitted, -%the default data set is assumed. Note that the problems will be -%added to the data set in a random order, not in the order in -%which they were defined. There must be at least \meta{n} problems -%defined in \meta{filename}. +%This randomly loads \meta{n} problems from the comma-separated +%list\footnote{The list form was added to v3.05. Earlier versions +%only allow a single filename.} +%of \meta{filenames} and adds them to the given data set. If +%\meta{data set} is omitted, the default data set is assumed. Note +%that the problems will be added to the data set in a random order, +%not in the order in which they were defined. There must be at least +%\meta{n} problems defined across the given list of files. +% +%Note that there's a difference between +%\begin{verbatim} +%\loadrandomproblems{5}{problemset1} +%\loadrandomproblems{5}{problemset2} +%\end{verbatim} +%and +%\begin{verbatim} +%\loadrandomproblems{10}{problemset1,problemset2} +%\end{verbatim} +%In the first case, the data set will contain 5 problems randomly +%selected from \texttt{problemset1} and 5 problems randomly selected +%from \texttt{problemset2}. Whereas in the second case, the data set +%will contain 10 problems randomly selected across both files. % %\begin{definition}[\DescribeMacro{\loadrandomexcept}] -%\cs{loadrandomexcept}\oarg{data -%set}\marg{n}\marg{filename}\marg{exception list} +%\cs{loadrandomexcept}\oarg{data set}\marg{n}\marg{filenames}\marg{exception list} %\end{definition} %This is similar to \cs{loadrandomproblems} except that it won't load %those problems whose labels are listed in \meta{exception list}. @@ -711,7 +732,7 @@ %\begin{definition}[\DescribeMacro{\foreachsolution}] %\cs{foreachsolution}\oarg{data set}\marg{body} %\end{definition} -%This is equivalent to \cs{foreachsolution}, but only iterates +%This is equivalent to \cs{foreachproblem}, but only iterates %through problems that contain the \env{onlysolution} environment. %Note that you still need to use \ics{showanswers} or the %\pkgopt{answers} package option for the contents of the @@ -967,7 +988,7 @@ % \end{macrocode} % Identify this package and version: % \begin{macrocode} -\ProvidesPackage{probsoln}[2012/08/23 v3.04 (NLCT)] +\ProvidesPackage{probsoln}[2017/07/10 v3.05 (NLCT)] % \end{macrocode} % Required packages: %\changes{3.01}{2011/08/22}{substr package no longer required} @@ -1490,7 +1511,7 @@ % which stores a comma-separated list of labels for each problem % associated with that data base. Each problem \meta{label} is % stored in the macro -% \cs{prob@data@}\meta{name}"@"\meta{name}"@"\meta{label}. Problems +% \cs{prob@data@}\meta{name}"@"\meta{label}. Problems % loaded from an external file using \cs{loadproblems} are added % to the specified data base. Any problems that are defined in the % document or are \cs{input}ed from another file (without the @@ -2345,7 +2366,11 @@ Please specify (e.g. \csname @prob@getargs@eg@\romannumeral#1\endcsname):}% % \begin{macrocode} \let\prob@do@defproblem=\prob@add@currentlabel \firstpasstrue - \input{#3}% +% \end{macrocode} +%\changes{3.05}{2017/07/10}{allow comma-separated list of file names} +%Allow a comma-separated list of file names. +% \begin{macrocode} + \@for\@thisfile:=#3\do{\input{\@thisfile}}% % \end{macrocode} % Shuffle labels. % \begin{macrocode} @@ -2422,7 +2447,7 @@ Please specify (e.g. \csname @prob@getargs@eg@\romannumeral#1\endcsname):}% % \begin{macrocode} \let\prob@do@defproblem=\prob@do@selectedproblem \firstpassfalse - \input{#3}% + \@for\@thisfile:=#3\do{\input{\@thisfile}}% % \end{macrocode} % Move them from the reserved data base into the required data base % in the order specified by \cs{prob@selectedlabels} @@ -3353,6 +3378,39 @@ Differentiate the following functions: %\fi %\iffalse % \begin{macrocode} +%<*sample9.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} + % This file is public domain +\documentclass[a4paper]{article} + +\usepackage{probsoln} + % uncomment the following line to display the answers + % \showanswers + + % Load 10 problems randomly selected from the given files +\loadrandomproblems{10}{prob-1stprncp,prob-easy,prob-implicit,prob-probspaces} + +\begin{document} +\title{Sample Problem Sheet} +\author{Nicola Talbot} +\maketitle + +\begin{enumerate} + \foreachproblem{\item \thisproblem} +\end{enumerate} +\end{document} +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%</sample9.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*prob-1stprncp.tex> % \end{macrocode} %\fi diff --git a/Master/texmf-dist/source/latex/probsoln/probsoln.ins b/Master/texmf-dist/source/latex/probsoln/probsoln.ins index 261f5de04d8..6ac532dcc55 100644 --- a/Master/texmf-dist/source/latex/probsoln/probsoln.ins +++ b/Master/texmf-dist/source/latex/probsoln/probsoln.ins @@ -1,14 +1,14 @@ -% probsoln.ins generated using makedtx version 0.94b 2013/3/13 15:28 +% probsoln.ins generated using makedtx version 1.1 2017/7/10 11:58 \input docstrip \preamble probsoln.dtx - Copyright 2013 Nicola Talbot + Copyright 2017 Nicola Talbot This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 - of this license of (at your option) any later version. + 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 @@ -18,7 +18,7 @@ The Current Maintainer of this work is Nicola Talbot. - This work consists of the files probsoln.dtx and probsoln.ins and the derived files probsoln.sty, sample-exclude.tex, sample.tex, sample2.tex, sample3.tex, sample4.tex, sample5.tex, sample6.tex, sample7.tex, sample8.tex, prob-1stprncp.tex, prob-args.tex, prob-easy.tex, prob-easy2.tex, prob-implicit.tex, prob-mchoice.tex, prob-mixed.tex, prob-newdata.tex, prob-nosoln.tex, prob-probspaces.tex, prob-probspaces2.tex, prob-tabmchoice.tex, prob-verb.tex. + This work consists of the files probsoln.dtx and probsoln.ins and the derived files probsoln.sty, sample-exclude.tex, sample.tex, sample2.tex, sample3.tex, sample4.tex, sample5.tex, sample6.tex, sample7.tex, sample8.tex, sample9.tex, prob-1stprncp.tex, prob-args.tex, prob-easy.tex, prob-easy2.tex, prob-implicit.tex, prob-mchoice.tex, prob-mixed.tex, prob-newdata.tex, prob-nosoln.tex, prob-probspaces.tex, prob-probspaces2.tex, prob-tabmchoice.tex, prob-verb.tex. \endpreamble @@ -44,6 +44,8 @@ \usepostamble\defaultpostamble\from{probsoln.dtx}{sample7.tex,package}} \file{sample8.tex}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{probsoln.dtx}{sample8.tex,package}} +\file{sample9.tex}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{probsoln.dtx}{sample9.tex,package}} \file{prob-1stprncp.tex}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{probsoln.dtx}{prob-1stprncp.tex,package}} \file{prob-args.tex}{\usepreamble\defaultpreamble |