rbrignall / OU-SUPPS

LaTeX class files for OU Supps. If you like this repository, you'll surely also like Robert Hasson's ouunit package: https://github.com/RobertHasson/ouunit Sign up to our mailing list to receive updates: https://www.jiscmail.ac.uk/OU-TEX-ANNOUNCEMENTS
8 stars 4 forks source link

<voffset> in \marks when [specsolns] activated #82

Closed rbrignall closed 8 months ago

rbrignall commented 2 years ago

From Ryan Campion:

The [] option from \mk[]{}[] works well but when you turn specsolns on the last set of square brackets and its contents can remain when the rest of the \mk command disappears.

An example: \mk[method]{2}[2cm] is treated as [2cm], which could be displayed in some contexts.

I understand this might be because the [] option is actually implemented by \solnmarks ending with the \margninnote command which uses \@ifnextchar to check for a following set of square brackets for its own [] option. When \solnmarks is defined to be \relax these square brackets aren’t interpreted as an option that is part of the command and are instead left in the document.

One possible fix would be to make [] an optional argument for \solnmarks with something like the solution found on this site: https://texfaq.org/FAQ-twooptarg using relay commands to pass extra optional arguments. Then, instead of defining \solnmarks to be \relax in the specsolns you define the relay command to be \relax. This way all arguments would be interpreted to be part of the command but just left unused.