From c2e26b130cd3c16ddba1e50bd65f8ff334ba8acc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 5 May 2014 22:02:58 +0000 Subject: exam-n (5may14) git-svn-id: svn://tug.org/texlive/trunk@33862 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/exam-n/README | 64 + .../texmf-dist/doc/latex/exam-n/exam-n-example.tex | 133 +++ Master/texmf-dist/doc/latex/exam-n/exam-n.html | 128 ++ Master/texmf-dist/doc/latex/exam-n/exam-n.pdf | Bin 0 -> 269024 bytes Master/texmf-dist/doc/latex/exam-n/lppl.txt | 416 +++++++ .../doc/latex/exam-n/move-to-texmf/A1.clo | 82 ++ .../doc/latex/exam-n/move-to-texmf/exam-n.cls | 1251 ++++++++++++++++++++ .../doc/latex/exam-n/notes-for-authors.pdf | Bin 0 -> 226217 bytes .../texmf-dist/doc/latex/exam-n/release-notes.html | 303 +++++ Master/texmf-dist/doc/latex/exam-n/sample/Makefile | 16 + .../texmf-dist/doc/latex/exam-n/sample/cosmo1.tex | 91 ++ .../texmf-dist/doc/latex/exam-n/sample/cosmo2.tex | 60 + .../texmf-dist/doc/latex/exam-n/sample/cosmo3.tex | 50 + .../doc/latex/exam-n/sample/dynamical1.tex | 96 ++ .../doc/latex/exam-n/sample/dynamical2.tex | 24 + .../doc/latex/exam-n/sample/dynamical3.tex | 59 + .../texmf-dist/doc/latex/exam-n/sample/excos1.tex | 46 + .../latex/exam-n/sample/numerical1-solution.pdf | Bin 0 -> 26704 bytes .../latex/exam-n/sample/numerical1-solution.tex | 18 + .../doc/latex/exam-n/sample/numerical1.tex | 58 + .../doc/latex/exam-n/sample/numerical2.tex | 41 + .../doc/latex/exam-n/sample/numerical3.tex | 42 + .../doc/latex/exam-n/sample/sample_exam.pdf | Bin 0 -> 191391 bytes .../doc/latex/exam-n/sample/sample_exam.tex | 64 + .../latex/exam-n/sample/sample_exam_solution.pdf | Bin 0 -> 244992 bytes .../latex/exam-n/sample/sample_exam_solution.tex | 64 + .../doc/latex/exam-n/sample/sample_mcq.tex | 87 ++ .../texmf-dist/doc/latex/exam-n/sample/spiral.eps | 22 + .../texmf-dist/doc/latex/exam-n/sample/spiral.pdf | Bin 0 -> 1799 bytes Master/texmf-dist/doc/latex/exam-n/sample_exam.pdf | Bin 0 -> 191391 bytes .../doc/latex/exam-n/sample_exam_solution.pdf | Bin 0 -> 244992 bytes Master/texmf-dist/doc/latex/exam-n/style.css | 230 ++++ 32 files changed, 3445 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/exam-n/README create mode 100644 Master/texmf-dist/doc/latex/exam-n/exam-n-example.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/exam-n.html create mode 100644 Master/texmf-dist/doc/latex/exam-n/exam-n.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/lppl.txt create mode 100644 Master/texmf-dist/doc/latex/exam-n/move-to-texmf/A1.clo create mode 100644 Master/texmf-dist/doc/latex/exam-n/move-to-texmf/exam-n.cls create mode 100644 Master/texmf-dist/doc/latex/exam-n/notes-for-authors.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/release-notes.html create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/Makefile create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/cosmo1.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/cosmo2.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/cosmo3.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/dynamical1.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/dynamical2.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/dynamical3.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/excos1.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/numerical1-solution.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/numerical1-solution.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/numerical1.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/numerical2.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/numerical3.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/sample_exam.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/sample_exam.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/sample_exam_solution.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/sample_exam_solution.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/sample_mcq.tex create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/spiral.eps create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample/spiral.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample_exam.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/sample_exam_solution.pdf create mode 100644 Master/texmf-dist/doc/latex/exam-n/style.css (limited to 'Master/texmf-dist/doc/latex/exam-n') diff --git a/Master/texmf-dist/doc/latex/exam-n/README b/Master/texmf-dist/doc/latex/exam-n/README new file mode 100644 index 00000000000..ac55c1037a6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/README @@ -0,0 +1,64 @@ + +exam-n: LaTeX class file for exams, version 1.1, 2014 May 03. +[ Mercurial revision 6f818b549982, 2014-05-03 13:42 +0100, tag 1.1 + 0 ] + + +Overview +-------- + +The class is designed to be localised to a particular institution's +exam layout, by a suitably skilled LaTeX hacker. There are three +possible ways of doing this, in increasing order of sophistication: + + 1. Make suitable adjustments to individual exam `.tex` files. + + 2. Rename the distributed `exam-n.dtx` file to something more locally + suitable, and edit it with suitable changes (search for + `%%%CONFIGURE` for hints on where to adjust). + + 3. Fork the Mercurial repository at + [bitbucket](https://bitbucket.org/nxg/exam-n), change the + value of the `EXAM-N` variable in the `Makefile`, and then + edit the `exam-n.dtx` file. See the comments at the top of the + `Makefile`. The command `make dist` will assemble a tarball + release of the class file. + +In the last two cases, if you change the `.dtx` file, you _must_ also +change its name, to avoid confusion. + +For general details, talk to Norman Gray . + +This is free software, and you are encouraged to use and adapt it as +you see fit. If, however, you need more substantial help with the +customisations of option 3 above, or need continuing support, then +[Norman can help](http://8ameter.com), on a commercial basis. + +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, it would be wise to 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. + + +Documentation +------------ + + * Documentation for question authors is in `notes-for-authors.pdf`. + * The full version of the documentation, for 'exam conveners' (or + equivalent) is in `exam-n.pdf`. This and the author + documentation are built as part of the distribution. + * Basic documentation for a LaTeX localiser is in this file (see + above), with extra remarks at the top of the `Makefile`. + +There are brief release notes in exam-n.html. + + +Distribution and copyright +-------------------------- + +Copyright 2005--2014, Norman Gray +Distributed under the terms of The LaTeX Project Public License (LPPL); +see the file lppl.txt for details. diff --git a/Master/texmf-dist/doc/latex/exam-n/exam-n-example.tex b/Master/texmf-dist/doc/latex/exam-n/exam-n-example.tex new file mode 100644 index 00000000000..396c01ae8f0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/exam-n-example.tex @@ -0,0 +1,133 @@ +%% +%% This is file `exam-n-example.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% exam-n.dtx (with options: `example') +%% exam-n: format exam questions +%% Release version 1.1, 2014 May 03. +%% +%%%% File: exam-n.dtx +%%%% Copyright 2005--2014, Norman Gray +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Norman Gray +%% +%% This work consists of the files exam-n.dtx and exam-n.ins, +%% the derived file exam-n.cls, +%% and the associated *.clo files. + +%%%% Source: Mercurial revision 6f818b549982, 2014-05-03 13:42 +0100, tag 1.1 + 0 +%% + + +%%%START example (Makefile strips out this block) +\documentclass{exam-n} % standard final version +%%\documentclass[draft,showsolutions]{exam-n} % draft style, showing solutions +%%\documentclass[compose]{exam-n} % compose (author's) style + +\examdate{Wednesday, 18 May 2005} +\examtime{9.30am -- 12 noon\\(or) 9.30am -- 1.45am} + +\exambanner{Examination for the Degrees of \BSc(Science) and + \MSci\ on the Honours Standard} +\schoolcoursecode{P304D and P304H} +\universitycoursecode{PHYS3031 and PHYS4025} +\coursetitle{Quantum Mechanics} +\degreedescriptions{Physics 3\\Chemical Physics 3\\Physics with + Astrophysics 3\\Theoretical Physics 3M\\Joint Physics 3} +\paperident{GR/P304} + +\rubric{Candidates for examination in \emph{Quantum Mechanics} should + answer question 1 (16 marks) and \emph{either 2A or 2B} (24 marks each)} + +\numquestions{3} + +\begin{document} +\maketitle + +\section{I} + +\begin{question}{20} +\part At various points in the development of the mathematical theory of +General Relativity, we pick a coordinate system in which +differentiation is simple, and do a calculation using non-covariant +differentiation, indicated by a comma. We then immediately deduce the +covariant result, replacing this comma with a semicolon. + +Separately, the strong equivalence principle is sometimes +referred to as the `comma goes to semicolon' rule. + +Explain the logic of each of these replacements of a comma with a +semicolon, putting particular stress on the distinction between +them.\partmarks{10} + +\part The radial and angular coordinates, $r$ and $\phi$ respectively, +of a test particle moving in the Schwartzschild metric exterior to a +star of mass $M\ll r$, are related by the equation +\[ + r = \frac{h^2}M \left( + 1 + e\cos\phi + \frac{3M^2}{h^2}e\phi\sin\phi + \right)^{-1}, +\] +where $h$ and $e$ are constants. Show that this equation takes the +form of a precessing ellipse, of semi-latus rectum $l=h^2/M$, in which +the pericentre line advances each orbit by an amount +$\Delta=6\pi M^2/h^2$, stating clearly any assumptions that +you make.\partmarks{6} + +The solar-mass star HD83443 has a 0.35 Jupiter-mass planet that +follows a circular orbit of period 2.986 days and radius 0.038\units\au. +Calculate the rate of precession, in arcseconds per year, of the +pericentre line of the planet's orbit.\partmarks{4} + +[Schwartzschild radius of the Sun${}= 3.0\times10^3\units{m}$, +$1\units\au=1.5\times10^{11}\units m$]. + +\begin{solution} + In the first type of calculation, we do a calculation in the LIF, in +which~$\Gamma^i_{jk}=0$, so that single partial differentiation is the +same as covariant differentiation. If this process produces a +geometrical object such as a scalar or a tensor, then we know that the +result is frame-invariant. If the result involves only single partial +differentiation -- that is, no second derivatives -- then since +partial differentiation is the same as covariant differentiation in +these coordinates, we cannot distinguish partial and covariant +derivatives, and can replace the commas by semicolons. Since these +are now manifestly covariant derivatives, so that the result is a +tensor, and thus frame-invariant, the same expression would be true in +any frame. + +The second situation is the statement that the expressions of physical +laws in SR, such as the conservation equation +$T^{\mu\nu}_{,\nu}=0$, must take the same \emph{form} when written +as a covariant equation in GR, crucially without any curvature +coupling. The slogan `comma goes to semicolon' is just a mnemonic for +this. + +The distinction is that the first is a mathematical trick, of sorts, +whereas the second is a version of the equivalence principle, and thus +a statement with deep physical content. + +They don't have to explain things at this length or with this +coherence (?) to get quite a few marks. They just have to show they +have a clue. +\end{solution} +\end{question} + +\end{document} +%%%END example + +\endinput +%% +%% End of file `exam-n-example.tex'. diff --git a/Master/texmf-dist/doc/latex/exam-n/exam-n.html b/Master/texmf-dist/doc/latex/exam-n/exam-n.html new file mode 100644 index 00000000000..438b017bf49 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/exam-n.html @@ -0,0 +1,128 @@ + + +exam-n class + + + + + + +

The exam-n class

+ +

Format exam papers

+ +

Version 1.1, 2014 May 03.

+ +
    +
  • Download: tarball +or zip file
  • +
  • You may want to look at a sample +exam. See the sample/ directory in the distribution +for the source of this. That demonstrates the final version of the +paper, as opposed to the ‘draft’ and ‘compose’ versions; there’s also +a version with this layout but +showing the solutions.
  • +
  • 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.
  • +
  • Repository available on bitbucket.
  • +
+ +

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), but the author is +available for paid support if that is +useful.
  • +
+ +

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 to some +location on the LaTeX search path. You're probably looking for a +directory called texmf-local, or something like that.

+ +

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.1, 2014 May 3
+
Converted to a generic class, exam-n, ready for wider +distribution. +Available on bitbucket +and at CTAN.
+ + +
...
+
Earlier release notes are available
+ +
+ + +
+Norman Gray
+2014 May 03 +
+ + + + + diff --git a/Master/texmf-dist/doc/latex/exam-n/exam-n.pdf b/Master/texmf-dist/doc/latex/exam-n/exam-n.pdf new file mode 100644 index 00000000000..eceefe9c068 Binary files /dev/null and b/Master/texmf-dist/doc/latex/exam-n/exam-n.pdf differ diff --git a/Master/texmf-dist/doc/latex/exam-n/lppl.txt b/Master/texmf-dist/doc/latex/exam-n/lppl.txt new file mode 100644 index 00000000000..22443139013 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/lppl.txt @@ -0,0 +1,416 @@ +The LaTeX Project Public License +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +LPPL Version 1.3c 2008-05-04 + +Copyright 1999 2002-2008 LaTeX3 Project + Everyone is allowed to distribute verbatim copies of this + license document, but modification of it is not allowed. + + +PREAMBLE +======== + +The LaTeX Project Public License (LPPL) is the primary license under +which the LaTeX kernel and the base LaTeX packages are distributed. + +You may use this license for any work of which you hold the copyright +and which you wish to distribute. This license may be particularly +suitable if your work is TeX-related (such as a LaTeX package), but +it is written in such a way that you can use it even if your work is +unrelated to TeX. + +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', +below, gives instructions, examples, and recommendations for authors +who are considering distributing their works under this license. + +This license gives conditions under which a work may be distributed +and modified, as well as conditions under which modified versions of +that work may be distributed. + +We, the LaTeX3 Project, believe that the conditions below give you +the freedom to make and distribute modified versions of your work +that conform with whatever technical specifications you wish while +maintaining the availability, integrity, and reliability of +that work. If you do not see how to achieve your goal while +meeting these conditions, then read the document `cfgguide.tex' +and `modguide.tex' in the base LaTeX distribution for suggestions. + + +DEFINITIONS +=========== + +In this license document the following terms are used: + + `Work' + Any work being distributed under this License. + + `Derived Work' + Any work that under any applicable law is derived from the Work. + + `Modification' + Any procedure that produces a Derived Work under any applicable + law -- for example, the production of a file containing an + original file associated with the Work or a significant portion of + such a file, either verbatim or with modifications and/or + translated into another language. + + `Modify' + To apply any procedure that produces a Derived Work under any + applicable law. + + `Distribution' + Making copies of the Work available from one person to another, in + whole or in part. Distribution includes (but is not limited to) + making any electronic components of the Work accessible by + file transfer protocols such as FTP or HTTP or by shared file + systems such as Sun's Network File System (NFS). + + `Compiled Work' + A version of the Work that has been processed into a form where it + is directly usable on a computer system. This processing may + include using installation facilities provided by the Work, + transformations of the Work, copying of components of the Work, or + other activities. Note that modification of any installation + facilities provided by the Work constitutes modification of the Work. + + `Current Maintainer' + A person or persons nominated as such within the Work. If there is + no such explicit nomination then it is the `Copyright Holder' under + any applicable law. + + `Base Interpreter' + A program or process that is normally needed for running or + interpreting a part or the whole of the Work. + + A Base Interpreter may depend on external components but these + are not considered part of the Base Interpreter provided that each + external component clearly identifies itself whenever it is used + interactively. Unless explicitly specified when applying the + license to the Work, the only applicable Base Interpreter is a + `LaTeX-Format' or in the case of files belonging to the + `LaTeX-format' a program implementing the `TeX language'. + + + +CONDITIONS ON DISTRIBUTION AND MODIFICATION +=========================================== + +1. Activities other than distribution and/or modification of the Work +are not covered by this license; they are outside its scope. In +particular, the act of running the Work is not restricted and no +requirements are made concerning any offers of support for the Work. + +2. You may distribute a complete, unmodified copy of the Work as you +received it. Distribution of only part of the Work is considered +modification of the Work, and no right to distribute such a Derived +Work may be assumed under the terms of this clause. + +3. You may distribute a Compiled Work that has been generated from a +complete, unmodified copy of the Work as distributed under Clause 2 +above, as long as that Compiled Work is distributed in such a way that +the recipients may install the Compiled Work on their system exactly +as it would have been installed if they generated a Compiled Work +directly from the Work. + +4. If you are the Current Maintainer of the Work, you may, without +restriction, modify the Work, thus creating a Derived Work. You may +also distribute the Derived Work without restriction, including +Compiled Works generated from the Derived Work. Derived Works +distributed in this manner by the Current Maintainer are considered to +be updated versions of the Work. + +5. If you are not the Current Maintainer of the Work, you may modify +your copy of the Work, thus creating a Derived Work based on the Work, +and compile this Derived Work, thus creating a Compiled Work based on +the Derived Work. + +6. If you are not the Current Maintainer of the Work, you may +distribute a Derived Work provided the following conditions are met +for every component of the Work unless that component clearly states +in the copyright notice that it is exempt from that condition. Only +the Current Maintainer is allowed to add such statements of exemption +to a component of the Work. + + a. If a component of this Derived Work can be a direct replacement + for a component of the Work when that component is used with the + Base Interpreter, then, wherever this component of the Work + identifies itself to the user when used interactively with that + Base Interpreter, the replacement component of this Derived Work + clearly and unambiguously identifies itself as a modified version + of this component to the user when used interactively with that + Base Interpreter. + + b. Every component of the Derived Work contains prominent notices + detailing the nature of the changes to that component, or a + prominent reference to another file that is distributed as part + of the Derived Work and that contains a complete and accurate log + of the changes. + + c. No information in the Derived Work implies that any persons, + including (but not limited to) the authors of the original version + of the Work, provide any support, including (but not limited to) + the reporting and handling of errors, to recipients of the + Derived Work unless those persons have stated explicitly that + they do provide such support for the Derived Work. + + d. You distribute at least one of the following with the Derived Work: + + 1. A complete, unmodified copy of the Work; + if your distribution of a modified component is made by + offering access to copy the modified component from a + designated place, then offering equivalent access to copy + the Work from the same or some similar place meets this + condition, even though third parties are not compelled to + copy the Work along with the modified component; + + 2. Information that is sufficient to obtain a complete, + unmodified copy of the Work. + +7. If you are not the Current Maintainer of the Work, you may +distribute a Compiled Work generated from a Derived Work, as long as +the Derived Work is distributed to all recipients of the Compiled +Work, and as long as the conditions of Clause 6, above, are met with +regard to the Derived Work. + +8. The conditions above are not intended to prohibit, and hence do not +apply to, the modification, by any method, of any component so that it +becomes identical to an updated version of that component of the Work as +it is distributed by the Current Maintainer under Clause 4, above. + +9. Distribution of the Work or any Derived Work in an alternative +format, where the Work or that Derived Work (in whole or in part) is +then produced by applying some process to that format, does not relax or +nullify any sections of this license as they pertain to the results of +applying that process. + +10. a. A Derived Work may be distributed under a different license + provided that license itself honors the conditions listed in + Clause 6 above, in regard to the Work, though it does not have + to honor the rest of the conditions in this license. + + b. If a Derived Work is distributed under a different license, that + Derived Work must provide sufficient documentation as part of + itself to allow each recipient of that Derived Work to honor the + restrictions in Clause 6 above, concerning changes from the Work. + +11. This license places no restrictions on works that are unrelated to +the Work, nor does this license place any restrictions on aggregating +such works with the Work by any means. + +12. Nothing in this license is intended to, or may be used to, prevent +complete compliance by all parties with all applicable laws. + + +NO WARRANTY +=========== + +There is no warranty for the Work. Except when otherwise stated in +writing, the Copyright Holder provides the Work `as is', without +warranty of any kind, either expressed or implied, including, but not +limited to, the implied warranties of merchantability and fitness for a +particular purpose. The entire risk as to the quality and performance +of the Work is with you. Should the Work prove defective, you assume +the cost of all necessary servicing, repair, or correction. + +In no event unless required by applicable law or agreed to in writing +will The Copyright Holder, or any author named in the components of the +Work, or any other party who may distribute and/or modify the Work as +permitted above, be liable to you for damages, including any general, +special, incidental or consequential damages arising out of any use of +the Work or out of inability to use the Work (including, but not limited +to, loss of data, data being rendered inaccurate, or losses sustained by +anyone as a result of any failure of the Work to operate with any other +programs), even if the Copyright Holder or said author or said other +party has been advised of the possibility of such damages. + + +MAINTENANCE OF THE WORK +======================= + +The Work has the status `author-maintained' if the Copyright Holder +explicitly and prominently states near the primary copyright notice in +the Work that the Work can only be maintained by the Copyright Holder +or simply that it is `author-maintained'. + +The Work has the status `maintained' if there is a Current Maintainer +who has indicated in the Work that they are willing to receive error +reports for the Work (for example, by supplying a valid e-mail +address). It is not required for the Current Maintainer to acknowledge +or act upon these error reports. + +The Work changes from status `maintained' to `unmaintained' if there +is no Current Maintainer, or the person stated to be Current +Maintainer of the work cannot be reached through the indicated means +of communication for a period of six months, and there are no other +significant signs of active maintenance. + +You can become the Current Maintainer of the Work by agreement with +any existing Current Maintainer to take over this role. + +If the Work is unmaintained, you can become the Current Maintainer of +the Work through the following steps: + + 1. Make a reasonable attempt to trace the Current Maintainer (and + the Copyright Holder, if the two differ) through the means of + an Internet or similar search. + + 2. If this search is successful, then enquire whether the Work + is still maintained. + + a. If it is being maintained, then ask the Current Maintainer + to update their communication data within one month. + + b. If the search is unsuccessful or no action to resume active + maintenance is taken by the Current Maintainer, then announce + within the pertinent community your intention to take over + maintenance. (If the Work is a LaTeX work, this could be + done, for example, by posting to comp.text.tex.) + + 3a. If the Current Maintainer is reachable and agrees to pass + maintenance of the Work to you, then this takes effect + immediately upon announcement. + + b. If the Current Maintainer is not reachable and the Copyright + Holder agrees that maintenance of the Work be passed to you, + then this takes effect immediately upon announcement. + + 4. If you make an `intention announcement' as described in 2b. above + and after three months your intention is challenged neither by + the Current Maintainer nor by the Copyright Holder nor by other + people, then you may arrange for the Work to be changed so as + to name you as the (new) Current Maintainer. + + 5. If the previously unreachable Current Maintainer becomes + reachable once more within three months of a change completed + under the terms of 3b) or 4), then that Current Maintainer must + become or remain the Current Maintainer upon request provided + they then update their communication data within one month. + +A change in the Current Maintainer does not, of itself, alter the fact +that the Work is distributed under the LPPL license. + +If you become the Current Maintainer of the Work, you should +immediately provide, within the Work, a prominent and unambiguous +statement of your status as Current Maintainer. You should also +announce your new status to the same pertinent community as +in 2b) above. + + +WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE +====================================================== + +This section contains important instructions, examples, and +recommendations for authors who are considering distributing their +works under this license. These authors are addressed as `you' in +this section. + +Choosing This License or Another License +---------------------------------------- + +If for any part of your work you want or need to use *distribution* +conditions that differ significantly from those in this license, then +do not refer to this license anywhere in your work but, instead, +distribute your work under a different license. You may use the text +of this license as a model for your own license, but your license +should not refer to the LPPL or otherwise give the impression that +your work is distributed under the LPPL. + +The document `modguide.tex' in the base LaTeX distribution explains +the motivation behind the conditions of this license. It explains, +for example, why distributing LaTeX under the GNU General Public +License (GPL) was considered inappropriate. Even if your work is +unrelated to LaTeX, the discussion in `modguide.tex' may still be +relevant, and authors intending to distribute their works under any +license are encouraged to read it. + +A Recommendation on Modification Without Distribution +----------------------------------------------------- + +It is wise never to modify a component of the Work, even for your own +personal use, without also meeting the above conditions for +distributing the modified component. While you might intend that such +modifications will never be distributed, often this will happen by +accident -- you may forget that you have modified that component; or +it may not occur to you when allowing others to access the modified +version that you are thus distributing it and violating the conditions +of this license in ways that could have legal implications and, worse, +cause problems for the community. It is therefore usually in your +best interest to keep your copy of the Work identical with the public +one. Many works provide ways to control the behavior of that work +without altering any of its licensed components. + +How to Use This License +----------------------- + +To use this license, place in each of the components of your work both +an explicit copyright notice including your name and the year the work +was authored and/or last substantially modified. Include also a +statement that the distribution and/or modification of that +component is constrained by the conditions in this license. + +Here is an example of such a notice and statement: + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. + +Given such a notice and statement in a file, the conditions +given in this license document would apply, with the `Work' referring +to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being +generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' +referring to any `LaTeX-Format', and both `Copyright Holder' and +`Current Maintainer' referring to the person `M. Y. Name'. + +If you do not want the Maintenance section of LPPL to apply to your +Work, change `maintained' above into `author-maintained'. +However, we recommend that you use `maintained', as the Maintenance +section was added in order to ensure that your Work remains useful to +the community even when you can no longer maintain and support it +yourself. + +Derived Works That Are Not Replacements +--------------------------------------- + +Several clauses of the LPPL specify means to provide reliability and +stability for the user community. They therefore concern themselves +with the case that a Derived Work is intended to be used as a +(compatible or incompatible) replacement of the original Work. If +this is not the case (e.g., if a few lines of code are reused for a +completely different task), then clauses 6b and 6d shall not apply. + + +Important Recommendations +------------------------- + + Defining What Constitutes the Work + + The LPPL requires that distributions of the Work contain all the + files of the Work. It is therefore important that you provide a + way for the licensee to determine which files constitute the Work. + This could, for example, be achieved by explicitly listing all the + files of the Work near the copyright notice of each file or by + using a line such as: + + % This work consists of all files listed in manifest.txt. + + in that place. In the absence of an unequivocal list it might be + impossible for the licensee to determine what is considered by you + to comprise the Work and, in such a case, the licensee would be + entitled to make reasonable conjectures as to which files comprise + the Work. + diff --git a/Master/texmf-dist/doc/latex/exam-n/move-to-texmf/A1.clo b/Master/texmf-dist/doc/latex/exam-n/move-to-texmf/A1.clo new file mode 100644 index 00000000000..fd79818b0c2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/move-to-texmf/A1.clo @@ -0,0 +1,82 @@ +\ProvidesFile{A1.clo}[2014/05/03 1.1] +\typeout{A1 exam options, 1.1} +%%%% Source: Mercurial revision 6f818b549982, 2014-05-03 13:42 +0100, tag 1.1 + 0 +%%%% File: A1.clo +%%%% Copyright 2005--2014, Norman Gray +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Norman Gray +%% +%% This work consists of the files exam-n.dtx and exam-n.ins, +%% the derived file exam-n.cls, +%% and the associated *.clo files. + +% Nothing here beyond the constants sheet +\constantssheet{ +\begin{center} +\def\e{{\rm e}}\def\deg{^\circ} +\def\dmin{^{\rm m}} +\def\dsec{^{\rm s}} +\def\ez{\epsilon_{\rm 0}} % permittivity of free space +\def\er{\epsilon_{\rm r}} % relative permittivity +\def\ep{\epsilon} % permittivity +\def\muz{\mu_{\rm 0}} % permeability of free space +\def\mur{\mu_{\rm r}} % relative permeability +\def\me{m_{\rm e}} % mass of the electron +\def\mprot{m_{\rm p}} % mass of the proton +\def\az{\a_{\rm 0}} % Bohr radius +\def\mub{\mu_{\rm B}} % Bohr magneton +% +\def\tothe#1{$^{#1}$} % raise to the power #1 +\def\metre{\,{\rm m}} +\def\kg{\,{\rm kg}} +\def\sec{\,{\rm s}} +\def\mm{\,{\rm mm}} +\def\mol{\,{\rm mol}} +\def\kelvin{\,{\rm K}} +\def\joule{\,{\rm J}} +\def\farad{\,{\rm F}} +\def\ampere{\,{\rm A}} +\def\ev{\,{\rm eV}} +\def\hz{\,{\rm Hz}} +\def\volt{\,{\rm V}} +\def\watt{\,{\rm W}} +\def\newton{\,{\rm N}} +\def\unit#1{\,{\rm #1}} +% +{\Large\textbf{Values of astrophysical constants}}\\[\bigskipamount] +\begin{tabular}{lll} \hline\\[-1.5ex] % slightly hacky extra space after hline + speed of light & $c$ & $2.998\times 10^8 \metre\sec^{-1}$\\ + gravitational constant & $G$ & $6.673\times10^{-11}\newton\metre^2\kg^{-2}$\\ + Planck constant & $h$ & $6.626\times10^{-34}\joule\sec$\\ + Boltzmann constant & $k_{\rm B}$ & $1.381\times10^{-23} \joule\kelvin^{-1}$\\ + Stefan-Boltzmann constant & $\sigma$ & $5.671\times10^{-8}\watt\metre^{-2}\kelvin^{-4}$\\ + Rydberg constant & $R_\infty$ &$1.097\times10^{7}\metre^{-1}$\\ + Avogadro constant & $N_{\rm A}$ & $6.022\times 10^{23}\unit{mol}^{-1}$\\ + gas constant & $R$ & $8.315 \joule\mol^{-1}\kelvin^{-1}$\\ + proton mass & $\mprot$ & $1.673\times10^{-27} \kg$\\ + electron mass & $\me$ & $9.109\times10^{-31} \kg$\\ + elementary charge & $e$ & $1.602\times 10^{-19}\unit{C}$\\ + electronvolt & ${\rm eV}$ & $1.602\times 10^{-19}\unit{J}$\\[3pt] + astronomical unit & au & $1.496\times10^{11} \metre$\\ + parsec & pc & $3.086\times10^{16}\metre$\\ + light year & ly & $9.461\times10^{15} \metre$\\[3pt] + solar mass & $M_\odot$ & $1.989\times10^{30} \kg$\\ + solar radius & $R_\odot$ & $6.960\times10^8 \metre$\\ + solar luminosity & $L_\odot$ & $3.826\times10^{26}\watt$\\ + Earth mass & $M_\oplus$ & $5.976\times10^{24} \kg$\\ + Earth radius & $R_\oplus$ & $6.378\times10^6 \metre$\\ + obliquity of the ecliptic & $\epsilon$ & $23^\circ\,26'$\\[\medskipamount] +\hline +\end{tabular} +\end{center} +} diff --git a/Master/texmf-dist/doc/latex/exam-n/move-to-texmf/exam-n.cls b/Master/texmf-dist/doc/latex/exam-n/move-to-texmf/exam-n.cls new file mode 100644 index 00000000000..68a03b55c61 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/move-to-texmf/exam-n.cls @@ -0,0 +1,1251 @@ +%% +%% This is file `exam-n.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% exam-n.dtx (with options: `package') +%% exam-n: format exam questions +%% Release version 1.1, 2014 May 03. +%% +%%%% File: exam-n.dtx +%%%% Copyright 2005--2014, Norman Gray +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Norman Gray +%% +%% This work consists of the files exam-n.dtx and exam-n.ins, +%% the derived file exam-n.cls, +%% and the associated *.clo files. + +%%%% Source: Mercurial revision 6f818b549982, 2014-05-03 13:42 +0100, tag 1.1 + 0 +%% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{exam-n}[2014/05/03 1.1] +\typeout{Class: `exam-n 1.1 <2014/05/03>} + + + +\newcount\@draftstatus +\@draftstatus=0 % default is final +\DeclareOption{compose}{\@draftstatus=2 + \@showsolutionstrue + \@pageperquestiontrue} +\DeclareOption{draft}{\@draftstatus=1 + \@showsolutionstrue + \@pageperquestionfalse} +\DeclareOption{final}{\@draftstatus=0 + \@showsolutionsfalse + \@pageperquestionfalse} +\newif\if@psfonts\@psfontsfalse +\DeclareOption{psfonts}{\@psfontstrue} +\DeclareOption{cmfonts}{\@psfontsfalse} +\newcount\examn@mtselect \examn@mtselect=0 +\DeclareOption{mathptm}{\@psfontstrue\examn@mtselect=0} +\DeclareOption{mathtime}{\@psfontstrue\examn@mtselect=1} +\DeclareOption{mtpro2}{\@psfontstrue\examn@mtselect=2} +\newif\ifexamn@serif +\examn@seriftrue +\DeclareOption{serif}{\examn@seriftrue} +\DeclareOption{sansserif}{\examn@seriffalse} +\newif\if@showsolutions +\@showsolutionsfalse +\DeclareOption{showsolutions}{\@showsolutionstrue} +\DeclareOption{noshowsolutions}{\@showsolutionsfalse} +\newif\if@pageperquestion +\@pageperquestionfalse +\DeclareOption{pageperquestion}{\@pageperquestiontrue} +\DeclareOption{nopageperquestion}{\@pageperquestionfalse} +\newif\if@perquestionmarks +\@perquestionmarkstrue +\DeclareOption{perquestionmarks}{\@perquestionmarkstrue} +\DeclareOption{noperquestionmarks}{\@perquestionmarksfalse} +\newif\if@showmarktotals +\@showmarktotalstrue +\DeclareOption{showmarktotals}{\@showmarktotalstrue} +\DeclareOption{noshowmarktotals}{\@showmarktotalsfalse} +\newif\if@twosidepages +\@twosidepagesfalse +\DeclareOption{twoside}{\@twosidepagestrue} +\DeclareOption{oneside}{\@twosidepagesfalse} +\newif\if@fleqn +\@fleqnfalse +\DeclareOption{fleqn}{ + \@fleqntrue + \PassOptionsToPackage{fleqn}{amsmath} + \PassOptionsToClass{fleqn}{article} +} +\newif\if@fussydescription +\@fussydescriptiontrue +\DeclareOption{sloppydescription}{\@fussydescriptionfalse} +\def\examn@header@shoutformat#1{{\Large\bfseries #1}} +\DeclareOption{mono}{ + \PassOptionsToPackage{monochrome}{color} + \def\examn@header@shoutformat#1{{\Huge\bfseries #1}} +} +\DeclareOption{colour}{} +\newif\ifbigfont +\bigfontfalse +\DeclareOption{bigfont}{\bigfonttrue} +\PassOptionsToClass{a4paper}{article} +\newtoks\@styleoverrides +\@styleoverrides={} +\def\OverrideFormatting{\@styleoverrides=} +\newtoks\@constantstoks +\def\@@displayconstants{% + \clearpage + \begingroup + \the\@constantstoks + \endgroup + \clearpage } +\newtoks\@constantstoks +\@constantstoks={} +\let\@displayconstants\relax +\def\constantssheet{\let\@displayconstants\@@displayconstants + \@constantstoks=} +\AtBeginDocument{\the\@styleoverrides} +\DeclareOption*{\InputIfFileExists{\CurrentOption.clo}{} + {\ClassError{exam-n} + {Bad option \CurrentOption} + {I don't understand the option \CurrentOption\MessageBreak + (I didn't find file \CurrentOption.clo, if that's what you meant)}}} +\InputIfFileExists{exam-n.config}{}{} +\ProcessOptions +\if@twosidepages + \PassOptionsToClass{twoside}{article} +\else + \PassOptionsToClass{oneside}{article} +\fi +\PassOptionsToClass{12pt}{article} +\PassOptionsToPackage{final}{graphicx} +\PassOptionsToPackage{final}{pdfpages} +\def\UniLogo#1{\vbox to 15.5mm{% + \hrule + \vss\hbox to #1{% Aspect ratio of logo is 100x31 + \hss no logo available\hss + }% + \vss + \hrule}} +\RequirePackage[english]{babel} % UK hyphenation +\RequirePackage{amsmath} +\RequirePackage{color} +\LoadClass{article} +\def\examn@setdocident{% + \begingroup + % yes, a big \ifcase would be more straightforward; + % no, that wouldn't be any fun at all + % (also it ends up looking messy and even tricksier). + \def\@step##1##2\@nil{\advance\@tempcnta##1 \def\@tempa{##2}} + \def\@tempa{{31}{28}{31}{30}{31}{30}{31}{31}{30}{31}{30}{31}}% + \@tempcnta=\day % day of month + \@tempcntb=\month % month of year (unit-offset) + \loop + \advance\@tempcntb-1 + \ifnum \@tempcntb>0 + \expandafter\@step\@tempa\@nil + \repeat + \@tempcntb=\year % yes, do calculate leap years + \divide\@tempcntb 4 \multiply\@tempcntb 4 + \ifnum\@tempcntb=\year + \ifnum\month>2 % but let's not worry about century years... + \advance\@tempcnta 1 + \fi + \fi + % remove any \\ or ~ in the coursecode fields + \let\\\space + \let~\space + \xdef\examn@docident{% first element is based on uni/school course code + \ifx\@coursetitle\@empty + \ifx\@schoolcoursecode\@empty + exam% + \else + \@schoolcoursecode + \fi + \else + \@coursetitle + \fi + /\the\@tempcnta % day-of-year + -\the\time} % minutes since midnight + \endgroup +} +\RequirePackage{ifpdf} +\def\@SetDocumentInfo{% + \ifpdf + {\pdfinfo{/Title (\examn@docident)}}% + % Don't put out an /Author(xxx) info entry -- there may be + % multiple authors, and it isn't obviously useful + \fi +} +\AtBeginDocument{\examn@setdocident\@SetDocumentInfo} +\if@psfonts + \ifcase\examn@mtselect + \ifexamn@serif + \RequirePackage{times} + \else + \RequirePackage{helvet} + \fi + \RequirePackage{mathptm} + \ClassWarningNoLine{exam-n}{Using mathptm fonts} + \or % use mathtime fonts + \RequirePackage[LY1]{fontenc} % specify text font encoding + \RequirePackage[LY1,mtbold]{mathtime} % switch math fonts + \ifexamn@serif + \RequirePackage{times} + \else + \RequirePackage{helvet} + \fi + \ClassWarningNoLine{exam-n}{Using Mathtime fonts} + \or % use mtpro2 fonts + \RequirePackage[T1]{fontenc} + \RequirePackage{textcomp} + \ifexamn@serif + \renewcommand\rmdefault{ptm} % the default + \else + \RequirePackage[scaled=0.9]{helvet} + \renewcommand\rmdefault{phv} + \fi + \RequirePackage[mtpbb]{mtpro2} + \ClassWarningNoLine{exam-n}{Using MTPro2 fonts} + \else + \ClassError{exam-n}{Impossible value of mtselect: \examn@mtselect} + \fi +\else + \ClassWarningNoLine{exam-n}{Using CM fonts} +\fi +\def\examn@bodyfontchange{} +\ifexamn@serif \else + \ClassWarningNoLine{exam-n}{Using sans serif fonts} + \DeclareRobustCommand\normalfont + {\usefont\encodingdefault\sfdefault\seriesdefault\shapedefault \relax} +\fi +\ifbigfont + \def\examn@bodyfontchange{ + \renewcommand\normalsize{% + \@setfontsize\normalsize{36}{42}% + \abovedisplayskip 36\p@ \@plus7\p@ \@minus17.5\p@ + \abovedisplayshortskip \z@ \@plus10.5\p@ + \belowdisplayshortskip 21\p@ \@plus10.5\p@ \@minus10.5\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} + \parindent=48pt + \parskip=36pt + % Redefine \FormatPartMarks so that it doesn't push the text off the paper + \def\FormatPartMarks##1{ + \setbox0=\hbox{\hskip 1em \textbf{[##1]}} + \@tempdima=0.8\marginsize + \ifdim\wd0>\@tempdima + \advance\@tempdima -\wd0 + \hbox to 0pt{\hskip\@tempdima \box0\hss}% + \else + \hbox to 0pt{\box0\hss} + \fi}} +\fi +\def\@exambanner{} +\def\exambanner{\def\@exambanner} + +\def\@schoolcoursecode{} +\def\schoolcoursecode{\def\@schoolcoursecode} + +\def\@universitycoursecode{} +\def\universitycoursecode{\def\@universitycoursecode} + +\def\@paperident{} +\def\paperident{\def\@paperident} + +\def\@examdate{} +\def\examdate{\def\@examdate} + +\def\@examtime{} +\def\examtime{\def\@examtime} + +\def\@coursetitle{} +\def\coursetitle{\def\@coursetitle} +\def\@degreedescriptions{} +\def\degreedescriptions{\def\@degreedescriptions} +\def\@displaydegreedescriptions{% + \let\@tempb\leavevmode + \def\dd##1\\{% + \def\@tempa{##1}% + \ifx\@tempa\@empty + \let\next\relax + \else + \@tempb\hbox{##1}\let\next\dd + \fi + \def\@tempb{\discretionary{}{}{\kern0.5em--\kern0.5em}}% + \next} + \expandafter\dd\@degreedescriptions\\} +\def\@rubric{} +\def\rubric{\long\def\@rubric} +\def\norubric{\let\@rubric\@nnil} + +\def\@baserubric{% +\textbf{Answer each question in a separate booklet}\par +Candidates are reminded that devices able to store or display text or +images may not be used in examinations without prior arrangement. +\if@perquestionmarks + \par + Approximate marks are indicated in brackets as a guide for candidates. +\fi +} +\def\baserubric{\long\def\@baserubric} +\def\@numquestions{} +\def\numquestions{\def\@numquestions} +\def\CheckTotalQuestions{% + \ifnum\@draftstatus < 2 + \ifx\@numquestions\@empty \else + \ifnum\questionnumber=\@numquestions \else + \ClassWarning{exam-n} + {Expected \@numquestions\space questions, got \the\questionnumber!} + \ifnum\@draftstatus > 0 % draft mode + \begin{center} + \textbf{\highlighted{Expected \@numquestions\space questions, got \the\questionnumber}} + \end{center} + \fi + \fi + \fi + \fi +} +\if@fleqn + \mathindent\parindent + \@mathmargin=\parindent +\fi +\newdimen\marginsize + \marginsize=35mm + +\headheight=15pt +\headsep=15pt +\definecolor{meta}{rgb}{0.7,0.2,0.2} +\def\highlighted{\textcolor{meta}} +\definecolor{solutiontext}{rgb}{0.2,0.2,0.5} +\definecolor{discreettext}{rgb}{0.6,0.6,0.6} +\newcommand\@settextblock[1]{ + \textwidth=\paperwidth + \advance\textwidth -2\marginsize + \textheight=\paperheight + \advance\textheight -2\marginsize + \oddsidemargin=\marginsize + \advance\oddsidemargin -1in + \advance\oddsidemargin -#1 + \evensidemargin=\oddsidemargin + \topmargin=\marginsize + \advance\topmargin -\headheight + \advance\topmargin -\headsep + \advance\topmargin -1in + \marginparwidth=\marginsize + \advance\marginparwidth -1.5cm + \advance\marginparwidth #1 +%% \typeout{paperwidth=\the\paperwidth, paperheight=\the\paperheight, +%% textwidth=\the\textwidth, textheight=\the\textheight, +%% oddsidemargin=\the\oddsidemargin, +%% headheight=\the\headheight, headsep=\the\headsep, topmargin=\the\topmargin} + \marginparsep=0.5cm +} + +\ifnum\@draftstatus > 0 + \@settextblock{2cm} +\else + \@settextblock{0pt} +\fi +\let\leftnudge\@settextblock +\renewcommand\@marginparreset{% + \reset@font + \@setminipage + \raggedright + \small +} +\setlength{\parindent}{2em} +\setlength{\parskip}{\bigskipamount} +\ifcase\@draftstatus % Final version + \def\ClosingText{ + \begin{center}\textbf{End of Paper}\\\end{center} + \mark{END}} +\or % Draft version + \def\ClosingText{ + \begin{center}\textbf{End of Draft Paper}\\\end{center} + \mark{END}} +\else % Compose version (nothing, because this would be on a page by itself) + \def\ClosingText{\mark{END}} +\fi +\RequirePackage{fancyhdr} +\pagestyle{fancy} +\setlength{\headwidth}{\textwidth} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +\fancyhead{} +\fancyfoot{} +\fancyfoot[L]{{\tiny\textcolor{discreettext}{% + \ifx\@paperident\@empty\examn@docident\else\@paperident\fi +}}} +\fancyfoot[R]{% + \def\@tempa{END} + \xdef\examn@topmark{\botmark} + \ifx\examn@topmark\@empty + \formatcontinuations{Paper continued over}% + \else\ifx\examn@topmark\@tempa + \formatcontinuations{END} + \else + \formatcontinuations{Q\,\examn@topmark\ continued over\dots}% + \fi\fi +} +\fancyfoot[C]{\thepage/\pageref{lastpage}} +\def\examn@topmark{} +\ifnum\@draftstatus=0 + \fancyhead[L]{% + \ifx\examn@topmark\@empty \else + \formatcontinuations{Q\,\examn@topmark\ continued}% + \fi + } +\fi +\def\examn@bighead#1{\strut\vbox to 0pt{\vss\hbox{\examn@header@shoutformat{#1}}\vskip 10mm}} +\ifnum\@draftstatus = 1 + \if@showsolutions + \fancyhead[C]{\examn@bighead{\highlighted{DRAFT + SOLUTIONS, p\thepage/\pageref{lastpage}}}} + \else + \fancyhead[C]{\examn@bighead{\highlighted{DRAFT, p\thepage/\pageref{lastpage}}}} + \fi +\else + \if@showsolutions + % Add a very prominent banner + \fancyhead[C]{\examn@bighead{\highlighted{SHOWING SOLUTIONS}}} + \fi +\fi +\def\formatcontinuations#1{\textbf{#1}} +\def\WriteLastPageLabel{\label{lastpage}} +\def\ps@titlepage{ + \def\@oddhead{} + \def\@oddfoot{\xdef\examn@topmark{\botmark}} +} +\renewcommand\maketitle{ + \ifnum\@draftstatus < 2 % final or draft version + \ifx\@examdate\@empty + \ClassError{exam-n} + {No exam date given} + {Specify an exam date using \protect\examdate} + \fi + \ifx\@examtime\@empty + \ClassError{exam-n} + {No exam time given} + {Specify an exam time using \protect\examtime} + \fi + \ifx\@exambanner\@empty + \ClassError{exam-n} + {No exam banner given} + {Specify an exam banner (eg Examination for the degree...) using \protect\exambanner} + \fi + \if@fussydescription + \ifx\@schoolcoursecode\@empty + \ClassError{exam-n} + {No school course code given} + {Specify a school course code (eg P304H) using \protect\schoolcoursecode} + \fi + \ifx\@universitycoursecode\@empty + \ClassError{exam-n} + {No paper title given} + {Specify a university course code (eg PHYS3031) using \protect\universitycoursecode} + \fi + \ifx\@coursetitle\@empty + \ClassError{exam-n} + {No course title given} + {Specify a course title (eg Quantum Mechanics) using \protect\coursetitle} + \fi + \ifx\@degreedescriptions\@empty + \ClassError{exam-n} + {No paper subject given} + {Specify a 'degree description' (eg Physics 3) using \protect\degreedescriptions} + \fi + \ifx\@rubric\@empty + \ClassError{exam-n} + {No rubric given} + {Specify a rubric using \protect\rubric, or declare its absence with \protect\norubric} + \fi + \fi + \thispagestyle{titlepage} + \begin{center} + \null + \vskip -1.5cm + \if@showsolutions + \nointerlineskip + \vbox to 0pt{\vss + \examn@header@shoutformat{\shout{SHOWING SOLUTIONS}} + \vskip 1.5\bigskipamount} + \else + \ifnum\examn@shoutcounttotal>0 + \typeout{SHOUTS: \the\examn@shoutcounttotal} + \nointerlineskip + \vbox to 0pt{\vss + \examn@header@shoutformat + {\highlighted{SHOUTS: \the\examn@shoutcounttotal\ (see end)}} + \vskip 1.5\bigskipamount} + \fi + \fi + \nointerlineskip + \hbox to \textwidth{% date and time + \vbox to 0pt{\vskip-2ex \UniLogo{50mm}\vss} + \hss + \setbox0=\hbox{\vtop{% \vtop or \vbox here? + % Opinions differ: + % This week, Norman prefers \vtop because it gives a cleaner top line. + \hsize=0.5\textwidth + \leftskip=0pt plus1fil \rightskip=0pt \parfillskip=0pt + \baselineskip=2.5ex + \parskip=0.25ex + \let\\\par + \ifx\@examdate\@empty + \shout{missing exam date} + \else + \@examdate + \fi + \par + \ifx\@examtime\@empty + \shout{missing exam time} + \else + \@examtime + \fi + \par}} + \dp0=0pt + \box0} + \vskip4\bigskipamount + %\UoGname\\[\medskipamount] + {\uppercase\expandafter{\@exambanner}}\\[\medskipamount] + \vbox{}\hrule + \ifx\@degreedescriptions\@empty\else + \@displaydegreedescriptions\\ + \fi + \vskip 2\baselineskip plus 0.3fil + \def\@tempa{\def\@tempa{\vskip 0.5\baselineskip}} + \ifx\@schoolcoursecode\@empty\else + \@tempa + {\large\textbf{\@schoolcoursecode}} + \fi + \ifx\@universitycoursecode\@empty\else + \@tempa + {\large\textbf{[~\@universitycoursecode~]}} + \fi + \ifx\@coursetitle\@empty\else + \setbox0=\hbox{\Huge\textbf{\@coursetitle}} + \ifdim\wd0>\columnwidth + \setbox0=\hbox{\LARGE\textbf{\@coursetitle}} + \ifdim\wd0>\columnwidth + % we're not going any smaller than this + \setbox0=\vbox{\hsize\columnwidth + \Large\bfseries + \@coursetitle} + \fi + \fi + \vskip 1.2\ht0 % generous vertical skip, size-dependent + \ifhbox0 + \hbox to \columnwidth{\hss\box0\hss} + \else + \box0 + \fi + \fi + \vskip 2\baselineskip plus 0.3fil + \parindent=0pt + \parskip=0.5\baselineskip + \ifbigfont + % Don't put the rubric here (see below) + \else + \ifx\@rubric\@empty\else + \ifx\@rubric\@nnil\else + % if there's a rubric, separate from the base rubric, then + % separate the two with an hrule (the per-exam rubric + % presumably represents special instructions for this exam, + % so should be highlighted + \vbox{\let\emph\textbf + \@rubric + \par} + \vskip2\baselineskip + \hrule + \vskip1.5\baselineskip + \fi + \fi + \ifx\@baserubric\@empty \else + \@baserubric \par + \fi + \fi % end \ifbigfont\else + \end{center} + \vskip 2\baselineskip plus 0.6fil % \newpage is {\vfil\penalty-\@M} + \vbox to 0pt{\hbox to \textwidth{% + \tiny + \textcolor{discreettext} + {\hfil\ifx\@paperident\@empty\examn@docident\else\@paperident\fi\hfil}}\vss} + \penalty -\@M + \@displayconstants + \else % compose version + \begin{tabular}{rl} + \textbf{Exam}& + {\def\\{ / }\@schoolcoursecode}\\ + \textbf{Course codes}& + \@universitycoursecode\\ + %% \textbf{Subject}& + %% {\def\and{and}\begin{tabular} + %% {\@degreedescriptionstemplate}\@degreedescriptions + %% \end{tabular}}\\ + \textbf{Date \& time}& + {\def\\{, }\@examdate, \@examtime}\\ + \end{tabular} + \fi + \ifcase\@draftstatus + % Final version + \typeout{Exam \@schoolcoursecode: FINAL VERSION} + \or % Draft version + \typeout{Exam \@schoolcoursecode: DRAFT VERSION} + \else % Compose version + \typeout{Exam \@schoolcoursecode: COMPOSE VERSION} + \fi + % + \examn@bodyfontchange + \normalfont\normalsize + \ifbigfont + % Put the rubric on a second page, in the 'huge' size. + \begin{center} + \parskip=18pt + \let\emph\textbf \@rubric\par + \vskip\baselineskip + \hrule + \vskip\baselineskip + \ifx\@baserubric\@empty \else + \@baserubric \par + \fi + \end{center} + \newpage + \fi +} +\setcounter{secnumdepth}{0} +\renewcommand\section{ + \@ifundefined{@currentquestion}\@@section + {\ClassError{exam-n}{Misplaced section} + {You can't have a section inside a question;\MessageBreak + move it before the {question} environment starts}}} +\newcommand\@@section{\@startsection{section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {1ex \@plus.1ex \@minus 0.5ex}% + {\fmt@section}} +\def\fmt@section#1{% + \examn@prequestionspace{} + \hbox to \textwidth{{\hfil\bfseries SECTION #1\hfil}}% +} +\renewcommand\subsection{ + \@ifundefined{@currentquestion}\@@subsection + {\ClassError{exam-n}{Misplaced subsection} + {You can't have a subsection inside a question;\MessageBreak + move it before the {question} environment starts}}} +\newcommand\@@subsection{\@startsection{subsection}{2}{\z@} + {-2ex \@plus -3ex \@minus -0.2ex} + {0.5ex \@plus .1ex \@minus 0.1ex} + {\fmt@subsection}} +\def\fmt@subsection#1{% + \examn@prequestionspace{} + \noindent\textbf{#1}} +\let\sectionmark\@gobble +\let\subsectionmark\@gobble +\def\@badsection#1#2{\ClassError{guexam}{Bad section} + {The exam class goes not support subdivisions like #1{#2}}} +\def\subsubsection{\@badsection{subsubsection}} +\def\paragraph{\@badsection{paragraph}} +\def\subparagraph{\@badsection{subparagraph}} +\newcount\marktotal % number of marks accumulated so far +\newcount\markgoal % number of marks we should have in the end + +\newcount\questionnumber +\questionnumber=0 +\newcounter{partnumber} +\renewcommand\part{% + \if@nobreak \else + \par + \@nobreakfalse + \fi + \ifvmode + \vskip 0pt plus 4\bigskipamount + \penalty-50 + \fi + \stepcounter{partnumber}% + \noindent\FormatPartNumber +} +\newcommand\FormatPartNumber{\hbox to \parindent{(\alph{partnumber})\hss}} +\newif\if@newpagebeforequestion +\if@pageperquestion + \@newpagebeforequestiontrue +\else + \@newpagebeforequestionfalse +\fi +\def\examn@prequestionspace#1{% + \if@pageperquestion + \if@newpagebeforequestion + % Add all the stretchability here, rather than stretching out + % displays and lists above this on the page. + \newpage + % Clear the \@newpagebeforequestion flag, to suppress the action + % of any following calls to \examn@prequestionspace, until the end + % of the next question. + \global\@newpagebeforequestionfalse + \fi + \else + #1% + \fi +} +\long\def\examn@endquestion#1{% + \mark{} % the position of this call is slightly sensitive (but this works) + \if@pageperquestion + \global\@newpagebeforequestiontrue + \fi + #1 + \@nobreakfalse + \everypar{} +} +\def\partmarks{% + \@ifstar{\@tempswatrue \@partmarks}{\@tempswafalse \@partmarks}} +\newdimen\@partmarksspace + \@partmarksspace=2em % default value +\def\@partmarks#1{% + \if@perquestionmarks + \if@insolution + % visual display only -- doesn't count towards mark total + \setbox0=\vbox to 0pt{\vss + \hbox to \textwidth{\hfil\hbox to 0pt{\quad\small[\dots #1]\hss}} + \vskip0.25ex } + % the next line is probably unnecessary, but guarantees that box0 + % has zero depth, so no extra vertical space appears because of + % this new box + \dp0=0pt + \ifvmode + \box0 + \else + \vadjust{\nointerlineskip\box0}% + \fi + \else + \global\advance\marktotal #1 + \if@tempswa + \setbox0=\vbox to 0pt{\vss + \hbox to \textwidth{\strut\hfill\FormatPartMarks{#1}}% + \vskip 1\baselineskip} % vskip means box has zero depth + \ifvmode + \box0 + \else + \vadjust{\box0}% + \fi + \else + \ifdim\@partmarksspace > 0pt + {\unskip\nobreak\hfil\penalty50 \hskip\@partmarksspace + \hbox{}\nobreak\hfil\FormatPartMarks{#1}% + \parfillskip=0pt \finalhyphendemerits=0 \par} + \else + \unskip\nobreak\hfill\FormatPartMarks{#1}\par + \fi + \fi + \fi + \else + \ClassError{exam-n}{\string\partmarks\ is not compatible with + noperquestionmarks}{Either remove \string\partmarks\ or remove + the noperquestionmarks option} + \fi + \ignorespaces +} +\@endparpenalty=\@M + +\newcommand\FormatPartMarks[1]{\hbox to 0pt{\hskip1em \textbf{[#1]}\hss}} +\@partmarksspace=\z@ +\newcommand\question{% + \if@perquestionmarks + \let\ex@next\@questionmarks + \else + \let\ex@next\@questionnomarks + \fi + \@ifnextchar[%] + {\ex@next}{\ex@next[]}} +\def\@questionmarks[#1]#2{% + \def\@tempa{#2}% marks available for this question + \ifx\@tempa\@empty + \ClassError{exam-n} + {Missing mark goal for question (using 0 instead)} + {Missing mark goal for question (using 0 instead)} + \def\@tempa{0} + \fi + \ifx\@includequestionoverridenumber\@empty + \do@question{#1}{\@tempa}% + \else + \ClassWarning{exam-n}{Forcing question number + \@includequestionoverridenumber, in included question #2} + \do@question{\@includequestionoverridenumber}{\@tempa}% + \fi +} +\def\@questionnomarks[#1]{% + \do@question{#1}{0}% +} +\newcount\ex@nmcq +\ex@nmcq=-1 +\newcount\ex@mcqnanswer +\def\multiplechoiceanswers#1{\ex@nmcq=#1} +\newenvironment{mcq} + {\parindent=0pt + \ifnum\ex@nmcq<1 + \ClassError{exam-n} + {mcq environment without preceding multiplechoiceanswers declaration} + {The mcq environment may only be used if the number of + permitted MCQ answers has been declared with \string\multiplechoiceanswers} + \else + \def\item{\@tempswafalse\ex@mcqitem} + \def\answer{\@tempswatrue\ex@mcqitem} + \ex@mcqi=0 + \ex@mcqnanswer=0 + \do@question{}{1} + \fi} + {\par + \ifnum\ex@mcqi<\ex@nmcq + \ClassWarning{exam-n}{Too few potential answers in MCQ \the\questionnumber} + \@shout{Too few potential answers in MCQ \the\questionnumber} + \ifnum\@draftstatus > 0 + \highlighted{TOO FEW ANSWERS}\par + \fi + \fi + \ifcase\ex@mcqnanswer + \ClassWarning{exam-n} + {No correct MCQ answer provided in question \the\questionnumber} + \@shout{No correct MCQ answer provided in question \the\questionnumber} + \ifnum\@draftstatus > 0 + \highlighted{NO CORRECT ANSWER PROVIDED}\par + \fi + \or + % ex@mcqanswer=1: correct -- do nothing + \else + \ClassWarning{exam-n} + {Too many correct MCQ answers provided in question \the\questionnumber} + \@shout{Too many correct MCQ answers provided in question \the\questionnumber} + \ifnum\@draftstatus > 0 + \highlighted{TOO MANY CORRECT ANSWERS}\par + \fi + \fi + \examn@endquestion{\relax} + } +\newcount\ex@mcqi +\def\ex@mcqitem{% + \par + \ifnum\ex@mcqi=0 + % first one + \smallskip + \parskip=0pt % nothing fancy -- we assume these won't spread + % over more than one line + \advance\leftskip by 2em + \fi + \advance\ex@mcqi by 1 + \noindent + \if@tempswa + % the correct answer + \advance\ex@mcqnanswer 1 + \if@showsolutions + \hbox to 0pt{\hss \highlighted{$\Longrightarrow$ \@Alph\ex@mcqi . }}% + \else + \hbox to 0pt{\hss \@Alph\ex@mcqi . }% + \fi + \else + \hbox to 0pt{\hss \@Alph\ex@mcqi . }% + \fi +} +\def\do@question#1#2{% + \par % get that out of the way... + \markgoal=#2 + \marktotal=0 + \ifx\examn@questionpreamble\@empty + \else + \vspace{2\baselineskip} + \hbox to \textwidth{\hfil\textbf{\examn@questionpreamble}\hfil} + \questionpreamble{} + \fi + \setcounter{partnumber}{0} + \global\advance\questionnumber 1 + \examn@prequestionspace{% + \if@nobreak + % after a heading (or something like that) + \else + % we're not forcing a new page here, but this would be a good point to choose + \vskip 2\baselineskip plus 8\baselineskip + \penalty-200 + \fi + } + \if@questionnumberchecks + \def\@tempa{#1}% intended question number + \ifx\@tempa\@empty + % no optional argument -- easy + \def\@currentquestion{\the\questionnumber} + \else + \setbox0=\hbox{\@tempcnta=#1} + \ifdim\wd0>0pt + \ClassWarning{exam-n}{Non-numeric question number, #1. + You probably want to put \string\QuestionNumberChecksOff in the preamble} + \par\textbf{Non-numeric question number, #1. + You probably want to put \hbox{$\backslash$\ttfamily QuestionNumberChecksOff} in the preamble} + (the formatting below may be messed up).\par + \fi + \ifcase\@draftstatus + % Final version + \@tempcnta=#1 + \ifnum\questionnumber=\@tempcnta + \def\@currentquestion{#1} + \else + \ifx\@includequestionoverridenumber\@empty + \ClassError{exam-n} + {\string\question[#1] is actually question \the\questionnumber!} + {The question in {question} environment number + \the\questionnumber\space is specified as + \string\question[#1].\MessageBreak + This is an error in 'final' mode.\MessageBreak + Perhaps you need \string\QuestionNumberChecksOff?} + \def\@currentquestion{???} + \else + \ClassWarning{exam-n}{Forcing question number \@includequestionoverridenumber, + in {question} environment number \the\questionnumber} + \edef\@currentquestion{\@includequestionoverridenumber}% this doesn't seem to expand in fact! + \message{current question=\@currentquestion, override \@includequestionoverridenumber} + \fi + \fi + \or + % Draft version -- let the given number override + % \the\questionnumber, but warn if there's a difference. + \@tempcnta=#1 + \ifnum\questionnumber=\@tempcnta \else + \ClassWarning{exam-n} + {\string\question[#1] is actually question \the\questionnumber!} + \fi + \def\@currentquestion{#1} + \else + % compose mode -- argument overrides without question + \def\@currentquestion{#1} + \fi + \fi + \else + % skip question-number checks + \def\@tempa{#1}% intended question number + \ifx\@tempa\@empty + % no optional argument -- this is possibly an error, so warn + \ClassWarning{exam-n}{\string\QuestionNumberChecksOff\ is in + force, but this question has no [number]} + \def\@currentquestion{\the\questionnumber} + \else + \typeout{Forcing question \the\questionnumber\space to be #1} + \def\@currentquestion{#1} + \fi + \fi + \everypar{\setbox0=\lastbox % discard \box0 + \FormatQuestionNumber + \mark{\@currentquestion}% + \everypar{}} +} +\newcommand\FormatQuestionNumber + {\hbox to 0pt{\hss \textbf{\@currentquestion}\hskip1em}} +\def\endquestion{% + \ifnum\marktotal=\markgoal + \typeout{Question \@currentquestion\if@perquestionmarks, \the\marktotal\space marks\fi} + \iffalse % all of this is redundant, and ends up too shouty + \ifcase\@draftstatus + % Final version -- do nothing + \relax + \or % draft version + \relax % no, the above is too much; do nothing + \else % compose version + \par + \hfil\textbf{\highlighted{[Q\,\@currentquestion\if@perquestionmarks, \the\marktotal\space marks\fi]}}% + \break + \fi + \fi + \else + \ClassWarning{exam-n} + {Question \@currentquestion\space has a total of \the\marktotal\space marks, + \MessageBreak + when it should have \the\markgoal} + \begin{center} + \edef\@tempa{Question \@currentquestion\space + has a total of \the\marktotal\space marks, + when it should have \the\markgoal} + \expandafter\shout\expandafter{\@tempa} + \end{center} + \fi + \examn@endquestion{% + \if@showmarktotals + \par % into vertical mode + \nobreak % keep the marks total with the question + \vbox to 2\baselineskip{ + \vss + % this should be very similar to the call to + % \FormatPartMarks in \@partmarks, above + \hbox to \textwidth{\strut\hfill\FormatPartMarks{Total: \the\markgoal + \ifnum\@draftstatus>0 + % in draft modes, put a fairly discreet confirmation in the total + \space + \highlighted{\ifnum\marktotal=\markgoal OK\else X\fi}% + \fi}}} + \fi + } +} +\newenvironment{questiondata}{% + \penalty50 % poor break + \vbox\bgroup + \slshape + \parindent=0pt \parskip=\medskipamount + \smallskip + \hrule + \nobreak + \smallskip + \noindent \ignorespaces +}{% + \par + \nobreak + \medskip + \hrule width \textwidth + \par + \egroup +} +\newcommand\questionpreamble[1]{\gdef\examn@questionpreamble{#1}} +\let\examn@questionpreamble\@empty +\newif\if@questionnumberchecks +\@questionnumbercheckstrue +\newcommand\QuestionNumberChecksOff{\@questionnumberchecksfalse} +\def\enumerate{% + \ifnum \@enumdepth >\thr@@\@toodeep\else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \expandafter + \list + \csname label\@enumctr\endcsname + {\usecounter\@enumctr + \topsep0pt + \partopsep0pt + %\parskip=5.0pt \parsep=\parskip + \def\makelabel##1{\hss\llap{##1}}}% + \fi} +\def\itemize{% + \ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter + \list + \csname\@itemitem\endcsname + {\topsep0pt + \partopsep0pt + \def\makelabel##1{\hss\llap{##1}}}% + \fi} +\renewcommand\theenumi{\@roman\c@enumi} +\newcommand\comment[1]{% + \ifnum\@draftstatus > 0 + \marginpar{\highlighted{#1}}% + % should we \@shout this, too? + \fi + \ignorespaces +} +\renewcommand\author[1]{\comment{Author: #1}} +\newtoks\@allshouts \@allshouts={} +\def\@shout#1{\edef\@tempa{#1}\expandafter\@@shout\expandafter{\@tempa}} +\def\@@shout#1{\global\@allshouts=\expandafter{\the\@allshouts\t{#1}}} +\def\showthe@shouts{% + {\def\t##1{{\LARGE\noindent\highlighted{NOTE: ##1}\par}}% + \the\@allshouts}% + % Remark on the number of shouts in the aux file + {\@tempcnta=0 \def\t##1{\advance\@tempcnta1}\the\@allshouts + \protected@write\@auxout{}% + {\string\examn@shoutcount{\the\@tempcnta}}}} +\def\shout#1{\textbf{\highlighted{#1}}\@shout{#1}} +\newcount\examn@shoutcounttotal +\examn@shoutcounttotal=0 +\def\examn@shoutcount#1{\global\examn@shoutcounttotal=#1} +\def\dummy@documentclass{% + \@ifnextchar[\dummy@@documentclass{\dummy@@documentclass[]}} +\def\dummy@@documentclass[#1]#2{} +\def\includequestion{ + \@ifnextchar[%] + {\@includequestion}{\@includequestion[]}} +\def\@includequestion[#1]#2{% + \begingroup + \let\documentclass\dummy@documentclass + \let\document\@empty % not \relax: makes \begin think {document} is undef'd + \let\enddocument\relax + \def\@tempa{#1} + \ifx\@tempa\@empty \else + \def\@includequestionoverridenumber{#1} + \message{includequestion override: \@includequestionoverridenumber} + \fi + \def\usepackage##1{\ClassWarning{exam-n} + {Ignoring \string\usepackage{##1} in included question #2}} + \input{#2} + \endgroup +} +\let\@includequestionoverridenumber\@empty +\newif\if@insolution +\@insolutionfalse +\def\@formatsolution{\par + \if@insolution + \ClassError{exam-n}{Misplaced solution}{You can't have a solution within a solution} + \else + \@insolutiontrue % this happens within a group + \fi + \examn@dummycaptions % dummy captions within solutions + \typeout{SHOWING SOLUTIONS} + \vskip 1ex plus 2\bigskipamount % add stretchable space... + \penalty-\@lowpenalty % ...and encouragement to break here + \parskip 0.5\baselineskip + \raggedright + \color{solutiontext}%\slshape + \ifbigfont\else + \small + \fi + \hrule + \hbox to \textwidth{\vrule height 1ex \hfil \vrule height 1ex} + \nobreak + \vskip -\parskip % cancel out the following parskip + \textbf{\highlighted{Solution:}}\hskip2em + \ignorespaces +} +\def\end@formatsolution{% + \par + \nobreak + \vskip -0.5ex + \hbox to \textwidth{\vrule height 1ex \hfil \vrule height 1ex} + \hrule +} +\if@showsolutions + \let\solution\@formatsolution + \let\endsolution\end@formatsolution +\else + \def\solution{% + \if@insolution + \ClassError{exam-n}{Misplaced solution}{You can't have a solution within a solution} + \fi + \let\endfigure\endfloat@skipsolutions + \let\endtable\endfloat@skipsolutions + \examn@dummycaptions % dummy captions avoid counter increments + \@ifundefined{includepdf}{}{\let\includepdf\examn@disabledpdfpages} + \par + \setbox\@tempboxa\vbox\bgroup + \@insolutiontrue} + \def\endsolution{% + \egroup % ...and do nothing with this box + } +\fi +\def\examn@badfloat#1[#2]{ + \ClassError{exam-n} + {Bad #1 option #2 ignored} + {In the exam-n class, the 'floating' environments take no argument,\MessageBreak + and are always placed 'here'} + \examn@float{#1}} +\def\examn@float#1{% + % re-using the standard LaTeX parameter means that \caption works + \def\@captype{#1} + \setbox\@tempboxa\vbox\bgroup} +\def\examn@endfloat{% + \egroup % end \@tempboxa + \unskip + \nobreak + % add lots of stretchability, but non-infinite, for the sake of tidiness + \vskip 0pt plus 0.5\textheight + \penalty50 % a pagebreak here discards following vskip + % (cf TeXBook p106; or try \filbreak of p111) + \vskip 2ex plus -0.5\textheight % negative stretch cancels previous vskip + \box\@tempboxa + %\vskip 1ex + \nobreak +} +\def\endfloat@skipsolutions{% + % variant when skipping solutions -- end the \@tempboxa and do nothing + \egroup +} +\def\figure{% + \@ifnextchar[{\examn@badfloat{figure}}{\examn@float{figure}}%] +} +\def\table{% + \@ifnextchar[{\examn@badfloat{table}}{\examn@float{table}}%] +} +\let\endfigure\examn@endfloat +\let\endtable\examn@endfloat +\def\examn@dummycaptions{% + \def\fnum@figure{\figurename} % 'Figure nnn' changed to just 'Figure' + \def\fnum@table{\tablename} + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + %\refstepcounter\@captype % omit this line from the standard definition + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + } +} +\def\examn@disabledpdfpages{\@ifnextchar[% ] + \examn@disabledpdfpages@ + {\examn@disabledpdfpages@[]}} +\def\examn@disabledpdfpages@[#1]#2{\relax} +\AtEndDocument{ + \CheckTotalQuestions + \ClosingText + \showthe@shouts + \WriteLastPageLabel} +\ifcase\examn@mtselect + % mathptm fonts + % This is a very clumsy version, but it appears to be our only option + \def\vec#1{\mathchoice{\mbox{\boldmath $\displaystyle #1$}} + {\mbox{\boldmath $ #1$}} + {\mbox{\boldmath $\scriptstyle #1$}} + {\mbox{\boldmath $\scriptscriptstyle #1$}}} +\or % mathtime (should this be the same for mathtime as for mtpro2? + \let\vec\mathbf +\or % mtpro2 + \let\vec\mathbold +\fi +\newcommand\BSc{B.Sc.{}} +\newcommand\MSci{M.Sci.{}} +\newcommand\MSc{M.Sc.{}} +\newcommand\MA{M.A.{}} +\newcommand\MEng{M.Eng.{}} +\newcommand\BEng{B.Eng.{}} +\newcommand{\dd}{\mathrm{d}} +\newcommand{\ddd}{\,\mathrm{d}} % inside an integral, including thinspace + +\def\Diffl{\@ifstar\@Difflflat\@Diffl} +\def\Partial{\@ifstar\@Partialflat\@Partial} +\def\@Partial{\@ifnextchar[{\@@Diffl\partial}{\@@Diffl\partial[]}} +\def\@Partialflat{\@ifnextchar[{\@@Difflflat\partial}{\@@Difflflat\partial[]}} +\def\@Diffl{\@ifnextchar[{\@@Diffl\dd}{\@@Diffl\dd[]}} +\def\@Difflflat{\@ifnextchar[{\@@Difflflat\dd}{\@@Difflflat\dd[]}} +\def\@@Diffl#1[#2]#3#4{% + \def\@tempa{#2}% + \ifx\@tempa\empty + \frac{#1#3}{#1#4}% + \else + \frac{{#1}^{#2}#3}{#1{#4}^{#2}}% + \fi} +\def\@@Difflflat#1[#2]#3#4{% + \def\@tempa{#2}% + \ifx\@tempa\empty + #1#3\mskip-0.8mu/\mskip-1.2mu #1#4% + \else + {#1}^{#2}#3\mskip-0.8mu /\mskip-1.2mu #1{#4}^{#2}% + \fi} +\def\e{{\mathrm e}} +\def\units{\begingroup + \catcode`\.=\active + \@ifstar{\let\un@tsspace\relax \un@ts}% + {\let\un@tsspace\thinspace\un@ts}} +\begingroup + \catcode`\.=\active + \gdef\un@ts#1{\let~\thinspace\let.\thinspace + \ifmmode + \un@tsspace\mathrm{#1}% + \else + \nobreak$\un@tsspace\mathrm{#1}$% + \fi + \endgroup} +\endgroup +\def\au{au} +\def\lambdabar{\setbox\@tempboxa\hbox{$\lambda$}% + \hbox to 0pt{\hbox to \wd\@tempboxa{\hss$\bar{}$\hss}\hss}\box\@tempboxa} +\endinput +%% +%% End of file `exam-n.cls'. diff --git a/Master/texmf-dist/doc/latex/exam-n/notes-for-authors.pdf b/Master/texmf-dist/doc/latex/exam-n/notes-for-authors.pdf new file mode 100644 index 00000000000..0c50ae77f7f Binary files /dev/null and b/Master/texmf-dist/doc/latex/exam-n/notes-for-authors.pdf differ diff --git a/Master/texmf-dist/doc/latex/exam-n/release-notes.html b/Master/texmf-dist/doc/latex/exam-n/release-notes.html new file mode 100644 index 00000000000..063e8fbe84a --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/release-notes.html @@ -0,0 +1,303 @@ + + +exam-n class – release notes + + + + + + +

The exam-n class – release notes

+ +
+ +
1.1, 2014 May 3
+
Converted to a generic class, exam-n, ready for wider +distribution. +Available on bitbucket +and at CTAN.
+ + + +
1.0.16, 2014 February 28
+
    +
  • Option mtpro2 now switches to times (this fixes a pre-existing bug + exposed by the [sansserif] option).
  • +
  • The [bigfont] option now works (this fixes a pre-existing bug, to + do with \subsections, which was exposed by the addition + of the [bigfont] option).
  • +
  • Added the [bigfont] option
  • +
  • Fixed 'shouts' warning at start (again)
  • +
  • Forbid *section commands inside questions (and don't freak out)
  • +
  • Rename \questiontrailer to \questionpreamble (more logical)
  • +
  • Fixed mcq warnings, and 'question continued' errors.
  • +
  • Renamed \multiplechoicequestions to more logical + \multiplechoiceanswers
  • +
  • Various (further) spacing changes
  • +
  • Added \subsection
  • +
  • Release includes +1.0.16b1 (2014 January 20); +1.0.16b2 (20 January); +1.0.16b3 (22 January); +1.0.16b4 (14 February). +
  • +
+
+ +
1.0.15, 2014 January 19
+
    +
  • Fixed mcq and showsolutions, to suppress incorrect warning of missing answers.
  • +
+ +
1.0.14, 2014 January 10
+
    +
  • pdfpages content now appears in draft mode.
  • +
  • The [draft] option now implies [showsolutions] (so if +you want to suppress the solutions in this mode, you must now follow +[draft] with [noshowsolutions]).
  • +
  • Showing missing information: shouts and missing exam date/time are +now highlighted.
  • +
  • Fixed bug where excess \QuestionNumberChecksOff +caused question numbers to disappear.
  • +
  • Remove indent at start of question.
  • +
+ +
1.0.13, 2013 December 4
+
    +
  • Added a [sansserif] class option.
  • +
  • Improved spacing and linebreaking; there are now fewer bad page-breaks.
  • +
  • Added the {mcq} environment.
  • +
  • Changed the distribution licence from GPL to LPPL.
  • +
+
+ +
1.0.12, 2013 November 11
+
    +
  • Adjustments to banner text and base rubric (consulting with Morag Casey).
  • +
  • Added notes about \includepdf in notes for authors.
  • +
  • Adjustments to the distributed example files.
  • +
+ +
1.0.11, 2013 July 18
+
Adjustments to question data: k_B, etc, should have roman subscripts.
+ +
1.0.10, 2013 June 27
+
Minor documentation and distribution fixes
+ +
1.0.9, 2013 March 22
+
Remove leftover debugging code (garhhh)
+ +
1.0.8, 2013 March 14
+
Add the mono and colour options.
+ +
1.0.7, 2013 March 14
+
    +
  • pdfpages is now disabled only in solutions
  • +
  • Minor layout changes (exam title adjusts size for long +titles)
  • +
+ +
1.0.6, 2013 March 13
+
    +
  • Avoid tables and figures in solutions incrementing the float counter.
  • +
  • Layout changes; adjustment to default base rubric; A345 rubric change
  • +
  • Some documentation changes
  • +
+
+ +
1.0.4-1, 2013 March 8
+
This is a bugfix release: it's a re-release of now-deprecated +1.0.5 minus a breaking change.
    +
  • Add {table} support, paralleling existing +{figure} support (ie tables don't float, but captions +work as expected).
  • +
  • Blank lines after a \begin{question} no longer +result in extra space.
  • +
  • Adjust spacing and layout of front page (again); various other +cosmetic changes.
  • +
  • A document identifier appears at the bottom of each page, +corroborating the exam the page is for (to avoid photocopier collation +accidents), and giving a numeric identifier which increases with time +(allowing you to identify which of two printouts is later).
  • +
+ +
1.0.4, 2013 March 6
+
Adjust base rubric; assorted distribution and detail fixes.
+ +
1.0.3, 2013 January 25
+
Added [A2] class option.
+ +
1.0.2, 2013 January 25
+
    +
  • The `pdfpages' package wasn't working when the `noshowsolutions' +option was present. Fixed, by special-casing, specifically disabling the +\includepdf command in this case.
  • +
  • Adjust display of \partmarks (no need for extra +space, since \partmarks is now fully in the margin).
  • +
  • Adjusting the front-page layout. Again.
  • +
+ +
1.0.1, 2013 January 18
+
    +
  • {figure} now works, because it's explicitly +supported ({figure} inside solutions could cause problems +before). The contents don't float.
  • +
  • Layout adjustments.
  • +
  • Graphics now appear in draft mode.
  • +
+
+ +
1.0, 2012 December 11
+
This is the nominal version 1.0 release, and will be used for the +2012-13 Honours Astronomy exams (it might get further tweaks along the +way, but we believe this is a complete distribution set).
    +
  • More adjustments to notes-for-authors, now showing example LaTeX results.
  • +
  • Addition of template-question.tex
  • +
  • Adjustments to base rubric.
  • +
+ +
1.0b5, 2012 December 3
+
    +
  • Fine formatting adjustments: occasional \nobreak and +rationalisation of \maketitle.
  • +
  • Improvements to notes-for-authors.
  • +
+ +
1.0b4, 2012 November 30
+
    +
  • Improve generation of PDF metadata.
  • +
  • Add macro \shout, for highlighted `FIXME' comments.
  • +
  • Add showmarktotals option.
  • +
  • Permit \partmarks in solutions, without it adding to +the marks added up for the question (at the same time, forbid having a +solution within a solution).
  • +
  • Various formatting adjustments.
  • +
+
+ +
1.0b3, 2012 November 8
+
    +
  • Add [A345] option.
  • +
  • Make compose/draft material appear in red.
  • +
  • Some packaging changes and bugfixes.
  • +
+ +
1.0b2, 2012 November 6
+
Mild formatting adjustments.
+ +
1.0rc1, 2012 November 2
+
    +
  • Significant rewrite of formatting, producing a consensus +AandA/PhysHons style, and renaming some confusingly named +commands.
  • +
  • Consequently, the AandA.clo and PhysHons.clo options have +disappeared.
  • +
  • The \constantssheet macro has appeared, and setting +this is now the principal function of per-class .clo +files. +See the new A1.clo and modified P2.clo option files.
  • +
+
+ +
0.17.1, 2012 September 21
+
Fix packaging infelicity
+ +
0.17, 2012 September 21
+
    +
  • Rework solutions environment to make it a little more robust.
  • +
  • Add \MSc degree shorthand.
  • +
  • Bugfix: continuation headers now appear if a question starts on page 1.
  • +
  • Bugfix: fix wrong syntax in draft+showsolutions mode -- now works again
  • +
+
+ +
0.16, 2012 July 26
+
    +
  • Renamed the [showmarks] option to more rational [perquestionmarks] +(because the option doesn't control whether per-question marks are +displayed, but whether they're tracked at all). Slightly +improved the documentation of this at the same time.
  • +
  • Added \lambdabar macro
  • +
  • Fix long-standing problem with continuation lines -- these should now be robust.
  • +
+
0.15, 2011 November 23
+
Avoid conflict with ifpdf package. +Now depends on ifpdf.
+
0.14, 2010 August 6
+
    +
  • Fixed the problem where the question-continuation marks would be +messed up by the presence of floats.
  • +
  • Added P2.clo; adjust 'showing solutions' banner +to avoid collision with other headers (thanks to Morag Casey for the .clo +file and the report).
  • +
  • Changed the name of the class to 'guexam', from potentially confusing 'exam'. +Support guexam.config for forcing options (for example).
  • +
+ +
0.13-1, 2008 November 21
+
Make the gulogo style optional, so that question authors don't +have to download and install that before they can draft a question. +Also adjust the logo size.
+ +
0.13, 2008 November 11
+
Add university logo, and slightly rearrange the header. +Add {questiondata} environment.
+ +
0.12-2, 2008 April 14
+
...keep on truckin'. Further changes to the +\partmarks* spacing code, still largely unprincipled, but +looking closer to what's required.
+ +
0.12-1, 2008 April 3
+
...and again. This time, I think I actually see what the problem +was. Macro \partmarks now forces a new paragraph (it was +documented to be usable at the end of a paragraph, so this is again +forced, and the documentation made more explicit), this makes what I +thought was the solution actually work. Which is nice. Redefined +enumerate and itemize environments, to +improve spacing somewhat.
+ +
0.12, 2008 April 3
+
Further adjustments to \partmarks: again, it should +be more consistent without necessarily being more principled, alas.
+ +
0.11, 2008 March 30
+
Minor fixes: Adjust display of partmarks -- should now be more +consistent; option [showsolutions] no longer defaults +[{no,}pageperquestion]; add macro \e to format roman +exponential.
+ +
0.10, 2008 January 17
+
Fix \vec when it appears in sub- or superscript +position. Add \paperident command.
+ +
0.9, 2007 December 10
+
Various formatting changes. Added optional argument to +\includequestion overriding question number.
+ +
0.8, 2007 November 25
+
You can now use \usepackage within +[compose] mode.
+ +
0.7, 2007 November 20
+
Make changes to the display of the 'University of Glasgow' banner +at the top: resolves some font problems. Other minor layout tweaks.
+ +
0.6, 2007 November 18
+
Fixed bold maths problems: \vec now works with greek +letters, too. Support MTpro2 (mathtime maths fonts) with the new +[mtpro2] class option. The {solution} +environment can appear multiple times within a question. Question +numbers now appear correctly in 'final' mode.
+ +
0.5, 2007 October 30
+
Fix collision with LaTeX internal: a \comment at the +start of a {question} now works.
+ +
+ + + diff --git a/Master/texmf-dist/doc/latex/exam-n/sample/Makefile b/Master/texmf-dist/doc/latex/exam-n/sample/Makefile new file mode 100644 index 00000000000..ff34e72ae46 --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/sample/Makefile @@ -0,0 +1,16 @@ +all: sample_exam.pdf + +sample_exam.pdf: numerical1-solution.pdf + +sample_exam_solution.pdf: sample_exam_solution.tex + +sample_exam_solution.tex: sample_exam.tex + rm -f $@ + sed '1s/documentclass/documentclass[showsolutions]/' sample_exam.tex >sample_exam_solution.tex + +%.pdf: %.tex + TEXINPUTS=..: pdflatex $< + if grep 'Rerun to get cross' ${<:.tex=.log}; then TEXINPUTS=..: pdflatex $<; else :; fi + +clean: + rm -f sample_exam*.pdf sample_exam_solution.tex *.log *.aux diff --git a/Master/texmf-dist/doc/latex/exam-n/sample/cosmo1.tex b/Master/texmf-dist/doc/latex/exam-n/sample/cosmo1.tex new file mode 100644 index 00000000000..cd9ae51974f --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/sample/cosmo1.tex @@ -0,0 +1,91 @@ +\documentclass[compose]{exam-n} + +\usepackage{graphics} + +\begin{document} + +\begin{question}{20} \author{Andrew Davies} +% Have a blank line here, to check that the question number remains +% nicely lined up, even if there are lines between the environment +% opening and the text. + +First, \emph{admire} the restful picture of a spiral in Fig.\ \ref{f:spiral}, +included as a graphic. Fully zenned up? Then let us begin\dots. +\begin{figure} +\ifbigfont + \includegraphics[width=\textwidth]{spiral} +\else + \includegraphics{spiral} +\fi +\caption{\label{f:spiral}A spiral} +\end{figure} + +\part Show that, under the action of gravity alone, the scale size +of the Universe varies according to +\begin{equation*} +\ddot{R}=-\frac{4\pi G \rho_0}{3R^2} +\end{equation*} +\partmarks*{4} +and that, consequently, +\begin{equation*} +\dot{R}^2=-\frac{8\pi G \rho_0}{3R}=-K. +\end{equation*} +\partmarks*{3} + +Express $K$ in terms of the present values of the Hubble constant +$H_0$ and of the density parameter $\Omega_0$. +\partmarks{3} +\begin{solution} +This can be solved by \emph{remembering} the solution +\partmarks{3} +\end{solution} + +\part In the early Universe, the relation between time and +temperature has the form +\begin{equation*} +t=\sqrt{\frac{3c^2}{16\pi G g_{\rm eff}a}}\frac{1}{T^2}, +\end{equation*} +where $a$ is the radiation constant. Discuss the assumptions +leading to this equation, but do not carry out the mathematical +derivation. Discuss the meaning of the factor $g_{\rm eff}$ , and +find its value just before and after annihilation of electrons and +positrons. +\partmarks{6} +\begin{solution} +Before, well, geee; after\dots kazamm! +\end{solution} + +\part +Explain how the present-day neutron/proton ratio was established +by particle interactions in the Early Universe. How is the ratio +of deuterium to helium relevant to the nature of dark matter? It is +\emph{crucially vital} to note +that Table~\ref{t:dullness} is of absolutely no relevance to this question. +\begin{table} +\begin{tabular}{r|l} +Column 1&and row 1\\ +More content&in row 2 +\end{tabular} +\caption{\label{t:dullness}A remarkably dull table} +\end{table} +\partmarks{4} +\begin{solution} +Explanations are superfluous; all that is, is. +\begin{table} +\begin{tabular}{r|l} +First rows&are premier\\ +subsequent rows&are of secondary interest +\end{tabular} +\caption{\label{t:dullnessII}A table o'erbrimming with otioseness} +\end{table} +In addition, Table~\ref{t:dullnessII} adds nothing to the discussion, +adds nothing to our understanding of our place in the cosmos, but it +\emph{does} contribute slightly to the heat-death of the universe (can +you work out how many deuterium nuclei decayed during the typing of +this table?). +\end{solution} +\begin{questiondata} +Hubble's law: $v=H_0 D$ +\end{questiondata} +\end{question} +\end{document} diff --git a/Master/texmf-dist/doc/latex/exam-n/sample/cosmo2.tex b/Master/texmf-dist/doc/latex/exam-n/sample/cosmo2.tex new file mode 100644 index 00000000000..bb6c512b9dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/exam-n/sample/cosmo2.tex @@ -0,0 +1,60 @@ +\documentclass[compose]{exam-n} +\begin{document} + +\begin{question}{30} \comment{by John Brown} +Show by considering the Newtonian rules of vector and velocity +addition that in Newtonian cosmology the cosmological principle +demands Hubble's Law $v_r\propto r$.\partmarks{10} + +Prove that, in Euclidean geometry, the number $N(F)$ of objects +of identical luminosity $L$, and of space density $n(r)$ at +distance $r$, observed with radiation flux $\ge F$ is (neglecting +other selection and redshift effects) +\begin{equation*} +N(F)=4\pi\int_0^{(\frac{L}{4\pi F})^{1/2}} n(r) r^2\ddd r. +\end{equation*} +\partmarks*{5} + +Use this to show that for $n=n_1=$constant at $rr_1$, +\begin{equation*} +N(F) = N_1\left(\frac{F}{F_1}\right)^{-3/2}\qquad \text{for +$F>F_1$}, +\end{equation*} +and +\ifbigfont + \begin{multline*} + N(F) = + N_1\left\{1+\frac{n_2}{n_1}\left[\left(\frac{F}{F_1}\right)^{-3/2}-1\right] + \right\}\\\text{for $F ul { + padding: 0pt; + margin: 0pt; + list-style: none; +} +div#toc li { + padding: 0pt; + display: inline-block; +} +div#toc li:before { + content: "§ "; + margin-left: 1em; +} +/* the following elements aren't currently generated by structure.lx */ +div#toc li ul { + padding-left: 1em; + margin-left: 0; + font-style: italic; + display: inline; +} +div#toc li ul:before { + content: "( "; +} +div#toc li ul:after { + content: " ) "; +} +div#toc li li { + padding-left: 0pt; +} +div#toc li li:after { + content: "; "; +} -- cgit v1.2.3