| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <title>exam-n class</title> |
| 5 | <link href="https://nxg.me.uk" rev="author"/> |
| 6 | |
| 7 | |
| 8 | <style class="distonly" type="text/css">body { |
| 9 | color: #333; |
| 10 | background: white; |
| 11 | margin-left: +30%; |
| 12 | width: 50%; /* body is 50% of screen width */ |
| 13 | margin-right: auto; /* ie, 20% */ |
| 14 | padding: 0.5em; /* this will make a difference if I decide to |
| 15 | have the background a different colour */ |
| 16 | /* I can't decide on font: Optima's always nice, but Gill looks |
| 17 | agreeably intense. Helvetica's a decent fallback. */ |
| 18 | font-family: "Helvetica Neue", Helvetica, "Gill Sans", gill, sans-serif; |
| 19 | /* font-family: Optima, "Gill Sans", gill, Helvetica, sans-serif; */ |
| 20 | /* font-family: "Gill Sans", gill, Helvetica, sans-serif; */ |
| 21 | /* I seem to have used 11pt at some point in the past, but this |
| 22 | is far too big -- did I ever have a reason for that, or is it |
| 23 | just due to browser changes? */ |
| 24 | font-size: 10pt; |
| 25 | line-height: 150%; |
| 26 | } |
| 27 | |
| 28 | div.topsidebar { |
| 29 | float: right; |
| 30 | width: 50%; /* ...of the body width (ie, 50% x 50% of screen) */ |
| 31 | font-size: smaller; |
| 32 | margin-left: 1em; |
| 33 | padding-left: 1em; |
| 34 | border-left: solid thin #AAA; |
| 35 | } |
| 36 | |
| 37 | /* On wider screens, move the sidebar out to the right hand side */ |
| 38 | /* This uses CSS3 media queries: http://www.w3.org/TR/css3-mediaqueries/ */ |
| 39 | @media screen and (min-width: 700pt) and (max-width: 850pt) { |
| 40 | body { |
| 41 | margin-left: 210pt; |
| 42 | width: 350pt; /* 50% of 700pt */ |
| 43 | margin-right: auto; |
| 44 | } |
| 45 | div.topsidebar { |
| 46 | position: absolute; |
| 47 | /* I feel this size should be 595pt (350 + 210 + 0.05*700), |
| 48 | but that's clearly not right -- I don't think I understand what the -5% |
| 49 | in the h1 spec below is actually 5% of! */ |
| 50 | left: 570pt; |
| 51 | width: auto; |
| 52 | margin-left: 0pt; |
| 53 | padding-left: 0pt; |
| 54 | border: none; |
| 55 | } |
| 56 | } |
| 57 | /* On still-wider screens, expand the left-margin, keeping the sidebar attached to the right-hand edge. |
| 58 | When the screen is 850pt wide (expanding from the @media case above), |
| 59 | the left margin will be 210pt, the width 350pt, and the right margin therefore 290pt.*/ |
| 60 | @media screen and (min-width: 850pt) { |
| 61 | body { |
| 62 | margin-right: 290pt; /* 290 = 850-(210+350) */ |
| 63 | width: 350pt; |
| 64 | margin-left: auto; /* ...takes up the slack */ |
| 65 | } |
| 66 | div.topsidebar { |
| 67 | position: absolute; |
| 68 | width: 290pt; /* same 290pt as above */ |
| 69 | left: auto; |
| 70 | right: 0%; |
| 71 | padding-left: 0pt; |
| 72 | border: none; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | |
| 77 | code, pre { |
| 78 | font-family: Monaco, fixed; |
| 79 | font-size: 9pt; |
| 80 | } |
| 81 | |
| 82 | a { text-decoration: none; } |
| 83 | a:link { color: #66C; } |
| 84 | a:visited { color: #669; } |
| 85 | a[href]:hover { background: #EEE; } |
| 86 | |
| 87 | div.abstract { |
| 88 | font-style: oblique; |
| 89 | text-align: left; |
| 90 | } |
| 91 | div.abstract em { font-style: normal; } |
| 92 | div.abstract code { |
| 93 | font-style: normal; |
| 94 | font-size: 80%; |
| 95 | } |
| 96 | |
| 97 | /* a span/div style for attracting attention */ |
| 98 | .attention { |
| 99 | color: #822; |
| 100 | } |
| 101 | |
| 102 | h1, h2, h3, h4, h5, h6 { |
| 103 | color: #822; |
| 104 | font-weight: 100; /* few fonts have ultra-light weights */ |
| 105 | line-height: 100%; /* no need to spread out titles */ |
| 106 | } |
| 107 | h1 { |
| 108 | margin-left: -40%; |
| 109 | margin-right: -5%; |
| 110 | padding: 0.5em; |
| 111 | border: solid thin #666; |
| 112 | text-align: right; |
| 113 | } |
| 114 | h2 { |
| 115 | margin-left: -40%; |
| 116 | margin-right: -5%; |
| 117 | padding: 0.2em; |
| 118 | border-top: solid thin #666; |
| 119 | clear: both; |
| 120 | } |
| 121 | |
| 122 | h2.appendices { |
| 123 | margin-top: 10ex; |
| 124 | border-top: double medium #666; |
| 125 | } |
| 126 | h3 { |
| 127 | margin-left: -30%; |
| 128 | float: left; |
| 129 | width: 25%; |
| 130 | display: block; |
| 131 | text-align: right; |
| 132 | vertical-align: bottom; |
| 133 | padding-top: 0pt; |
| 134 | padding-right: 0.5em; |
| 135 | margin-top: 0pt; |
| 136 | line-height: 100%; |
| 137 | } |
| 138 | |
| 139 | /* |
| 140 | h4 { |
| 141 | color: #C66; |
| 142 | } |
| 143 | */ |
| 144 | |
| 145 | pre, table { background: #dde; } |
| 146 | |
| 147 | pre { |
| 148 | padding: 1em; |
| 149 | line-height: 130%; |
| 150 | } |
| 151 | |
| 152 | table { |
| 153 | font-size: smaller; |
| 154 | } |
| 155 | td { |
| 156 | padding: 0.5ex; |
| 157 | } |
| 158 | |
| 159 | Q:before { content: "“"; } |
| 160 | Q:after { content: "”"; } |
| 161 | |
| 162 | img.smallimage { |
| 163 | float: right; |
| 164 | margin: 24pt; |
| 165 | margin-right: -30%; |
| 166 | } |
| 167 | |
| 168 | div.signature { |
| 169 | margin-left: -40%; |
| 170 | margin-right: -5%; |
| 171 | margin-top: 4ex; |
| 172 | text-align: right; |
| 173 | border: solid thin #666; |
| 174 | padding: 0.3em; |
| 175 | clear: both; |
| 176 | } |
| 177 | |
| 178 | /* ============================================================ |
| 179 | * Some other curiosities of my one-time formatting for web pages |
| 180 | */ |
| 181 | .doc-history { |
| 182 | font-size: xx-small; |
| 183 | background: #eee; |
| 184 | line-height: 100%; |
| 185 | } |
| 186 | |
| 187 | div.subtoc, div.subsubtoc { display: none; } |
| 188 | |
| 189 | /* ============================================================ |
| 190 | * Special formatting for ToC |
| 191 | */ |
| 192 | |
| 193 | /* |
| 194 | If there's significant amount of text in front of the first subsection, |
| 195 | then the following are good to put in the per-document stylesheet: |
| 196 | width: 25%; |
| 197 | float: right; |
| 198 | */ |
| 199 | div#toc { |
| 200 | color: #888; |
| 201 | padding: 0; |
| 202 | font-size: smaller; |
| 203 | text-align: right; |
| 204 | } |
| 205 | div#toc a:link { color: #888; } |
| 206 | div#toc > ul { |
| 207 | padding: 0pt; |
| 208 | margin: 0pt; |
| 209 | list-style: none; |
| 210 | } |
| 211 | div#toc li { |
| 212 | padding: 0pt; |
| 213 | display: inline-block; |
| 214 | } |
| 215 | div#toc li:before { |
| 216 | content: "§ "; |
| 217 | margin-left: 1em; |
| 218 | } |
| 219 | /* the following elements aren't currently generated by structure.lx */ |
| 220 | div#toc li ul { |
| 221 | padding-left: 1em; |
| 222 | margin-left: 0; |
| 223 | font-style: italic; |
| 224 | display: inline; |
| 225 | } |
| 226 | div#toc li ul:before { |
| 227 | content: "( "; |
| 228 | } |
| 229 | div#toc li ul:after { |
| 230 | content: " ) "; |
| 231 | } |
| 232 | div#toc li li { |
| 233 | padding-left: 0pt; |
| 234 | } |
| 235 | div#toc li li:after { |
| 236 | content: "; "; |
| 237 | } |
| 238 | </style> |
| 239 | <style type="text/css"> |
| 240 | dd ul { padding: 0pt; margin: 0pt; } |
| 241 | </style> |
| 242 | </head> |
| 243 | |
| 244 | <body> |
| 245 | <h1>The exam-n class</h1> |
| 246 | |
| 247 | <p>Format exam papers</p> |
| 248 | |
| 249 | <p class="distonly">This is version exam-n-1.4.0, 2022 October 10.</p> |
| 250 | |
| 251 | |
| 252 | |
| 253 | <ul> |
| 254 | |
| 255 | <li class="distonly">See the sample exam in the distribution.</li> |
| 256 | <li>If you're a question author, you probably don't want to read the |
| 257 | full documentation. Stick to the shorter |
| 258 | <a href="notes-for-authors.pdf">notes for authors</a>.</li> |
| 259 | <li>See the <a href="exam-n.pdf">documentation</a> for fuller |
| 260 | discussion.</li> |
| 261 | <li>The package's 'home page' is |
| 262 | <a href="https://purl.org/nxg/dist/exam-n"><code>https://purl.org/nxg/dist/exam-n</code></a>, |
| 263 | and the repository is available to |
| 264 | <a href="https://heptapod.host/nxg/exam-n">browse</a> |
| 265 | or clone.</li> |
| 266 | <li>And it's on CTAN at <a href="https://www.ctan.org/pkg/exam-n">/pkg/exam-n</a>.</li> |
| 267 | </ul> |
| 268 | |
| 269 | <h2>Overview</h2> |
| 270 | |
| 271 | <h3>Other exam styles</h3> |
| 272 | <p>There are already multiple ‘exam’ LaTeX styles on CTAN, |
| 273 | including |
| 274 | the (original?) <a href="http://dante.ctan.org/tex-archive/macros/latex/contrib/exam/">exam class</a>, |
| 275 | the extensive <a href="http://www.math.uakron.edu/~dpstory/webeq.html">AcroTeX</a> bundle, |
| 276 | the |
| 277 | <a href="http://dante.ctan.org/tex-archive/macros/latex/contrib/examdesign/">examdesign</a> and |
| 278 | <a href="http://dante.ctan.org/tex-archive/macros/latex/contrib/exams/">exams</a> |
| 279 | classes, and |
| 280 | <a href="http://www.tex.ac.uk/cgi-bin/CTANcataloguesearch.pl?CATSTRING=exam">a variety of other packages</a> |
| 281 | which mention exams in some way. |
| 282 | Some of these are more focused on generating quizzes |
| 283 | (even doing things like randomising answers) |
| 284 | or on having a highly customisable layout. |
| 285 | Several (including ‘exam-n’) have support for generating versions of |
| 286 | the exam document which include answers, for the benefit of |
| 287 | markers.</p> |
| 288 | |
| 289 | <h3>The exam-n style</h3> |
| 290 | <p>What the ‘exam-n’ class can bring to this particular (rather crowded) |
| 291 | party is:</p> |
| 292 | <ul> |
| 293 | <li>Direct support for collaborative development of an exam, using a |
| 294 | model in which a departmental ‘exams convener’ or ‘exam chair’ |
| 295 | coordinates multiple authors writing individual questions. This |
| 296 | includes various completeness checks to avoid embarrasing mistakes. |
| 297 | The class file and associated process is in regular use within a |
| 298 | physics and astronomy department, and this work-flow is discussed in a |
| 299 | little more detail within the class file documentation.</li> |
| 300 | <li>Designed to have all of the ‘traditional’ exam paper features such |
| 301 | as sectioning, per-part running marks, ‘Question <em>n</em> continued’ |
| 302 | catchwords, and so on.</li> |
| 303 | <li>Designed to be locally adaptable.</li> |
| 304 | <li>The class file is freely adaptable (LPPL). The author can provide |
| 305 | the usual basic free-software support, or potentially more elaborate |
| 306 | support with a different arrangement.</li> |
| 307 | </ul> |
| 308 | |
| 309 | <p>The focus of the ‘exam-n’ class is on the careful collaborative |
| 310 | process of assembling an exam, and many of the features are to do with |
| 311 | checks to avoid mistakes. The result has, in effect, been validated |
| 312 | by practice.</p> |
| 313 | |
| 314 | |
| 315 | <h2>To install</h2> |
| 316 | <p>Unpack the distribution tarball or zip |
| 317 | file, and move the directory <code>move-to-texmf</code> (or its |
| 318 | contents) to some |
| 319 | location on the LaTeX search path. You're probably looking for a |
| 320 | directory called <code>texmf-local</code>, or something like that.</p> |
| 321 | |
| 322 | <p>‘Move…to a suitable place’ is admittedly very vague. Here are some |
| 323 | pointers, however:</p> |
| 324 | <ul> |
| 325 | <li>This can be the same location as your exam source files. This |
| 326 | will work, but you'll have to do this for each directory.</li> |
| 327 | <li>See the good generic advice in |
| 328 | <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf">the |
| 329 | TeX FAQ</a>.</li> |
| 330 | <li>Your LaTeX environment might have some hints on ‘installing new |
| 331 | style files’, or you can search online with some search string like |
| 332 | that.</li> |
| 333 | <li>If you're on a unix-like OS, then the command <code>kpsewhich |
| 334 | guexam.cls</code> will show you which class file LaTeX will use (so if |
| 335 | it produces no result, that's telling you that LaTeX won't find the |
| 336 | files); also <code>kpsepath tex</code> will display, in an admittedly |
| 337 | very oblique form, the list of places where TeX will search.</li> |
| 338 | <li>If you're using MikTeX, then the documentation on the |
| 339 | ‘<a href="https://miktex.org/howto/miktex-console">MikTeX console</a>’ |
| 340 | includes a section on ‘Registering a user-managed TEXMF root |
| 341 | directory’. This rather obliquely says that you can ‘register a |
| 342 | user-managed TEXMF root directory’. What that means is that (i) |
| 343 | you should go to a folder such as |
| 344 | <code>...\Users\<em>yourname</em>\AppData\MikTeX</code>, (ii) create a |
| 345 | sequence of folders so that you end up with |
| 346 | <code>...\MikTeX\texmf\tex\latex\exam-n</code>, and (iii) put the |
| 347 | distributed <code>.sty</code> and <code>.clo</code> files in the |
| 348 | latter folder. The directory <code>...\MikTex\texmf</code> is your |
| 349 | ‘user-managed TEXMF root directory’, and you should add it to MikTeX's |
| 350 | search path using the instructions above.</li> |
| 351 | </ul> |
| 352 | |
| 353 | |
| 354 | <h2>Releases</h2> |
| 355 | |
| 356 | <p>With the version 1.1 release, the interface should now be regarded |
| 357 | as rather stable. However version 1.1 was the first to be released |
| 358 | outside Glasgow University, so there may be some changes to the |
| 359 | interface which will emerge with broader use, as well as some bug |
| 360 | fixes. The interface <em>may</em>, therefore, yet change. If you use |
| 361 | this class to produce exams, you should therefore include a copy of |
| 362 | the class file locally, rather than relying on a central version. If |
| 363 | you need an earlier version of the class, let me know.</p> |
| 364 | |
| 365 | <p>The class was called <code>exam</code> until release 0.14, and |
| 366 | <code>guexam</code> until release 1.1. In the first case, it was |
| 367 | renamed to avoid a conflict with a pre-existing LaTeX class with the |
| 368 | same name; and in the second it was renamed to make it more |
| 369 | generically useful to other institutions.</p> |
| 370 | |
| 371 | <h:dl xmlns:h="http://www.w3.org/1999/xhtml"> |
| 372 | <h:dt><h:span class="attention">1.4.0, 2022 October 10</h:span></h:dt><h:dd> |
| 373 | <ul> |
| 374 | <li>The [siunitx] option is now on by default, and the |
| 375 | <code>\units</code> macro produces a one-time-per-document |
| 376 | warning that it will be removed in the next version.</li> |
| 377 | <li>Having two <code>\partmarks</code> commands in an |
| 378 | environment is now detected as an error (it was documented as an |
| 379 | error, but not checked, so the extra <code>\partmarks</code> |
| 380 | commands were simply ignored).</li> |
| 381 | </ul> |
| 382 | </h:dd> |
| 383 | |
| 384 | <h:dt>1.4.0-b1, 2022 August 7</h:dt><h:dd> |
| 385 | <ul> |
| 386 | <li>The class file now depends on a version of LaTeX which is at least |
| 387 | the 2020/10/01 release. This is so that we can use the current LaTeX |
| 388 | hooks mechanism.</li> |
| 389 | <li>Rework <code>\partmarks</code>: the <code>\partmarks</code> |
| 390 | indicator can now go <em>inside</em> most environments, including |
| 391 | list, quotes, unnumbered equations, and the various amsmath displays. In these |
| 392 | cases, the indicator will automatically appear at the end of the |
| 393 | environment. The starred variant of the command still exists, but |
| 394 | should rarely be necessary.</li> |
| 395 | </ul> |
| 396 | </h:dd> |
| 397 | |
| 398 | <h:dt>1.3.5-b1, 2022 July 11</h:dt><h:dd><ul> |
| 399 | <li>Fix erroneous broken line before <code>\partmarks</code>, in |
| 400 | compose mode, when a paragraph fills the last line.</li> |
| 401 | <li>Fix support for STIX2 fonts in XeLaTeX and LuaLaTeX (it was |
| 402 | working inaccurately before).</li> |
| 403 | <li>Add an optional argument for <code>\part</code> to override part numbering.</li> |
| 404 | <li>Use the <code>xcolor</code> package for colour management, instead |
| 405 | of the core <code>color</code> package (the <code>xcolor</code> |
| 406 | package is well-known and stable, and this means that we are |
| 407 | compatible with TikZ).</li> |
| 408 | <li><code>\partmarks</code> in solutions no longer gobble trailing space |
| 409 | (doing so is probably right in questions, and is still the case, but |
| 410 | <code>\partmarks</code> in solutions tend to be more interspersed with |
| 411 | text).</li> |
| 412 | <li><code>\label</code> within a <code>\part</code> now refers to the |
| 413 | part number (as opposed to the question number).</li> |
| 414 | <li>Avoid a ‘You can't use `\unskip' in vertical mode’ error, |
| 415 | in certain circumstances.</li> |
| 416 | <li>Add the <code>[siunitx]</code> option, indicating that we should |
| 417 | load the <a href="https://www.ctan.org/pkg/siunitx">siunitx</a> package (default no). |
| 418 | This is now preferred to the <code>\units</code> macro, and the latter will be |
| 419 | removed in a forthcoming release.</li> |
| 420 | <li>Renamed <code>A1.clo</code> to clearer <code>myclass.clo</code></li> |
| 421 | <li>Repository moved from bitbucket to |
| 422 | <a href="https://heptapod.host/nxg/exam-n">https://heptapod.host/nxg/exam-n</a>, |
| 423 | when bitbucket dropped support for Mercurial. |
| 424 | This means, incidentally, that links to specific issues at bitbucket |
| 425 | are now broken.</li> |
| 426 | <li>Bold-italic maths should now work correctly with STIX.</li> |
| 427 | <li>Long <code>\partmarks</code> comments now appear as footnotes.</li> |
| 428 | <li>Solutions are now set <code>\normalsize</code>.</li> |
| 429 | <li>Bugfix: move definition of <code>\defaultpartmarkscategory</code> |
| 430 | so it can be invoked within a <code>.clo</code> file straightforwardly.</li> |
| 431 | <li>Define the <code>[uprightpi]</code> option to set <code>\pi</code> |
| 432 | as an upright character, as appropriate for a constant (this is |
| 433 | implemented fully only for the <code>[mtpro2]</code> and |
| 434 | <code>[stix2]</code> options)..</li> |
| 435 | <li>Note that the <code>\units</code> macro is likely to be deprecated |
| 436 | in a forthcoming version, and replaced by a recommendation to use the |
| 437 | standard <code>[siunitx]</code> package.</li> |
| 438 | </ul></h:dd> |
| 439 | |
| 440 | <h:dt>1.3, 2018 November 21</h:dt><h:dd><ul> |
| 441 | <li>Add a ‘category’ optional argument to <code>\partmarks</code>, and |
| 442 | add <code>\defaultpartmarkscategory</code>.</li> |
| 443 | </ul> |
| 444 | </h:dd> |
| 445 | |
| 446 | <h:dt>1.2.1, 2018 July 2</h:dt><h:dd><ul> |
| 447 | <li>Bugfix: ignore any content which appears after |
| 448 | <code>\end{document}</code>, in <code>\includequestion</code> (author) |
| 449 | files (fixes issue 6).</li> |
| 450 | <li>The environments <code>{figure*}</code> and <code>{table*}</code> now produce an error.</li> |
| 451 | <li>The macro <code>\vec</code> now produces correct greek bold maths.</li> |
| 452 | <li>Docmentation: notes on unit formatting.</li> |
| 453 | </ul> |
| 454 | </h:dd> |
| 455 | |
| 456 | <h:dt>1.2, 2017 December 1</h:dt><h:dd><ul> |
| 457 | <li>Use serif STIX2 fonts for sans and monospace cases, when using |
| 458 | Lua- or XeLaTeX (the style doesn't use/encourage any sans-serif text, |
| 459 | so this shouldn't matter).</li> |
| 460 | <li>Fix font sizes in solutions.</li> |
| 461 | <li>Adjustments to font-handling, which appear to have fixed LuaLaTeX differences.</li> |
| 462 | <li>Add the <code>stix2</code> option, to use the |
| 463 | <a href="http://www.stixfonts.org/">STIX2 font set</a>.</li> |
| 464 | <li>Make it possible to use <code>\rubric</code> and <code>\baserubric</code> within a <code>.clo</code> file. |
| 465 | This was advertised as being possible, but it seems it had never been tested!</li> |
| 466 | </ul></h:dd> |
| 467 | </h:dl> |
| 468 | |
| 469 | |
| 470 | |
| 471 | <p class="distonly"><a href="release-notes-dist.html">Earlier release notes</a> are available</p> |
| 472 | |
| 473 | |
| 474 | <div class="signature"> |
| 475 | <a href="https://nxg.me.uk">Norman Gray</a><br/> |
| 476 | 2022 October 10 |
| 477 | </div> |
| 478 | |
| 479 | </body> |
| 480 | </html> |