Department of Applied Mathematics and Theoretical Physics |
At the beginning of every term the new example sheets need to be available on the web for supervisors and students. The mechanism for doing this is via two Unix commands getex and putex.
All Part III example sheets should also go on the web, with a ‘3’ in front of the course number. Special instructions apply to Part III - see the Part III section at the end of this document.
The basic idea behind these two commands is that lecturers or secretaries use the getex command to obtain a copy of the TeX source for a given example sheet. They then make any changes they desire and use the putex command to update the copy on the web. There is a built-in mechanism to ensure that two people do not simultaneously edit the same example sheet: the getex command will not retrieve an example if someone else has already done so and not yet returned it using the putex command.
If you are unable to produce the notes in TeX/LaTex then it is possible for PDF versions to be (manually) inserted for you. Please ensure that the PDF files are of reasonable quality (please don't use scanned images, students may have problems reading them) and are generated with page size set to A4. Contact faculty_office@maths.cam.ac.uk for more information.
If you include figures then normally they should be EPS (encapsulated postscript), if you can only generate PDF figures then please contact us for help - currently putex does not use pdftex and cannot include PDF figures directly.
Why is the PDF/ps file not there? The program which updates the examples web page runs at various times through the day. Currently this is done every ~20 mins between the hours 8-18 and hourly for the rest of the day.
This is quite simple. First decide which example sheet you want. If you don't know the codes then you can just type
listex
to get a list. If the sheet you expected to find is not listed then it means that it has never been submitted to the system. In this case you will have to find out who last lectured the course and obtain the sheet from them, or ask them to submit the sheet as described below.
Having determined the code, cd to a directory in which you want to keep the files. Once there type
getex XXx
where XXx is the appropriate code. One of two things will happen. Either you will see text to the effect that it is working, or you will get an error message. Unless there is an error, the result will be the full set of files for the requested example.
You can now make the necessary changes to the example. Once you have done that and checked that the TeX code is correct you must return the example to update the copy on the web.
If you want to look at the sources of an example sheet but not edit it, e.g. to check that it has a correction or the latest version of some macros you can use
getex -r XXx
This will return a copy of the current files, but not actually mark them as locked (it also marks them read-only to prevent accidental edits). Once you have finished with the files simply delete them. If you do need to make any changes you need to run getex again without the -r option.
Provided you have only altered files which were extracted by getex, the command to do this is simply
putex XXx
where XXx is the example code. This results in the file being processed by TeX/LaTeX to produce the PostScript file for the web. If there are any errors whilst running TeX then the command halts without returning the file. You must then correct the errors and run putex again.
If you have created any extra files that are part of the example sheet (e.g. new figures (.fig or .eps files)) then you must tell putex to add these files to the existing files on the system, by using the -a option to putex. For example the command:
putex XXx -a fig1.fig fig1.pstex fig1.pstex_t
will add three new files to the example. When adding .fig figures it is important to include both the .fig source (if it's an xfig drawing) as well as the resulting .ps/.eps file. If the source for the figure is not included then it will have to be redrawn if someone wants to alter it. If the .eps file is missing the TeX/LaTeX command will fail.
If you accidentally use -a
to list a file that is
already part of the sheet, then putex will complain - but not change
anything. If this happens simply run putex again without the
-a
option.
If an updated sheet no longer uses a file which was previously needed you need to tell the system that the file isn't part of the example any more. e.g. if it previously used a file fig4.eps which isn't now used, you should run:
putex XXx -d fig4.eps
and that file will no longer be included.
If after running getex (and perhaps editing the files), you decide that you don't in fact want to alter them at all, you can release the locks on the example without updating the postscript/pdf versions. This is useful if you accidentally ran getex and don't wish to make the timestamp on the example change, or if something bad happened to one of the files and you need to go back to the last known good version. Simply run:
putex -R XXx
and it will release the locks. It doesn't delete the copies you have (in case they are still valuable), so you can still run getex in another directory if you want to merge some of the changes later.
If an example sheet has never been added with putex then a new sheet must be created. This is done using the putex command with a special option -n. For example the command
putex -n "Differential Equations" C4a -a C4a.tex
Creates a new example directory for the first example sheet of the course Differential Equations, adding (-a) the file C4a.tex to that directory. (Note that the TeX file must have the same name as the example and in every example there must be exactly one TeX file so named.) If the TeX file has inclusions (figure files or eps files) then those should be listed after the TeX file name. If figures are included then both the source (e.g. .fig files if they are XFig drawings) and the eps files should be included.
The course codes for Part IA/IB/II as taken from the offical Faculty Schedules.
If you can't find a course code for your course please email faculty_office@maths.cam.ac.uk, who will either know where to look or who to talk to about creating a code for your course.
Note that all Part III sheets must start with ‘3’ before the course number.
Once this command has been given the example sheet will be run through TeX or LaTeX as required and a postscript file will be created. Then, once the TeX file has been saved in the examples directory, the original will be made read-only.
Note that all the files making up the example sheet must be in the same directory, and that that must be the current directory when the putex command is run.
There can be as many example sheets or lecture notes as required for any one course. If there is more than one example sheet for a given course then the sheets should be coded XXa, XXb etc. where XX is the course code as listed in the faculty Schedules of Lecture Courses for the Mathematical Tripos
If lecture notes or specimen examination questions are also required then they should be coded XXLa, XXLb, etc. (for lecture notes,) XXEa, XXEb etc. (for exam questions) or XXAa, XXAb, etc. for answers.
Some courses are presented differently by different lecturers in different terms. In these cases there are likely to be more than one set of example sheets for a given course and the codes used will have another letter appended, indicating the term to which the examples apply. For example: if the course C9 Analysis had three example sheets as given in the Michaelmas term then the sheets would be coded C9am, C9bm and C9cm. However, if the example sheets are essentially the same for each term's presentation then it is neither necessary nor desirable that they be copied for other terms.
If an example sheet already exists then the title can be changed using putex -t followed by the new title and the code of the paper to change.
For example, to change the title of sheet Q3a to Silly Equations, you could type:
putex -t "Silly Equations" Q3a
Note that putex -t will only change the title of the example sheet. If you are also editing the text of the sheet you will still need to run putex to put back those changes.
If for some reason an example sheet should not appear in the web index, you can mark it by simply including the word hidden in the title. All the usual checks on submission are done, but it will not appear in the web index of examples sheets.
To make the sheet visible simply use the rename option (putex -t as above) to remove the word hidden from the title.
There is no easy way to recode an example sheet. If you want the code changed then send mail to the address below.
Again there is currently no easy way to do this, so send mail to help@maths.cam.ac.uk
Not having tex/latex sources available means that anyone else taking over that course won't easily be able to update the sheet so such things will certainly make more work for others later. Also using tex/LaTeX will use our standard templates and produce good quality ps and PDF files that are very likely to print without problems.
If a sheet was not generated using tex/latex and won't have a ps file then you can manually insert a PDF sheet by hand:
For example C6e only has a PDF file. Create a directory C6e. Inside C6e make an RCS directory and put a file called description which contains the string:
cd ~examples mkdir C6e cd C6e mkdir RCS cd RCS echo "Mathematical Biology" > description
and put the PDF into ~examples/ps/C6e.pdf
A batch job will automatically detect it and show N/A for the ps version of that sheet.
The other way to do this is to email the pdf file and course name to help@maths
To have a weblink in the course description just include it in the description.
If you are linking because the example sheet is kept elsewhere you may want to set up a fake tex file with the same information.
Then putex your new file.
A copyright line is automatically put on the side of example sheets generated using putex. If you wish to generate the copyright yourself there are two ways of doing so.
In Part III there has been considerable variation from year to year, and in some years the codes were completely redefined at the start of the year - with all previous sheets being moved into a different tree.
However we have not needed to do this since 2006, so in most cases except for new courses much the same procedures as for the undergraduate sheets is fine, except that the codes are listed in a different place.
The course codes for Part III as taken from the Faculty Course Descriptions.
If you do need copies of old sheets from before 2006 (e.g. to copy the questions from a course which went away and had been brought back), then you can find copies in:
/opt/partiii/oldexamples/
This directory contains subdirectories corresponding to previous
academic years (YY-YY). Each subdirectory contains a file
codes
which gives a listing of all examples sheets (codes
and descriptions), from that year, e.g. for the directory would be
/opt/partiii/oldexamples/01-02/
for examples from the
year 2001-2002.
Once the material has been copied from an old sheet, it may be viewed, edited, renamed etc as in the main instructions above.
If this isn't clear feel free to ask us for help.
If you have queries re coding, or need help with the unix commands please send a mail message to help@damtp.cam.ac.uk.
Return to undergraduate examples listing.