exam-n class

# The exam-n class

Format exam papers

This is version exam-n-1.4.0, 2022 October 10.

- See the sample exam in the distribution.
- If you're a question author, you probably don't want to read the full documentation. Stick to the shorter notes for authors.
- See the documentation for fuller discussion.
- The package's 'home page' is `https://purl.org/nxg/dist/exam-n`, and the repository is available to browse or clone.
- And it's on CTAN at /pkg/exam-n.

## Overview

### Other exam styles

There are already multiple ‘exam’ LaTeX styles on CTAN, including the (original?) exam class, the extensive AcroTeX bundle, the examdesign and exams classes, and a variety of other packages which mention exams in some way. Some of these are more focused on generating quizzes (even doing things like randomising answers) or on having a highly customisable layout. Several (including ‘exam-n’) have support for generating versions of the exam document which include answers, for the benefit of markers.

### The exam-n style

What the ‘exam-n’ class can bring to this particular (rather crowded) party is:

- Direct support for collaborative development of an exam, using a model in which a departmental ‘exams convener’ or ‘exam chair’ coordinates multiple authors writing individual questions. This includes various completeness checks to avoid embarrasing mistakes. The class file and associated process is in regular use within a physics and astronomy department, and this work-flow is discussed in a little more detail within the class file documentation.
- Designed to have all of the ‘traditional’ exam paper features such as sectioning, per-part running marks, ‘Question n continued’ catchwords, and so on.
- Designed to be locally adaptable.
- The class file is freely adaptable (LPPL). The author can provide the usual basic free-software support, or potentially more elaborate support with a different arrangement.

The focus of the ‘exam-n’ class is on the careful collaborative process of assembling an exam, and many of the features are to do with checks to avoid mistakes. The result has, in effect, been validated by practice.

## To install

Unpack the distribution tarball or zip file, and move the directory `move-to-texmf` (or its contents) to some location on the LaTeX search path. You're probably looking for a directory called `texmf-local`, or something like that.

‘Move…to a suitable place’ is admittedly very vague. Here are some pointers, however:

- This can be the same location as your exam source files. This will work, but you'll have to do this for each directory.
- See the good generic advice in the TeX FAQ.
- Your LaTeX environment might have some hints on ‘installing new style files’, or you can search online with some search string like that.
- If you're on a unix-like OS, then the command `kpsewhich guexam.cls` will show you which class file LaTeX will use (so if it produces no result, that's telling you that LaTeX won't find the files); also `kpsepath tex` will display, in an admittedly very oblique form, the list of places where TeX will search.
- If you're using MikTeX, then the documentation on the ‘MikTeX console’ includes a section on ‘Registering a user-managed TEXMF root directory’. This rather obliquely says that you can ‘register a user-managed TEXMF root directory’. What that means is that (i) you should go to a folder such as `...\Users\yourname\AppData\MikTeX`, (ii) create a sequence of folders so that you end up with `...\MikTeX\texmf\tex\latex\exam-n`, and (iii) put the distributed `.sty` and `.clo` files in the latter folder. The directory `...\MikTex\texmf` is your ‘user-managed TEXMF root directory’, and you should add it to MikTeX's search path using the instructions above.

## Releases

With the version 1.1 release, the interface should now be regarded as rather stable. However version 1.1 was the first to be released outside Glasgow University, so there may be some changes to the interface which will emerge with broader use, as well as some bug fixes. The interface may, therefore, yet change. If you use this class to produce exams, you should therefore include a copy of the class file locally, rather than relying on a central version. If you need an earlier version of the class, let me know.

The class was called `exam` until release 0.14, and `guexam` until release 1.1. In the first case, it was renamed to avoid a conflict with a pre-existing LaTeX class with the same name; and in the second it was renamed to make it more generically useful to other institutions.

1.4.0, 2022 October 10

- The [siunitx] option is now on by default, and the `\units` macro produces a one-time-per-document warning that it will be removed in the next version.
- Having two `\partmarks` commands in an environment is now detected as an error (it was documented as an error, but not checked, so the extra `\partmarks` commands were simply ignored).

1.4.0-b1, 2022 August 7

- The class file now depends on a version of LaTeX which is at least the 2020/10/01 release. This is so that we can use the current LaTeX hooks mechanism.
- Rework `\partmarks`: the `\partmarks` indicator can now go inside most environments, including list, quotes, unnumbered equations, and the various amsmath displays. In these cases, the indicator will automatically appear at the end of the environment. The starred variant of the command still exists, but should rarely be necessary.

1.3.5-b1, 2022 July 11

- Fix erroneous broken line before `\partmarks`, in compose mode, when a paragraph fills the last line.
- Fix support for STIX2 fonts in XeLaTeX and LuaLaTeX (it was working inaccurately before).
- Add an optional argument for `\part` to override part numbering.
- Use the `xcolor` package for colour management, instead of the core `color` package (the `xcolor` package is well-known and stable, and this means that we are compatible with TikZ).
- `\partmarks` in solutions no longer gobble trailing space (doing so is probably right in questions, and is still the case, but `\partmarks` in solutions tend to be more interspersed with text).
- `\label` within a `\part` now refers to the part number (as opposed to the question number).
- Avoid a ‘You can't use `\unskip' in vertical mode’ error, in certain circumstances.
- Add the `[siunitx]` option, indicating that we should load the siunitx package (default no). This is now preferred to the `\units` macro, and the latter will be removed in a forthcoming release.
- Renamed `A1.clo` to clearer `myclass.clo`
- Repository moved from bitbucket to https://heptapod.host/nxg/exam-n, when bitbucket dropped support for Mercurial. This means, incidentally, that links to specific issues at bitbucket are now broken.
- Bold-italic maths should now work correctly with STIX.
- Long `\partmarks` comments now appear as footnotes.
- Solutions are now set `\normalsize`.
- Bugfix: move definition of `\defaultpartmarkscategory` so it can be invoked within a `.clo` file straightforwardly.
- Define the `[uprightpi]` option to set `\pi` as an upright character, as appropriate for a constant (this is implemented fully only for the `[mtpro2]` and `[stix2]` options)..
- Note that the `\units` macro is likely to be deprecated in a forthcoming version, and replaced by a recommendation to use the standard `[siunitx]` package.

1.3, 2018 November 21

- Add a ‘category’ optional argument to `\partmarks`, and add `\defaultpartmarkscategory`.

1.2.1, 2018 July 2

- Bugfix: ignore any content which appears after `\end{document}`, in `\includequestion` (author) files (fixes issue 6).
- The environments `{figure*}` and `{table*}` now produce an error.
- The macro `\vec` now produces correct greek bold maths.
- Docmentation: notes on unit formatting.

1.2, 2017 December 1

- Use serif STIX2 fonts for sans and monospace cases, when using Lua- or XeLaTeX (the style doesn't use/encourage any sans-serif text, so this shouldn't matter).
- Fix font sizes in solutions.
- Adjustments to font-handling, which appear to have fixed LuaLaTeX differences.
- Add the `stix2` option, to use the STIX2 font set.
- Make it possible to use `\rubric` and `\baserubric` within a `.clo` file. This was advertised as being possible, but it seems it had never been tested!

Earlier release notes are available

Norman Gray
2022 October 10