diff options
author | Karl Berry <karl@freefriends.org> | 2013-03-13 22:35:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-03-13 22:35:46 +0000 |
commit | 95080bc66f5d1022cbcfbe7535a87055d02aa568 (patch) | |
tree | 78110a9731c73d008803b1243437378b52afc905 /Master/texmf-dist/doc/latex/probsoln | |
parent | 8b6e07d34f4b46b6c6a049934683348b12ff3fd6 (diff) |
probsoln (13mar13)
git-svn-id: svn://tug.org/texlive/trunk@29371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/probsoln')
20 files changed, 2083 insertions, 1536 deletions
diff --git a/Master/texmf-dist/doc/latex/probsoln/CHANGES b/Master/texmf-dist/doc/latex/probsoln/CHANGES index 353a6ee6db8..3c3efc2c943 100644 --- a/Master/texmf-dist/doc/latex/probsoln/CHANGES +++ b/Master/texmf-dist/doc/latex/probsoln/CHANGES @@ -1,5 +1,13 @@ probsoln package versions: +Version 3.04: + + * fixed bug in textenum + +version 3.03: + + * added facility to exclude problems selected in the past n years + version 3.02: * Added xkeyval to required package list diff --git a/Master/texmf-dist/doc/latex/probsoln/README b/Master/texmf-dist/doc/latex/probsoln/README index d3a2a30d676..e3e0912a332 100644 --- a/Master/texmf-dist/doc/latex/probsoln/README +++ b/Master/texmf-dist/doc/latex/probsoln/README @@ -1,6 +1,6 @@ -LaTeX Package : probsoln v3.02 +LaTeX Package : probsoln v3.04 -Last Modified : 2011-12-10 +Last Modified : 2012-08-23 Author : Nicola L.C. Talbot diff --git a/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.css b/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.css index 0581f0a1a53..86f6de1a936 100644 --- a/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.css +++ b/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.css @@ -1,19 +1,86 @@ /* start css.sty */ -.ec-lmr-17{font-size:170%;} -.ec-lmr-12{font-size:120%;} -.ec-lmtt-12{font-size:120%; font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} +.ec-lmr-10x-x-109{} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{font-size:188%; font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmr-12x-x-120{font-size:130%;} +.ec-lmtt-12x-x-120{font-size:130%; font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmtt-10{font-size:90%; font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} @@ -26,43 +93,27 @@ .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmtt-9{font-size:90%; font-family: monospace;} +.rm-lmr-8x-x-103{font-size:74%;} +.lmmi-10x-x-109{} +.lmmi-8x-x-103{font-size:74%;} +.lmsy-10x-x-109{} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmr-10{font-size:90%;} +.ec-lmr-9{font-size:81%;} +.ec-lmtt-9{font-size:81%; font-family: monospace;} +.ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} @@ -74,22 +125,6 @@ .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} -.rm-lmr-8x-x-95{font-size:76%;} -.lmmi-8x-x-95{font-size:76%;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmr-9{font-size:90%;} -.ec-lmr-8{font-size:80%;} p.noindent { text-indent: 0em } td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } @@ -198,6 +233,7 @@ div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } .abstract p {margin-left:5%; margin-right:5%;} div.abstract {width:100%;} +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } table.multicols { width:100%; margin-left:1em; margin-top:1em; margin-bottom:1em; } .equation td{text-align:center; } .equation-star td{text-align:center; } diff --git a/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.html b/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.html index 5f2552db5b0..55dfa44a832 100644 --- a/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.html +++ b/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.html @@ -1,36 +1,102 @@ -<a - id="top"></a><?xml version="1.0" encoding="iso-8859-1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd--> <html xmlns="http://www.w3.org/1999/xhtml" > -<head><title>probsoln v3.02: creating problem sheets optionally with solutions</title> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<head><title>probsoln v3.04: creating problem sheets optionally with solutions</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" /> <meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" /> -<!-- xhtml,fn-in,css-in --> +<!-- xhtml,fn-in,css-in,uni-html4,utf8 --> <meta name="src" content="probsoln-manual.tex" /> -<meta name="date" content="2011-12-13 15:58:00" /> +<meta name="date" content="2013-03-13 15:29:00" /> <style type="text/css"> <!-- /* start css.sty */ -.ec-lmr-17{font-size:170%;} -.ec-lmr-12{font-size:120%;} -.ec-lmtt-12{font-size:120%; font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} -.ec-lmtt-12{ font-family: monospace;} +.ec-lmr-10x-x-109{} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmss-10x-x-109{ font-family: sans-serif;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-109{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{font-size:188%; font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmssbx-10x-x-207{ font-family: sans-serif; font-weight: bold;} +.ec-lmr-12x-x-120{font-size:130%;} +.ec-lmtt-12x-x-120{font-size:130%; font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-12x-x-120{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmtt-10x-x-109{ font-family: monospace;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmbx-10x-x-109{ font-weight: bold;} +.ec-lmtt-10{font-size:90%; font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} @@ -43,43 +109,27 @@ .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} .ec-lmtt-10{ font-family: monospace;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmss-10{ font-family: sans-serif;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmbx-10{ font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmssbx-10{ font-family: sans-serif; font-weight: bold;} -.ec-lmtt-9{font-size:90%; font-family: monospace;} +.rm-lmr-8x-x-103{font-size:74%;} +.lmmi-10x-x-109{} +.lmmi-8x-x-103{font-size:74%;} +.lmsy-10x-x-109{} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmri-10x-x-109{ font-style:italic;} +.ec-lmr-10{font-size:90%;} +.ec-lmr-9{font-size:81%;} +.ec-lmtt-9{font-size:81%; font-family: monospace;} +.ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} @@ -91,22 +141,6 @@ .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} .ec-lmtt-9{ font-family: monospace;} -.rm-lmr-8x-x-95{font-size:76%;} -.lmmi-8x-x-95{font-size:76%;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmri-10{ font-style:italic;} -.ec-lmr-9{font-size:90%;} -.ec-lmr-8{font-size:80%;} p.noindent { text-indent: 0em } td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } @@ -215,6 +249,7 @@ div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } .abstract p {margin-left:5%; margin-right:5%;} div.abstract {width:100%;} +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } table.multicols { width:100%; margin-left:1em; margin-top:1em; margin-bottom:1em; } .equation td{text-align:center; } .equation-star td{text-align:center; } @@ -237,253 +272,257 @@ div.important { background-color:red; } </style> </head><body > - <div class="maketitle"> + <div class="maketitle"> - - +<div class="minipage"><a + id="top"></a> +</div> -<h2 class="titleHead">probsoln v3.02: creating problem sheets optionally -with solutions</h2> - <div class="author" ><span -class="ec-lmr-12">Nicola L.C. Talbot</span> -<br /> <span -class="ec-lmr-12">School of Computing Sciences</span> -<br /> <span -class="ec-lmr-12">University of East Anglia</span> -<br /> <span -class="ec-lmr-12">Norwich. Norfolk</span> +<h2 class="titleHead">probsoln v3.04: creating problem +sheets optionally with solutions</h2> + <div class="author" ><span +class="ec-lmr-12x-x-120">Nicola L.C. Talbot</span> <br /> <span -class="ec-lmr-12">NR4 7TJ. United Kingdom.</span> +class="ec-lmr-12x-x-120">School of Computing Sciences</span> +<br /> <span +class="ec-lmr-12x-x-120">University of East Anglia</span> +<br /> <span +class="ec-lmr-12x-x-120">Norwich. Norfolk</span> +<br /> <span +class="ec-lmr-12x-x-120">NR4 7TJ. United Kingdom.</span> <br /><a href="http://theoval.cmp.uea.ac.uk/~nlct/" class="url" ><span -class="ec-lmtt-12">http://theoval.cmp.uea.ac.uk/~nlct/</span></a></div><br /> +class="ec-lmtt-12x-x-120">http://theoval.cmp.uea.ac.uk/~nlct/</span></a></div><br /> <div class="date" ><span -class="ec-lmr-12">2011-12-10</span></div> - </div> - <h3 class="likesectionHead"><a +class="ec-lmr-12x-x-120">2012-08-23</span></div> + </div> + <h3 class="likesectionHead"><a id="x1-1000"></a>Contents</h3> - <div class="tableofcontents"> - <span class="sectionToc" >1 <a + <div class="tableofcontents"> + <span class="sectionToc" >1 <a href="#x1-20001" id="QQ2-1-2">Introduction</a></span> -<br /> <span class="sectionToc" >2 <a +<br /> <span class="sectionToc" >2 <a href="#x1-30002" id="QQ2-1-3">Package Options</a></span> -<br /> <span class="sectionToc" >3 <a +<br /> <span class="sectionToc" >3 <a href="#x1-40003" id="QQ2-1-4">Verbatim</a></span> -<br /> <span class="sectionToc" >4 <a +<br /> <span class="sectionToc" >4 <a href="#x1-50004" id="QQ2-1-5">Showing and Hiding Solutions</a></span> -<br /> <span class="sectionToc" >5 <a +<br /> <span class="sectionToc" >5 <a href="#x1-60005" id="QQ2-1-6">General Formatting Commands</a></span> -<br /> <span class="sectionToc" >6 <a +<br /> <span class="sectionToc" >6 <a href="#x1-70006" id="QQ2-1-7">Defining a Problem</a></span> -<br /> <span class="sectionToc" >7 <a +<br /> <span class="sectionToc" >7 <a href="#x1-80007" id="QQ2-1-8">Using a Problem</a></span> -<br /> <span class="sectionToc" >8 <a +<br /> <span class="sectionToc" >8 <a href="#x1-90008" id="QQ2-1-9">Loading Problems From External Files</a></span> -<br /> <span class="sectionToc" >9 <a -href="#x1-100009" id="QQ2-1-10">Iterating Through Datasets</a></span> -<br /> <span class="sectionToc" >10 <a -href="#x1-1100010" id="QQ2-1-11">Random Number Generator</a></span> -<br /> <span class="sectionToc" >11 <a -href="#x1-1200011" id="QQ2-1-12">Compatibility With Versions Prior to 3.0</a></span> -<br /> <span class="sectionToc" ><a -href="#Q1-1-13">Index</a></span> - </div> +<br />  <span class="subsectionToc" >8.1 <a +href="#x1-100008.1" id="QQ2-1-10">Randomly Selecting Problems Not Selected in Previous Documents</a></span> +<br /> <span class="sectionToc" >9 <a +href="#x1-110009" id="QQ2-1-11">Iterating Through Datasets</a></span> +<br /> <span class="sectionToc" >10 <a +href="#x1-1200010" id="QQ2-1-12">Random Number Generator</a></span> +<br /> <span class="sectionToc" >11 <a +href="#x1-1300011" id="QQ2-1-13">Compatibility With Versions Prior to 3.0</a></span> +<br /> <span class="sectionToc" ><a +href="#Q1-1-14">Index</a></span> + + + </div> <!--l. 40--><p class="noindent" > </p> - <h3 class="sectionHead"><span class="titlemark">1 </span> <a + <h3 class="sectionHead"><span class="titlemark">1 </span> <a id="x1-20001"></a>Introduction</h3> <!--l. 41--><p class="noindent" >The <span -class="ec-lmss-10">probsoln </span>package is designed for teachers or lecturers who want to create problem -sheets for their students. This package was designed with mathematics problems in -mind, but can be used for other subjects as well. The idea is to create a file -containing a large number of problems with their solutions which can be read in - - - -by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span -class="E">E</span>X</span></span>, and then select a number of problems to typeset. This means -that once the database has been set up, each year you can easily create a new -problem sheet that is sufficiently different from the previous year, thus preventing -the temptation of current students seeking out the previous year’s students, -and checking out their answers. There is also an option that can be passed to -the package to determine whether or not the solutions should be printed. In -this way, one file can either produce the student’s version or the teacher’s +class="ec-lmss-10x-x-109">probsoln </span>package is designed for teachers or lecturers who want to +create problem sheets for their students. This package was designed with +mathematics problems in mind, but can be used for other subjects as well. The +idea is to create a file containing a large number of problems with their +solutions which can be read in by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span>, and then select a number of +problems to typeset. This means that once the database has been set up, +each year you can easily create a new problem sheet that is sufficiently +different from the previous year, thus preventing the temptation of current +students seeking out the previous year’s students, and checking out their +answers. There is also an option that can be passed to the package +to determine whether or not the solutions should be printed. In this +way, one file can either produce the student’s version or the teacher’s version. </p><!--l. 56--><p class="noindent" > </p> <!--l. 56--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">2 </span> <a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">2 </span> <a id="x1-30002"></a>Package Options</h3> <!--l. 57--><p class="noindent" >The following options may be passed to this package: </p><dl class="description"><dt class="description"> <span -class="ec-lmssbx-10">answers</span><a +class="ec-lmssbx-10x-x-109">answers</span><a id="dx1-3001"></a> </dt><dd class="description">Show the answers </dd><dt class="description"> <span -class="ec-lmssbx-10">noanswers</span><a +class="ec-lmssbx-10x-x-109">noanswers</span><a id="dx1-3002"></a> </dt><dd class="description">Don’t show the answers (default) </dd><dt class="description"> <span -class="ec-lmssbx-10">draft</span><a +class="ec-lmssbx-10x-x-109">draft</span><a id="dx1-3003"></a> </dt><dd class="description">Display the label and dataset name when a problem is used </dd><dt class="description"> <span -class="ec-lmssbx-10">final</span><a +class="ec-lmssbx-10x-x-109">final</span><a id="dx1-3004"></a> </dt><dd class="description">Don’t display label and dataset name when a problem is used </dd><dt class="description"> <span -class="ec-lmssbx-10">usedefaultargs</span><a +class="ec-lmssbx-10x-x-109">usedefaultargs</span><a id="dx1-3005"></a> </dt><dd class="description">Make <span -class="ec-lmtt-10">\thisproblem</span><a - id="dx1-3006"></a> use the default arguments supplied in the - problem definition. +class="ec-lmtt-10x-x-109">\thisproblem</span><a + id="dx1-3006"></a> use the default arguments supplied in + the problem definition. + + </dd><dt class="description"> <span -class="ec-lmssbx-10">nousedefaultargs</span><a +class="ec-lmssbx-10x-x-109">nousedefaultargs</span><a id="dx1-3007"></a> </dt><dd -class="description">Make <span -class="ec-lmtt-10">\thisproblem</span><a - id="dx1-3008"></a> prompt for problem arguments (default).</dd></dl> +class="description">Make <span +class="ec-lmtt-10x-x-109">\thisproblem</span><a + id="dx1-3008"></a> prompt for problem arguments + (default).</dd></dl> <!--l. 69--><p class="noindent" > </p> <!--l. 69--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">3 </span> <a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">3 </span> <a id="x1-40003"></a>Verbatim</h3> -<!--l. 71--><p class="noindent" >As from version 3.02, problems and solutions may contain verbatim text, but you must -use the <a +<!--l. 71--><p class="noindent" >As from version 3.02, problems and solutions may contain verbatim text, but +you must use the <a id="dx1-4001"></a><span -class="ec-lmtt-10">fragile </span>(or <span -class="ec-lmtt-10">fragile=true</span>) option for the associated environments. -</p><!--l. 75--><p class="indent" > Alternatively, if most of your problems contain verbatim, you can globally set this -option using: +class="ec-lmtt-10x-x-109">fragile </span>(or <span +class="ec-lmtt-10x-x-109">fragile=true</span>) option for the associated +environments. +</p><!--l. 75--><p class="indent" > Alternatively, if most of your problems contain verbatim, you can globally set +this option using: - </p> - <div class="verbatim" id="verbatim-1"> + <div class="verbatim" id="verbatim-1"> \setkeys{probsoln}{fragile} </div> <!--l. 79--><p class="nopar" > You can switch off this option using <span -class="ec-lmtt-10">fragile=false</span>. -</p><!--l. 82--><p class="indent" > The <span -class="ec-lmtt-10">fragile </span>option writes information to a temporary file. This defaults to +class="ec-lmtt-10x-x-109">fragile=false</span>. +</p><!--l. 82--><p class="indent" > The <span +class="ec-lmtt-10x-x-109">fragile </span>option writes information to a temporary file. This defaults to <span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\jobname.vrb</span></span></span> but the name may be changed. The extension (<span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">.vrb</span></span></span>) is given +class="ec-lmtt-10x-x-109">\jobname.vrb</span></span></span> but the name may be changed. The extension (<span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">.vrb</span></span></span>) is given by: -</p><!--l. 85--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\ProbSolnFragileExt</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 85--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\ProbSolnFragileExt</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-4002"></a> <span -class="ec-lmtt-10">\ProbSolnFragileExt </span></div><hr> +class="ec-lmtt-10x-x-109">\ProbSolnFragileExt </span></div><hr> </p><!--l. 87--><p class="noindent" > The base name (<span -class="ec-lmtt-10">\jobname</span>) is given by: -</p><!--l. 89--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\ProbSolnFragileFile</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10x-x-109">\jobname</span>) is given by: +</p><!--l. 89--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\ProbSolnFragileFile</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-4003"></a> <span -class="ec-lmtt-10">\ProbSolnFragileFile </span></div><hr> +class="ec-lmtt-10x-x-109">\ProbSolnFragileFile </span></div><hr> </p><!--l. 91--><p class="noindent" > </p><!--l. 93--><p class="noindent" > </p> <!--l. 93--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">4 </span> <a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">4 </span> <a id="x1-50004"></a>Showing and Hiding Solutions</h3> <!--l. 95--><p class="noindent" >In addition to the <span -class="ec-lmss-10">answers</span><a +class="ec-lmss-10x-x-109">answers</span><a id="dx1-5001"></a> and <span -class="ec-lmss-10">noanswers</span><a - id="dx1-5002"></a> package options, it is also possible to show or -suppress the solutions using -</p><!--l. 98--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\showanswers</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmss-10x-x-109">noanswers</span><a + id="dx1-5002"></a> package options, it is also possible to +show or suppress the solutions using +</p><!--l. 98--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\showanswers</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-5003"></a> <span -class="ec-lmtt-10">\showanswers </span></div><hr> +class="ec-lmtt-10x-x-109">\showanswers </span></div><hr> </p><!--l. 100--><p class="noindent" > and -</p><!--l. 102--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\hideanswers</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 102--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\hideanswers</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-5004"></a> <span -class="ec-lmtt-10">\hideanswers </span></div><hr> +class="ec-lmtt-10x-x-109">\hideanswers </span></div><hr> </p><!--l. 104--><p class="noindent" > respectively. -</p><!--l. 107--><p class="indent" > The boolean variable <span -class="ec-lmss-10">showanswers</span><a +</p><!--l. 107--><p class="indent" > The boolean variable <span +class="ec-lmss-10x-x-109">showanswers</span><a id="dx1-5005"></a> determines whether the answers should be displayed. You can use this value with the <span -class="ec-lmss-10">ifthen</span><a - id="dx1-5006"></a> package to specify different text -depending on whether the solutions should be displayed. For example: +class="ec-lmss-10x-x-109">ifthen</span><a + id="dx1-5006"></a> package to specify +different text depending on whether the solutions should be displayed. For +example: - </p> - <div class="verbatim" id="verbatim-2"> + <div class="verbatim" id="verbatim-2"> Assignment 1\ifthenelse{\boolean{showanswers}}{ (Solution Sheet)}{} </div> <!--l. 113--><p class="nopar" > Alternatively you can use <span -class="ec-lmtt-10">\ifshowanswers</span><a +class="ec-lmtt-10x-x-109">\ifshowanswers</span><a id="dx1-5007"></a>…<span -class="ec-lmtt-10">\else</span>…<span -class="ec-lmtt-10">\fi</span>: +class="ec-lmtt-10x-x-109">\else</span>…<span +class="ec-lmtt-10x-x-109">\fi</span>: - </p> - <div class="verbatim" id="verbatim-3"> + <div class="verbatim" id="verbatim-3"> Assignment 1\ifshowanswers\space (Solution Sheet)\fi </div> <!--l. 118--><p class="nopar" > -</p><!--l. 120--><p class="indent" > For longer passages, you can use the environments -</p><!--l. 121--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">onlyproblem</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 120--><p class="indent" > For longer passages, you can use the environments +</p><!--l. 121--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">onlyproblem</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-5008"></a><a id="dx1-5009"></a> <span -class="ec-lmtt-10">\begin{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">onlyproblem</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">option</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">] </span></div><hr> +class="ec-lmtt-10x-x-109">\begin{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">onlyproblem</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">option</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">] </span></div><hr> </p><!--l. 123--><p class="noindent" > and -</p><!--l. 125--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">onlysolution</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 125--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">onlysolution</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-5010"></a><a id="dx1-5011"></a> <span -class="ec-lmtt-10">\begin{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">onlysolution</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">option</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">] </span></div><hr> +class="ec-lmtt-10x-x-109">\begin{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">onlysolution</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">option</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">] </span></div><hr> </p><!--l. 127--><p class="noindent" > For example: - </p> - <div class="verbatim" id="verbatim-4"> + <div class="verbatim" id="verbatim-4"> \begin{onlyproblem}%  <br />What is the derivative of $f(x) = x^2$?  <br />\end{onlyproblem}% @@ -492,130 +531,130 @@ For example:  <br />\end{onlysolution} </div> <!--l. 136--><p class="nopar" > The above will only display the question if <span -class="ec-lmss-10">showanswers</span><a - id="dx1-5012"></a> is false and will only display -the solution if <span -class="ec-lmss-10">showanswers</span><a - id="dx1-5013"></a> is true. If you want the question to appear in the answer -sheet as well as the solution, then don’t put the question in the <span -class="ec-lmss-10">onlyproblem</span><a +class="ec-lmss-10x-x-109">showanswers</span><a + id="dx1-5012"></a> is false and will only +display the solution if <span +class="ec-lmss-10x-x-109">showanswers</span><a + id="dx1-5013"></a> is true. If you want the question to appear in +the answer sheet as well as the solution, then don’t put the question in the +<span +class="ec-lmss-10x-x-109">onlyproblem</span><a id="dx1-5014"></a><a - id="dx1-5015"></a> -environment: + id="dx1-5015"></a> environment: - </p> - <div class="verbatim" id="verbatim-5"> + <div class="verbatim" id="verbatim-5"> What is the derivative of $f(x) = x^2$?  <br />\begin{onlysolution}%  <br />Solution: $f’(x) = 2x$  <br />\end{onlysolution} </div> <!--l. 147--><p class="nopar" > -</p><!--l. 149--><p class="indent" > <div class="important" title="Important Note"> If you want to include verbatim text in the body of <span -class="ec-lmss-10">onlyproblem</span><a +</p><!--l. 149--><p class="indent" > <div class="important" title="Important Note"> If you want to include verbatim text in the body of <span +class="ec-lmss-10x-x-109">onlyproblem</span><a id="dx1-5016"></a><a - id="dx1-5017"></a> or <span -class="ec-lmss-10">onlysolution</span><a + id="dx1-5017"></a> or +<span +class="ec-lmss-10x-x-109">onlysolution</span><a id="dx1-5018"></a><a - id="dx1-5019"></a>, you -need to specify <span -class="ec-lmtt-10">fragile </span>in the optional argument of the environment. (See <a + id="dx1-5019"></a>, you need to specify <span +class="ec-lmtt-10x-x-109">fragile </span>in the optional argument of the +environment. (See <a href="#x1-40003">§3 </a><a -href="#x1-40003">Verbatim<!--tex4ht:ref: sec:verbatim --></a> -for further details.) </div> +href="#x1-40003">Verbatim<!--tex4ht:ref: sec:verbatim --></a> for further details.) </div> </p><!--l. 154--><p class="noindent" > -</p><!--l. 156--><p class="indent" > If you use <span -class="ec-lmss-10">onlysolution </span>within the <span -class="ec-lmss-10">defproblem</span><a +</p><!--l. 156--><p class="indent" > If you use <span +class="ec-lmss-10x-x-109">onlysolution </span>within the <span +class="ec-lmss-10x-x-109">defproblem</span><a id="dx1-5020"></a><a - id="dx1-5021"></a> environment, the problem will be -tagged as having a solution and will be added to the list used by <span -class="ec-lmtt-10">\foreachsolution</span><a - id="dx1-5022"></a>. -The optional argument of <span -class="ec-lmss-10">onlysolution </span>(and <span -class="ec-lmss-10">onlyproblem</span><a - id="dx1-5023"></a><a - id="dx1-5024"></a>) is inherited from the parent + id="dx1-5021"></a> environment, the problem will +be tagged as having a solution and will be added to the list used by <span -class="ec-lmss-10">defproblem</span><a +class="ec-lmtt-10x-x-109">\foreachsolution</span><a + id="dx1-5022"></a>. The optional argument of <span +class="ec-lmss-10x-x-109">onlysolution </span>(and <span +class="ec-lmss-10x-x-109">onlyproblem</span><a + id="dx1-5023"></a><a + id="dx1-5024"></a>) is +inherited from the parent <span +class="ec-lmss-10x-x-109">defproblem</span><a id="dx1-5025"></a><a id="dx1-5026"></a> setting. </p><!--l. 162--><p class="noindent" > </p> <!--l. 162--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">5 </span> <a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">5 </span> <a id="x1-60005"></a>General Formatting Commands</h3> <!--l. 164--><p class="noindent" >The commands and environments described in this section are provided to assist formatting problems and their solutions. -</p><!--l. 166--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">solution</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 166--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">solution</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-6001"></a><a id="dx1-6002"></a> <span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\begin{solution}</span></span></span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">text</span><span -class="lmsy-10">⟩</span><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\end{solution}</span></span></span> </div><hr> +class="ec-lmtt-10x-x-109">\begin{solution}</span></span></span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">text</span><span +class="lmsy-10x-x-109">⟩</span><span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\end{solution}</span></span></span> </div><hr> </p><!--l. 168--><p class="noindent" > By default, this is equivalent to <spacer type=vertical size=10><span class="obeylines-h"> - <br /><span class="verb"><span -class="ec-lmtt-10">\par\noindent\textbf{\solutionname}:</span><span -class="ec-lmtt-10"> </span></span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">text</span><span -class="lmsy-10">⟩</span> - <br /><spacer type=vertical size=10></span> + <br /><span class="verb"><span +class="ec-lmtt-10x-x-109">\par\noindent\textbf{\solutionname}:</span><span +class="ec-lmtt-10x-x-109"> </span></span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">text</span><span +class="lmsy-10x-x-109">⟩</span> + <br /><spacer type=vertical size=10></span> where <span class="marginpar"><span -class="ec-lmtt-9">\solutionname</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10">\solutionname</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-6003"></a><span -class="ec-lmtt-10">\solutionname </span>defaults to “Solution”. Note that you must -place the <span -class="ec-lmss-10">solution</span><a +class="ec-lmtt-10x-x-109">\solutionname </span>defaults to “Solution”. Note that you +must place the <span +class="ec-lmss-10x-x-109">solution</span><a id="dx1-6004"></a><a id="dx1-6005"></a> environment inside the <span -class="ec-lmss-10">onlysolution </span>environment or between -<span -class="ec-lmtt-10">\ifshowanswers</span><a +class="ec-lmss-10x-x-109">onlysolution </span>environment or +between <span +class="ec-lmtt-10x-x-109">\ifshowanswers</span><a id="dx1-6006"></a>…<span -class="ec-lmtt-10">\fi </span>to ensure that it is suppressed when the solutions are not wanted. -(See <a +class="ec-lmtt-10x-x-109">\fi </span>to ensure that it is suppressed when the solutions +are not wanted. (See <a href="#x1-50004">§4 </a><a href="#x1-50004">Showing and Hiding Solutions<!--tex4ht:ref: sec:showanswers --></a>.) -</p><!--l. 181--><p class="indent" > Note that the <span -class="ec-lmss-10">probsoln </span>package will only define the <span -class="ec-lmss-10">solution</span><a +</p><!--l. 181--><p class="indent" > Note that the <span +class="ec-lmss-10x-x-109">probsoln </span>package will only define the <span +class="ec-lmss-10x-x-109">solution</span><a id="dx1-6007"></a><a - id="dx1-6008"></a> environment if it is not -already defined. -</p><!--l. 184--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">textenum</span><span -class="ec-lmtt-9"> </span></span><a + id="dx1-6008"></a> environment if it +is not already defined. +</p><!--l. 184--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">textenum</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-6009"></a><a id="dx1-6010"></a> <span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\begin{textenum}</span></span></span><span -class="ec-lmtt-10">…</span><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\end{textenum}</span></span></span> </div><hr> +class="ec-lmtt-10x-x-109">\begin{textenum}</span></span></span><span +class="ec-lmtt-10x-x-109">…</span><span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\end{textenum}</span></span></span> </div><hr> </p><!--l. 186--><p class="noindent" > The <span -class="ec-lmss-10">textenum </span>environment is like the <span -class="ec-lmss-10">enumerate</span><a +class="ec-lmss-10x-x-109">textenum </span>environment is like the <span +class="ec-lmss-10x-x-109">enumerate</span><a id="dx1-6011"></a><a - id="dx1-6012"></a> environment but is in-line. It uses -the same counter that the <span -class="ec-lmss-10">enumerate </span>environment would use at that level so -the question can be compact but the answer can use <span -class="ec-lmss-10">enumerate </span>instead. For + id="dx1-6012"></a> environment but is in-line. It +uses the same counter that the <span +class="ec-lmss-10x-x-109">enumerate </span>environment would use at that level +so the question can be compact but the answer can use <span +class="ec-lmss-10x-x-109">enumerate </span>instead. For + + example: - </p> - <div class="verbatim" id="verbatim-6"> + <div class="verbatim" id="verbatim-6"> \begin{onlyproblem}%  <br />  Differentiate the following:  <br />  \begin{textenum} @@ -640,65 +679,64 @@ example:  <br />\end{onlysolution} </div> <!--l. 215--><p class="nopar" > In this example, the items in the question are brief, so an <span -class="ec-lmss-10">enumerate</span><a +class="ec-lmss-10x-x-109">enumerate</span><a id="dx1-6013"></a><a - id="dx1-6014"></a> environment -would result in a lot of unnecessary white space, but the answers require more space, so -an <span -class="ec-lmss-10">enumerate </span>environment is more appropriate. Since the <span -class="ec-lmss-10">textenum </span>environment uses -the same counters as the <span -class="ec-lmss-10">enumerate </span>environment, the question and answer sheets use -consistent labelling. Note that there are other packages available on CTAN -that you can use to create in-line lists. Check the <a -href="http://www.tex.ac.uk/tex-archive/help/Catalogue/bytopic.html#enumeration" >TeX Catalogue</a> for further -details. -</p><!--l. 227--><p class="indent" > <span class="marginpar"><span -class="ec-lmtt-9">\correctitem</span><span -class="ec-lmtt-9"> </span></span><a + id="dx1-6014"></a> +environment would result in a lot of unnecessary white space, but the answers +require more space, so an <span +class="ec-lmss-10x-x-109">enumerate </span>environment is more appropriate. Since the +<span +class="ec-lmss-10x-x-109">textenum </span>environment uses the same counters as the <span +class="ec-lmss-10x-x-109">enumerate </span>environment, the +question and answer sheets use consistent labelling. Note that there are other +packages available on CTAN that you can use to create in-line lists. Check the +<a +href="http://www.tex.ac.uk/tex-archive/help/Catalogue/bytopic.html#enumeration" >TeX Catalogue</a> for further details. +</p><!--l. 227--><p class="indent" > <span class="marginpar"><span +class="ec-lmtt-10">\correctitem</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-6015"></a><span class="marginpar"><span -class="ec-lmtt-9">\incorrectitem</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10">\incorrectitem</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-6016"></a> -</p><!--l. 229--><p class="indent" > <hr><div title="Definition"><span -class="ec-lmtt-10">\correctitem</span><br +</p><!--l. 229--><p class="indent" > <hr><div title="Definition"><span +class="ec-lmtt-10x-x-109">\correctitem</span><br class="newline" /><span -class="ec-lmtt-10">\incorrectitem </span></div><hr> +class="ec-lmtt-10x-x-109">\incorrectitem </span></div><hr> </p><!--l. 231--><p class="noindent" > You can use the commands <span -class="ec-lmtt-10">\correctitem </span>and <span -class="ec-lmtt-10">\incorrectitem </span>in place of +class="ec-lmtt-10x-x-109">\correctitem </span>and <span +class="ec-lmtt-10x-x-109">\incorrectitem </span>in place of <span -class="ec-lmtt-10">\item</span><a +class="ec-lmtt-10x-x-109">\item</span><a id="dx1-6017"></a>. If the solutions are suppressed, these commands behave in the same way as <span -class="ec-lmtt-10">\item</span>, otherwise they format the item label using one of the commands: +class="ec-lmtt-10x-x-109">\item</span>, otherwise they format the item label using one of the commands: <span class="marginpar"><span -class="ec-lmtt-9">\correctitemformat</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10">\correctitemformat</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-6018"></a><span class="marginpar"><span -class="ec-lmtt-9">\incorrectitemformat</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10">\incorrectitemformat</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-6019"></a> -</p><!--l. 238--><p class="indent" > <hr><div title="Definition"><span -class="ec-lmtt-10">\correctitemformat{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}</span><br +</p><!--l. 238--><p class="indent" > <hr><div title="Definition"><span +class="ec-lmtt-10x-x-109">\correctitemformat{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span><br class="newline" /><span -class="ec-lmtt-10">\incorrectitemformat{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> +class="ec-lmtt-10x-x-109">\incorrectitemformat{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> </p><!--l. 240--><p class="noindent" > For example: - </p> - <div class="verbatim" id="verbatim-7"> + <div class="verbatim" id="verbatim-7"> Under which of the following functions does $S=\{a_1,a_2\}$  <br />become a probability space?  <br />\begin{enumerate} @@ -709,146 +747,147 @@ Under which of the following functions   <br />\end{enumerate} </div> <!--l. 251--><p class="nopar" > The default definition of <span -class="ec-lmtt-10">\correctitemformat </span>puts a frame around the label. +class="ec-lmtt-10x-x-109">\correctitemformat </span>puts a frame around the +label. </p><!--l. 255--><p class="noindent" > </p> <!--l. 255--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">6 </span> <a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">6 </span> <a id="x1-70006"></a>Defining a Problem</h3> -<!--l. 257--><p class="noindent" >It is possible to construct a problem sheet with solutions using the commands described -in the previous sections, however it is also possible to define a set of problems for later -use. In this way you can create an external file containing many problems some or all of -which can be loaded and used in a document. The <span -class="ec-lmss-10">probsoln </span>package has a default data -set labelled “default” in which you can store problems. Alternatively, you can -create multiple data sets. You can then iterate through each problem in a -problem set. You can use a previously defined problem more than once, which -means that by judicious use of <span -class="ec-lmss-10">onlyproblem</span><a +<!--l. 257--><p class="noindent" >It is possible to construct a problem sheet with solutions using the commands +described in the previous sections, however it is also possible to define a set of +problems for later use. In this way you can create an external file containing +many problems some or all of which can be loaded and used in a document. The +<span +class="ec-lmss-10x-x-109">probsoln </span>package has a default data set labelled “default” in which you can +store problems. Alternatively, you can create multiple data sets. You +can then iterate through each problem in a problem set. You can use a +previously defined problem more than once, which means that by judicious +use of <span +class="ec-lmss-10x-x-109">onlyproblem</span><a id="dx1-7001"></a><a id="dx1-7002"></a>, <span -class="ec-lmss-10">onlysolution</span><a +class="ec-lmss-10x-x-109">onlysolution</span><a id="dx1-7003"></a><a id="dx1-7004"></a> or the <span -class="ec-lmss-10">showanswers</span><a - id="dx1-7005"></a> -boolean variable in conjunction with <span -class="ec-lmtt-10">\showanswers</span><a +class="ec-lmss-10x-x-109">showanswers</span><a + id="dx1-7005"></a> boolean variable +in conjunction with <span +class="ec-lmtt-10x-x-109">\showanswers</span><a id="dx1-7006"></a> and <span -class="ec-lmtt-10">\hideanswers</span><a - id="dx1-7007"></a>, you can -print the solutions in a different location to the questions (for example in an +class="ec-lmtt-10x-x-109">\hideanswers</span><a + id="dx1-7007"></a>, you can print +the solutions in a different location to the questions (for example in an appendix). -</p><!--l. 272--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">defproblem</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 272--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">defproblem</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-7008"></a><a id="dx1-7009"></a> <span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\begin{defproblem}</span></span></span><span -class="ec-lmtt-10">[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">][</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">default args</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">option</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]</span><br +class="ec-lmtt-10x-x-109">\begin{defproblem}</span></span></span><span +class="ec-lmtt-10x-x-109">[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">][</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">default args</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">option</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]</span><br class="newline" /><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">definition</span><span -class="lmsy-10">⟩</span><br +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">definition</span><span +class="lmsy-10x-x-109">⟩</span><br class="newline" /><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\end{defproblem}</span></span></span> </div><hr> +class="ec-lmtt-10x-x-109">\end{defproblem}</span></span></span> </div><hr> </p><!--l. 276--><p class="noindent" > This defines the problem whose label is given by <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span>. The label must be unique for a -given data set and should not contain active characters or a comma. (Active characters -include the special characters such as $ and &, but some packages may make other -symbols active, such as the colon (:) character. For example, the <span -class="ec-lmss-10">ngerman</span><a +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span>. The label must be +unique for a given data set and should not contain active characters or +a comma. (Active characters include the special characters such as $ +and &, but some packages may make other symbols active, such as the +colon (:) character. For example, the <span +class="ec-lmss-10x-x-109">ngerman</span><a id="dx1-7010"></a> and <span -class="ec-lmss-10">babel</span><a - id="dx1-7011"></a> -packages make certain punctuation active. Check the relevant package documentation -for details.) -</p><!--l. 285--><p class="indent" > <div class="important" title="Important Note"> The final optional argument <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">option</span><span -class="lmsy-10">⟩ </span>may be <span -class="ec-lmtt-10">fragile </span>to indicate that the problem -contains verbatim text. Any occurrences of <span -class="ec-lmss-10">onlyproblem</span><a +class="ec-lmss-10x-x-109">babel</span><a + id="dx1-7011"></a> packages make +certain punctuation active. Check the relevant package documentation for +details.) + + +</p><!--l. 285--><p class="indent" > <div class="important" title="Important Note"> The final optional argument <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">option</span><span +class="lmsy-10x-x-109">⟩ </span>may be <span +class="ec-lmtt-10x-x-109">fragile </span>to indicate that the +problem contains verbatim text. Any occurrences of <span +class="ec-lmss-10x-x-109">onlyproblem</span><a id="dx1-7012"></a><a id="dx1-7013"></a> or <span -class="ec-lmss-10">onlysolution</span><a +class="ec-lmss-10x-x-109">onlysolution</span><a id="dx1-7014"></a><a - id="dx1-7015"></a> contained within -<span -class="ec-lmss-10">defproblem </span>are inherited from <span -class="ec-lmss-10">defproblem</span>. (See <a + id="dx1-7015"></a> +contained within <span +class="ec-lmss-10x-x-109">defproblem </span>are inherited from <span +class="ec-lmss-10x-x-109">defproblem</span>. (See <a href="#x1-40003">§3 </a><a -href="#x1-40003">Verbatim<!--tex4ht:ref: sec:verbatim --></a> for further details.) -</div> +href="#x1-40003">Verbatim<!--tex4ht:ref: sec:verbatim --></a> for +further details.) </div> </p><!--l. 291--><p class="noindent" > -</p><!--l. 293--><p class="indent" > If <span -class="ec-lmss-10">defproblem</span><a +</p><!--l. 293--><p class="indent" > If <span +class="ec-lmss-10x-x-109">defproblem</span><a id="dx1-7016"></a><a id="dx1-7017"></a> occurs in the document or is included via <span -class="ec-lmtt-10">\input</span><a +class="ec-lmtt-10x-x-109">\input</span><a id="dx1-7018"></a> or <span -class="ec-lmtt-10">\include</span><a - id="dx1-7019"></a>, then -the problem will be added to the default data set. If <span -class="ec-lmss-10">defproblem </span>occurs in an external -file that is loaded using one of the commands defined in <a +class="ec-lmtt-10x-x-109">\include</span><a + id="dx1-7019"></a>, +then the problem will be added to the default data set. If <span +class="ec-lmss-10x-x-109">defproblem </span>occurs in +an external file that is loaded using one of the commands defined in <a href="#x1-90008">§8 </a><a -href="#x1-90008">Loading Problems - - - -From External Files<!--tex4ht:ref: sec:load --></a> then the problem will be added to the specified data -set. -</p><!--l. 300--><p class="indent" > The contents of the <span -class="ec-lmss-10">defproblem</span><a +href="#x1-90008">Loading +Problems From External Files<!--tex4ht:ref: sec:load --></a> then the problem will be added to the specified +data set. +</p><!--l. 300--><p class="indent" > The contents of the <span +class="ec-lmss-10x-x-109">defproblem</span><a id="dx1-7020"></a><a - id="dx1-7021"></a> environment should be the text that defines the -problem. This may include any of the commands defined in <a + id="dx1-7021"></a> environment should be the text that defines +the problem. This may include any of the commands defined in <a href="#x1-50004">§4 </a><a -href="#x1-50004">Showing and Hiding -Solutions<!--tex4ht:ref: sec:showanswers --></a> and <a +href="#x1-50004">Showing and +Hiding Solutions<!--tex4ht:ref: sec:showanswers --></a> and <a href="#x1-60005">§5 </a><a href="#x1-60005">General Formatting Commands<!--tex4ht:ref: sec:formatting --></a>. -</p><!--l. 305--><p class="indent" > The problem may optionally take <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>arguments (where <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>is from 0 to 9). The -arguments can be referenced in the definition via <span -class="ec-lmtt-10">#1</span>,…,<span -class="ec-lmtt-10">#9</span>. If <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>is omitted then the -problem doesn’t take any arguments. The following example defines a problem with one -argument: +</p><!--l. 305--><p class="indent" > The problem may optionally take <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>arguments (where <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>is from 0 to 9). +The arguments can be referenced in the definition via <span +class="ec-lmtt-10x-x-109">#1</span>,…,<span +class="ec-lmtt-10x-x-109">#9</span>. If <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>is omitted +then the problem doesn’t take any arguments. The following example defines a +problem with one argument: - </p> - <div class="verbatim" id="verbatim-8"> + <div class="verbatim" id="verbatim-8"> \begin{defproblem}[1]{diffsin}  <br />Differentiate $f(x)=\sin(#1x)$.  <br />\begin{onlysolution}% @@ -859,26 +898,25 @@ argument:  <br />\end{defproblem} </div> <!--l. 320--><p class="nopar" > -</p><!--l. 322--><p class="indent" > The second optional argument <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">default args</span><span -class="lmsy-10">⟩ </span>supplies default problem arguments -that will automatically be used within <span -class="ec-lmtt-10">\thisproblem</span><a - id="dx1-7022"></a> when used in <span -class="ec-lmtt-10">\foreachproblem</span><a - id="dx1-7023"></a> -in conjunction with the package option <span -class="ec-lmss-10">usedefaultargs</span><a +</p><!--l. 322--><p class="indent" > The second optional argument <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">default args</span><span +class="lmsy-10x-x-109">⟩ </span>supplies default problem +arguments that will automatically be used within <span +class="ec-lmtt-10x-x-109">\thisproblem</span><a + id="dx1-7022"></a> when used in +<span +class="ec-lmtt-10x-x-109">\foreachproblem</span><a + id="dx1-7023"></a> in conjunction with the package option <span +class="ec-lmss-10x-x-109">usedefaultargs</span><a id="dx1-7024"></a>. (See <a -href="#x1-100009">§9 </a><a -href="#x1-100009">Iterating Through -Datasets<!--tex4ht:ref: sec:foreach --></a>.) For example: +href="#x1-110009">§9 +</a><a +href="#x1-110009">Iterating Through Datasets<!--tex4ht:ref: sec:foreach --></a>.) For example: - </p> - <div class="verbatim" id="verbatim-9"> + <div class="verbatim" id="verbatim-9"> \begin{defproblem}[1][{2}]{diffsin}  <br />Differentiate $f(x)=\sin(#1x)$.  <br />\begin{onlysolution}% @@ -889,74 +927,73 @@ Datasets<!--tex4ht:ref: sec:foreach --></a>.) For example:  <br />\end{defproblem} </div> <!--l. 336--><p class="nopar" > -</p><!--l. 338--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\newproblem</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 338--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\newproblem</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-7025"></a> <span -class="ec-lmtt-10">\newproblem[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">][</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">default args</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">problem</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">solution</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}</span> +class="ec-lmtt-10x-x-109">\newproblem[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">][</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">default args</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">problem</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">solution</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span> </div><hr> </p><!--l. 340--><p class="noindent" > This is a shortcut command for: <span class="obeylines-h"> - <span -class="ec-lmtt-10">\begin{defproblem}[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">][</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">default args</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}%</span> - <br /><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">problem</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">%</span> - <br /><span -class="ec-lmtt-10">\begin{onlysolution}%</span> - <br /><span -class="ec-lmtt-10">\begin{solution}%</span> - <br /><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">solution</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">%</span> - <br /><span -class="ec-lmtt-10">\end{solution}%</span> - <br /><span -class="ec-lmtt-10">\end{onlysolution}%</span> - <br /><span -class="ec-lmtt-10">\end{defproblem}</span></span> -</p><!--l. 352--><p class="indent" > For example: + <span +class="ec-lmtt-10x-x-109">\begin{defproblem}[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">][</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">default args</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}%</span> + <br /><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">problem</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">%</span> + <br /><span +class="ec-lmtt-10x-x-109">\begin{onlysolution}%</span> + <br /><span +class="ec-lmtt-10x-x-109">\begin{solution}%</span> + <br /><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">solution</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">%</span> + <br /><span +class="ec-lmtt-10x-x-109">\end{solution}%</span> + <br /><span +class="ec-lmtt-10x-x-109">\end{onlysolution}%</span> + <br /><span +class="ec-lmtt-10x-x-109">\end{defproblem}</span></span> +</p><!--l. 352--><p class="indent" > For example: - </p> - <div class="verbatim" id="verbatim-10"> + <div class="verbatim" id="verbatim-10"> \newproblem[1]{diffsin}{%  <br />  \(f(x) = \sin(#1x)\)  <br />}% @@ -966,10 +1003,9 @@ class="ec-lmtt-10">\end{defproblem}</span></span> </div> <!--l. 360--><p class="nopar" > is equivalent to - </p> - <div class="verbatim" id="verbatim-11"> + <div class="verbatim" id="verbatim-11"> \begin{defproblem}[1]{diffcos}%  <br />  \(f(x) = \cos(#1x)\)  <br />\begin{onlysolution}% @@ -979,22 +1015,21 @@ class="ec-lmtt-10">\end{defproblem}</span></span>  <br />\end{onlysolution}%  <br />\end{defproblem} </div> -<!--l. 371--><p class="nopar" > (In this example, the argument will need to be a positive number to avoid a double -minus in the answer. If you want to perform floating point arithmetic on the arguments, -then try the <span -class="ec-lmss-10">fp</span><a +<!--l. 371--><p class="nopar" > (In this example, the argument will need to be a positive number to avoid a +double minus in the answer. If you want to perform floating point arithmetic on +the arguments, then try the <span +class="ec-lmss-10x-x-109">fp</span><a id="dx1-7026"></a> or <span -class="ec-lmss-10">pgfmath</span><a +class="ec-lmss-10x-x-109">pgfmath</span><a id="dx1-7027"></a> packages.) -</p><!--l. 377--><p class="indent" > Alternatively, if you want to supply default arguments to use when iterating through -problems with <span -class="ec-lmtt-10">\foreachproblem</span><a +</p><!--l. 377--><p class="indent" > Alternatively, if you want to supply default arguments to use when iterating +through problems with <span +class="ec-lmtt-10x-x-109">\foreachproblem</span><a id="dx1-7028"></a>: - </p> - <div class="verbatim" id="verbatim-12"> + <div class="verbatim" id="verbatim-12"> \newproblem[1][{3}]{diffsin}{%  <br />  \(f(x) = \sin(#1x)\)  <br />}% @@ -1003,135 +1038,134 @@ class="ec-lmtt-10">\foreachproblem</span><a  <br />} </div> <!--l. 386--><p class="nopar" > -</p><!--l. 389--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\newproblem*</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 389--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\newproblem*</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-7029"></a> <span -class="ec-lmtt-10">\newproblem*[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">][</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">default args</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">definition</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}</span> +class="ec-lmtt-10x-x-109">\newproblem*[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">][</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">default args</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">definition</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span> </div><hr> </p><!--l. 391--><p class="noindent" > This is a shortcut for: <span class="obeylines-h"> - <span -class="ec-lmtt-10">\begin{defproblem}[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">][</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">default args</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}%</span> - <br /><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">definition</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">%</span> - <br /><span -class="ec-lmtt-10">\end{defproblem}</span></span> -</p><!--l. 399--><p class="indent" > <div class="important" title="Important Note"> Note that you can’t use verbatim text with <span -class="ec-lmtt-10">\newproblem </span>or <span -class="ec-lmtt-10">\newproblem*</span>. Use the -<span -class="ec-lmss-10">defproblem</span><a + <span +class="ec-lmtt-10x-x-109">\begin{defproblem}[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">][</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">default args</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}%</span> + <br /><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">definition</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">%</span> + <br /><span +class="ec-lmtt-10x-x-109">\end{defproblem}</span></span> +</p><!--l. 399--><p class="indent" > <div class="important" title="Important Note"> Note that you can’t use verbatim text with <span +class="ec-lmtt-10x-x-109">\newproblem </span>or <span +class="ec-lmtt-10x-x-109">\newproblem*</span>. +Use the <span +class="ec-lmss-10x-x-109">defproblem</span><a id="dx1-7030"></a><a id="dx1-7031"></a> environment instead with the <span -class="ec-lmtt-10">fragile option</span>. </div> +class="ec-lmtt-10x-x-109">fragile option</span>. </div> </p><!--l. 403--><p class="noindent" > </p><!--l. 405--><p class="noindent" > </p> <!--l. 405--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">7 </span> <a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">7 </span> <a id="x1-80007"></a>Using a Problem</h3> <!--l. 407--><p class="noindent" >Once you have defined a problem using <span -class="ec-lmss-10">defproblem</span><a +class="ec-lmss-10x-x-109">defproblem</span><a id="dx1-8001"></a><a id="dx1-8002"></a> or <span -class="ec-lmtt-10">\newproblem</span><a +class="ec-lmtt-10x-x-109">\newproblem</span><a id="dx1-8003"></a> (see <a -href="#x1-70006">§6 </a><a -href="#x1-70006">Defining a -Problem<!--tex4ht:ref: sec:defproblem --></a>), you can later display the problem using: -</p><!--l. 410--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\useproblem</span><span -class="ec-lmtt-9"> </span></span><a +href="#x1-70006">§6 +</a><a +href="#x1-70006">Defining a Problem<!--tex4ht:ref: sec:defproblem --></a>), you can later display the problem using: +</p><!--l. 410--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\useproblem</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-8004"></a> <span -class="ec-lmtt-10">\useproblem[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">arg</span><sub><span -class="rm-lmr-8x-x-95">1</span></sub><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}</span><span -class="ec-lmtt-10">…{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">arg</span><sub><span -class="lmmi-8x-x-95">N</span></sub><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> +class="ec-lmtt-10x-x-109">\useproblem[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">arg</span><sub><span +class="rm-lmr-8x-x-103">1</span></sub><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span><span +class="ec-lmtt-10x-x-109">…{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">arg</span><sub><span +class="lmmi-8x-x-103">N</span></sub><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span> +</div><hr> </p><!--l. 413--><p class="noindent" > where <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩ </span>is the name of the data set that contains the problem (the default data -set is used if omitted), <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">label</span><span -class="lmsy-10">⟩ </span>is the label identifying the required problem and <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">arg</span><sub><span -class="rm-lmr-8x-x-95">1</span></sub><span -class="lmsy-10">⟩</span>, …, -<span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">arg</span><sub><span -class="lmmi-8x-x-95">N</span></sub><span -class="lmsy-10">⟩ </span>are the arguments to pass to the problem, if the problem was defined to have -arguments (where <span -class="lmmi-10">N </span>is the number of arguments specified when the problem was -defined). -</p><!--l. 422--><p class="indent" > For example, in the previous section the problem <span -class="ec-lmtt-10">diffcos </span>was defined to have one -argument, so it can be used as follows: +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩ </span>is the name of the data set that contains the problem (the +default data set is used if omitted), <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">label</span><span +class="lmsy-10x-x-109">⟩ </span>is the label identifying the required +problem and <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">arg</span><sub><span +class="rm-lmr-8x-x-103">1</span></sub><span +class="lmsy-10x-x-109">⟩</span>, …, <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">arg</span><sub><span +class="lmmi-8x-x-103">N</span></sub><span +class="lmsy-10x-x-109">⟩ </span>are the arguments to pass to the problem, if the +problem was defined to have arguments (where <span +class="lmmi-10x-x-109">N </span>is the number of arguments +specified when the problem was defined). +</p><!--l. 422--><p class="indent" > For example, in the previous section the problem <span +class="ec-lmtt-10x-x-109">diffcos </span>was defined to have +one argument, so it can be used as follows: - </p> - <div class="verbatim" id="verbatim-13"> + <div class="verbatim" id="verbatim-13"> \useproblem{diffcos}{3} </div> <!--l. 426--><p class="nopar" > This will be equivalent to: - </p> - <div class="verbatim" id="verbatim-14"> + <div class="verbatim" id="verbatim-14"> \(f(x) = \cos(3x)\)  <br />\begin{onlysolution}%  <br />\begin{solution}% @@ -1143,367 +1177,575 @@ argument, so it can be used as follows: </p><!--l. 437--><p class="noindent" > </p> <!--l. 437--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">8 </span> <a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">8 </span> <a id="x1-90008"></a>Loading Problems From External Files</h3> <!--l. 439--><p class="noindent" >You can store all your problem definitions (see <a href="#x1-70006">§6 </a><a -href="#x1-70006">Defining a Problem<!--tex4ht:ref: sec:defproblem --></a>) in an external -file. These problems can all be appended to the default data set by including the file via -<span -class="ec-lmtt-10">\input</span><a - id="dx1-9001"></a> or they can be appended to other data sets using one of the commands -described below. Once you have loaded all the required problems, you can iterate -through the data sets using the commands described in <a -href="#x1-100009">§9 </a><a -href="#x1-100009">Iterating Through Datasets<!--tex4ht:ref: sec:foreach --></a>. -Note that the commands below will create a new data set, if the named data set doesn’t +href="#x1-70006">Defining a Problem<!--tex4ht:ref: sec:defproblem --></a>) in an +external file. These problems can all be appended to the default data set by +including the file via <span +class="ec-lmtt-10x-x-109">\input</span><a + id="dx1-9001"></a> or they can be appended to other data sets +using one of the commands described below. Once you have loaded all +the required problems, you can iterate through the data sets using the +commands described in <a +href="#x1-110009">§9 </a><a +href="#x1-110009">Iterating Through Datasets<!--tex4ht:ref: sec:foreach --></a>. Note that the +commands below will create a new data set, if the named data set doesn’t exist. -</p><!--l. 450--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\loadallproblems</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 450--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\loadallproblems</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-9002"></a> <span -class="ec-lmtt-10">\loadallproblems[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> +class="ec-lmtt-10x-x-109">\loadallproblems[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> </p><!--l. 452--><p class="noindent" > This will load all problems defined in <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩ </span>and append them to the specified -data set, in the order in which they are defined in the file. If <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩ </span>is -omitted, the default data set will be used. If <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩ </span>doesn’t exist, it will be +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩ </span>and append them to the +specified data set, in the order in which they are defined in the file. If <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span> +is omitted, the default data set will be used. If <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩ </span>doesn’t exist, it will be created. -</p><!--l. 459--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\loadselectedproblems</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 459--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\loadselectedproblems</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-9003"></a> <span -class="ec-lmtt-10">\loadselectedproblems[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">labels</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}</span> +class="ec-lmtt-10x-x-109">\loadselectedproblems[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">labels</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span> </div><hr> </p><!--l. 461--><p class="noindent" > This is like <span -class="ec-lmtt-10">\loadallproblems</span>, but only those problems whose label is listed in the -comma-separated list <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">labels</span><span -class="lmsy-10">⟩ </span>are loaded. For example, if I have some problems defined -in the file <span -class="ec-lmtt-10">derivatives.tex</span>, then +class="ec-lmtt-10x-x-109">\loadallproblems</span>, but only those problems whose label is listed in +the comma-separated list <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">labels</span><span +class="lmsy-10x-x-109">⟩ </span>are loaded. For example, if I have some +problems defined in the file <span +class="ec-lmtt-10x-x-109">derivatives.tex</span>, then - </p> - <div class="verbatim" id="verbatim-15"> + <div class="verbatim" id="verbatim-15"> \loadselectedproblems{diffsin,diffcos}{derivatives} </div> <!--l. 468--><p class="nopar" > will only load the problems whose labels are <span -class="ec-lmtt-10">diffsin </span>and <span -class="ec-lmtt-10">diffcos</span>, respectively. All -the other problems in the file will remain undefined. -</p><!--l. 473--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\loadexceptproblems</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10x-x-109">diffsin </span>and <span +class="ec-lmtt-10x-x-109">diffcos</span>, +respectively. All the other problems in the file will remain undefined. +</p><!--l. 473--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\loadexceptproblems</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-9004"></a> <span -class="ec-lmtt-10">\loadexceptproblems[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">exception list</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}</span> -</div><hr> +class="ec-lmtt-10x-x-109">\loadexceptproblems[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">exception</span> +<span +class="ec-lmri-10x-x-109">list</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> </p><!--l. 475--><p class="noindent" > This is the reverse of <span -class="ec-lmtt-10">\loadselectedproblems</span>. This loads all problems except those -whose labels are listed in <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">exception list</span><span -class="lmsy-10">⟩</span>. -</p><!--l. 480--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\loadrandomproblems</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10x-x-109">\loadselectedproblems</span>. This loads all problems except +those whose labels are listed in <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">exception list</span><span +class="lmsy-10x-x-109">⟩</span>. +</p><!--l. 480--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\loadrandomproblems</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-9005"></a> <span -class="ec-lmtt-10">\loadrandomproblems[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}</span> +class="ec-lmtt-10x-x-109">\loadrandomproblems[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span> </div><hr> </p><!--l. 482--><p class="noindent" > This randomly loads <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>problems from <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩ </span>and adds them to the given data -set. If <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩ </span>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 <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>problems defined in +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>problems from <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩ </span>and adds them to the given +data set. If <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩ </span>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 <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>problems defined in <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span>. -</p><!--l. 490--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\loadrandomexcept</span><span -class="ec-lmtt-9"> </span></span><a +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span>. +</p><!--l. 490--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\loadrandomexcept</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-9006"></a> <span -class="ec-lmtt-10">\loadrandomexcept[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">exception</span> +class="ec-lmtt-10x-x-109">\loadrandomexcept[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">exception</span> <span -class="ec-lmri-10">list</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> +class="ec-lmri-10x-x-109">list</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> </p><!--l. 493--><p class="noindent" > This is similar to <span -class="ec-lmtt-10">\loadrandomproblems </span>except that it won’t load those problems -whose labels are listed in <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">exception list</span><span -class="lmsy-10">⟩</span>. -</p><!--l. 497--><p class="indent" > Note that the random number generator has been modified in version 3.01 in order -to fix a bug. If you want to ensure that your random numbers are compatible with -earlier versions, you can switch to the old generator using -</p><!--l. 501--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\PSNuseoldrandom</span><span -class="ec-lmtt-9"> </span></span><a +class="ec-lmtt-10x-x-109">\loadrandomproblems </span>except that it won’t load those +problems whose labels are listed in <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">exception list</span><span +class="lmsy-10x-x-109">⟩</span>. <span +class="ec-lmbx-10x-x-109">If you want to</span> +<span +class="ec-lmbx-10x-x-109">automatically exclude problems included in previous documents, see</span> +<a +href="#x1-100008.1"><span +class="ec-lmbx-10x-x-109">§8.1 </span></a><a +href="#x1-100008.1"><span +class="ec-lmbx-10x-x-109">Randomly Selecting Problems Not Selected in Previous</span> +<span +class="ec-lmbx-10x-x-109">Documents</span><!--tex4ht:ref: sec:exprev --></a><span +class="ec-lmbx-10x-x-109">.</span> +</p><!--l. 499--><p class="indent" > Note that the random number generator has been modified in version 3.01 in +order to fix a bug. If you want to ensure that your random numbers are +compatible with earlier versions, you can switch to the old generator +using +</p><!--l. 503--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\PSNuseoldrandom</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-9007"></a> <span -class="ec-lmtt-10">\PSNuseoldrandom </span></div><hr> -</p><!--l. 503--><p class="noindent" > -</p><!--l. 505--><p class="indent" > <div class="important" title="Important Note"> It is generally not a good idea to place anything in <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩ </span>that is not inside the -body of <span -class="ec-lmss-10">defproblem</span><a +class="ec-lmtt-10x-x-109">\PSNuseoldrandom </span></div><hr> +</p><!--l. 505--><p class="noindent" > +</p><!--l. 507--><p class="indent" > <div class="important" title="Important Note"> It is generally not a good idea to place anything in <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩ </span>that is not +inside the body of <span +class="ec-lmss-10x-x-109">defproblem</span><a id="dx1-9008"></a><a id="dx1-9009"></a> or in the arguments to <span -class="ec-lmtt-10">\newproblem</span><a - id="dx1-9010"></a> or <span -class="ec-lmtt-10">\newproblem*</span><a - id="dx1-9011"></a>. All -the commands in this section input the external file within a local scope, so -command definitions would need to be made global to have any effect. In addition, +class="ec-lmtt-10x-x-109">\newproblem</span><a + id="dx1-9010"></a> or <span -class="ec-lmtt-10">\loadrandomproblems </span>has to load each file twice, which means that anything outside a -problem definition will be parsed twice. </div> -</p><!--l. 514--><p class="noindent" > -</p><!--l. 516--><p class="noindent" > -</p> -<!--l. 516--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">9 </span> <a - id="x1-100009"></a>Iterating Through Datasets</h3> -<!--l. 518--><p class="noindent" >Once you have defined all your problems for a given data set, you can use an individual -problem with <span -class="ec-lmtt-10">\useproblem</span><a - id="dx1-10001"></a> (see <a -href="#x1-80007">§7 </a><a -href="#x1-80007">Using a Problem<!--tex4ht:ref: sec:useproblem --></a>) but it is more likely that you will -want to iterate through all the problems so that you don’t need to remember the labels -of all the problems you have defined. +class="ec-lmtt-10x-x-109">\newproblem*</span><a + id="dx1-9011"></a>. All the commands in this section input the external file within a +local scope, so command definitions would need to be made global to have any +effect. In addition, <span +class="ec-lmtt-10x-x-109">\loadrandomproblems </span>has to load each file twice, which +means that anything outside a problem definition will be parsed twice. +</div> - -</p><!--l. 524--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\foreachproblem</span><span -class="ec-lmtt-9"> </span></span><a +</p><!--l. 516--><p class="noindent" > +</p><!--l. 519--><p class="noindent" > +</p> +<!--l. 519--><p class="noindent" ><a +href="#top">Top</a></p><h4 class="subsectionHead"><span class="titlemark">8.1 </span> <a + id="x1-100008.1"></a>Randomly Selecting Problems Not Selected in Previous Documents</h4> +<!--l. 522--><p class="noindent" >Suppose you have a large set of questions that you want to randomly select for +assignments and exams. The chances are, you don’t want to include questions +that have been previously set for, say, the last three years. That is, you don’t +want to select questions the students may already have seen. As from version +3.03, you can now do this. +</p><!--l. 529--><p class="indent" > The <span +class="ec-lmss-10x-x-109">probsoln</span><a + id="dx1-10001"></a> package defaults to the UK academic year, which starts in +September. If this isn’t appropriate, you can change it using: +</p><!--l. 532--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\SetStartMonth</span><span +class="ec-lmtt-10"> </span></span><a id="dx1-10002"></a> <span -class="ec-lmtt-10">\foreachproblem[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">body</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 526--><p class="noindent" > +class="ec-lmtt-10x-x-109">\SetStartMonth{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 534--><p class="noindent" > +where <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>is the number of the month. (1 = January, 2 = February, +etc.) +</p><!--l. 538--><p class="indent" > The <span +class="ec-lmri-10x-x-109">start year </span>is the calender year in effect when the academic +year started. For example, if this is the academic year 2011/12, then +the start year is 2011. This is automatically set to the start of the +current academic year. It is also updated when <span +class="ec-lmtt-10x-x-109">\SetStartMonth </span>is +used.<span class="footnote-mark"><a +href="#fn1x0" id="fn1x0-bk"><sup class="textsuperscript">1</sup></a></span><a + id="x1-10003f1"></a> +If you want to set it to a specific year, you can use: +</p><!--l. 545--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\SetStartYear</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-10004"></a> <span +class="ec-lmtt-10x-x-109">\SetStartYear{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">year</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 547--><p class="noindent" > +For example: <span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\SetStartYear{2008}</span></span></span> indicates the academic year 2008/9. +</p><!--l. 551--><p class="indent" > There are two files concerned with previously used labels. They are: + </p><dl class="description"><dt class="description"> +<span +class="ec-lmssbx-10x-x-109">The previously used labels file</span> </dt><dd +class="description">This keeps track of all problems used in + previous years, as well as problems used by other documents that have + this as their previously used labels file, and it contains the problem + labels from the last run of the current document. + </dd><dt class="description"> +<span +class="ec-lmssbx-10x-x-109">The current used labels file</span> </dt><dd +class="description">This defaults to <span +class="ec-lmtt-10x-x-109">\jobname.prb</span>, but the name can + be changed using: + <!--l. 562--><p class="noindent" ><hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\SetUsedFileName</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-10005"></a> <span +class="ec-lmtt-10x-x-109">\SetUsedFileName{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">name</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> + </p><!--l. 564--><p class="noindent" > + This file keeps track of all the labels used in the current document from + the previous <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> run. Note that if you want to delete this file, first + clear it using + + + </p><!--l. 568--><p class="noindent" ><hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\ClearUsedFile</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-10006"></a> <span +class="ec-lmtt-10x-x-109">\ClearUsedFile{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">file</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> + </p><!--l. 570--><p class="noindent" > + in place of <span +class="ec-lmtt-10x-x-109">\ExcludePreviousFile{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">file</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}</span>, described below. The + argument <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">file</span><span +class="lmsy-10x-x-109">⟩ </span>is the previously used labels file described above. + <span +class="ec-lmtt-10x-x-109">\ClearUsedFile </span>will remove all labels in the current used labels file from + the previously used labels file and clear the current used labels file. Once + this file is empty, it may then be deleted. +</p> + </dd></dl> +<!--l. 580--><p class="indent" > Before loading randomly selected problems, first specify the previously used +labels file with the command: +</p><!--l. 582--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\ExcludePreviousFile</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-10007"></a> <span +class="ec-lmtt-10x-x-109">\ExcludePreviousFile[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">number of years</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">file</span> +<span +class="ec-lmri-10x-x-109">name</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 584--><p class="noindent" > +where <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">file name</span><span +class="lmsy-10x-x-109">⟩ </span>is the name of the previously used file. The optional argument +<span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">number of years</span><span +class="lmsy-10x-x-109">⟩ </span>specifies the year cut-off. This defaults to 3, which means that +only those labels used this year or the previous 2 years will be kept. Any +problems used before then may be reused. +</p><!--l. 591--><p class="indent" > Suppose I’m lecturing a first year undergraduate mathematics course +(designated, say, mth101). I want to set assignments on each topic and an exam +at the end of the year (as well as a resit or second sitting paper). I’ve got +databases with problems for each topic, but the first and second sitting +exams mustn’t include any of the problems used in the assignments +or any problems used in assignments or exams for the previous two +academic years. I’m going to arrange my directory structure as follows: +</p> + <ul class="itemize1"> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">mth101/</span> + <ul class="itemize2"> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">assignment1/ </span>(differentiation) + <ul class="itemize3"> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">assignment1.tex</span></li></ul> + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">assignment2/ </span>(probability spaces) + <ul class="itemize3"> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">assignment2.tex</span></li></ul> + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">assignment3/ </span>(linear algebra) + <ul class="itemize3"> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">assignment3.tex</span></li></ul> + + + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">exams/</span> + <ul class="itemize3"> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">exam.tex </span>(first sitting) + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">resit.tex </span>(second sitting)</li></ul> + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">databases/</span> + <ul class="itemize3"> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">differentiation.tex</span> + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">probabilityspaces.tex</span> + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">linearalgebra.tex</span></li></ul> + </li> + <li class="itemize"><span +class="ec-lmtt-10x-x-109">previouslabels.tex </span>(created by <span +class="ec-lmss-10x-x-109">probsoln</span><a + id="dx1-10008"></a>)</li></ul> + </li></ul> +<!--l. 629--><p class="noindent" > +</p> +<!--l. 629--><p class="noindent" ><a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">9 </span> <a + id="x1-110009"></a>Iterating Through Datasets</h3> +<!--l. 631--><p class="noindent" >Once you have defined all your problems for a given data set, you can use an +individual problem with <span +class="ec-lmtt-10x-x-109">\useproblem</span><a + id="dx1-11001"></a> (see <a +href="#x1-80007">§7 </a><a +href="#x1-80007">Using a Problem<!--tex4ht:ref: sec:useproblem --></a>) but it is more +likely that you will want to iterate through all the problems so that +you don’t need to remember the labels of all the problems you have +defined. +</p><!--l. 637--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\foreachproblem</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-11002"></a> <span +class="ec-lmtt-10x-x-109">\foreachproblem[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">body</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 639--><p class="noindent" > This does <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">body</span><span -class="lmsy-10">⟩ </span>for each problem in the given data set. If <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩ </span>is omitted, the -default data set is used. Within <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">body</span><span -class="lmsy-10">⟩ </span>you can use -</p><!--l. 530--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\thisproblem</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-10003"></a> <span -class="ec-lmtt-10">\thisproblem </span></div><hr> -</p><!--l. 532--><p class="noindent" > +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">body</span><span +class="lmsy-10x-x-109">⟩ </span>for each problem in the given data set. If <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩ </span>is omitted, +the default data set is used. Within <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">body</span><span +class="lmsy-10x-x-109">⟩ </span>you can use +</p><!--l. 643--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\thisproblem</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-11003"></a> <span +class="ec-lmtt-10x-x-109">\thisproblem </span></div><hr> +</p><!--l. 645--><p class="noindent" > to use the current problem and -</p><!--l. 534--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\thisproblemlabel</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-10004"></a> <span -class="ec-lmtt-10">\thisproblemlabel </span></div><hr> -</p><!--l. 536--><p class="noindent" > +</p><!--l. 647--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\thisproblemlabel</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-11004"></a> <span +class="ec-lmtt-10x-x-109">\thisproblemlabel </span></div><hr> +</p><!--l. 649--><p class="noindent" > to access the current label. If the problem requires arguments, and no default -arguments were supplied in the problem definition or the package option <span -class="ec-lmss-10">usedefaultargs</span><a - id="dx1-10005"></a> -was not used, then you will be prompted for arguments, so if you want to use this -approach you will need to use <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span -class="E">E</span>X</span></span> in interactive mode. If you do provide -arguments, they will be stored in the event that you need to iterate through the data -set again. The arguments will be included in <span -class="ec-lmtt-10">\thisproblem</span>, so you only need to use +arguments were supplied in the problem definition or the package option <span -class="ec-lmtt-10">\thisproblem </span>without having to specify <span -class="ec-lmtt-10">\useproblem</span><a - id="dx1-10006"></a>. -</p><!--l. 548--><p class="indent" > For example, to iterate through all problems in the default data set: +class="ec-lmss-10x-x-109">usedefaultargs</span><a + id="dx1-11005"></a> was not used, then you will be prompted for arguments, so if you + + +want to use this approach you will need to use <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> in interactive mode. If +you do provide arguments, they will be stored in the event that you need to +iterate through the data set again. The arguments will be included in +<span +class="ec-lmtt-10x-x-109">\thisproblem</span>, so you only need to use <span +class="ec-lmtt-10x-x-109">\thisproblem </span>without having to specify +<span +class="ec-lmtt-10x-x-109">\useproblem</span><a + id="dx1-11006"></a>. +</p><!--l. 661--><p class="indent" > For example, to iterate through all problems in the default data set: - </p> - <div class="verbatim" id="verbatim-16"> + <div class="verbatim" id="verbatim-16"> \begin{enumerate}  <br />\foreachproblem{\item\thisproblem}  <br />\end{enumerate} </div> -<!--l. 554--><p class="nopar" > -</p><!--l. 556--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\foreachsolution</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-10007"></a> <span -class="ec-lmtt-10">\foreachsolution[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">data set</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">body</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 558--><p class="noindent" > +<!--l. 667--><p class="nopar" > +</p><!--l. 669--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\foreachsolution</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-11007"></a> <span +class="ec-lmtt-10x-x-109">\foreachsolution[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">data set</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">body</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 671--><p class="noindent" > This is equivalent to <span -class="ec-lmtt-10">\foreachsolution</span>, but only iterates through problems that -contain the <span -class="ec-lmss-10">onlysolution</span><a - id="dx1-10008"></a><a - id="dx1-10009"></a> environment. Note that you still need to use <span -class="ec-lmtt-10">\showanswers</span><a - id="dx1-10010"></a> or -the <span -class="ec-lmss-10">answers</span><a - id="dx1-10011"></a> package option for the contents of the <span -class="ec-lmss-10">onlysolution</span><a - id="dx1-10012"></a><a - id="dx1-10013"></a> environment to -appear. -</p><!--l. 565--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\foreachdataset</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-10014"></a> <span -class="ec-lmtt-10">\foreachdataset{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">cmd</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">body</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 567--><p class="noindent" > +class="ec-lmtt-10x-x-109">\foreachsolution</span>, but only iterates through problems +that contain the <span +class="ec-lmss-10x-x-109">onlysolution</span><a + id="dx1-11008"></a><a + id="dx1-11009"></a> environment. Note that you still need to use +<span +class="ec-lmtt-10x-x-109">\showanswers</span><a + id="dx1-11010"></a> or the <span +class="ec-lmss-10x-x-109">answers</span><a + id="dx1-11011"></a> package option for the contents of the <span +class="ec-lmss-10x-x-109">onlysolution</span><a + id="dx1-11012"></a><a + id="dx1-11013"></a> +environment to appear. +</p><!--l. 678--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\foreachdataset</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-11014"></a> <span +class="ec-lmtt-10x-x-109">\foreachdataset{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">cmd</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">body</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 680--><p class="noindent" > This does <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">body</span><span -class="lmsy-10">⟩ </span>for each of the defined data sets. Within <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">body</span><span -class="lmsy-10">⟩</span>, <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">cmd</span><span -class="lmsy-10">⟩ </span>will be set to -the name of the current data set. For example, to display all problems in all data -sets: +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">body</span><span +class="lmsy-10x-x-109">⟩ </span>for each of the defined data sets. Within <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">body</span><span +class="lmsy-10x-x-109">⟩</span>, <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">cmd</span><span +class="lmsy-10x-x-109">⟩ </span>will be +set to the name of the current data set. For example, to display all problems in +all data sets: - </p> - <div class="verbatim" id="verbatim-17"> + <div class="verbatim" id="verbatim-17"> \begin{enumerate}  <br />\foreachdataset{\thisdataset}{%  <br />\foreachproblem[\thisdataset]{\item\thisproblem}}  <br />\end{enumerate} </div> -<!--l. 576--><p class="nopar" > -</p><!--l. 578--><p class="indent" > Suppose I have two external files called <span -class="ec-lmtt-10">derivatives.tex </span>and <span -class="ec-lmtt-10">probspaces.tex</span> -which define problems using both <span -class="ec-lmss-10">onlyproblem</span><a - id="dx1-10015"></a><a - id="dx1-10016"></a> and <span -class="ec-lmss-10">onlysolution</span><a - id="dx1-10017"></a><a - id="dx1-10018"></a> for example: +<!--l. 689--><p class="nopar" > +</p><!--l. 691--><p class="indent" > Suppose I have two external files called <span +class="ec-lmtt-10x-x-109">derivatives.tex </span>and +<span +class="ec-lmtt-10x-x-109">probspaces.tex </span>which define problems using both <span +class="ec-lmss-10x-x-109">onlyproblem</span><a + id="dx1-11015"></a><a + id="dx1-11016"></a> and <span +class="ec-lmss-10x-x-109">onlysolution</span><a + id="dx1-11017"></a><a + id="dx1-11018"></a> +for example: - </p> - <div class="verbatim" id="verbatim-18"> + <div class="verbatim" id="verbatim-18"> \begin{defproblem}{cosxsqsinx}%  <br />\begin{onlyproblem}%  <br />$y = \cos(x^2)\sin x$.% @@ -1513,30 +1755,30 @@ class="ec-lmss-10">onlysolution</span><a  <br />\end{onlysolution}%  <br />\end{defproblem} </div> -<!--l. 591--><p class="nopar" > I can write a document that creates two data sets, one for the derivative problems and -one for the problems about probability spaces. I can then use <span -class="ec-lmtt-10">\hideanswers</span><a - id="dx1-10019"></a> and iterate -through the require data set to produce the problems. Later, I can use <span -class="ec-lmtt-10">\showanswers</span><a - id="dx1-10020"></a> -and iterate over all problems defined in both data sets to produce the chapter -containing all the answers. When displaying the questions, I have taken advantage of -the fact that I can cross-reference items within an <span -class="ec-lmss-10">enumerate</span><a - id="dx1-10021"></a><a - id="dx1-10022"></a> environment, -and redefined <span -class="ec-lmtt-10">\theenumi</span><a - id="dx1-10023"></a> to label the questions according to the chapter. The -cross-reference label is constructed from the problem label and is referenced -in the answer section to ensure that the answers have the same label as the +<!--l. 704--><p class="nopar" > I can write a document that creates two data sets, one for the derivative +problems and one for the problems about probability spaces. I can then use +<span +class="ec-lmtt-10x-x-109">\hideanswers</span><a + id="dx1-11019"></a> and iterate through the require data set to produce the +problems. Later, I can use <span +class="ec-lmtt-10x-x-109">\showanswers</span><a + id="dx1-11020"></a> and iterate over all problems defined +in both data sets to produce the chapter containing all the answers. When +displaying the questions, I have taken advantage of the fact that I can +cross-reference items within an <span +class="ec-lmss-10x-x-109">enumerate</span><a + id="dx1-11021"></a><a + id="dx1-11022"></a> environment, and redefined +<span +class="ec-lmtt-10x-x-109">\theenumi</span><a + id="dx1-11023"></a> to label the questions according to the chapter. The cross-reference +label is constructed from the problem label and is referenced in the +answer section to ensure that the answers have the same label as the questions. - </p> - <div class="verbatim" id="verbatim-19"> + <div class="verbatim" id="verbatim-19"> \documentclass{report}  <br />\usepackage{probsoln}  <br />\begin{document} @@ -1571,241 +1813,234 @@ questions.  <br />\end{itemize}  <br />\end{document} </div> -<!--l. 644--><p class="nopar" > -</p><!--l. 646--><p class="noindent" > -</p> -<!--l. 646--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">10 </span> <a - id="x1-1100010"></a>Random Number Generator</h3> -<!--l. 648--><p class="noindent" >This package provides a pseudo-random number generator that is used by -<span -class="ec-lmtt-10">\loadrandomproblems</span><a - id="dx1-11001"></a>. As noted earlier the random number generator has been +<!--l. 757--><p class="nopar" > - -modified in version 3.01 in order to fix a bug. If you want to ensure that your random -numbers are compatible with earlier versions, you can switch to the old generator -using -</p><!--l. 653--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\PSNuseoldrandom</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-11002"></a> <span -class="ec-lmtt-10">\PSNuseoldrandom </span></div><hr> -</p><!--l. 655--><p class="noindent" > -</p><!--l. 657--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\PSNrandseed</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-11003"></a> <span -class="ec-lmtt-10">\PSNrandseed{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 659--><p class="noindent" > +</p><!--l. 759--><p class="noindent" > +</p> +<!--l. 759--><p class="noindent" ><a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">10 </span> <a + id="x1-1200010"></a>Random Number Generator</h3> +<!--l. 761--><p class="noindent" >This package provides a pseudo-random number generator that is used by +<span +class="ec-lmtt-10x-x-109">\loadrandomproblems</span><a + id="dx1-12001"></a>. As noted earlier the random number generator has been +modified in version 3.01 in order to fix a bug. If you want to ensure that your +random numbers are compatible with earlier versions, you can switch to the old +generator using +</p><!--l. 766--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\PSNuseoldrandom</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-12002"></a> <span +class="ec-lmtt-10x-x-109">\PSNuseoldrandom </span></div><hr> +</p><!--l. 768--><p class="noindent" > +</p><!--l. 770--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\PSNrandseed</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-12003"></a> <span +class="ec-lmtt-10x-x-109">\PSNrandseed{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 772--><p class="noindent" > This sets the seed to <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>which must be a non-zero integer. For example, to +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>which must be a non-zero integer. For example, to generate a different set of random numbers every time you <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> your document,<span class="footnote-mark"><a -href="#fn1x0" id="fn1x0-bk"><sup class="textsuperscript">1</sup></a></span><a - id="x1-11004f1"></a> +href="#fn2x0" id="fn2x0-bk"><sup class="textsuperscript">2</sup></a></span><a + id="x1-12004f2"></a> put the following in your preamble: - </p> - <div class="verbatim" id="verbatim-20"> + <div class="verbatim" id="verbatim-20"> \PSNrandseed{\time} </div> -<!--l. 667--><p class="nopar" > or to generate a different set of random numbers every year you <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +<!--l. 780--><p class="nopar" > or to generate a different set of random numbers every year you <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> your document: - </p> - <div class="verbatim" id="verbatim-21"> + <div class="verbatim" id="verbatim-21"> \PSNrandseed{\year} </div> -<!--l. 672--><p class="nopar" > -</p><!--l. 674--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\PSNgetrandseed</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-11005"></a> <span -class="ec-lmtt-10">\PSNgetrandseed{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">register</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 676--><p class="noindent" > +<!--l. 785--><p class="nopar" > +</p><!--l. 787--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\PSNgetrandseed</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-12005"></a> <span +class="ec-lmtt-10x-x-109">\PSNgetrandseed{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">register</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 789--><p class="noindent" > This stores the current seed in the count register specified by <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">register</span><span -class="lmsy-10">⟩</span>. For +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">register</span><span +class="lmsy-10x-x-109">⟩</span>. For example: - </p> - <div class="verbatim" id="verbatim-22"> + <div class="verbatim" id="verbatim-22"> \newcount\myseed  <br />\PSNgetrandseed{\myseed} </div> -<!--l. 683--><p class="nopar" > -</p><!--l. 685--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\PSNrandom</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-11006"></a> <span -class="ec-lmtt-10">\PSNrandom{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">register</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 687--><p class="noindent" > +<!--l. 796--><p class="nopar" > +</p><!--l. 798--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\PSNrandom</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-12006"></a> <span +class="ec-lmtt-10x-x-109">\PSNrandom{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">register</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 800--><p class="noindent" > Generates a random integer from 1 to <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>and stores in the count register specified by -<span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">register</span><span -class="lmsy-10">⟩</span>. For example, the following generates an integer from 1 to 10 and stores it in -the register <span -class="ec-lmtt-10">\myreg</span>: +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>and stores in the count register +specified by <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">register</span><span +class="lmsy-10x-x-109">⟩</span>. For example, the following generates an integer from 1 to +10 and stores it in the register <span +class="ec-lmtt-10x-x-109">\myreg</span>: - </p> - <div class="verbatim" id="verbatim-23"> + <div class="verbatim" id="verbatim-23"> \newcount\myreg  <br />\PSNrandom{\myreg}{10} </div> -<!--l. 695--><p class="nopar" > -</p><!--l. 697--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\random</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-11007"></a> <span -class="ec-lmtt-10">\random{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">counter</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">min</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">max</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 699--><p class="noindent" > +<!--l. 808--><p class="nopar" > +</p><!--l. 810--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\random</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-12007"></a> <span +class="ec-lmtt-10x-x-109">\random{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">counter</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">min</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">max</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 812--><p class="noindent" > Generates a random integer from <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">min</span><span -class="lmsy-10">⟩ </span>to <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">max</span><span -class="lmsy-10">⟩ </span>and stores in the given counter. For -example, the following generates a random number between 3 and 8 (inclusive) and -stores it in the counter <span -class="ec-lmtt-10">myrand</span>. +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">min</span><span +class="lmsy-10x-x-109">⟩ </span>to <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">max</span><span +class="lmsy-10x-x-109">⟩ </span>and stores in the given +counter. For example, the following generates a random number between 3 and +8 (inclusive) and stores it in the counter <span +class="ec-lmtt-10x-x-109">myrand</span>. - </p> - <div class="verbatim" id="verbatim-24"> + <div class="verbatim" id="verbatim-24"> \newcounter{myrand}  <br />\random{myrand}{3}{8} </div> -<!--l. 707--><p class="nopar" > -</p><!--l. 709--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\doforrandN</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-11008"></a> <span -class="ec-lmtt-10">\doforrandN{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">cmd</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">list</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">text</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 711--><p class="noindent" > +<!--l. 820--><p class="nopar" > +</p><!--l. 822--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\doforrandN</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-12008"></a> <span +class="ec-lmtt-10x-x-109">\doforrandN{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">cmd</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">list</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">text</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 824--><p class="noindent" > Randomly selects <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩ </span>values from the comma-separated list given by <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">list</span><span -class="lmsy-10">⟩ </span>and iterates -through this subset. On each iteration it sets <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">cmd</span><span -class="lmsy-10">⟩ </span>to the current value and does +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩ </span>values from the comma-separated list given by +<span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">list</span><span +class="lmsy-10x-x-109">⟩ </span>and iterates through this subset. On each iteration it sets <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">cmd</span><span +class="lmsy-10x-x-109">⟩</span> +to the current value and does <span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">text</span><span +class="lmsy-10x-x-109">⟩</span>. For example, the following will +load a randomly selected problem from two of the listed files (where <span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">text</span><span -class="lmsy-10">⟩</span>. For example, the following will load a randomly selected problem from two of the -listed files (where <span -class="ec-lmtt-10">file1.tex</span>, <span -class="ec-lmtt-10">file2.tex </span>and <span -class="ec-lmtt-10">file3.tex </span>are files containing at least -one problem): +class="ec-lmtt-10x-x-109">file1.tex</span>, <span +class="ec-lmtt-10x-x-109">file2.tex </span>and <span +class="ec-lmtt-10x-x-109">file3.tex </span>are files containing at least one +problem): - </p> - <div class="verbatim" id="verbatim-25"> + <div class="verbatim" id="verbatim-25"> \doforrandN{2}{\thisfile}{file1,file2,file3}{%  <br />\loadrandomproblems{1}{\thisfile}} </div> -<!--l. 722--><p class="nopar" > -</p><!--l. 724--><p class="noindent" > +<!--l. 835--><p class="nopar" > +</p><!--l. 837--><p class="noindent" > </p> -<!--l. 724--><p class="noindent" ><a -href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">11 </span> <a - id="x1-1200011"></a>Compatibility With Versions Prior to 3.0</h3> -<!--l. 726--><p class="noindent" >Version 3.0 of the <span -class="ec-lmss-10">probsoln</span><a - id="dx1-12001"></a> package completely changed the structure of the package, -but the commands described in this section have been provided to maintain -compatibility with earlier versions. The only problems that are likely to occur -are those where commands are contained within groups. This will effect any -commands that are contained in external files that are outside of the arguments to -<span -class="ec-lmtt-10">\newproblem</span><a - id="dx1-12002"></a> and <span -class="ec-lmtt-10">\newproblem*</span><a - id="dx1-12003"></a>. However, since the external files had to be -parsed twice in order to load the problems, this shouldn’t be an issue as adding -anything other than problem definitions in those files would be problematic -anyway. -</p><!--l. 738--><p class="indent" > The other likely difference is where the random generator is used in a group. This -includes commands such as <span -class="ec-lmtt-10">\selectrandomly</span><a - id="dx1-12004"></a>. For example, if your document -contained something like: +<!--l. 837--><p class="noindent" ><a +href="#top">Top</a></p><h3 class="sectionHead"><span class="titlemark">11 </span> <a + id="x1-1300011"></a>Compatibility With Versions Prior to 3.0</h3> +<!--l. 839--><p class="noindent" >Version 3.0 of the <span +class="ec-lmss-10x-x-109">probsoln</span><a + id="dx1-13001"></a> package completely changed the structure of the +package, but the commands described in this section have been provided to +maintain compatibility with earlier versions. The only problems that are likely +to occur are those where commands are contained within groups. This will effect +any commands that are contained in external files that are outside of the +arguments to <span +class="ec-lmtt-10x-x-109">\newproblem</span><a + id="dx1-13002"></a> and <span +class="ec-lmtt-10x-x-109">\newproblem*</span><a + id="dx1-13003"></a>. However, since the external files +had to be parsed twice in order to load the problems, this shouldn’t be an issue +as adding anything other than problem definitions in those files would be +problematic anyway. +</p><!--l. 851--><p class="indent" > The other likely difference is where the random generator is used in a group. +This includes commands such as <span +class="ec-lmtt-10x-x-109">\selectrandomly</span><a + id="dx1-13004"></a>. For example, if your +document contained something like: - </p> - <div class="verbatim" id="verbatim-26"> + <div class="verbatim" id="verbatim-26"> \begin{enumerate}  <br />\selectrandomly{file1}{8}  <br />\item Solve the following: @@ -1815,18 +2050,17 @@ contained something like:  <br />\selectrandomly{file3}{2}  <br />\end{enumerate} </div> -<!--l. 753--><p class="nopar" > Then using versions prior to v3.0 will produce a different set of random numbers since -the second <span -class="ec-lmtt-10">\selectrandomly </span>is in a different level of grouping. If you want to -ensure that the document produces exactly the same random set with the -new version as with the old version, you will need to get and set the random -number seed. For example, the above would need to be modified so that it -becomes: +<!--l. 866--><p class="nopar" > Then using versions prior to v3.0 will produce a different set of random +numbers since the second <span +class="ec-lmtt-10x-x-109">\selectrandomly </span>is in a different level of grouping. If +you want to ensure that the document produces exactly the same random set +with the new version as with the old version, you will need to get and set the +random number seed. For example, the above would need to be modified so that +it becomes: - </p> - <div class="verbatim" id="verbatim-27"> + <div class="verbatim" id="verbatim-27"> \begin{enumerate}  <br />\selectrandomly{file1}{8}  <br />\item Solve the following: @@ -1839,424 +2073,451 @@ becomes:  <br />\selectrandomly{file3}{2}  <br />\end{enumerate} </div> -<!--l. 775--><p class="nopar" > -</p><!--l. 777--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\selectrandomly</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-12005"></a> <span -class="ec-lmtt-10">\selectrandomly{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 779--><p class="noindent" > +<!--l. 888--><p class="nopar" > +</p><!--l. 890--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\selectrandomly</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-13005"></a> <span +class="ec-lmtt-10x-x-109">\selectrandomly{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 892--><p class="noindent" > This is now equivalent to: <span class="obeylines-h"> - <span -class="ec-lmtt-10">{\loadrandomproblems[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">n</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}}%</span> - <br /><span -class="ec-lmtt-10">\foreachproblem[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{\PSNitem\thisproblem\endPSNitem}</span></span> -</p><!--l. 786--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span -class="ec-lmtt-9">\selectallproblems</span><span -class="ec-lmtt-9"> </span></span><a - id="dx1-12006"></a> <span -class="ec-lmtt-10">\selectallproblems{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">} </span></div><hr> -</p><!--l. 788--><p class="noindent" > + <span +class="ec-lmtt-10x-x-109">{\loadrandomproblems[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">n</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}}%</span> + <br /><span +class="ec-lmtt-10x-x-109">\foreachproblem[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{\PSNitem\thisproblem\endPSNitem}</span></span> +</p><!--l. 899--><p class="indent" > <hr><div title="Definition"><span class="marginpar"><span +class="ec-lmtt-10">\selectallproblems</span><span +class="ec-lmtt-10"> </span></span><a + id="dx1-13006"></a> <span +class="ec-lmtt-10x-x-109">\selectallproblems{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">} </span></div><hr> +</p><!--l. 901--><p class="noindent" > This is now equivalent to: <span class="obeylines-h"> - <span -class="ec-lmtt-10">{\loadallproblems[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">}}%</span> - <br /><span -class="ec-lmtt-10">\foreachproblem[</span><span -class="lmsy-10">⟨</span><span -class="ec-lmri-10">filename</span><span -class="lmsy-10">⟩</span><span -class="ec-lmtt-10">]{\PSNitem\thisproblem\endPSNitem}</span></span> -</p><!--l. 795--><p class="indent" > Note that in both the above cases, a new data set is created with the same name as -the file name. - - - -</p><!--l. 798--><p class="indent" > <a + <span +class="ec-lmtt-10x-x-109">{\loadallproblems[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">}}%</span> + <br /><span +class="ec-lmtt-10x-x-109">\foreachproblem[</span><span +class="lmsy-10x-x-109">⟨</span><span +class="ec-lmri-10x-x-109">filename</span><span +class="lmsy-10x-x-109">⟩</span><span +class="ec-lmtt-10x-x-109">]{\PSNitem\thisproblem\endPSNitem}</span></span> +</p><!--l. 908--><p class="indent" > Note that in both the above cases, a new data set is created with the same +name as the file name. + + +</p><!--l. 911--><p class="indent" > <a id="likesection.1"></a><a - id="Q1-1-13"></a> + id="Q1-1-14"></a> </p> <!--l. 2--><p class="noindent" ><a href="#top">Top</a></p><h3 class="likesectionHead"><a - id="x1-1300011"></a>Index</h3> + id="x1-1400011"></a>Index</h3> <!--l. 4--><p class="noindent" > <span -class="ec-lmbx-10">B</span> +class="ec-lmbx-10x-x-109">B</span> </p> - <div class="theindex"><span class="index-item"><span -class="ec-lmss-10">babel </span>package  <a + <div class="theindex"><span class="index-item"><span +class="ec-lmss-10x-x-109">babel </span>package  <a href="probsoln-manual.html#dx1-7011" >1</a> <br /></span> <p class="theindex"> <span -class="ec-lmbx-10">C</span> +class="ec-lmbx-10x-x-109">C</span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\ClearUsedFile</span></span></span>  <a +href="probsoln-manual.html#dx1-10006" ><span +class="ec-lmri-10x-x-109">2</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\correctitem</span></span></span>  <a +class="ec-lmtt-10x-x-109">\correctitem</span></span></span>  <a href="probsoln-manual.html#dx1-6015" ><span -class="ec-lmri-10">2</span></a> <br /></span> +class="ec-lmri-10x-x-109">3</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\correctitemformat</span></span></span>  <a +class="ec-lmtt-10x-x-109">\correctitemformat</span></span></span>  <a href="probsoln-manual.html#dx1-6018" ><span -class="ec-lmri-10">3</span></a> <br /></span> +class="ec-lmri-10x-x-109">4</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">D</span> +class="ec-lmbx-10x-x-109">D</span> <span class="index-item"><span -class="ec-lmtt-10">defproblem </span>(environment)  <a -href="probsoln-manual.html#dx1-5020" ><span class="underline">4</span></a>, <a -href="probsoln-manual.html#dx1-5025" ><span class="underline">5</span></a>, <a +class="ec-lmtt-10x-x-109">defproblem </span>(environment)  <a +href="probsoln-manual.html#dx1-5020" ><span class="underline">5</span></a>, <a +href="probsoln-manual.html#dx1-5025" ><span class="underline">6</span></a>, <a href="probsoln-manual.html#dx1-7008" ><span -class="ec-lmri-10">6</span></a>, <a -href="probsoln-manual.html#dx1-7016" ><span class="underline">7</span></a>, <a -href="probsoln-manual.html#dx1-7020" ><span class="underline">8</span></a>, <a -href="probsoln-manual.html#dx1-7030" ><span class="underline">9</span></a>, <a -href="probsoln-manual.html#dx1-8001" ><span class="underline">10</span></a>, <a -href="probsoln-manual.html#dx1-9008" ><span class="underline">11</span></a> <br /></span> +class="ec-lmri-10x-x-109">7</span></a>, <a +href="probsoln-manual.html#dx1-7016" ><span class="underline">8</span></a>, <a +href="probsoln-manual.html#dx1-7020" ><span class="underline">9</span></a>, <a +href="probsoln-manual.html#dx1-7030" ><span class="underline">10</span></a>, <a +href="probsoln-manual.html#dx1-8001" ><span class="underline">11</span></a>, <a +href="probsoln-manual.html#dx1-9008" ><span class="underline">12</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\doforrandN</span></span></span>  <a -href="probsoln-manual.html#dx1-11008" ><span -class="ec-lmri-10">12</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\doforrandN</span></span></span>  <a +href="probsoln-manual.html#dx1-12008" ><span +class="ec-lmri-10x-x-109">13</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">E</span> +class="ec-lmbx-10x-x-109">E</span> <span class="index-item"><span -class="ec-lmtt-10">enumerate </span>(environment)  <a -href="probsoln-manual.html#dx1-6011" ><span class="underline">13</span></a>, <a -href="probsoln-manual.html#dx1-6013" ><span class="underline">14</span></a>, <a -href="probsoln-manual.html#dx1-10021" ><span class="underline">15</span></a> <br /></span> +class="ec-lmtt-10x-x-109">enumerate </span>(environment)  <a +href="probsoln-manual.html#dx1-6011" ><span class="underline">14</span></a>, <a +href="probsoln-manual.html#dx1-6013" ><span class="underline">15</span></a>, <a +href="probsoln-manual.html#dx1-11021" ><span class="underline">16</span></a> <br /></span> <span class="index-item">environments:<br /></span> <span class="index-subitem">    <span -class="ec-lmtt-10">defproblem</span>  <a -href="probsoln-manual.html#dx1-5021" ><span class="underline">16</span></a>, <a -href="probsoln-manual.html#dx1-5026" ><span class="underline">17</span></a>, <a +class="ec-lmtt-10x-x-109">defproblem</span>  <a +href="probsoln-manual.html#dx1-5021" ><span class="underline">17</span></a>, <a +href="probsoln-manual.html#dx1-5026" ><span class="underline">18</span></a>, <a href="probsoln-manual.html#dx1-7009" ><span -class="ec-lmri-10">18</span></a>, <a -href="probsoln-manual.html#dx1-7017" ><span class="underline">19</span></a>, <a -href="probsoln-manual.html#dx1-7021" ><span class="underline">20</span></a>, <a -href="probsoln-manual.html#dx1-7031" ><span class="underline">21</span></a>, <a -href="probsoln-manual.html#dx1-8002" ><span class="underline">22</span></a>, <a -href="probsoln-manual.html#dx1-9009" ><span class="underline">23</span></a> <br /></span> +class="ec-lmri-10x-x-109">19</span></a>, <a +href="probsoln-manual.html#dx1-7017" ><span class="underline">20</span></a>, <a +href="probsoln-manual.html#dx1-7021" ><span class="underline">21</span></a>, <a +href="probsoln-manual.html#dx1-7031" ><span class="underline">22</span></a>, <a +href="probsoln-manual.html#dx1-8002" ><span class="underline">23</span></a>, <a +href="probsoln-manual.html#dx1-9009" ><span class="underline">24</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmtt-10">enumerate</span>  <a -href="probsoln-manual.html#dx1-6012" ><span class="underline">24</span></a>, <a -href="probsoln-manual.html#dx1-6014" ><span class="underline">25</span></a>, <a -href="probsoln-manual.html#dx1-10022" ><span class="underline">26</span></a> <br /></span> +class="ec-lmtt-10x-x-109">enumerate</span>  <a +href="probsoln-manual.html#dx1-6012" ><span class="underline">25</span></a>, <a +href="probsoln-manual.html#dx1-6014" ><span class="underline">26</span></a>, <a +href="probsoln-manual.html#dx1-11022" ><span class="underline">27</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmtt-10">onlyproblem</span>  <a +class="ec-lmtt-10x-x-109">onlyproblem</span>  <a href="probsoln-manual.html#dx1-5009" ><span -class="ec-lmri-10">27</span></a>, <a -href="probsoln-manual.html#dx1-5015" ><span class="underline">28</span></a>, <a -href="probsoln-manual.html#dx1-5017" ><span class="underline">29</span></a>, <a -href="probsoln-manual.html#dx1-5024" ><span class="underline">30</span></a>, <a -href="probsoln-manual.html#dx1-7002" ><span class="underline">31</span></a>, <a -href="probsoln-manual.html#dx1-7013" ><span class="underline">32</span></a>, <a -href="probsoln-manual.html#dx1-10016" ><span class="underline">33</span></a> <br /></span> +class="ec-lmri-10x-x-109">28</span></a>, <a +href="probsoln-manual.html#dx1-5015" ><span class="underline">29</span></a>, <a +href="probsoln-manual.html#dx1-5017" ><span class="underline">30</span></a>, <a +href="probsoln-manual.html#dx1-5024" ><span class="underline">31</span></a>, <a +href="probsoln-manual.html#dx1-7002" ><span class="underline">32</span></a>, <a +href="probsoln-manual.html#dx1-7013" ><span class="underline">33</span></a>, <a +href="probsoln-manual.html#dx1-11016" ><span class="underline">34</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmtt-10">onlysolution</span>  <a +class="ec-lmtt-10x-x-109">onlysolution</span>  <a href="probsoln-manual.html#dx1-5011" ><span -class="ec-lmri-10">34</span></a>, <a -href="probsoln-manual.html#dx1-5019" ><span class="underline">35</span></a>, <a -href="probsoln-manual.html#dx1-7004" ><span class="underline">36</span></a>, <a -href="probsoln-manual.html#dx1-7015" ><span class="underline">37</span></a>, <a -href="probsoln-manual.html#dx1-10009" ><span class="underline">38</span></a>, <a -href="probsoln-manual.html#dx1-10013" ><span class="underline">39</span></a>, <a -href="probsoln-manual.html#dx1-10018" ><span class="underline">40</span></a> <br /></span> +class="ec-lmri-10x-x-109">35</span></a>, <a +href="probsoln-manual.html#dx1-5019" ><span class="underline">36</span></a>, <a +href="probsoln-manual.html#dx1-7004" ><span class="underline">37</span></a>, <a +href="probsoln-manual.html#dx1-7015" ><span class="underline">38</span></a>, <a +href="probsoln-manual.html#dx1-11009" ><span class="underline">39</span></a>, <a +href="probsoln-manual.html#dx1-11013" ><span class="underline">40</span></a>, <a +href="probsoln-manual.html#dx1-11018" ><span class="underline">41</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmtt-10">solution</span>  <a +class="ec-lmtt-10x-x-109">solution</span>  <a href="probsoln-manual.html#dx1-6002" ><span -class="ec-lmri-10">41</span></a>, <a -href="probsoln-manual.html#dx1-6005" ><span class="underline">42</span></a>, <a -href="probsoln-manual.html#dx1-6008" ><span class="underline">43</span></a> <br /></span> +class="ec-lmri-10x-x-109">42</span></a>, <a +href="probsoln-manual.html#dx1-6005" ><span class="underline">43</span></a>, <a +href="probsoln-manual.html#dx1-6008" ><span class="underline">44</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmtt-10">textenum</span>  <a +class="ec-lmtt-10x-x-109">textenum</span>  <a href="probsoln-manual.html#dx1-6010" ><span -class="ec-lmri-10">44</span></a> <br /></span> +class="ec-lmri-10x-x-109">45</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\ExcludePreviousFile</span></span></span>  <a +href="probsoln-manual.html#dx1-10007" ><span +class="ec-lmri-10x-x-109">46</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">F</span> +class="ec-lmbx-10x-x-109">F</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\foreachdataset</span></span></span>  <a -href="probsoln-manual.html#dx1-10014" ><span -class="ec-lmri-10">45</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\foreachdataset</span></span></span>  <a +href="probsoln-manual.html#dx1-11014" ><span +class="ec-lmri-10x-x-109">47</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\foreachproblem</span></span></span>  <a -href="probsoln-manual.html#dx1-7023" ><span class="underline">46</span></a>, <a -href="probsoln-manual.html#dx1-7028" ><span class="underline">47</span></a>, <a -href="probsoln-manual.html#dx1-10002" ><span -class="ec-lmri-10">48</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\foreachproblem</span></span></span>  <a +href="probsoln-manual.html#dx1-7023" ><span class="underline">48</span></a>, <a +href="probsoln-manual.html#dx1-7028" ><span class="underline">49</span></a>, <a +href="probsoln-manual.html#dx1-11002" ><span +class="ec-lmri-10x-x-109">50</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\foreachsolution</span></span></span>  <a -href="probsoln-manual.html#dx1-5022" ><span class="underline">49</span></a>, <a -href="probsoln-manual.html#dx1-10007" ><span -class="ec-lmri-10">50</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\foreachsolution</span></span></span>  <a +href="probsoln-manual.html#dx1-5022" ><span class="underline">51</span></a>, <a +href="probsoln-manual.html#dx1-11007" ><span +class="ec-lmri-10x-x-109">52</span></a> <br /></span> <span class="index-item"><span -class="ec-lmss-10">fp </span>package  <a -href="probsoln-manual.html#dx1-7026" >51</a> <br /></span> +class="ec-lmss-10x-x-109">fp </span>package  <a +href="probsoln-manual.html#dx1-7026" >53</a> <br /></span> <span class="index-item">fragile  <a -href="probsoln-manual.html#dx1-4001" ><span class="underline">52</span></a> <br /></span> +href="probsoln-manual.html#dx1-4001" ><span class="underline">54</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">H</span> +class="ec-lmbx-10x-x-109">H</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\hideanswers</span></span></span>  <a +class="ec-lmtt-10x-x-109">\hideanswers</span></span></span>  <a href="probsoln-manual.html#dx1-5004" ><span -class="ec-lmri-10">53</span></a>, <a -href="probsoln-manual.html#dx1-7007" ><span class="underline">54</span></a>, <a -href="probsoln-manual.html#dx1-10019" ><span class="underline">55</span></a> <br /></span> +class="ec-lmri-10x-x-109">55</span></a>, <a +href="probsoln-manual.html#dx1-7007" ><span class="underline">56</span></a>, <a +href="probsoln-manual.html#dx1-11019" ><span class="underline">57</span></a> <br /></span> + + </p><p class="theindex"> <span -class="ec-lmbx-10">I</span> +class="ec-lmbx-10x-x-109">I</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\ifshowanswers</span></span></span>  <a -href="probsoln-manual.html#dx1-5007" ><span class="underline">56</span></a>, <a -href="probsoln-manual.html#dx1-6006" ><span class="underline">57</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\ifshowanswers</span></span></span>  <a +href="probsoln-manual.html#dx1-5007" ><span class="underline">58</span></a>, <a +href="probsoln-manual.html#dx1-6006" ><span class="underline">59</span></a> <br /></span> <span class="index-item"><span -class="ec-lmss-10">ifthen </span>package  <a -href="probsoln-manual.html#dx1-5006" >58</a> <br /></span> +class="ec-lmss-10x-x-109">ifthen </span>package  <a +href="probsoln-manual.html#dx1-5006" >60</a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\include</span></span></span>  <a -href="probsoln-manual.html#dx1-7019" ><span class="underline">59</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\include</span></span></span>  <a +href="probsoln-manual.html#dx1-7019" ><span class="underline">61</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\incorrectitem</span></span></span>  <a +class="ec-lmtt-10x-x-109">\incorrectitem</span></span></span>  <a href="probsoln-manual.html#dx1-6016" ><span -class="ec-lmri-10">60</span></a> <br /></span> - - - +class="ec-lmri-10x-x-109">62</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\incorrectitemformat</span></span></span>  <a +class="ec-lmtt-10x-x-109">\incorrectitemformat</span></span></span>  <a href="probsoln-manual.html#dx1-6019" ><span -class="ec-lmri-10">61</span></a> <br /></span> +class="ec-lmri-10x-x-109">63</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\input</span></span></span>  <a -href="probsoln-manual.html#dx1-7018" ><span class="underline">62</span></a>, <a -href="probsoln-manual.html#dx1-9001" ><span class="underline">63</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\input</span></span></span>  <a +href="probsoln-manual.html#dx1-7018" ><span class="underline">64</span></a>, <a +href="probsoln-manual.html#dx1-9001" ><span class="underline">65</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\item</span></span></span>  <a -href="probsoln-manual.html#dx1-6017" ><span class="underline">64</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\item</span></span></span>  <a +href="probsoln-manual.html#dx1-6017" ><span class="underline">66</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">L</span> +class="ec-lmbx-10x-x-109">L</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\loadallproblems</span></span></span>  <a +class="ec-lmtt-10x-x-109">\loadallproblems</span></span></span>  <a href="probsoln-manual.html#dx1-9002" ><span -class="ec-lmri-10">65</span></a> <br /></span> +class="ec-lmri-10x-x-109">67</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\loadexceptproblems</span></span></span>  <a +class="ec-lmtt-10x-x-109">\loadexceptproblems</span></span></span>  <a href="probsoln-manual.html#dx1-9004" ><span -class="ec-lmri-10">66</span></a> <br /></span> +class="ec-lmri-10x-x-109">68</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\loadrandomexcept</span></span></span>  <a +class="ec-lmtt-10x-x-109">\loadrandomexcept</span></span></span>  <a href="probsoln-manual.html#dx1-9006" ><span -class="ec-lmri-10">67</span></a> <br /></span> +class="ec-lmri-10x-x-109">69</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\loadrandomproblems</span></span></span>  <a +class="ec-lmtt-10x-x-109">\loadrandomproblems</span></span></span>  <a href="probsoln-manual.html#dx1-9005" ><span -class="ec-lmri-10">68</span></a>, <a -href="probsoln-manual.html#dx1-11001" ><span class="underline">69</span></a> <br /></span> +class="ec-lmri-10x-x-109">70</span></a>, <a +href="probsoln-manual.html#dx1-12001" ><span class="underline">71</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\loadselectedproblems</span></span></span>  <a +class="ec-lmtt-10x-x-109">\loadselectedproblems</span></span></span>  <a href="probsoln-manual.html#dx1-9003" ><span -class="ec-lmri-10">70</span></a> <br /></span> +class="ec-lmri-10x-x-109">72</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">N</span> +class="ec-lmbx-10x-x-109">N</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\newproblem</span></span></span>  <a +class="ec-lmtt-10x-x-109">\newproblem</span></span></span>  <a href="probsoln-manual.html#dx1-7025" ><span -class="ec-lmri-10">71</span></a>, <a -href="probsoln-manual.html#dx1-8003" ><span class="underline">72</span></a>, <a -href="probsoln-manual.html#dx1-9010" ><span class="underline">73</span></a>, <a -href="probsoln-manual.html#dx1-12002" ><span class="underline">74</span></a> <br /></span> +class="ec-lmri-10x-x-109">73</span></a>, <a +href="probsoln-manual.html#dx1-8003" ><span class="underline">74</span></a>, <a +href="probsoln-manual.html#dx1-9010" ><span class="underline">75</span></a>, <a +href="probsoln-manual.html#dx1-13002" ><span class="underline">76</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\newproblem*</span></span></span>  <a +class="ec-lmtt-10x-x-109">\newproblem*</span></span></span>  <a href="probsoln-manual.html#dx1-7029" ><span -class="ec-lmri-10">75</span></a>, <a -href="probsoln-manual.html#dx1-9011" ><span class="underline">76</span></a>, <a -href="probsoln-manual.html#dx1-12003" ><span class="underline">77</span></a> <br /></span> +class="ec-lmri-10x-x-109">77</span></a>, <a +href="probsoln-manual.html#dx1-9011" ><span class="underline">78</span></a>, <a +href="probsoln-manual.html#dx1-13003" ><span class="underline">79</span></a> <br /></span> <span class="index-item"><span -class="ec-lmss-10">ngerman </span>package  <a -href="probsoln-manual.html#dx1-7010" >78</a> <br /></span> +class="ec-lmss-10x-x-109">ngerman </span>package  <a +href="probsoln-manual.html#dx1-7010" >80</a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">O</span> +class="ec-lmbx-10x-x-109">O</span> <span class="index-item"><span -class="ec-lmtt-10">onlyproblem </span>(environment)  <a +class="ec-lmtt-10x-x-109">onlyproblem </span>(environment)  <a href="probsoln-manual.html#dx1-5008" ><span -class="ec-lmri-10">79</span></a>, <a -href="probsoln-manual.html#dx1-5014" ><span class="underline">80</span></a>, <a -href="probsoln-manual.html#dx1-5016" ><span class="underline">81</span></a>, <a -href="probsoln-manual.html#dx1-5023" ><span class="underline">82</span></a>, <a -href="probsoln-manual.html#dx1-7001" ><span class="underline">83</span></a>, <a -href="probsoln-manual.html#dx1-7012" ><span class="underline">84</span></a>, <a -href="probsoln-manual.html#dx1-10015" ><span class="underline">85</span></a> <br /></span> +class="ec-lmri-10x-x-109">81</span></a>, <a +href="probsoln-manual.html#dx1-5014" ><span class="underline">82</span></a>, <a +href="probsoln-manual.html#dx1-5016" ><span class="underline">83</span></a>, <a +href="probsoln-manual.html#dx1-5023" ><span class="underline">84</span></a>, <a +href="probsoln-manual.html#dx1-7001" ><span class="underline">85</span></a>, <a +href="probsoln-manual.html#dx1-7012" ><span class="underline">86</span></a>, <a +href="probsoln-manual.html#dx1-11015" ><span class="underline">87</span></a> <br /></span> <span class="index-item"><span -class="ec-lmtt-10">onlysolution </span>(environment)  <a +class="ec-lmtt-10x-x-109">onlysolution </span>(environment)  <a href="probsoln-manual.html#dx1-5010" ><span -class="ec-lmri-10">86</span></a>, <a -href="probsoln-manual.html#dx1-5018" ><span class="underline">87</span></a>, <a -href="probsoln-manual.html#dx1-7003" ><span class="underline">88</span></a>, <a -href="probsoln-manual.html#dx1-7014" ><span class="underline">89</span></a>, <a -href="probsoln-manual.html#dx1-10008" ><span class="underline">90</span></a>, <a -href="probsoln-manual.html#dx1-10012" ><span class="underline">91</span></a>, <a -href="probsoln-manual.html#dx1-10017" ><span class="underline">92</span></a> <br /></span> +class="ec-lmri-10x-x-109">88</span></a>, <a +href="probsoln-manual.html#dx1-5018" ><span class="underline">89</span></a>, <a +href="probsoln-manual.html#dx1-7003" ><span class="underline">90</span></a>, <a +href="probsoln-manual.html#dx1-7014" ><span class="underline">91</span></a>, <a +href="probsoln-manual.html#dx1-11008" ><span class="underline">92</span></a>, <a +href="probsoln-manual.html#dx1-11012" ><span class="underline">93</span></a>, <a +href="probsoln-manual.html#dx1-11017" ><span class="underline">94</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">P</span> +class="ec-lmbx-10x-x-109">P</span> <span class="index-item">package options:<br /></span> <span class="index-subitem">    <span -class="ec-lmss-10">answers</span>  <a -href="probsoln-manual.html#dx1-3001" ><span class="underline">93</span></a>, <a -href="probsoln-manual.html#dx1-5001" ><span class="underline">94</span></a>, <a -href="probsoln-manual.html#dx1-10011" ><span class="underline">95</span></a> <br /></span> +class="ec-lmss-10x-x-109">answers</span>  <a +href="probsoln-manual.html#dx1-3001" ><span class="underline">95</span></a>, <a +href="probsoln-manual.html#dx1-5001" ><span class="underline">96</span></a>, <a +href="probsoln-manual.html#dx1-11011" ><span class="underline">97</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmss-10">draft</span>  <a -href="probsoln-manual.html#dx1-3003" ><span class="underline">96</span></a> <br /></span> +class="ec-lmss-10x-x-109">draft</span>  <a +href="probsoln-manual.html#dx1-3003" ><span class="underline">98</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmss-10">final</span>  <a -href="probsoln-manual.html#dx1-3004" ><span class="underline">97</span></a> <br /></span> +class="ec-lmss-10x-x-109">final</span>  <a +href="probsoln-manual.html#dx1-3004" ><span class="underline">99</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmss-10">noanswers</span>  <a -href="probsoln-manual.html#dx1-3002" ><span class="underline">98</span></a>, <a -href="probsoln-manual.html#dx1-5002" ><span class="underline">99</span></a> <br /></span> +class="ec-lmss-10x-x-109">noanswers</span>  <a +href="probsoln-manual.html#dx1-3002" ><span class="underline">100</span></a>, <a +href="probsoln-manual.html#dx1-5002" ><span class="underline">101</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmss-10">nousedefaultargs</span>  <a -href="probsoln-manual.html#dx1-3007" ><span class="underline">100</span></a> <br /></span> +class="ec-lmss-10x-x-109">nousedefaultargs</span>  <a +href="probsoln-manual.html#dx1-3007" ><span class="underline">102</span></a> <br /></span> <span class="index-subitem">    <span -class="ec-lmss-10">usedefaultargs</span>  <a -href="probsoln-manual.html#dx1-3005" ><span class="underline">101</span></a>, <a -href="probsoln-manual.html#dx1-7024" ><span class="underline">102</span></a>, <a -href="probsoln-manual.html#dx1-10005" ><span class="underline">103</span></a> <br /></span> +class="ec-lmss-10x-x-109">usedefaultargs</span>  <a +href="probsoln-manual.html#dx1-3005" ><span class="underline">103</span></a>, <a +href="probsoln-manual.html#dx1-7024" ><span class="underline">104</span></a>, <a +href="probsoln-manual.html#dx1-11005" ><span class="underline">105</span></a> <br /></span> <span class="index-item"><span -class="ec-lmss-10">pgfmath </span>package  <a -href="probsoln-manual.html#dx1-7027" >104</a> <br /></span> +class="ec-lmss-10x-x-109">pgfmath </span>package  <a +href="probsoln-manual.html#dx1-7027" >106</a> <br /></span> <span class="index-item"><span -class="ec-lmss-10">probsoln </span>package  <a -href="probsoln-manual.html#dx1-12001" >105</a> <br /></span> +class="ec-lmss-10x-x-109">probsoln </span>package  <a +href="probsoln-manual.html#dx1-10001" >107</a>, <a +href="probsoln-manual.html#dx1-10008" >108</a>, <a +href="probsoln-manual.html#dx1-13001" >109</a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\ProbSolnFragileExt</span></span></span>  <a +class="ec-lmtt-10x-x-109">\ProbSolnFragileExt</span></span></span>  <a href="probsoln-manual.html#dx1-4002" ><span -class="ec-lmri-10">106</span></a> <br /></span> +class="ec-lmri-10x-x-109">110</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\ProbSolnFragileFile</span></span></span>  <a +class="ec-lmtt-10x-x-109">\ProbSolnFragileFile</span></span></span>  <a href="probsoln-manual.html#dx1-4003" ><span -class="ec-lmri-10">107</span></a> <br /></span> +class="ec-lmri-10x-x-109">111</span></a> <br /></span> + + <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\PSNgetrandseed</span></span></span>  <a -href="probsoln-manual.html#dx1-11005" ><span -class="ec-lmri-10">108</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\PSNgetrandseed</span></span></span>  <a +href="probsoln-manual.html#dx1-12005" ><span +class="ec-lmri-10x-x-109">112</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\PSNrandom</span></span></span>  <a -href="probsoln-manual.html#dx1-11006" ><span -class="ec-lmri-10">109</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\PSNrandom</span></span></span>  <a +href="probsoln-manual.html#dx1-12006" ><span +class="ec-lmri-10x-x-109">113</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\PSNrandseed</span></span></span>  <a -href="probsoln-manual.html#dx1-11003" ><span -class="ec-lmri-10">110</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\PSNrandseed</span></span></span>  <a +href="probsoln-manual.html#dx1-12003" ><span +class="ec-lmri-10x-x-109">114</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\PSNuseoldrandom</span></span></span>  <a +class="ec-lmtt-10x-x-109">\PSNuseoldrandom</span></span></span>  <a href="probsoln-manual.html#dx1-9007" ><span -class="ec-lmri-10">111</span></a>, <a -href="probsoln-manual.html#dx1-11002" ><span -class="ec-lmri-10">112</span></a> <br /></span> +class="ec-lmri-10x-x-109">115</span></a>, <a +href="probsoln-manual.html#dx1-12002" ><span +class="ec-lmri-10x-x-109">116</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">R</span> +class="ec-lmbx-10x-x-109">R</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\random</span></span></span>  <a -href="probsoln-manual.html#dx1-11007" ><span -class="ec-lmri-10">113</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\random</span></span></span>  <a +href="probsoln-manual.html#dx1-12007" ><span +class="ec-lmri-10x-x-109">117</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">S</span> +class="ec-lmbx-10x-x-109">S</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\selectallproblems</span></span></span>  <a -href="probsoln-manual.html#dx1-12006" ><span -class="ec-lmri-10">114</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\selectallproblems</span></span></span>  <a +href="probsoln-manual.html#dx1-13006" ><span +class="ec-lmri-10x-x-109">118</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\selectrandomly</span></span></span>  <a -href="probsoln-manual.html#dx1-12004" ><span class="underline">115</span></a>, <a -href="probsoln-manual.html#dx1-12005" ><span -class="ec-lmri-10">116</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\selectrandomly</span></span></span>  <a +href="probsoln-manual.html#dx1-13004" ><span class="underline">119</span></a>, <a +href="probsoln-manual.html#dx1-13005" ><span +class="ec-lmri-10x-x-109">120</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\showanswers</span></span></span>  <a +class="ec-lmtt-10x-x-109">\SetStartMonth</span></span></span>  <a +href="probsoln-manual.html#dx1-10002" ><span +class="ec-lmri-10x-x-109">121</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\SetStartYear</span></span></span>  <a +href="probsoln-manual.html#dx1-10004" ><span +class="ec-lmri-10x-x-109">122</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\SetUsedFileName</span></span></span>  <a +href="probsoln-manual.html#dx1-10005" ><span +class="ec-lmri-10x-x-109">123</span></a> <br /></span> +<span class="index-item"><span class="obeylines-h"><span class="verb"><span +class="ec-lmtt-10x-x-109">\showanswers</span></span></span>  <a href="probsoln-manual.html#dx1-5003" ><span -class="ec-lmri-10">117</span></a>, <a -href="probsoln-manual.html#dx1-7006" ><span class="underline">118</span></a>, <a -href="probsoln-manual.html#dx1-10010" ><span class="underline">119</span></a>, <a -href="probsoln-manual.html#dx1-10020" ><span class="underline">120</span></a> <br /></span> - - - +class="ec-lmri-10x-x-109">124</span></a>, <a +href="probsoln-manual.html#dx1-7006" ><span class="underline">125</span></a>, <a +href="probsoln-manual.html#dx1-11010" ><span class="underline">126</span></a>, <a +href="probsoln-manual.html#dx1-11020" ><span class="underline">127</span></a> <br /></span> <span class="index-item"><span -class="ec-lmss-10">showanswers </span>boolean variable  <a -href="probsoln-manual.html#dx1-5005" >121</a>, <a -href="probsoln-manual.html#dx1-5012" >122</a>, <a -href="probsoln-manual.html#dx1-5013" >123</a>, <a -href="probsoln-manual.html#dx1-7005" >124</a> <br /></span> +class="ec-lmss-10x-x-109">showanswers </span>boolean variable  <a +href="probsoln-manual.html#dx1-5005" >128</a>, <a +href="probsoln-manual.html#dx1-5012" >129</a>, <a +href="probsoln-manual.html#dx1-5013" >130</a>, <a +href="probsoln-manual.html#dx1-7005" >131</a> <br /></span> <span class="index-item"><span -class="ec-lmtt-10">solution </span>(environment)  <a +class="ec-lmtt-10x-x-109">solution </span>(environment)  <a href="probsoln-manual.html#dx1-6001" ><span -class="ec-lmri-10">125</span></a>, <a -href="probsoln-manual.html#dx1-6004" ><span class="underline">126</span></a>, <a -href="probsoln-manual.html#dx1-6007" ><span class="underline">127</span></a> <br /></span> +class="ec-lmri-10x-x-109">132</span></a>, <a +href="probsoln-manual.html#dx1-6004" ><span class="underline">133</span></a>, <a +href="probsoln-manual.html#dx1-6007" ><span class="underline">134</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\solutionname</span></span></span>  <a +class="ec-lmtt-10x-x-109">\solutionname</span></span></span>  <a href="probsoln-manual.html#dx1-6003" ><span -class="ec-lmri-10">128</span></a> <br /></span> +class="ec-lmri-10x-x-109">135</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">T</span> +class="ec-lmbx-10x-x-109">T</span> <span class="index-item"><span -class="ec-lmtt-10">textenum </span>(environment)  <a +class="ec-lmtt-10x-x-109">textenum </span>(environment)  <a href="probsoln-manual.html#dx1-6009" ><span -class="ec-lmri-10">129</span></a> <br /></span> +class="ec-lmri-10x-x-109">136</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\theenumi</span></span></span>  <a -href="probsoln-manual.html#dx1-10023" ><span class="underline">130</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\theenumi</span></span></span>  <a +href="probsoln-manual.html#dx1-11023" ><span class="underline">137</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\thisproblem</span></span></span>  <a -href="probsoln-manual.html#dx1-3006" ><span class="underline">131</span></a>, <a -href="probsoln-manual.html#dx1-3008" ><span class="underline">132</span></a>, <a -href="probsoln-manual.html#dx1-7022" ><span class="underline">133</span></a>, <a -href="probsoln-manual.html#dx1-10003" ><span -class="ec-lmri-10">134</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\thisproblem</span></span></span>  <a +href="probsoln-manual.html#dx1-3006" ><span class="underline">138</span></a>, <a +href="probsoln-manual.html#dx1-3008" ><span class="underline">139</span></a>, <a +href="probsoln-manual.html#dx1-7022" ><span class="underline">140</span></a>, <a +href="probsoln-manual.html#dx1-11003" ><span +class="ec-lmri-10x-x-109">141</span></a> <br /></span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\thisproblemlabel</span></span></span>  <a -href="probsoln-manual.html#dx1-10004" ><span -class="ec-lmri-10">135</span></a> <br /></span> +class="ec-lmtt-10x-x-109">\thisproblemlabel</span></span></span>  <a +href="probsoln-manual.html#dx1-11004" ><span +class="ec-lmri-10x-x-109">142</span></a> <br /></span> </p><p class="theindex"> <span -class="ec-lmbx-10">U</span> +class="ec-lmbx-10x-x-109">U</span> <span class="index-item"><span class="obeylines-h"><span class="verb"><span -class="ec-lmtt-10">\useproblem</span></span></span>  <a +class="ec-lmtt-10x-x-109">\useproblem</span></span></span>  <a href="probsoln-manual.html#dx1-8004" ><span -class="ec-lmri-10">136</span></a>, <a -href="probsoln-manual.html#dx1-10001" ><span class="underline">137</span></a>, <a -href="probsoln-manual.html#dx1-10006" ><span class="underline">138</span></a> <br /></span> +class="ec-lmri-10x-x-109">143</span></a>, <a +href="probsoln-manual.html#dx1-11001" ><span class="underline">144</span></a>, <a +href="probsoln-manual.html#dx1-11006" ><span class="underline">145</span></a> <br /></span> </p></div> - <div class="footnotes"><!--l. 663--><p class="indent" > <span class="footnote-mark"><a -href="#fn1x0-bk" id="fn1x0"><sup class="textsuperscript">1</sup></a></span><span -class="ec-lmr-8">assuming you leave at least a minute between runs.</span></p> </div> + <div class="footnotes"><!--l. 543--><p class="indent" > <span class="footnote-mark"><a +href="#fn1x0-bk" id="fn1x0"> +<sup class="textsuperscript">1</sup></a></span><span +class="ec-lmr-9">So don’t use </span><span +class="ec-lmtt-9">\SetStartMonth </span><span +class="ec-lmr-9">after </span><span +class="ec-lmtt-9">\SetStartYear</span><span +class="ec-lmr-9">.</span></p><!--l. 776--><p class="indent" > <span class="footnote-mark"><a +href="#fn2x0-bk" id="fn2x0"> +<sup class="textsuperscript">2</sup></a></span><span +class="ec-lmr-9">assuming you leave at least a minute between runs.</span></p> </div> </body></html> diff --git a/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.tex b/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.tex index 83f12ca68e6..d2822c6093d 100644 --- a/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.tex +++ b/Master/texmf-dist/doc/latex/probsoln/probsoln-manual.tex @@ -16,7 +16,7 @@ \RecordChanges \PageIndex -\CheckSum{1484} +\CheckSum{1822} \newcommand*{\dq}[1]{``#1''} @@ -24,7 +24,7 @@ \MakeShortVerb{"} \DeleteShortVerb{\|} - \title{probsoln v3.02: + \title{probsoln v3.04: creating problem sheets optionally with solutions} \author{Nicola L.C. Talbot\\[10pt] School of Computing Sciences\\ @@ -33,7 +33,7 @@ Norwich. Norfolk\\ NR4 7TJ. United Kingdom.\\ \url{http://theoval.cmp.uea.ac.uk/~nlct/}} - \date{2011-12-10} + \date{2012-08-23} \maketitle \tableofcontents @@ -493,6 +493,8 @@ set}\marg{n}\marg{filename}\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}. +\textbf{If you want to automatically exclude problems included in +previous documents, see \sectionref{sec:exprev}.} Note that the random number generator has been modified in version 3.01 in order to fix a bug. If you want to ensure that your random @@ -513,6 +515,117 @@ has to load each file twice, which means that anything outside a problem definition will be parsed twice. \end{important} +\subsection{Randomly Selecting Problems Not Selected in Previous +Documents} +\label{sec:exprev} + +Suppose you have a large set of questions that you want to randomly +select for assignments and exams. The chances are, you don't want to +include questions that have been previously set for, say, the last +three years. That is, you don't want to select questions the +students may already have seen. As from version 3.03, you can now do +this. + +The \sty{probsoln} package defaults to the UK academic year, which +starts in September. If this isn't appropriate, you can change it +using: +\begin{definition}[\DescribeMacro{\SetStartMonth}] +\cs{SetStartMonth}\marg{n} +\end{definition} +where \meta{n} is the number of the month. (1 = January, 2 = +February, etc.) + +The \emph{start year} is the calender year in effect when the +academic year started. For example, if this is the academic year +2011/12, then the start year is 2011. This is automatically set to +the start of the current academic year. It is also updated when +\cs{SetStartMonth} is used.\footnote{So don't use \cs{SetStartMonth} +after \cs{SetStartYear}.} If you want to set it to a specific year, +you can use: +\begin{definition}[\DescribeMacro{\SetStartYear}] +\cs{SetStartYear}\marg{year} +\end{definition} +For example: \verb|\SetStartYear{2008}| indicates the academic year +2008/9. + +There are two files concerned with previously used labels. They are: +\begin{description} + + \item[The previously used labels file] This keeps track of all + problems used in previous years, as well as problems used by + other documents that have this as their previously used labels + file, and it contains the problem labels from the last run of + the current document. + + \item[The current used labels file] This defaults to +\cs{jobname}\texttt{.prb}, but the name can be changed using: + \begin{definition}[\DescribeMacro{\SetUsedFileName}] + \cs{SetUsedFileName}\marg{name} + \end{definition} + This file keeps track of all the labels used in the current + document from the previous \LaTeX\ run. Note that if you want to + delete this file, first clear it using + \begin{definition}[\DescribeMacro{\ClearUsedFile}] + \cs{ClearUsedFile}\marg{file} + \end{definition} + in place of \cs{ExcludePreviousFile}\marg{file}, described below. + The argument \meta{file} is the previously used labels file + described above. \cs{ClearUsedFile} will remove all labels in + the current used labels file from the previously used labels file + and clear the current used labels file. Once this file is empty, + it may then be deleted. + +\end{description} + +Before loading randomly selected problems, first specify the +previously used labels file with the command: +\begin{definition}[\DescribeMacro{\ExcludePreviousFile}] +\cs{ExcludePreviousFile}\oarg{number of years}\marg{file name} +\end{definition} +where \meta{file name} is the name of the previously used file. The +optional argument \meta{number of years} specifies the year cut-off. +This defaults to 3, which means that only those labels used this +year or the previous 2 years will be kept. Any problems used before +then may be reused. + +Suppose I'm lecturing a first year undergraduate mathematics course +(designated, say, mth101). I want to set assignments on each topic +and an exam at the end of the year (as well as a resit or second +sitting paper). I've got databases with problems for each topic, but +the first and second sitting exams mustn't include any of the +problems used in the assignments or any problems used in assignments +or exams for the previous two academic years. I'm going to arrange +my directory structure as follows: +\begin{itemize} +\item \texttt{mth101/} + \begin{itemize} + \item \texttt{assignment1/} (differentiation) + \begin{itemize} + \item \texttt{assignment1.tex} + \end{itemize} + \item \texttt{assignment2/} (probability spaces) + \begin{itemize} + \item \texttt{assignment2.tex} + \end{itemize} + \item \texttt{assignment3/} (linear algebra) + \begin{itemize} + \item \texttt{assignment3.tex} + \end{itemize} + \item \texttt{exams/} + \begin{itemize} + \item \texttt{exam.tex} (first sitting) + \item \texttt{resit.tex} (second sitting) + \end{itemize} + \item \texttt{databases/} + \begin{itemize} + \item \texttt{differentiation.tex} + \item \texttt{probabilityspaces.tex} + \item \texttt{linearalgebra.tex} + \end{itemize} + \item \texttt{previouslabels.tex} (created by \sty{probsoln}) + \end{itemize} +\end{itemize} + \section{Iterating Through Datasets}\label{sec:foreach} Once you have defined all your problems for a given data set, you diff --git a/Master/texmf-dist/doc/latex/probsoln/probsoln.pdf b/Master/texmf-dist/doc/latex/probsoln/probsoln.pdf Binary files differindex 50eb3513ddf..e0bbc92904f 100644 --- a/Master/texmf-dist/doc/latex/probsoln/probsoln.pdf +++ b/Master/texmf-dist/doc/latex/probsoln/probsoln.pdf diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample-exclude.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample-exclude.tex new file mode 100644 index 00000000000..8295015352e --- /dev/null +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample-exclude.tex @@ -0,0 +1,129 @@ +%% +%% This is file `sample-exclude.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% probsoln.dtx (with options: `sample-exclude.tex,package') +%% +%% probsoln.dtx +%% Copyright 2013 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. +%% 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 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. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% randomly select 25 problems from derivatives.tex and add to +%% the data set called 'deriv' +%% Display the problems +%% You may need to change \theenumi back here +%% randomly select 25 problems from probspaces.tex and add to +%% the data set called 'spaces' +%% Display the problems +%% You may need to change \theenumi back here + % This file is public domain +\documentclass[a4paper]{article} + +\usepackage{probsoln} + %uncomment the following line to display the answers + %\showanswers + + % Set the academic year to be 2011/12 (if omitted assume current + % academic year): + \SetStartYear{2011} + + % Set the seed for the random number generator: + \PSNrandseed{\GetStartYear} + + % Exclude problems that have been used this year or the previous + % two academic years. (Creates a file called 'excluded.tex' to + % store labels of used problems. Also creates a file called + % \jobname.prb that stores labels of problems used in this + % document, so they don't get excluded on subsequent runs.) + \ExcludePreviousFile[3]{excluded} + + % To clear the used problems file (\jobname.prb) of the labels + % generated in the previous run, comment the above and uncomment + % below: + % \ClearUsedFile{excluded} + + % Load 1 problem randomly selected from the given file + % and store in database 'firstprinciples': +\loadrandomproblems[firstprinciples]{1}{prob-1stprncp} + + % Load 5 problems randomly selected from the given file + % and store in database 'easy': +\loadrandomproblems[easy]{5}{prob-easy} + + % Load 2 problems randomly selected from the given file + % and store in database 'implicit': +\loadrandomproblems[implicit]{2}{prob-implicit} + + % Load 2 problems randomly selected from the given file + % and store in database 'probspaces': +\loadrandomproblems[probspaces]{2}{prob-probspaces} + + % Load 1 problem randomly selected from the given file + % and store in database 'mchoice': +\loadrandomproblems[mchoice]{1}{prob-mchoice} + + % Load 1 problem randomly selected from the given file + % and store in database 'nosoln': +\loadrandomproblems[nosoln]{1}{prob-nosoln} + +\begin{document} +\title{Sample Problem Sheet} +\author{Nicola Talbot} +\maketitle + +\begin{enumerate} + % Differentiation from first principles + \foreachproblem[firstprinciples]{\item \thisproblem} + +\item Differentiate the following functions: +\begin{enumerate} + \foreachproblem[easy]{\item \thisproblem} +\end{enumerate} + + % Implicit differentiation +\foreachproblem[implicit]{\item \thisproblem} + + % Finite probability spaces +\foreachproblem[probspaces]{\item \thisproblem} + + % Multiple choice question +\foreachproblem[mchoice]{\item \thisproblem} + + % select one essay style question that doesn't come with a solution + +\foreachproblem[nosoln]{\item \thisproblem} +\end{enumerate} +\end{document} +\endinput +%% +%% End of file `sample-exclude.tex'. diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample.pdf b/Master/texmf-dist/doc/latex/probsoln/samples/sample.pdf Binary files differindex b5b7adf2538..43f13544672 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample.pdf +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample.pdf diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample.tex index 8b927bd5588..c5b631659e6 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -50,8 +50,8 @@ \documentclass[a4paper]{article} \usepackage{probsoln} - %uncomment the following line to display the answers -\showanswers + % uncomment the following line to display the answers + % \showanswers % The following will generate a different set of % problems each year diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample2.pdf b/Master/texmf-dist/doc/latex/probsoln/samples/sample2.pdf Binary files differindex 545b648d531..a54bc6f77d3 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample2.pdf +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample2.pdf diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex index 57580107254..72a2f6df6a3 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample2.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample3.pdf b/Master/texmf-dist/doc/latex/probsoln/samples/sample3.pdf Binary files differindex 2a4bdd77839..1b0e3717ade 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample3.pdf +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample3.pdf diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample3.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample3.tex index e10158ae4db..f40e4755ae4 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample3.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample3.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample3.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample4.pdf b/Master/texmf-dist/doc/latex/probsoln/samples/sample4.pdf Binary files differindex 3abaeb7843e..fba702a13fb 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample4.pdf +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample4.pdf diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample4.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample4.tex index 8d0355a2f2b..e79fd08340d 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample4.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample4.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample4.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample5.pdf b/Master/texmf-dist/doc/latex/probsoln/samples/sample5.pdf Binary files differindex e8b50cfa542..3d50533dc6c 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample5.pdf +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample5.pdf diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample5.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample5.tex index fd31bef8d66..4f515585196 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample5.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample5.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample5.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample6.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample6.tex index 1edcbaad89b..321fda452a9 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample6.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample6.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample6.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample7.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample7.tex index 5b1997c8f39..0b48c4cc85e 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample7.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample7.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample7.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample8.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample8.tex index d52549da9eb..503488f5e2e 100644 --- a/Master/texmf-dist/doc/latex/probsoln/samples/sample8.tex +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample8.tex @@ -7,7 +7,7 @@ %% probsoln.dtx (with options: `sample8.tex,package') %% %% probsoln.dtx -%% Copyright 2011 Nicola Talbot +%% Copyright 2013 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,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.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, 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. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |