summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/rmpage
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/rmpage
Initial commit
Diffstat (limited to 'macros/latex/contrib/rmpage')
-rw-r--r--macros/latex/contrib/rmpage/README34
-rw-r--r--macros/latex/contrib/rmpage/rmpage-doc.pdfbin0 -> 487208 bytes
-rw-r--r--macros/latex/contrib/rmpage/rmpage-doc.tex4
-rw-r--r--macros/latex/contrib/rmpage/rmpage.sty5581
-rw-r--r--macros/latex/contrib/rmpage/rmpage.tex5528
-rw-r--r--macros/latex/contrib/rmpage/rmpgen.cfg1406
-rw-r--r--macros/latex/contrib/rmpage/rmplocal.gfc1407
7 files changed, 13960 insertions, 0 deletions
diff --git a/macros/latex/contrib/rmpage/README b/macros/latex/contrib/rmpage/README
new file mode 100644
index 0000000000..7e002ac1d6
--- /dev/null
+++ b/macros/latex/contrib/rmpage/README
@@ -0,0 +1,34 @@
+The rmpage package has five files:
+
+rmpage.tex LaTeXable documenation
+rmpage.sty The package file
+rmplocal.gfc A configuration file
+rmpgen.cfg A configuration file
+readme This file
+
+The documentation's a bit of a mess - you can expect lots of overfull and
+underfull \hboxes when you LaTeX it. You might want to change the paper
+size if you don't use A4.
+
+rmplocal.gfc is configuration file with fewer options than rmpgen.cfg -
+it's much faster. See rmpage.tex for more details.
+
+And what's rmpage for?
+
+The rmpage package lets you change page layout parameters in small
+steps over a range of values using options. It can set \textwidth
+appropriately for the main fount, and ensure that the text fits inside
+the printable area of a printer.
+
+An rmpage-formatted document can be typeset identically without
+rmpage after a single cut and paste operation. Local configuration
+can set defaults: for all documents; or by class, by printer, and by
+paper size.
+
+The geometry package is better if you want to set layout parameters to
+particular measurements.
+
+
+Rowland McDonnell
+10/10/97
+rebecca@astrid.u-net.com \ No newline at end of file
diff --git a/macros/latex/contrib/rmpage/rmpage-doc.pdf b/macros/latex/contrib/rmpage/rmpage-doc.pdf
new file mode 100644
index 0000000000..c2b8f57e81
--- /dev/null
+++ b/macros/latex/contrib/rmpage/rmpage-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/rmpage/rmpage-doc.tex b/macros/latex/contrib/rmpage/rmpage-doc.tex
new file mode 100644
index 0000000000..0944e78764
--- /dev/null
+++ b/macros/latex/contrib/rmpage/rmpage-doc.tex
@@ -0,0 +1,4 @@
+\makeatletter
+\newcommand*{\bs}{\expandafter\@gobble\string\\}
+\makeatother
+\input{rmpage.tex}
diff --git a/macros/latex/contrib/rmpage/rmpage.sty b/macros/latex/contrib/rmpage/rmpage.sty
new file mode 100644
index 0000000000..559735f71b
--- /dev/null
+++ b/macros/latex/contrib/rmpage/rmpage.sty
@@ -0,0 +1,5581 @@
+%% rmpage.sty 29/8/96
+%% rmpagenew.sty 27/8/95
+%% LaTeX2e package file to define printing area parameters
+%%
+%% Copyright 1995, 1996, 1997 R.J.M. McDonnell
+%% email: rebecca@astrid.u-net.com
+%
+% This work is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% any later version.
+%
+% This work is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this work; if not, write to the Free Software
+% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%
+%
+% This version of rmpage was developed from Rowland's original rmpage
+% (er, this makes sense if you know what's happened), which was his
+% first ever LaTeX2e package. The original rmpage dealt with the
+% standard LaTeX classes' insistance on assuming that you had headers,
+% made the inside margin the large one, aand let you select different
+% text heights and widths, just like his old rma4 series of style
+% files.
+%
+% A fragment of code --- not more than a dozen lines --- from
+% classes.dtx was used in the original rmpage. I assume it's still here
+% somewhere, so part of this file is probably:
+%
+% Copyright 1994 the LaTeX3 project and the individual authors.
+% All rights reserved. For further copyright information see the file
+% legal.txt, and any other copyright indicated in this file.
+%
+% Quite what I'm suppose to do about this I don't know: if anyone
+% thinks my use of LaTeX3 project code needs to be dealt with more
+% formally, please let me know.
+%%
+%%
+%% \section{Some notes to me}
+%%
+% And replace
+% occurrences of pt with \p@, 0pt with \z@; define \mm@ to be 1mm,
+% \in@ to be 1in---use them likewise; and use \m@ne to replace
+% occurrences of -1 or -?
+% 1 2 3 4 5 6 7 8
+% 12345678901234567890123456789012345678901234567890123456789012345678901234567890
+% Package rmpage Warning:
+% ! Package rmpage Error:
+%
+% Error text starts at column 25; there's another 56 characters to go
+% to the end of the line. First argument to each needs to full stop;
+% second argument to Error does, and starts at column 1.
+%
+% ABBREVIATIONS THAT MIGHT BE USED IN DEFINITIONS:
+%
+% clear = clearance
+% ptr = printer
+% sep = separation
+% col = column
+% par = paragraph
+% opt = option
+% land = landscape
+% port = portrait
+% min = minimum
+% l = left
+% r = right
+% t = top
+% b = bottom
+%
+%%
+%%
+%% \section{File identification}
+%%
+\NeedsTeXFormat{LaTeX2e}[1996/09/29]
+\ProvidesPackage{rmpage}
+ [1997/09/29 v0.92veryx sets printing size and
+ position etc. to suit me]
+% 1997/09/29 v0.92 Added an error message; removed a redundant error
+% message; added \RM@classtype 19 to use when the classtype is
+% unrecognized - new class type `Unknown', more-or-less. This
+% appears to work. The standard class width-setting stuff now
+% produces an error message if \@ptsize is outside the standard
+% range. I've added some bits to trap illegal values of
+% \RM@ptsizegroup. It's probably a good idea to add some code to
+% trap illegal values of other things as well.
+% 1996/11/26 v0.91 Added \RMheadheight stuff so you can define custom
+% multi-line headers with fancyhdr and have rmpage calculate
+% vertical page paramters sensibly. Don't know what to do about
+% footers yet---a bit of a problem...
+% Goes with rmplocal-v0.36.cfg
+% 1996/11/09 v0.90 Added some notes about new typesetting parameters
+% for fontinst founts.
+% Goes with rmplocal-v0.36.cfg
+% 1996/11/01 v0.89.2 Moved \baselineskip report
+% Goes with rmplocal-v0.35.cfg
+% 1996/10/31 v0.89.1 Changed a comment.
+% Goes with rmplocal-v0.34.cfg
+% 1996/10/31 v0.89 Added \baselineskip and \RM@ifbeton to reports at
+% end. Doesn't complain if you load beton with
+% standard-baselineskips and tell rmpage about it. And added a
+% check on the beton command rmpage uses. Moved re-setting of
+% \baselineskip to after reporting so \baselineskip is reported
+% correctly.
+% Goes with rmplocal-v0.33.cfg
+% 1996/10/28 v0.88 Binned a rubbish hook (grammar? who he?); added
+% \RM@executehook command. Added
+% \RM@AfterInitialTextwidthSetting hook. Stopped
+% \RM@textwidthgroup=4 producing an error message.
+% Goes with rmplocal-v0.32.cfg
+% 1996/10/28 v0.87 Changed a message; fixed slides ptperchar setting.
+% Changed width-setting code quite a lot to support foils class:
+% introduced \RM@textwidthgroup and \RM@ptsizegroup. Need more
+% hooks. All a bit iffy so far---needs tidying.
+% Goes with rmplocal-v0.31.cfg
+% 1996/10/27 v0.86.1 No changes; this version created purely to check
+% up on saveall.
+% Goes with rmplocal-v0.30.cfg
+% 1996/10/27 v0.86 Included rmpwnorm.pko in rmpage; retired
+% rmpwnorm. Corrected slides legibility check. Rationalized
+% comments a little. Put rmpwnorm defs at the top of rmpage and
+% \let\@undefs at end. Saved about 0.5s out of 16s execution
+% time.
+% Goes with rmplocal-v0.30.cfg
+% 1996/10/25 v0.85 Changed some comments and added \RM@typeclasstype
+% command, used in changed \RM@OnClassType. Changed width setting
+% code; now call rmpwnorm for all classes. rmpwslid.pko hsa been
+% retired, and the slides-specific stuff included in rmpwnorm.pko.
+% Goes with rmpwnorm-v0.60.pko and rmplocal-v0.30.cfg
+% 1996/10/25 v0.84.2 Minor reporting change.
+% Goes with rmpwnorm-v0.59.pko, rmpwslid-v0.7.pko, and
+% rmplocal-v0.29.cfg
+% 1996/10/25 v0.84.1 Minor reporting change.
+% Goes with rmpwnorm-v0.59.pko, rmpwslid-v0.7.pko, and
+% rmplocal-v0.29.cfg
+% 1996/10/21 v0.84 Started using rmpwslid again; changed some
+% comments; added \RM@percent command; changed reporting a bit
+% Goes with rmpwnorm-v0.58.pko, rmpwslid-v0.6.pko, and
+% rmplocal-v0.28.cfg
+% 1996/10/19 v0.83 added \RM@SetLengthAtLeast and \RM@DefLengthAtLeast
+% to set parameters to at least the required values. This is for
+% the ringbinding option (in the config file).
+% Goes with rmpwnorm-v0.57.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.26.cfg
+% 1996/10/17 v0.82 added sixth looseness option; similar to sloppy so
+% you get a sensible looseness if you've asked for twocolumn
+% typesetting and a psfount.
+% Goes with rmpwnorm-v0.57.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.25.cfg
+% 1996/10/15 v0.81.2 changed some comments
+% Goes with rmpwnorm-v0.57.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.24.cfg
+% 1996/10/02 v0.81.1 Corrected a name (argh).
+% Goes with rmpwnorm-v0.57.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.20.cfg
+% 1996/10/01 v0.81 Fiddled about so that loadconcrete loads the beton
+% package and executes the beton option. More CheckCommands and
+% changed the \RM@OnPrinterType command so it won't let you
+% configure printer types<10.
+% Goes with rmpwnorm-v0.56.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.20.cfg
+% 1996/09/30 v0.80.2 Added ref to beton version supported.
+% 1996/09/30 v0.80.1 Changed refs to c6/7 to c7/6; removed wandering
+% \RM@tval.
+% Goes with rmpwnorm-v0.56.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.19.1.cfg
+% 1996/09/29 v0.80 Changed initial definition of
+% \RM@[min|max]text[width|height] and
+% \RM@min[top|bottom|inside|outside]margins to \providecommand so
+% they can be set in a document. Added code to ensure than
+% \RM@maxtextheight is set to no more than the space allowed for
+% \textheight---doesn't make much practical difference at the
+% moment, but it is more elegant. Fixed a few messsages; is there
+% no end to them? Bunged in an \ExecuteOptions statement just
+% after the letterpaper option to select US letter paper by
+% default; doing it like that means you can over-ride it anywhere,
+% but I'm not likely to delete it by mistake. normalbase stuff
+% replaces smallbase stuff
+% Goes with rmpwnorm-v0.55.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.19.cfg
+% 1996/09/28 v0.79 Changed defaults of \RM@headers and \RM@stdmargins
+% to true
+% 1996/09/27 v0.78 Changed wideish option to widish; changed ref to
+% luccasua to lucasual.
+% Goes with rmpwnorm-v0.54.1.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.17.cfg
+% 1996/09/26 v0.77 Changed \RM@ClassExecuteOptions to
+% \RM@OnClassExecuteOptions
+% 1996/09/26 v0.76 Changed lucida-casual stuff to use new packages.
+% Goes with rmpwnorm-v0.54.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.15.cfg
+% 1996/09/25 v0.75 Changed some error messages so they'll fit on an 80
+% column terminal
+% Goes with rmpwnorm-v0.52.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.15.cfg
+% 1996/09/24 v0.74 Put some printer/paper settings in the
+% \RM@PrinterPaperSettings hook in the config file. Changed the
+% initial value of \RM@nicedate to false. And checked
+% \@settopoint, which is used in rmpwnorm.pko
+% Goes with rmpwnorm-v0.50.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.15.cfg
+% 1996/09/23 v0.73 Changed \textheight setting code to deal with
+% \RM@[min|max]textheight differently; the new code should ensure
+% that the [min|max]textheight limits can't cause printing outside
+% the available printing area. Fully testing the code is hurting
+% my head. Corrected final setting of \RM@totalheadclearance and
+% changed the comments there so they're right. Changed some
+% messages to give less poor line breaks.
+% Goes with rmpwnorm-v0.49.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.14.cfg
+% 1996/09/22 v0.72 Corrected \RM@scalebyoption; two of the factors
+% had got themselves transposed by the intervention of a
+% gremlin. Oops. Shifted some options about into more sensible
+% groups. Added the letter4paper option to the paper size
+% documentation.
+% Goes with rmpwnorm-v0.49.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.13.cfg
+% 1996/09/18 v0.71.2 Changed `can't find config file' warning to
+% match new names; removed rmpall.cfg from list of config files
+% looked for by default. Somewhat untested; be wary of these
+% changes!
+% Goes with rmpwnorm-v0.48.1.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.12.1.cfg
+% 1996/09/16 v0.71.1 Saved because SaveAll appears to be behaving
+% very weirdly.
+% Goes with rmpwnorm-v0.48.1.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.12.cfg
+% 1996/09/16 v0.71 Put the fulllength and stdlength options into the
+% config file because they need to be executed after the
+% touchlength options. Changed some comments.
+% Goes with rmpwnorm-v0.48.1.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.12.cfg
+% 1996/09/15 v0.70 (boo) changed end of package reporting so you can
+% cut and paste parameters straight into a LaTeX doc. Needed to
+% change \RM@tval and \RM@ttval too. Shuffled a few code blocks
+% around at the end of the package.
+% 1996/09/13 v0.69 Replaced \newcommands with \defs (expect where I
+% need optional arguments). Saved 3\% time; oh well. Got rid of
+% \tight...\loosest commands---I've never used them and they're
+% redundant anyway. Isn't this the best version number since 42?
+% 101's the next good one, I think. Tried replacing pt with \p@
+% and saved < 0.1s (<0.5\%), so left pt as pt.
+% Goes with rmpwnorm-v0.48.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.11.cfg
+% 1996/09/12 v0.68 Removed a redundant \let...\@undefined at end.
+% Changed parameter reporting code quite a lot. Got rid of
+% \RM@ocltype commands, probably.
+% Goes with rmpwnorm-v0.47.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.10.1.cfg
+% 1996/09/11 v0.67 Much hacking out of \RM@ocl statements. Added
+% \RM@infotheval command. Changed loosesetting commands,
+% including \GenericError.
+% Goes with rmpwnorm-v0.46.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.10.1.cfg
+% 1996/09/11 v0.66 I mourn the death of rat-setwidth-norm,
+% rat-setwidth-slides, and rmpagelocal.cfg. Bill Gates killed
+% them, and I weep for their passing. They've been replaced by
+% rmpwnorm.pko, rmpwslid.pko, and rmplocal.cfg; horribly
+% utilitarian names, but needs must when the devil Gates drives.
+% Used the \RM@notinexecuteoptions command to prevent one executing
+% an option that advances a counter (these should always be done in
+% the right order, passed to the package normally). Created some
+% new printer types, and moved a lot of option declarations into
+% the config file. Added \RM@SetClassType command and
+% \RM@ClassExecuteOptions commands. Corrected a hook executor.
+% \@undefined some more commands. Author dies horribly and goes
+% to bed.
+% Goes with rmpwnorm-v0.45.pko, rmpwslid-v0.5.pko, and
+% rmplocal-v0.10.cfg
+% 1996/09/10 v0.65 Changed comments somewhat; got rid of plenty of
+% double %% lines.
+% Goes with rat-setwidth-norm-v0.43, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.9
+% 1996/09/10 v0.64 Fiddled with a few bits; not much done.
+% Goes with rat-setwidth-norm-v0.43, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.8
+% 1996/09/09 v0.63 Changed class detection code and class type
+% numbers; scrapped earlyclassdetect error checking and stuff like
+% that; rmpage.tex got some scribbles, and it really does make
+% sense, honest.
+% Goes with rat-setwidth-norm-v0.43, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.7
+% 1996/09/05 v0.62 dropped \RM@oncolumn flag; replaced with
+% \RM@texcols counter; replaced old text column options with
+% onecolumn(width), twocolumn(width), threecolumnwidth, and
+% fourcolumnwidth. Added a new command and options to select
+% setting textwidth by:
+% (char+paper, char only, paper only) based width setting.
+% Added settings for DW520 printer to handle long A3 sizes printed
+% on A4 paper. Moved \if@compatibility check. Much tidying.
+% \RM@OnPaperSize commands now recognize [-1] as the long paper
+% size, meaning `all long paper sizes and not long'. Added small
+% and large basemaxmparwidth options to go with small and large
+% basemparclear which have been here a while.
+% Goes with rat-setwidth-norm-v0.42, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.6
+% 1996/09/04 v0.61 changed marginal paragraph clearance setting;
+% it's set by an initial option, then scaled by option. A little
+% checking of the initial value is done. stdmargins and
+% notstdmargins no longer do anything at all with the position of
+% marginal notes; reversemargins/normalsmargins are up to you
+% now. Added concrete fount to recognized founts, and tidied
+% that code up a bit, removing some redundant options. Removed
+% 10, 11, and 12pt options because they do nought. Removed call
+% to 12pt option in ljmueepexam settings bit. Added code to
+% ensure that \textheight stays within the bounds set by min and
+% max textheight. And it works. Changed printer options:
+% dw520spec is now dw520; dw520 is now dw520-ours.
+% Goes with rat-setwidth-norm-v0.41, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.6
+% 1996/09/03 v0.60 changed altitude options so it's now done as a
+% fraction of 24, and touchaltitude increments interpolate
+% between the main option heights (well, I know what I mean).
+% Fixed ltxdoc stuff; fixed \RM@OnPaperType etc. Came up with
+% new way of handling jacking up; there's now a jackup flag to
+% allow/disallow jacking up---it should be set on a
+% printer/papersize/etc basis by printersettings code.
+% Scrapped all the old jackup stuff. Improved hook handling with
+% \@ifundefined. Major re-work of \textheight setting: touch
+% options interpolate properly; added stdlength option. Er,
+% temporarily stopped using rat-setwidth-slides for slide width
+% setting, and used rat-setwidth-norm instead. Change this
+% again when rsw-norm is stable and can be used as the basis for
+% slides width setting. Added some \CheckCommands to do some
+% checking of the LaTeX commands I use. Added US paper sizes to
+% the option declarations. And stuff; much fiddling.
+% Goes with rat-setwidth-norm-v0.40, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.5
+% 1996/09/02 v0.59.1 corrected leastoffset (oops)
+% 1996/09/02 v0.59 changed lots more stuff, mainly in the
+% corresponding version of rat-setwidth-norm. Removed touch
+% counters for width and offset setting; put ltxdoc class setting
+% code in the config file. Added \RM@[min|max]textwidth
+% parameters; set only for ltxdoc class for now; some checking
+% done to ensure they're not set too daftly. Hacked out some
+% obsolete code.
+% Goes with rat-setwidth-norm-v0.40, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.4
+% 1996/08/29 v0.58 changed name to rmpage.sty and added \RM@scalebyoption
+% and \RM@sc@leby@ption. Replaced \PackageErrors with \RM@Error.
+% Changed \headsep, \footskip, \mparsep, and \columnsep setting code to
+% use \RM@scalebyoption. Adaptivecolumnsep code (in
+% rat-setwidth-norm) now gives a larger columnsep. Replaced
+% occurrrences of rmpagenew with rmpage.
+% Goes with rat-setwidth-norm-v0.38, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.3
+% 1996/08/29 v0.57veryx; added five hooks: \RM@BeforeProcessOptions,
+% \RM@AfterProcessOptions, \RM@PrinterPaperSettings,
+% \RM@BeforeWidthSetting, and \RM@AfterWidthSetting. Changed
+% \ProcessOptions* back to \ProcessOptions. Changed class
+% identification code to use \RM@OnClassType; changed width-setting
+% file choice to use \RM@OnClassType
+% Goes with rat-setwidth-norm-v0.37, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.3
+% 1996/08/28 v0.56.1veryx; added no10envelopepaper.
+% Goes with rat-setwidth-norm-v0.37, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.3
+% 1996/08/25 v0.56veryx; erm, got 7/8longpaper right; changed paper
+% size codes and added more paper sizes. Changed classtouch
+% options into t@uch options; saved about 0.25s! Changed options
+% with marginpar in the name to options with mpar in the name;
+% saved about 0.1s. Changed options with columnsep in the name
+% to options with colsep in the name; saved about 0.1s. Saved
+% 0.45s this way. rmpagenew seems to add about 13.1s to a LaTeX
+% run. Eek!
+% Goes with rat-setwidth-norm-v0.37, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.3
+% 1996/08/24 v0.55veryx; added \RM@Warn and \RM@Error as synonyms
+% for \PackageError{rmpagenew} etc., added longpaper support, and
+% changed the code that specifies the printer printing area so
+% you don't have to know about all paper sizes. Removed `sensible
+% paper' check, because a paper size can be specified in the .cfg
+% file. Changed the .cfg file searching code to support multiple
+% .cfg files (not fully tested).
+% Goes with rat-setwidth-norm-v0.36, rat-setwidth-slides-v0.4,
+% and rmpagelocal.cfg v0.2
+% 1996/08/23 v0.54veryx; added \RM@PrinterPaperSettings hook and
+% started using the rmpagenew.cfg config file; eventually, I'll
+% have sensible paper size and local printer support. Added some
+% useful commands for setting printer and paper settings, and removed
+% some of the options from the \ExecuteOptions list (which is now in
+% the .cfg file).
+% Goes with rat-setwidth-norm-v0.35, rat-setwidth-slides-v0.4,
+% and rmpagenew.cfg v0.1
+% 1996/08/21 v0.53.1veryx; changed some of the loose typesetting
+% parameters because they weren't very nice; corrected B paper
+% sizes, and confirmed A sizes against BS4000; checked some
+% envelope sizes against BS4264.
+% 1996/08/09 v0.53veryx; added dw600 printer option based on
+% measuring Rebecca's printer's printing area.
+% 1996/08/01 v0.52veryx; added beton option to change \baselineskip
+% before beton does so that \textheight is set correctly. Lots of
+% jiggery-pokery so that \normalsize is selected while vertical
+% stuff is being worked on (but only if beton's been loaded), and
+% so that the size and baselineskip of the fount that was selected
+% on entering the package is selected after vertical stuff has been
+% worked on. Goes with rat-setwidth-norm-v0.34.pko and
+% rat-setwidth-slides-v0.4.pko
+% 1996/07/21 v0.51.4veryx; trivial comment changes etc. Goes with
+% rat-setwidth-norm-v0.33.pko and rat-setwidth-slides-v0.4.pko.
+% 1996/07/12 v0.51.3veryx; changed a \PackageWarning into an
+% \oclwarninfo. Goes with rat-setwidth-norm-v0.32.pko and
+% rat-setwidth-slides-v0.4.pko
+% 1996/07/10 v0.51.2veryx; some small documentation changes. Goes
+% with rat-setwidth-norm-v0.32.pko and
+% rat-setwidth-slides-v0.4.pko
+% 1996/06/30 v0.51.1 veryx; as below but this one works. Goes with
+% rat-setwidth-norm-v0.30.pko
+% 1996/06/30 v0.51 veryx; changed email address and fixed
+% touchmoremarginparsep (and tmfootskip and tmheadsep. Foolish
+% child.) bug. And added notstdmargins option which also says
+% \reversemarginpar (\reversemarginpar is executed anyway just
+% after the \RM@stdmargins flag is defined); \normalmarginpar
+% added to stdmargins option to balance things up.
+% 1996/06/14 v0.50 veryx; changed \RM@onchatlevel to \RM@ocl;
+% used some of the new \RM@ocl commands (added an ocl command or
+% two); changed \ifs into \ifRM@s, and \let the \if, true, and
+% false declarations to \@empty at end; added \ifRM@infowarned flag
+% and message at end so user knows if a warning has been logged;
+% adaptivecolumnsep flag is now RM@adaptivecolsep. Goes with
+% rat-setwidth-norm v0.30
+% 1996/06/07 v0.49.2veryx; added a couple of \s where they will do
+% most good.
+% 1996/05/24 v0.49.1veryx; stuff done with \RM@ocl commands; not
+% finished
+% 1996/05/16 v0.49veryx; \@total[head|foot|headfoot]clearance
+% lengths changed to \RM@... lengths; \@ifnotearlyerror command
+% renamed \RM@ifnotearly error; goes with rsw.sty v0.29
+% 1996/05/12 v0.48veryx; \RM@mparclearfrac used to retire
+% \@minmparclearance; [least...most]mparclearfrac options added;
+% \@maxmparwidth length replaced with \RM@maxmparwidth command
+% both \@emptied at end; [least...most]maxmparwidth options
+% added; goes with rat-setwidth-norm v0.28
+% 1996/05/06 v0.47veryx; goes with rat-setwidth-norm v0.27. Changed
+% \@min[left|right|foot|head]clearance lengths to
+% \RM@min[left|right|head|foot]clearance commands; changed a couple of
+% ifnums to ifdims like they should be; minor message changes
+% (probably); \@emptied the new commands at end; \@emptied
+% \RM@oclwarninfo at end.
+% 1996/05/05 v0.46veryx; added the \@RMoclwarninfo command;
+% \def->\newcommand for a couple of commands;
+% \@min[outside|inside|top|bottom]margin lengths changed to commands
+% beginning with \RM@ and \@emptied at end; goes with rsw-norm v0.26
+% 1996/04/29 v0.45.1 added \let\XXX\@empty stuff for jackup commands.
+% 1996/04/24 v0.45 changed dw520printer minclearances so they match the
+% printer, not the specs. Added dw520printerspec option with
+% minclearances according to spec; changed \@[p|l]jackuplong[er|est]
+% to \RM@[ditto]; changed \@jackup to command and \let it to
+% \RM@[p|l]jackuplong[er|est] at the appropriate points; goes with
+% rsw-norm v0.25
+% 1996/04/20 v0.44veryx; added fulllength and fullwidth options;
+% replaced \@ptr[l|r|t|b][port|land]clear lengths with
+% \RM@ptr[l|r|t|b][port|land]clear commands; goes with
+% rat-setwidth-norm-v0.25
+% 1996/04/12 v0.43veryx; added support for rmsizeN packages; I'm not sure
+% they are a good thing to let loose on the rest of the world.
+% Changed \@minmparclearance to 8mm from 0.4in
+% 1996/04/11 v0.42veryx; \@looseoption counter now \RM@looseoption
+% command; \@classtype counter now \RM@classtype command; \@fountfamily
+% counter now \RM@fountfamily command; \@chatlevel now \RM@chatlevel;
+% \@lengthoption counter now \RM@lengthoption command; \@widthoption
+% counter now \RM@widthoption command; \@offsetoption counter now
+% \RM@offsetoption command; \@printerype counter now \RM@printertype
+% command; \@papertype counter now \RM@papertype command;
+% \@onchatlevel command now \RM@onchatlevel command. All these
+% commands \let to \@empty at the end. \@headfootbalance renamed
+% \RM@headfootbalance; \@touchlength renamed \RM@touchlength;
+% \@touchaltitude renamed \RM@touchaltitude; \@touchoffset renamed
+% \RM@touchoffset; \@touchwidth renamed \RM@touchwidth
+% 1996/04/05 v0.41veryx; changed some \defs (ish). \looseness changed to
+% \sloppiness; it seems that \looseness is defined by the TeX kernel (oops).
+% Some commands now defined by \newcommand ... \def. Maybe do
+% something about this later. Started changing counts into defs
+% (where possible) to free memory at the end with \let\XXX-\@empty.
+% Find out where I got this idea from and see if it works. Commented
+% out quite a few paper sizes for speed's sake
+% 1996/03/29 v0.40veryx; added ...columnsep, ...headsep, ...footskip,
+% ...marginparsep options; fixed marginparwidth setting
+% 1996/03/16 v0.39veryx; \normalmarginpar and \mparswitchtrue
+% (\if@twoside) now set in conventional place if \@classtype=9 (ltxdoc).
+% 1996/03/14 v0.38veryx; added adaptivecolumnsep option
+% 1996/03/12 v0.37veryx; added touch... counters and classtouch options
+% so you can always get a touch option to have an effect. Removed the
+% notouch options; they were horrid and now redundant.
+% 1996/03/12 v0.36veryx; changed touch... switches so touchsmaller after
+% touchlarger results in no change and vice-versa. Handy if you have a
+% class or something that uses a touch... option.
+% 1996/03/12 v0.35veryx; recognises ljmueepexam class, and sets default
+% options; \@earlyclassdetect flag checks that the
+% \@ifclassloaded command is still working; added notouch... options
+% to cancel any of the touchXXX option pairs
+% 1996/03/11 v0.34veryx; changed longest setting parameters slightly so
+% dw520 is happier
+% 1996/03/10 v0.33veryx; removed the (unused!) oldlength option; changed
+% some comments; now reports text/paper height.
+% 1996/03/09 v0.32veryx; added the thisfountwidth and loadthisfount
+% options; removed \let..\@empty; fiddled with some messages.
+% 1996/03/08 v0.31veryx; midoffset->normaloffset; removed some redundant
+% \relaxes; fixed calls to rat-setwidth-[norm/slides].pko; made failed
+% loadfount more friendly; one \let...\@empty at end (add more to clear
+% memory)
+% 1996/03/07 v0.30veryx; added all A, B, and C series paper sizes.
+% 1996/03/06 v0.29veryx; added ltxguide class; fixed textheight definition
+% based on classtype and made it more robust.
+% 1996/03/05 v0.28veryx; low options corrected
+% 1996/03/04 v0.27veryx; added touchmoreoffset/touchlessoffset options and
+% flags. Added old British book sizes as paper sizes. [more/less]offset
+% and touch[more/less]offset options seem to work.
+% 1996/03/03 v0.26veryx; removed \if@rmcv, @ltxdoc, and @rmletter flags. Rely on
+% references to \@classtype from now on. Added halfinchmargins option.
+% Added more papersizes. Added touchhigher and touchlower options.
+% Started to do things to support variable offsets; \@offsetoption counter
+% defined, as well as more/less offset options.
+% 1996/02/29 v0.25veryx; loadfount now sets \@looseoption=4 unless a looseness
+% setting option has been specified
+% 1996/02/28 v0.24veryx; corrected default value of \@lengthoption
+% 1996/02/27 v0.23veryx; added portrait/landscape forcing---needed because of
+% the paper size definitions
+% 1996/02/25 v0.22veryx; added \@min[inside,outside,top,bottom]emargins;
+% added maxmparwidth + minmparclearance; changed fountfamily
+% options to fountwidth; changed class recognition code and add\@rd bithesis
+% to recognition list; added c4 papertype; added altitude options
+% 1996/02/20 v0.21veryx; added the load[fount] options
+% 1996/02/18 v0.20veryx; ltxdoc switch added; nicedate fixed
+% 1996/02/17 v0.19veryx; paper size flags no longer used (but \@sensiblepaper
+% is still used). More sensible code for setting and checking head and
+% foot clearances. \@jackup[l][p]long[er][est] now used to set \@jackup;
+% \@jackup can be set differently for every printer/size/orientation
+% combination.
+% 1996/02/16 v0.18veryx; more fount families declared; began to rationalize
+% paper size handling. Check length settings!
+% 1996/02/15 v0.17veryx; minclearances now set by printer options
+% 1996/02/14 V0.16veryx; minclearances now set better.
+% 1996/02/13 v0.15veryx; multicolumn option added; setwidth-norm changed;
+% fount family options declared (not that they're used yet.
+% 1996/01/28 v0.14veryx; shorter and shortest options added
+% 1996/01/17 v0.13veryx; shortish option added
+% 1996/01/08 v0.12veryx; printer's happier still---minfootclearance->15mm
+% 1995/12/18 v0.11veryx; dunno what I did; changed setwidth-norm at the same time
+% 1995/12/10 v0.10veryx; printer's happier---minfootclearance->19mm
+% 1995/12/03 v0.9veryx; argh! changed minfootclearance->20mm; Printer probs.
+% 1995/11/05 v0.8veryx: notonecolumn option added; saves attempting to
+% detect all the ways of asking for multicolumn printing.
+% 1995/11/05 v0.7veryx: oneinchmargins added; \@toowide replaced by
+% \@setbymargins; \@minleft/right clearances now exist and know about
+% portrait/landscape printing (as do \@minfoot/head clearances).
+% 1995/11/01 v0.6veryx: portrait/landscape recognised.
+% 1995/10/22 v0.5veryx; nicedate now balanced by nastydate
+% 1995/08/29 v0.4veryx; can't remember
+%
+%
+%%
+%%
+%% \subsection{Changes to rmpwnorm.pko, now included in rmpage.sty}
+%%
+% 1996/10/25 v0.60 Included the changes needed to set horizontal
+% parameters for the slides class; this is to make rmpwslid.pko
+% obsolete. I wonder if it's worked yet? Changed | to / as the
+% OR delimiter in some typeouts because ltxguide re-defines |
+% with shortvrb
+% Goes with rmpage-v0.85.sty
+% 1996/10/25 v0.59.1 Changed name in \ProvidesFile (eek)
+% Goes with rmpage-v0.84.2.sty
+% 1996/10/25 v0.59 Changed some logged info
+% Goes with rmpage-v0.84.1.sty
+% 1996/10/21 v0.58 Changed the minimum textwidth warning limit.
+% Changed stuff to use rmpwslid.pko again
+% Goes with rmpage-v0.84.sty
+% 1996/10/02 v0.57 Fixed a couple of depressingly obvious width
+% setting bugs. How did they get this far? Was I mad? asleep?
+% somewhere else? when I checked it the first time?
+% Goes with rmpage-v0.81.1.sty
+% 1996/09/30 v0.56 Changed checking and handling of illegal
+% RM@fountfamily setting.
+% Goes with rmpage-v0.80.1.sty
+% 1996/09/29 v0.55 Added some checks to ensure that the various
+% printing limits don't ask for something impossible.
+% Goes with rmpage-v0.80.sty
+% 1996/09/27 v0.54.1 Changed comments so wideish appears as widish.
+% Goes with rmpage-v0.78.sty
+% 1996/09/26 v0.54 Changed lucida casual width to match the new
+% lucasual stuff.
+% Goes with rmpage-v0.76.sty
+% 1996/09/25 v0.53 Changed character-based width multipliers; very
+% strange, this is.
+% Goes with rmpage-v0.75.sty
+% 1996/09/25 v0.52 Changed handling of multiple columns so you get
+% stdwidth with stdwidth: removed columnsep from the reckoning for
+% stdwidth setting, and warned if you've asked for more than two
+% columns
+% Goes with rmpage-v0.75.sty
+% 1996/09/24 v0.51 Added a report of which textwidth has been used.
+% Removed some redundant comments, and added some new ones about
+% what to do in with future versions. Deleted some frighteningly
+% pointless code.
+% Goes with rmpage-v0.74.sty
+% 1996/09/23 v0.50 Did something else, but I can't remember what.
+% Probably. Never mind; save the version.
+% Goes with rmpage-v0.73.sty
+% 1996/09/22 v0.49 Changed the textwidth setting code, so that if you
+% ask for a paper-based textwidth (like oneinchmargins) and
+% characterwidthset, you get oneinchmargins and a warning.
+% Goes with rmpage-v0.72.sty
+% 1996/09/14 v0.48.1 minor doc change
+% Goes with rmpage-v0.71.2.sty
+% 1996/09/13 v0.48 Got rid of the one \newcommand. Saved a tiny bit
+% of time.
+% Goes with rmpage-v0.69.sty
+% 1996/09/12 v0.47 Played about with reporting a good deal. Remove
+% \RM@marginoffset length; it appears to be redundant.
+% Goes with rmpage-v0.68.sty
+% 1996/09/11 v0.46 Much hacking out of \RM@ocl statements
+% Goes with rmpage-v0.67.sty
+% 1996/09/11 v0.45 Urk. Corrected \RM@setbywidth code and added more
+% reporting; changed name to rmpnormw.pko from rat-setwidth-norm
+% (as it would be in a world free from Bill Gates's malign
+% influence). Apologies to people who might use the abbreviation
+% RMP in a different context.
+% Goes with rmpage-v0.66
+% 1996/09/10 v0.44 Turned %% lines into % lines.
+% Goes with rmpage-v0.65
+% 1996/09/09 v0.43 Added column width limit warning, and console
+% message about textwidth in terms of characters.
+% Goes with rmpage-v0.63
+% 1996/09/05 v0.42 Changed multiple-column handling, and added stuff
+% to support setting width by paper only, or by character size
+% only. Scrapped shrunk[p|c]width flags and surrounding code.
+% Goes with rmpage-v0.62
+% 1996/09/04 v0.41 marginal paragraph width setting changed:
+% maxmparwidth and mparclearance are both now setbyoption, with
+% initial values set as a fraction of paperwidth. Oh dear:
+% corrected columnsep error in width setting code (I must debug
+% things properly, foolish boy). Added Concrete founts to the
+% list of known founts: concrete is number 11, thisfountwidth is
+% done by number 12 now. Much tidying done.
+% Goes with rmpage-v0.61.sty
+% 1996/09/02 v0.40 Re-worked the initial \textwidth setting selection
+% code and the offsetting code. Added support for
+% \RM@[min|max]textwidth. Removed some obsolete code.
+% Goes with rmpage-v0.59.sty
+% 1996/08/30 v0.39 re-measured the character widths of the various
+% standard founts using larger sample and (mainly) the new 8r
+% installation. (cmr and hlcn the exceptions to this 8r business,
+% I think).
+% 1996/08/30 v0.38 changed width setting code to take notice of
+% \columnsep. Changed mparsep and columnsep setting to use
+% \RM@scalebyoption. Changed \PackageError{rmpagenew} into
+% \RM@Error. Changed occurrances of rmpagenew into rmpage.
+% Changed columnsep given by adaptivecolsep (it's a bit larger
+% now).
+% Goes with rmpage.sty v0.58
+% 1996/08/25 v0.37 changed the name of marginparsepoption to
+% mparsepoption, to go along with rmpagenew.
+% Goes with rmpagenew.sty v0.56
+% 1996/08/24 v0.36; debugged some stuff (too tired to remember what
+% was wrong); I think that's it.
+% Goes with rmpagenew.sty v0.55.
+% 1996/08/23 v0.35 veryx; Changed the \textwidth settting code to
+% preserve the \RM@offsetfrac relationship between right-hand and
+% left-hand margins. It appears to work, but I haven't tested it
+% exhaustively yet. Oh, and the \RM@offsetfrac relationship isn't
+% maintained if you've asked for fullwidth. I'm not sure that
+% this is the right decision, but I suspect so. Goes with
+% rmpagenew v0.53.1
+% 1996/07/28 v0.34 veryx; changed setwidth setting so that wider,
+% widest, oneinchmargins, halfinchmargins, and full width all use
+% the standard width setting code (eek). Goes with rmpagenew v0.51.4.
+% 1996/07/21 v0.33 veryx; corrected stdwidth setting (was ten times
+% too small). Goes with rmpagenew v0.51.4.
+% 1996/07/08 v0.32 veryx; changed \@marginoffset length to
+% \RM@marginoffset; goes with rmpagenew v0.51.1
+% 1996/06/30 v0.31 veryx; fixed marginparwidth setting bug. Goes
+% with rmpagenew-v0.51.1.sty (v0.51 is faulty, as are all previous
+% versions of rat-setwidth-norm. And what makes you think I've
+% found all the bugs *now*, eh?)
+% 1996/06/16 v0.30.1 veryx; changed remaining \PackageWarnings into
+% \RM@oclwarninfos. Goes with rmpagenew v0.50.
+% 1996/06/14 v0.30 veryx; removed oldwidth support; changed \ifs to
+% \ifRM@s; \RM@ptperchar+\RM@offsetfrac both \let to \@empty at
+% end; new \RM@ocl commands used to tidy up the code that reports
+% stuff to the user; goes with rmpagenew v0.50
+% 1996/05/24 v0.29.1veryx; changed \@ptperchar, \@offsetfrac, and
+% \@setptperchar to \RM@ names and \let \RM@setptperchar\@empty at end.
+% 1996/05/16 v0.29veryx; changed \@rmdaftmargins length to
+% \RM@daftmargins length; goes with rmpagenew v0.49
+% 1996/05/12 v0.28veryx; goes with rmpagenew v0.48; \@minmparclearance
+% retired, and \RM@mparclearfrac used instead; \@maxmparwidth
+% length replaced with \RM@maxmparwidth command.
+% 1996/05/06 v0.27veryx; goes with rmpagenew v0.47;
+% \@min[left|right]clearance lengths now \RM@min[left|right]clearance
+% commands; minor message changes.
+% 1996/05/05 v0.26veryx; goes with rmpagenew v0.46; \@min[in|out]sidemargin
+% lengths changed to \RM@[...] commands.
+% 1996/04/24 v0.25.1veryx; changed a messge so it fits on the line better
+% 1996/04/20 v0.25veryx; added fullwidth option; changed increase esm
+% code so the warning makes sense; goes with rmpagenew-v0.44
+% 1996/04/12 v0.24veryx; added some more \typeouts.
+% 1996/04/11 v0.23veryx; some counters are now commands with changed names
+% (\RM@XXX rather than \@XXX); see changes comments for rmpagenew-v0.42
+% for full details. Opposite \oddsidemargin now correctly calculated.
+% 1996/04/10 v0.22veryx; now deals with wide asking for wider \textwidth
+% than wider/est, and traps some possible bug conditions.
+% 1996/03/29 v0.21veryx; added ...columnsepoption/...marginparsepoption
+% support
+% 1996/03/14 v0.20veryx; added adaptivecolumnsep
+% 1996/03/12 v0.19veryx; \@touch[width/offset] counters supported (soon!)
+% 1996/03/12 v0.18veryx; added \@onchatlevel to control \typeouts
+% 1996/03/09 v0.17veryx; added code to support thisfountwidth; removed
+% \let...\@empty; fiddled with some messages
+% 1996/03/05 v0.16veryx; stdwidth now done properly
+% 1996/03/04 v0.15veryx; variable l/r offsets probably supported
+% 1996/03/03 v0.14veryx; replaced \if@ltxdoc with \ifnum\@classtype=9;
+% halfinchmargins now supported. Probably cleaned up something else.
+% Started to do things to support variable l/r offsets; \@offsetfrac counter
+% defined.
+% 1996/02/25 v0.13veryx; completely re-wrote most of the margin setting code.
+% 1996/02/25 v0.12veryx; added support for \@min[in,out]sidemargins; uses
+% \@maxmparwidth and \@minmparclearance set by rmpagenew.
+% 18/02/96 v0.11veryx; ltxdoc switch added; min \textwidth is 355pt if
+% typesetting with ltxdoc. 0.4in is min gap twixt marginal notes and edge of
+% paper.
+% 17/2/96 v0.10.1veryx; \marginparsep=0pt for wider+widest
+% 16/2/96 v0.10veryx; added courier and utopia fount family sizes
+% 16/2/96 v0.9veryx; different founts now set different \textwidths. stdwidth
+% option sets normalwidth \textwidth to standard values.
+% 15/2/96 v0.8.1veryx; began to take notice of different founts (and other stuff)
+% 14/2/96 v0.8veryx; wider and widest setting appears to work; stdmargins untested.
+% 13/2/96 v0.7veryx: narrowest and narrower options added, widths now set
+% to less arbitrary values; touchnarrower/wider works even
+% more (idiot)
+% 12/2/96 v0.6veryx: touchnarrower/wider now work again (fool)
+% 18/12/95 v0.5veryx: stdmargins works (ish); marginpar sizes set better, but untested
+% 5/11/95 v0.4veryx: maximum \textwidth based on papersize now sets
+% minimum margins as a fraction of \paperwidth; \RM@onecolumn flag recognized.
+% 5/11/95 v0.3veryx; \@toowide flag replaced by \RM@setbymargins and
+% oneinchmargins option added, set by (almost) the same code that does for
+% wider and widest. Fixed margin setting bug in my head. Wider and
+% widest now set margins proportional to paperwidth. Added *some* l/r margin
+% checking code.
+% 3/11/95 v0.2veryx: added more width options; used \@widthoption counter
+% for the first time.
+% 2/11/95 v0.1veryx rat-setwidth-norm.pko
+% Extracted from rmpagenew v0.5veryx on 2/11/95. See rmpagenew.sty for
+% copyright information.
+%%
+%%
+%% \subsection{End of rmpwnorm's changes history}
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+%%
+%%
+%% \section{Begin with definitions}
+%%
+%%
+%% \subsection{Miscellaneous definitions}
+%%
+% The golden ratio = (\sqrt{5} - 1) / 2 \approx 0.6180
+% 210/297 \approx 1/\sqrt{2} \approx 0.7071
+%
+% Define a command so I can print
+\catcode`\%=11\relax
+\def\RM@percentsign{%}
+\catcode`\%=14\relax
+%
+% \RM@ocl.: level = 1, 2, or 3. 1 is printed only with
+% garrulous option, 2 with garrulous and chatty, 3 with garrulous,
+% chatty, and taciturn. Nought is printed with t' yorkshire option
+% \@onlevel{1}{\typeout{Done it}}{}
+%
+% \RM@ocl{1}{}{}: include reports of option setting etc.; garrulous
+% \RM@ocl{2}{}{}: include most parameter values and report main
+% processing blocks; chatty
+% \RM@ocl{3}{}{}: final parameter values etc. only; taciturn
+% \RM@ocl{4}{}{}: always print even when yorkshire;
+%
+%
+% \RM@oclwarninfo{num}{text}; like \RM@ocl, but text is used in a
+% PackageWarning if num > chatlevel, or in a PackageInfo otherwise.
+\newif\ifRM@infowarned\RM@infowarnedfalse
+%
+
+\long\def\RM@ocl#1#2#3{\ifnum #1>\RM@chatlevel #2\else #3\fi}
+%
+\def\RM@ttval#1{\typeout{\space\space\space\protect#1\space= \the#1}}
+\def\RM@tval#1{\typeout{\space\space\space\protect#1\space= #1}}
+%
+\long\def\RM@oclwarninfo#1#2{\RM@ocl{#1}
+ {\PackageWarningNoLine{rmpage}{#2}}
+ {\PackageInfo{rmpage}{#2}\RM@infowarnedtrue}}
+%
+\def\RM@infotheval#1{\PackageInfo{rmpage}{\the#1\space= \protect#1}}
+%
+\def\RM@Error#1#2{\PackageError{rmpage}{#1}{#2}}
+\def\RM@Warn#1{\PackageWarning{rmpage}{#1}}
+%
+\if@compatibility
+ \RM@Error{rmpage won't work right in LaTeX 2.09 compatibility
+ mode}
+ {Either stop using the rmpage document style option, or
+ typeset your document\MessageBreak as a LaTeX2e document. You
+ can do this by using \protect\documentclass\space\MessageBreak
+ instead of \protect\documentstyle; style files like rmpage are
+ loaded by saying:\MessageBreak \protect\usepackage{rmpage}}
+ \fi% endif@compatibility
+%
+\CheckCommand{\@gobble}[1]{}
+\CheckCommand{\@gobbletwo}[2]{}
+\CheckCommand{\@gobblefour}[4]{}
+\CheckCommand{\@firstofone}[1]{#1}
+\CheckCommand{\@firstoftwo}[2]{#1}
+\CheckCommand{\@secondoftwo}[2]{#2}
+\CheckCommand*{\@settopoint}[1]{\divide#1\p@\multiply#1\p@}
+%
+\CheckCommand*{\@ifpackageloaded}{\@ifl@aded\@pkgextension}
+\CheckCommand*{\@ifclassloaded}{\@ifl@aded\@clsextension}
+%
+\CheckCommand*{\@ifpackagewith}{\@if@ptions\@pkgextension}
+%
+\CheckCommand*{\@ifundefined}[1]{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+
+%%
+%%
+%% \subsection{Initialize parameter variables}
+%%
+\def\RM@earlyclass{0}
+% Set to the class number if \@ifclassloaded has said `yes' to
+% anything before \ProcessOptions; produce an error if it hasn't when
+% it should've.
+%
+\newif\ifRM@loadfount\RM@loadfountfalse
+\newif\ifRM@nicedate\RM@nicedatefalse
+%
+\newif\ifRM@adaptivecolsep\RM@adaptivecolsepfalse
+%
+%
+% This flag is used to detect when the \DeclareOptions bit is over,
+% and is set true just before \ProcessOptions. So options which
+% should not be used in an \ExecuteOptions statement can be trapped
+% and warned about, using the \RM@notinexecuteoptions command in the
+% \DeclareOption statement.
+%
+\newif\ifRM@donewithoptions\RM@donewithoptionsfalse
+%
+\def\RM@notinexecuteoptions
+ {\ifRM@donewithoptions
+ \else
+ \RM@Error
+ {You shouldn't be using the \CurrentOption\space option in
+ \MessageBreak an \protect\ExecuteOptions\space statement}
+ {Try passing the \CurrentOption\space option to rmpage in
+ the conventional way}
+ \fi}
+%
+%
+% The following code is from article.cls
+%
+% % \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+% % \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
+% %
+% % \DeclareOption{onecolumn}{\@twocolumnfalse}
+% % \DeclareOption{twocolumn}{\@twocolumntrue}
+% end article.cls extract
+%
+% Stuff to keep track of the things they're named after\ldots
+%
+% centred text or not, twoside or not (and damn the standard flag),
+% the number of text columns, and portrait/landscape orientation.
+%
+%
+\newif\ifRM@centre \RM@centrefalse
+\newif\ifRM@twoside \RM@twosidefalse
+\def\RM@textcols{1}
+\newif\ifRM@portrait\RM@portraittrue% no std flag
+%
+% need this switch to figure out what to do with minimum printing
+% clearances if you're using ISO long sizes
+%
+\newif\ifRM@portlandinvert\RM@portlandinvertfalse
+%
+\newif\ifRM@headers \RM@headerstrue
+\newif\ifRM@footers \RM@footerstrue
+%
+\newif\ifRM@stdmargins\RM@stdmarginstrue
+%
+%
+% The 6 parameters below need to be counts.
+%
+\newcount\RM@headfootbalance\RM@headfootbalance=12
+%
+%
+% The four counters below are set by options; the allowed values mean:
+% 3=least, 6=less, 9=lessish, 12=normal, 15=moreish, 18=more, 21=most.
+% Values less than 12 shrink the corresponding length, greater than 12
+% expands the length.
+%
+\newcount\RM@columnsepoption\RM@columnsepoption=12
+\newcount\RM@headsepoption\RM@headsepoption=12
+\newcount\RM@footskipoption\RM@footskipoption=12
+\newcount\RM@mparsepoption\RM@mparsepoption=12
+%
+\newcount\RM@mparclearoption\RM@mparclearoption=12
+\newcount\RM@maxmparwidthoption\RM@maxmparwidthoption=12
+%
+%
+% This works as a flag:
+% 0 = set width by character and paper-based widths (default)
+% 1 = set width by character-based width only
+% 2 = set width by paper-basd width only
+% It's set by options here, and acted on in rsw-norm.
+\def\RM@setwidthby{0}
+%
+%
+% \RM@mparclearance is a new parameter: the gap between the outside edge
+% of a marginal paragraph and the edge of the paper. It is scaled by
+% option later on, and is set to an initial value based on a fraction of
+% paperwidth later on. The two base initial values work out to 0.4in or
+% 0.8in if US letter paper is specified. So that you don't have to use
+% the normalbasemparclear or largebasemparclear options, or so you can
+% set your own base \RM@mparclearance, normalbasemparclear is set by
+% default after option processing if \RM@mparclearance=-666pt.
+%
+\newlength\RM@mparclearance
+\setlength\RM@mparclearance{-666pt}
+%
+% \RM@maxmparwidth is dealt with similarly; if nothing else is done
+% to \RM@maxmparwidth
+%
+\newlength\RM@maxmparwidth
+\setlength\RM@maxmparwidth{-666pt}
+%
+\def\RM@chatlevel{2}
+% 0 = All
+% 1 = Most parameter values and reports of main processing blocks
+% 2 = Some: main final values
+% 3 = Nothing reported except essential warnings and errors
+%
+\def\RM@ifbeton{3}% 0=beton opt, beton loaded
+% 1=beton loaded, no opt
+% 2=beton opt, beton not loaded
+% 3=pristine
+% 4=nobeton opt
+\def\RM@looseoption{205}
+% 0=tight, 1=looseish, 2=loose, 3=looser, 4=loosest, 5=sloppier,
+% 205=undefined
+%
+% Needs to be a count.
+\newcount\RM@lengthoption\RM@lengthoption=15
+% 0=stdlength, 3=shortest, 6=shorter, 9=shortish, 12=short
+% 15=normallength ... 27=longest, 30=fulllength
+%
+\def\RM@classtype{0}
+% 0=undefined,
+% 1=article, 2=report, 3=letter, 4=book, 5=slides,
+% 10=ltxdoc, 11=ltxguide, 19=unknown
+% 20=rmcv, 21=rmletter, 22=bithesis, 23=ljmueepexam
+%
+% Needs to be a count
+\newcount\RM@widthoption\RM@widthoption=14
+% 14=normal
+%
+% Needs to be a count
+\newcount\RM@offsetoption\RM@offsetoption=11
+% 2=leastoffset, 11=normaloffset, 20=mostoffset
+%
+\def\RM@fountfamily{0}
+% 0=cmr, 1=avant, 2=bookman, 3=chancery, 4=helvet, 5=newcent,
+% 6=palatino, 7=times, 8=utopia, 9=lucasual 10=courier, 11= concrete,
+% 12=this fount, 13=lucida-casual
+%
+\def\RM@printertype{0}
+%
+\def\RM@papertype{0}
+% 0=unknown, 1=usletter, 2=uslegal, 3=usexecutive,
+% 4=a0, 15=b0, 26=c0, 36=foolscapfolio, ...
+%
+%
+% 0 = not long
+% 1 = 7/8 2 = 3/4 3 = 2/3 4 = 5/8 5 = 1/2
+% 6 = 3/8 7 = 1/3 8 = 1/4 9 = 1/8.
+% 1/2 is non-canonical, but works anyway.
+%
+\def\RM@longpapertype{0}
+%
+% minmargins are the minimum gap between the main block of text and the
+% edge of the paper. minclearances are the minimum gap between the
+% furthest extent of printing and the edge of the paper. minmargins are
+% only taken notice of by classes like bithesis, where a minimum margin
+% is specified in the regulations.
+%
+% The following commands hold the minimum permitted margin around the
+% body of the text (different to printing area: you can have marginal
+% notes inside the margin, you can't have marginal notes outside the
+% permitted printing area.) The foot and head are contained within the
+% \RM@min[top/bottom]margin space. These parameters are only set where
+% regulations or something specify minimum margins. For example:
+% camera-ready copy for journals, theses, and stuff like that. They are
+% currently only set if you are using the bithesis class; it is sensible
+% to set them anywhere before LaTeX's \textheight/width/etc., parameters
+% are set. You could add code to set them for the book class, add an
+% option which sets these parameters, or whatever.
+%
+\providecommand{\RM@minoutsidemargin}{0pt}
+\providecommand{\RM@mininsidemargin}{0pt}
+\providecommand{\RM@mintopmargin}{0pt}
+\providecommand{\RM@minbottommargin}{0pt}
+%
+% The following commands hold the minimum margin around the printing
+% area for a particular printer/paper size/orientation combination.
+% They are set later, and are set to the values of
+% \@ptr[r/l][port/land]clear. Precisely which minclearance is set to
+% which ptrclearance depends on the printer/papersize/orientation
+% combination. The default setting is r->right, l->left, t->head,
+% b->foot. The default setting of 1742pt is so that if they are *not*
+% set later, the ommission is apparent in the printed output. (er, the
+% least random number concatenated with the philosophically most
+% significant number).
+%
+\def\RM@minrightclearance{1742pt}
+\def\RM@minleftclearance{1742pt}
+\def\RM@minfootclearance{1742pt}
+\def\RM@minheadclearance{1742pt}
+%
+%
+% \RM@[min|max]text[width|height] are yet more limits on text size.
+% Intended to be set on a class-by-class basis, applying limits where
+% necessary.
+%
+\providecommand{\RM@mintextwidth}{1pt}
+\providecommand{\RM@maxtextwidth}{9999pt}
+\providecommand{\RM@mintextheight}{1pt}
+\providecommand{\RM@maxtextheight}{9999pt}
+%
+%
+% The following three parameters need to be lengths
+%
+\newlength\RM@totalheadfootclearance
+\newlength\RM@totalfootclearance
+\newlength\RM@totalheadclearance
+%
+%
+% The following lengths hold the minimum margin around the printing area
+% for a particular printer. They are set later. They are used to set
+% the minimum clearance parameters for each paper size.
+%
+\def\RM@ptrrportclear{0pt}% right-hand edge, portrait orientation
+\def\RM@ptrlportclear{0pt}% left-hand edge, portrait orientation
+\def\RM@ptrtportclear{0pt}% top edge, portrait orientation
+\def\RM@ptrbportclear{0pt}% bottom edge, portrait orientation
+\def\RM@ptrrlandclear{0pt}% right-hand edge, landscape orientation
+\def\RM@ptrllandclear{0pt}% left-hand edge, landscape orientation
+\def\RM@ptrtlandclear{0pt}% top edge, landscape orientation
+\def\RM@ptrblandclear{0pt}% bottom edge, landscape orientation
+%
+% Assumed minimum printer position tolereance; added to the
+% \RM@min...clearance parameters after they've been set by everything
+% else. Intended to cope with the fact that the real world is
+% wobblier than you might think.
+\def\RM@ptrpostol{0pt}
+%
+%
+% If this switch is set to true, then the printing area can be raised
+% a bit without warning to clear an over-large non-printing margin at
+% the bottom.
+\newif\ifRM@jackup\RM@jackupfalse
+%
+%
+% 0 for all classes except slides. 1 for slides class. Change by
+% class; use class detection section in the config file or the
+% \RM@BeforeTextheightSetting hook.
+\def\RM@textheightgroup{0}
+%
+%
+% 0 = article, report, letter, book, and derivatives
+% 1 = slides
+% 2 = foiltex
+% 3 = classes using non-standard values for \@ptperchar
+% 4 = undefined classes (produces error currently; don't use)
+\def\RM@textwidthgroup{0}
+%
+%
+% \RM@ptsizegroup is used by the width setting code; it's set to 0, 1,
+% or 2 as if it were \@ptsize. But classes like foils which have four
+% different base sizes set \@ptsize to different values. In these
+% cases, RM@ptsizegroup is set to 0, 1, 2, or 3; code which needs to
+% know which typesize you're using needs to be told about foils and
+% the like, so it behaves differently. This probably makes life a
+% little easier.
+%
+% The initial value is set to be either 0pt, or whatever \@ptsize is, if
+% it exists. This might not always be appropriate, but it's a good
+% starting point.
+%
+\@ifundefined{@ptsize}
+ {\def\RM@ptsizegroup{0}}
+ {\edef\RM@ptsizegroup{\@ptsize}}
+%%
+%%
+%% \subsection{Some useful commands}
+%%
+% The four commands below are intended to be used by a .cfg file
+% writer (and me, inside rmpage) to fiddle about with settings that
+% apply to different paper sizes/orientations on a printer-by-printer
+% basis.
+%
+% \RM@OnPortraitPaperSize[<long size code>]{<paper type code>}{<TeX
+% code>} Executes <TeX code> if paper size is as specified and in
+% portrait orientation. The default <long size code> (the [optional
+% argument]) is 0, which is `not long'. Passing -1 as the <long size
+% code> [optional argument] means `all sizes based on this <paper type
+% code>'; i.e., not long, 7/8long, 3/4long, \ldots, and 1/8long.
+%
+% The other \RM@On...PaperSize commands are similar.
+%
+\newcommand*{\RM@OnPaperSize}[3][0]{
+ \ifnum#2=\RM@papertype \relax
+ \ifnum#1=\RM@longpapertype \relax
+ #3 \relax
+ \else
+ \ifnum#1=-1
+ #3 \relax
+ \fi
+ \fi
+ \fi
+}
+\newcommand*{\RM@OnPortraitPaperSize}[3][0]{
+ \ifRM@portrait
+ \ifnum#2=\RM@papertype \relax
+ \ifnum#1=\RM@longpapertype \relax
+ #3 \relax
+ \else
+ \ifnum#1=-1
+ #3 \relax
+ \fi
+ \fi
+ \fi
+ \fi
+}
+\newcommand*{\RM@OnLandscapePaperSize}[3][0]{
+ \ifRM@portrait
+ \else
+ \ifnum#2=\RM@papertype \relax
+ \ifnum#1=\RM@longpapertype \relax
+ #3 \relax
+ \else
+ \ifnum#1=-1
+ #3 \relax
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+\def\RM@OnPrinterType#1#2{\ifnum#1<10\relax
+ \RM@Error{You shouldn't be applying local code to this printer}
+ {Printer types < 10 are supposed to be the same everywhere: stop it.}
+ \else
+ \ifnum#1=\RM@printertype\relax #2 \relax\fi
+ \fi}
+
+%
+%
+%
+% \RM@OnClassType{<class type number>}{<true code>}{<false code>}
+% Executes <true code> if \RM@classtype=<class type number>;
+% otherwise executes <false code>. Reports the current class type if
+% you've asked for garrulous reporting.
+%
+\def\RM@OnClassType#1#2#3{\relax
+ \RM@ocl{1}{\RM@typeclasstype{\RM@classtype}}{}
+ \ifnum\RM@classtype=#1 \relax
+ #2 \relax
+ \else
+ #3 \relax
+ \fi
+}
+%% 0=unknown, 1=article, 2=report, 3=letter, 4=book, 5=slides,
+%% 10=ltxdoc, 11=ltxguide, 20=rmcv, 21=rmletter, 22=bithesis,
+%% 23=ljmueepexam
+%
+% Re-define the \RM@LocalClassReport command in the config file if you
+% add classes. Use the \RM@OnClassType{<number>}{<true code>}{<false
+% code>} to report your new class.
+%
+\def\RM@LocalClassReport{\typeout{Undefined class detected}}
+%
+\def\RM@typeclasstype#1{
+\ifcase#1
+ \typeout{Unknown class type}% 0=Unknown
+\or
+ \typeout{article class detected}% 1=article
+\or
+ \typeout{report class detected}% 2=report
+\or
+ \typeout{letter class detected}% 3=letter
+\or
+ \typeout{book class detected}% 4=book
+\or
+ \typeout{slides class detected}% 5=slides
+\or
+ \typeout{Undefined class detected}% 6
+\or
+ \typeout{Undefined class detected}% 7
+\or
+ \typeout{Undefined class detected}% 8
+\or
+ \typeout{Undefined class detected}% 9
+\or
+ \typeout{ltxdoc class detected}% 10=ltxdoc
+\or
+ \typeout{ltxguide class detected}% 11=ltxguide
+\or
+ \typeout{Undefined class detected}% 12
+\or
+ \typeout{Undefined class detected}% 13
+\or
+ \typeout{Undefined class detected}% 14
+\or
+ \typeout{Undefined class detected}% 15
+\or
+ \typeout{Undefined class detected}% 16
+\or
+ \typeout{Undefined class detected}% 17
+\or
+ \typeout{Undefined class detected}% 18
+\or
+ \typeout{Unknown class detected}% 19
+\or
+ \typeout{rmcv class detected}% 20=rmcv
+\or
+ \typeout{rmletter class detected}% 21=rmletter
+\or
+ \typeout{bithesis class detected}% 22=bithesis
+\or
+ \typeout{ljmueepexam class detected}% 23=ljmueepexam
+\else
+ \ifnum\RM@classtype=50 \relax
+ \typeout{foils class detected}% 50=foils
+ \else
+ \typeout{No standard class detected}
+ \RM@LocalClassReport% Other
+ \fi
+\fi}
+%
+% \RM@SetClassType{<class name>}{<class type number>} If class <class
+% name> has been loaded, and current \RM@classtype is less than <class
+% type number>, sets \RM@classtype to be <class type number>.
+%
+\def\RM@SetClassType#1#2{
+ \@ifclassloaded{#1}
+ {\ifnum\RM@classtype<#2
+ \def\RM@classtype{#2}
+ \fi}
+ {}
+}
+%
+% \RM@OnClassExecuteOptions{<class name>}{<option list>}
+% If the class <class name> has been loaded,
+% perform \ExecuteOptions{<option list>}.
+%
+\def\RM@OnClassExecuteOptions#1#2{\@ifclassloaded{#1}{\ExecuteOptions{#2}}{}}
+%
+% \RM@OnTextheightGroup{<textheight group number>}{<true code>}{<false code>}
+% Executes <true code> if \RM@textheightgroup=<textheight group number>;
+% otherwise executes <false code>
+%
+\long\def\RM@OnTextheightGroup#1#2#3{
+ \relax
+ \ifnum\RM@textheightgroup=#1
+ #2
+ \else
+ #3
+ \fi
+}
+%
+% Ditto for textwidth
+%
+\long\def\RM@OnTextwidthGroup#1{
+ \relax
+ \ifnum\RM@textwidthgroup=#1\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+%
+% Use these commands to set parameters like \RM@mininsidemargin, which
+% often need to be set to at least a certain value. One's for
+% lengths, the other's for commands.
+%
+\def\RM@SetLengthAtLeast#1#2{\ifdim#1<#2 \relax #1#2 \relax\fi}
+\def\RM@DefLengthAtLeast#1#2{\ifdim#1<#2 \relax \def#1{#2}\relax\fi}
+%
+% \RM@scalebyoption{<thing to scale>}{<option number to scale by>}
+% If I want to report values, do it outside this command; the bugs
+% seem to have gone now.
+%
+\def\RM@scalebyoption#1#2{
+ \ifcase#2
+ \RM@Error{What option do you
+ think that is, then?}
+ {rmpage has a bug: \protect\RM@scalebyoption\space has
+ been passed 0 as an option number.\MessageBreak This
+ shouldn't happen}
+ \or #1=0.3263#1% 1 = least - touchless - [class|@]touchless
+ \or #1=0.3613#1% 2
+ \or #1=0.4000#1% 3 = least
+ \or #1=0.4429#1% 4
+ \or #1=0.4903#1% 5
+ \or #1=0.5429#1% 6 = less
+ \or #1=0.6011#1% 7
+ \or #1=0.6655#1% 8
+ \or #1=0.7368#1% 9 = lessish
+ \or #1=0.8158#1% 10
+ \or #1=0.9032#1% 11
+ \or \relax% 12 = norm
+ \or #1=1.1072#1% 13
+ \or #1=1.2258#1% 14
+ \or #1=1.3572#1% 15 = moreish
+ \or #1=1.5027#1% 16
+ \or #1=1.6637#1% 17
+ \or #1=1.8420#1% 18 = more
+ \or #1=2.0394#1% 19
+ \or #1=2.2580#1% 20
+ \or #1=2.5000#1% 21 = most
+ \or #1=2.7679#1% 22
+ \or #1=3.0646#1% 23 = most + touchmore + [class|@]touchmore
+ \else
+ \RM@Error{This isn't right}
+ {rmpage has a bug: \protect\RM@scalebyoption has been
+ passed a number greater than 23\MessageBreak as an
+ option number.}
+ \fi% endifcase#2
+}
+%
+% Only used by the fount loading code; just short-hand to save
+% re-typing this lot N times.
+%
+\def\RM@noffilew#1#2{\RM@Error{You've asked me to load the\MessageBreak
+ #1\space fount family,\MessageBreak but I can't find the file #2}
+ {Get the file #2, and put it somewhere LaTeX can see it.}}
+%
+\def\RM@executehook#1{\@ifundefined{#1}{}{\csname#1\endcsname}}
+%
+% The name of the default configuration file (the .cfg extension is
+% optional; rmpage first searches for \RMconfigfile.cfg, then
+% \RMconfigfile). Change this with \newcommand in your document
+% preamble, before loading rmpage.sty, if you want to. Damn Bill
+% Gates to hell and back for the 8+3 filename; this would be called
+% rmpagelocal if it weren't for Microsoft and its attendant evils.
+% Go on, bring on your lawyers, see if I care.
+%
+%
+\providecommand{\RMconfigfile}{rmplocal}
+%
+%
+%%
+%%
+%% \section{Various definitions from rmpwnorm}
+%% =================================
+%%
+%%
+% Needs to be a length
+\newlength\RM@ptperchar
+%
+%
+% Needs to be a count
+\newcount\RM@offsetfrac\RM@offsetfrac=60
+%
+% \RM@OnWidthOption{<low width option number>}{<high width option number>}
+% {<true code>}{<false code>}
+% Executes <true code> if
+% <low width option number> < \RM@widthoption < <high width option number>;
+% otherwise executes <false code>
+%
+\def\RM@OnWidthOption#1#2#3#4
+ {
+ \ifnum#1<\RM@widthoption
+ \ifnum\RM@widthoption<#2
+ #3
+ \else
+ #4
+ \fi
+ \else
+ #4
+ \fi
+}
+%
+% This is ignored if the slides class is being used; only one point
+% size is available
+%
+\def\RM@setptperchar#1#2#3#4{% std / foils
+ \ifcase\RM@ptsizegroup
+ \setlength\RM@ptperchar{#1}% 10 pt/17pt
+ \or
+ \setlength\RM@ptperchar{#2}% 11 pt/20pt
+ \or
+ \setlength\RM@ptperchar{#3}% 12 pt/25pt
+ \or
+ \setlength\RM@ptperchar{#4}% 12 pt/30pt
+ \else
+ \RM@Error
+ {I don't recognize the point size you've asked\MessageBreak
+ for. I have assumed you meant 10pt; you can\MessageBreak
+ continue, but you will probably not like the\MessageBreak
+ \protect\textwidth\space setting}
+ {\protect\RM@ptsize\space has been set outside the range 0->3.
+ I don't understand; I need fixing}
+ \setlength\RM@ptperchar{#1}
+ \fi% endifcase\@ptsize
+}
+%
+% Executing this command sets \RM@ptperchar to a value based on the
+% current fount. It's used a few times in the width setting code.
+% Note that you've got to have selected the fount you want (but note
+% that this code executes a \selectfont just in case you've forgotten).
+%
+\def\RM@setthisfountptperchar{
+ \selectfont
+ \settowidth{\RM@ptperchar}% 1067 characters in this para
+ {Yet the more I thought about it, the more attractive it
+ became. Hitherto, my life has been ruled by the
+ principles of emotional candour, complex pharmaceuticals,
+ and financial chicanery, but look where it has got me:
+ holed up in this goat-stained room with a comprehensive
+ selection of liturgical sourcebooks, a duffel-bag stuffed
+ with lurid pornography and Barbie and Ken snarling on the
+ other side of the wall (their accents slip with rage or
+ lubricity). Down they quailed to the earth, those
+ Phaeacians of the long oars, those master mariners,
+ beneath the hurtling of the stone which soared so freely
+ from the hero's hand that it overpassed the marks of every
+ other. Athene, in her human shape, appeared suddenly and
+ marked the place where it touched earth. Loudly she cried
+ to Odysseus: `Stranger, even a blind man's dim groping
+ hand would pick out the dint of your stone: because it
+ does not lie confused among the crowd of marks, but is
+ alone, far in front of all. Be confident, for this event
+ at least. No Phaeacian will reach your throw, much less
+ exceed it.'}
+ % 1067 total chars of English from Bargepole and T.E. Lawrence
+ \divide\RM@ptperchar by1067
+ \typeout{***************************************************************}
+ \typeout{*\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space*}
+ \typeout{* I am using the currently selected fount in my
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space*}
+ \typeout{* \protect\textwidth\space calculations. This fount is
+ \f@encoding\space encoded: \space\space\space\space
+ \space\space\space\space*}
+ \typeout{* \f@family\space family, \f@series\space series,
+ \f@shape\space shape, \f@size pt size
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space*}
+ \typeout{* I reckon it measures \the\RM@ptperchar\space
+ points per character
+ \space\space\space\space\space\space\space\space *}
+ \typeout{*\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space\space*}
+ \typeout{***************************************************************}
+}
+%%
+%% \section{Declare options}
+%% ===============
+%%
+\typeout{Starting option declaration}
+%
+% \RM@chatlevel
+% 0 = All
+% 1 = Most parameter values and reports of main processing blocks
+% 2 = Some: main final values
+% 3 = Nothing reported except essential warnings and errors
+\DeclareOption{garrulous}{\def\RM@chatlevel{0}}
+\DeclareOption{chatty}{\def\RM@chatlevel{1}}
+\DeclareOption{taciturn}{\def\RM@chatlevel{2}}
+\DeclareOption{yorkshire}{\def\RM@chatlevel{3}}
+%
+%
+% Data source for the old British book sizes: Pears Cyclopedia, 68th
+% edition, 1959-1960. Pelham Books Ltd., 1959. (General Compendium,
+% page N13). A, B, and other untrimmed sizes taken from BS4000. C0,
+% C1, C2, C7, and C7/6 taken from The Cambridge Factfinder, Cambridge
+% University Press, 1993. C3, C4, C5, C6, DL, and non-ISO envelope
+% sizes taken from BS4264.
+%
+% According to BS4000,
+% The ISO A series is based on A0, with a surface area of $1m^{2}$.
+% Each ISO B paper size is a geometric mean between adjacent A sizes,
+% with sides in the same proportions.
+%
+% Each size shall be acheived by dividing the size immediately above it
+% into two equal parts, the division being parallel to the shorter
+% side. Consequently, the areas of two successive sizes shall be in the
+% ratio 2:1.
+%
+% All the size in each series shall be geometrically similar to one
+% another.
+%
+% What this means is that the ratio of the sides must be $1:\sqrt{2}$,
+% so that A0 is $841mm \times 1189mm$.
+%
+% Tolerances are specified thus:
+%
+% \begin{tabular}{rl}
+% Size & tolerance \\ \hline
+% $\mathrm{sizes}\leq 150 \mathrm{mm}$&$\pm1.5 \mathrm{mm}$ \\
+% $150\mathrm{mm}<\mathrm{sizes}\leq 600\mathrm{mm}$&$\pm2 \mathrm{mm}$\\
+% $600\mathrm{mm}<\mathrm{sizes}\mathrm{mm}$&$\pm3 \mathrm{mm}$\\
+% \end{tabular}
+%
+% Long ISO sizes are created by dividing ordinary ISO sizes into slices,
+% cutting parallel to the short edge, e.g.,
+% \begin{tabular}{ll}
+% 1/3 A4 & $99 \times 210$ \\
+% 1/4 A4 & $74 \times 210$ \\
+% 1/8 A8 & $13 \times 74 $ \\
+% \end{tabular}
+%
+% 2/3 A4 is apparently a common size commercially, used for invoices
+% and the like. It is defined as $198 \times 210 \mathrm{mm}$. Note
+% that the standard defines sizes to the nearest millimetre, but
+% rmpage does not round the calculated long sizes, nor does it ensure
+% that only ISO sizes are processed by the `long' options. This is
+% because you can chop up any bit of paper you like; if you are cutting
+% real-world paper, rounding errors on a 1/8 size could result in 4mm
+% error by the time you reached the strip furthest from the datum edge,
+% very different from the 0.5mm error (which is always within specified
+% tolerance and therefore irrelevant), which you get if you're talking
+% about single bits of paper.
+%
+%
+%
+% NEW
+%
+% papertypes: 0=undefined, 1=letter, 2=legal, 3=executive,
+% 9 letter4paper
+% 10=a0, ... , 20=a10 (a4=14, a5=15)
+% 30=b0, ... , 40=b10
+% 50=c0, ... , 57=c7, 58=dl, 59=c7/6,
+% 60=bspopseedevelopepaper, 61=bspopnonisoenvelopepaper,
+% 62=bsbrochureenvelopepaper, 63=bslegalenvelopepaper,
+% 64=bslargelegalenvelopepaper, 65=bscalendarenvelopepaper
+% 66=no10envelopepaper
+% 70=foolscap folio, 71=foolscap quarto, 72=foolscap octavo
+% 73=crown folio, 74=crown quarto, 75=crown octavo
+% 76=royal folio, 77=royal quarto, 78=royal octavo
+% 79=imperial folio, 80=imperial quarto, 81=imperial octavo
+% 82=large crown octavo
+% 83=demy quarto, 84=demy octavo
+% 85=medium quarto, 86=medium octavo
+% 90=RA0, 91=RA1, 92=RA2, 93=SRA0, 94=SRA1, 95=SRA2
+% 96=metricdoublecrownpaper, 97=metricquadcrownpaper
+% 98=metriclargequadcrownpaper, 99=metricquaddemypaper
+% 100=metricsmallquadroyalpaper
+%
+% 3 US sizes recognised by 3 options (1-3)
+% 1 bodge size recognised by 1 option (9)
+% 11 A sizes defined by 11 options: for writing paper, books, etc. (10-20)
+% 11 B sizes defined by 11 options: for posters, etc. (30-40)
+% 10 C sizes plus dlpaper defined by 10 options: for envelopes, etc. (50-59)
+% 6 BS4264 envelope sizes defined by 6 options: (60-65)
+% 1 US envelope size defined by 1 option: (66)
+% 17 old British sizes defined by 18 options. (70-86)
+% 11 BS4000 untrimmed sizes defined by 11 options (90-100)
+% -----
+% 71 different paper sizes defined by 72 options.
+%
+%
+\DeclareOption{letterpaper}{\def\RM@papertype{1}
+ \setlength\paperheight {11in}
+ \setlength\paperwidth {8.5in}
+ }
+%
+% Ensure that the standard LaTeX default paper size is always
+% selected. Doing this here ensures that it can be over-ridden
+% anywhere else, but it won't be removed. Ugly, but reliable, and
+% therefore elegant?
+%
+\ExecuteOptions{letterpaper}
+%
+\DeclareOption{legalpaper}{\def\RM@papertype{2}
+ \setlength\paperheight {14in}
+ \setlength\paperwidth {8.5in}
+ }
+\DeclareOption{executivepaper}{\def\RM@papertype{3}
+ \setlength\paperheight {10.5in}
+ \setlength\paperwidth {7.25in}
+ }
+\DeclareOption{a4paper}{\def\RM@papertype{14}
+ \setlength\paperheight{297mm}
+ \setlength\paperwidth{210mm}
+ }
+\DeclareOption{a5paper}{\def\RM@papertype{15}
+ \setlength\paperheight{210mm}
+ \setlength\paperwidth{148mm}
+ }
+\DeclareOption{b5paper}{\def\RM@papertype{35}
+ \setlength\paperheight{250mm}
+ \setlength\paperwidth{176mm}
+ }
+\DeclareOption{c6paper}{\def\RM@papertype{56}
+ \setlength\paperheight{162mm}
+ \setlength\paperwidth{114mm}
+ }
+\DeclareOption{dlpaper}{\def\RM@papertype{58}% Ordinary envelopes
+ \setlength\paperheight{220mm}
+ \setlength\paperwidth{110mm}
+ }
+\DeclareOption{no10envelopepaper}{\def\RM@papertype{66}% Ordinary US envelopes
+ \setlength\paperheight{9.5in}
+ \setlength\paperwidth{4.12in}
+ }
+% long paper type numbers:
+%
+% 0 = not long (or 1)
+% 1 = 7/8 2 = 3/4 3 = 2/3 4 = 5/8 5 = 1/2
+% 6 = 3/8 7 = 1/3 8 = 1/4 9 = 1/8
+%
+% long paper options in rmplocal.cfg
+%
+% These options can be executed before or after the load<fount>
+% options; they'll over-ride the `loose' request of the loadfount options
+% whichever way.
+\DeclareOption{tight}{\def\RM@looseoption{0}}
+\DeclareOption{looseish}{\def\RM@looseoption{1}}
+\DeclareOption{loose}{\def\RM@looseoption{2}}
+\DeclareOption{looser}{\def\RM@looseoption{3}}
+\DeclareOption{loosest}{\def\RM@looseoption{4}}
+\DeclareOption{sloppyish}{\def\RM@looseoption{5}}
+%
+\DeclareOption{shortest}{\RM@lengthoption=3}
+\DeclareOption{shorter}{\RM@lengthoption=6}
+\DeclareOption{short}{\RM@lengthoption=9}
+\DeclareOption{shortish}{\RM@lengthoption=12}
+\DeclareOption{normallength}{\RM@lengthoption=15}
+\DeclareOption{longish}{\RM@lengthoption=18}
+\DeclareOption{long}{\RM@lengthoption=21}
+\DeclareOption{longer}{\RM@lengthoption=24}
+\DeclareOption{longest}{\RM@lengthoption=27}
+%
+% Note that the touch length options need to be executed after the
+% main length options; one way of doing this is to ensure that the
+% touch options are declared after the main options, and that
+% \ProcessOptions is used rather than \ProcessOptions*
+%
+% The touchlength options are in rmplocal.cfg now. The fulllength
+% and stdlength options must be executed after the touchlength options.
+%
+% And odd length options---fulllength and stdlength---need to be
+% executed after the touchlength options, so bung them in the
+% configuration file. This isn't a nice way of doing it, but it'll
+% work.
+%
+%
+% Headsep is scaled by option
+%
+\DeclareOption{leastheadsep}{\RM@headsepoption=3}
+\DeclareOption{lessheadsep}{\RM@headsepoption=6}
+\DeclareOption{lessishheadsep}{\RM@headsepoption=9}
+\DeclareOption{normalheadsep}{\RM@headsepoption=12}
+\DeclareOption{moreishheadsep}{\RM@headsepoption=15}
+\DeclareOption{moreheadsep}{\RM@headsepoption=18}
+\DeclareOption{mostheadsep}{\RM@headsepoption=21}
+%
+% Footskip is scaled by option
+%
+\DeclareOption{leastfootskip}{\RM@footskipoption=3}
+\DeclareOption{lessfootskip}{\RM@footskipoption=6}
+\DeclareOption{lessishfootskip}{\RM@footskipoption=9}
+\DeclareOption{normalfootskip}{\RM@footskipoption=12}
+\DeclareOption{moreishfootskip}{\RM@footskipoption=15}
+\DeclareOption{morefootskip}{\RM@footskipoption=18}
+\DeclareOption{mostfootskip}{\RM@footskipoption=21}
+%
+% The marginpar setting options are now in rmplocal.cfg
+%
+% \columnsep is scaled by option.
+%
+\DeclareOption{leastcolsep}{\RM@columnsepoption=3}
+\DeclareOption{lesscolsep}{\RM@columnsepoption=6}
+\DeclareOption{lessishcolsep}{\RM@columnsepoption=9}
+\DeclareOption{normalcolsep}{\RM@columnsepoption=12}
+\DeclareOption{moreishcolsep}{\RM@columnsepoption=15}
+\DeclareOption{morecolsep}{\RM@columnsepoption=18}
+\DeclareOption{mostcolsep}{\RM@columnsepoption=21}
+%
+% The touch options below need to be executed after their corresponding
+% main options (sort of thing). Keeping these declarations after the
+% corresponding main declarations, and using \ProcessOptions rather than
+% \ProcessOptions* does this rather neatly.
+%
+% The touch colsep, mparsep, footskip, and headsep options are now in
+% rmplocal.cfg
+%
+% If \RM@adaptivecolseptrue, then \columnsep is set to be a fraction
+% of the number of points per character. This isn't always
+% appropriate, and the flag is set to false by default.
+%
+\DeclareOption{adaptivecolsep}{\RM@adaptivecolseptrue}
+\DeclareOption{noadaptivecolsep}{\RM@adaptivecolsepfalse}
+%
+% Note that the width option setting options need to be executed in
+% the order they are declared here: so that you can increment or
+% decrement narrowest---widest; but stdwidth, half and one inchmargins,
+% and fullwidth are all fixed options.
+%
+% One easy way of ensuring this is to keep these options declared in
+% this order and use \ProcessOptions rather than \ProcessOptions*
+%
+\DeclareOption{widest}{\RM@widthoption=26}
+\DeclareOption{wider}{\RM@widthoption=23}
+\DeclareOption{wide}{\RM@widthoption=20}
+\DeclareOption{widish}{\RM@widthoption=17}
+\DeclareOption{normalwidth}{\RM@widthoption=14}
+\DeclareOption{narrowish}{\RM@widthoption=11}
+\DeclareOption{narrow}{\RM@widthoption=8}
+\DeclareOption{narrower}{\RM@widthoption=5}
+\DeclareOption{narrowest}{\RM@widthoption=2}
+%
+% The touchwidth options are in rmplocal.cfg now.
+%
+\DeclareOption{stdwidth}{\RM@widthoption=32}
+\DeclareOption{halfinchmargins}{\RM@widthoption=31}
+\DeclareOption{oneinchmargins}{\RM@widthoption=30}
+\DeclareOption{fullwidth}{\RM@widthoption=29}
+%
+% Left/right positioning.
+%
+\DeclareOption{twoside}{\RM@twosidetrue\@mparswitchtrue}% Hmm. Is this wise?
+\DeclareOption{oneside}{\RM@twosidefalse}
+\DeclareOption{centre}{\RM@centretrue}
+\DeclareOption{notcentre}{\RM@centrefalse}
+%
+% stdmargins: large margin outside, small margin inside.
+% notdstdmargins: large margin inside, small margin outside.
+%
+\DeclareOption{stdmargins}{\RM@stdmarginstrue}
+\DeclareOption{notstdmargins}{\RM@stdmarginsfalse}
+%
+% The offset options don't do anything if the centre option has been
+% specified.
+%
+\DeclareOption{leastoffset}{\RM@offsetoption=2}
+\DeclareOption{lessoffset}{\RM@offsetoption=5}
+\DeclareOption{lessishoffset}{\RM@offsetoption=8}
+\DeclareOption{normaloffset}{\RM@offsetoption=11}
+\DeclareOption{moreishoffset}{\RM@offsetoption=14}
+\DeclareOption{moreoffset}{\RM@offsetoption=17}
+\DeclareOption{mostoffset}{\RM@offsetoption=20}
+%
+% The touchoffset options must be executed after the offset options.
+% This is easy to arrange: just declare the options in this order, and
+% use \ProcessOptions rather than \ProcessOptions* (that is, these
+% options must be processed in the order of declaration, rather than
+% the order given in the calling commands).
+%
+% The touch offset options are in the config file now.
+%
+% Note that the standard classes set the \@twocolumn flag. rmpage
+% doesn't, but it now needs to see it to decide which typesetting
+% looseness to set if you've asked for twocolumn and loaded a
+% psfount. See the loadfount options in the config file.
+%
+% The config file has onecolumnwidth...tencolumnwidth options, which
+% change \textwidth but don't change the number of columns. You can
+% use the multicols package to do that.
+\DeclareOption{onecolumn}{\def\RM@textcols{1}}
+\DeclareOption{twocolumn}{\def\RM@textcols{2}}
+%
+%
+% 0 = set width by character and paper-based widths (default)
+% 1 = set width by character-based width only
+% 2 = set width by paper-based width only
+%
+% The bothwidth option is redundant, which is a good thing because I
+% really don't like the name
+\DeclareOption{bothwidthset}{\def\RM@setwidthby{0}}
+\DeclareOption{characterwidthset}{\def\RM@setwidthby{1}}
+\DeclareOption{paperwidthset}{\def\RM@setwidthby{2}}
+%
+\DeclareOption{portrait}{\RM@portraittrue}
+\DeclareOption{landscape}{\RM@portraitfalse}
+%
+\DeclareOption{noheaders}{\RM@headersfalse}
+\DeclareOption{headers}{\RM@headerstrue}
+\DeclareOption{nofooters}{\RM@footersfalse}
+\DeclareOption{footers}{\RM@footerstrue}
+%
+\DeclareOption{highest}{\RM@headfootbalance=0}% 0/8
+\DeclareOption{higher}{\RM@headfootbalance=3}% 1/8
+\DeclareOption{high}{\RM@headfootbalance=6}% 2/8
+\DeclareOption{highish}{\RM@headfootbalance=9}% 3/8
+\DeclareOption{normalaltitude}{\RM@headfootbalance=12}% 4/8
+\DeclareOption{lowish}{\RM@headfootbalance=15}% 5/8
+\DeclareOption{low}{\RM@headfootbalance=18}% 6/8
+\DeclareOption{lower}{\RM@headfootbalance=21}% 7/8
+\DeclareOption{lowest}{\RM@headfootbalance=24}% 8/8
+%
+% These touch options must be executed after the altitude options
+% above; one easy way is to declare the touch options after the
+% straight altitude options and use \ProcessOptions, not
+% \ProcessOptions*
+%
+% nice/othernicedate date are in rmplocal.cfg now.
+%
+\DeclareOption{usdate}{\RM@nicedatefalse}
+\DeclareOption{ukdate}{\RM@nicedatetrue}
+%
+% The option to load founts and set textwidth by fount size are now
+% in rmplocal.cfg
+%
+% Printer types were:
+% 0=fullbleed, 1=general, 2=dw520, 3=dw600, 4=pessimistic
+%
+% all printer options are now in rmplocal.cfg
+%
+% Printer types are:
+% 0=fullbleed, 1=general, 2=pessimistic, 3=optimistic
+% 10=dw300 11=dw500 12=dw600 (HP deskwriter inkjet series)
+% 20=lj2 21=lj3 22=lj4 (HP laserjet laser printer series)
+% 30=canonbjx bubblejet something (Canon bubblejet inkjet series)
+% 40+ whatever else comes up
+%
+% The figures for all these printers are guesses, except for the DW500
+% (from the manual) and the DW600 and lj4 (measured): I'd very much
+% appreciate it if you could send me any information on the non-printing
+% margins for any other printers. I can use information on printing
+% limits at the top, bottom, left, and right for portrait and landscape
+% modes, and whether the data is what the book says or what you measured
+% (preferrably both, but anything'll help). If anyone really uses LaTeX
+% with an A3 printer, do tell: it's something I've been wondering about.
+%
+%
+%
+% \RM@ifbeton=3 is pristine value; 1=beton loaded, neither beton nor
+% nobeton specified.
+%
+\DeclareOption{beton}{
+ \ifnum\RM@ifbeton=3
+ \def\RM@ifbeton{2}
+ \else
+ \RM@Error{You've specified both the beton and nobeton
+ options;\MessageBreak make up your mind!}
+ {Remove one or both of the beton and
+ nobeton options to rmpage}
+ \fi
+}
+%
+\DeclareOption{nobeton}{
+ \ifnum\RM@ifbeton=3
+ \def\RM@ifbeton{4}
+ \else
+ \RM@Error{You've specified both the beton and nobeton
+ options;\MessageBreak make up your mind!}
+ {Remove one or both of the beton and
+ nobeton options to rmpage}
+ \fi
+}
+%
+%%
+%%
+%% \subsection{Load config file}
+%%
+% Once upon a time, the config files had sensible names. Then the
+% evil Bill Gates came along and chopped their legs off, leaving them
+% bleeding to death in the dust. Bill skipped off down the road,
+% cackling with delight at his own cruelty. Alas, there was no saving
+% these poor mutilated wretches, but I created some new file names
+% that I dislike but work with the crippled `operating system' most
+% personal computers are equipped with.
+%
+% Load the config file here, because it can have option declarations.
+%
+% Configuration file handling: load one of the following files, searched
+% in this order: the file jobname.rmp, the file specified by
+% \RMconfigfile (rmplocal.cfg by default), or rmpgen.cfg. rmplocal.cfg
+% is the local config file, based on my one. rmpgen.cfg is a config
+% file with all options defined, based on my rmplocal.cfg. If you want
+% to change the default first config file, you must
+% \newcommand{\RMconfigfile}{<filename>} in the preamble of your
+% document, \emph{before} loading rmpage.
+%
+% rmplocal.cfg is the one I'm working on, not for general release.
+% rmpgen.cfg and rmplocal.gfc are derived from it, the first with all
+% options enabled, the second with some commented out. The idea is
+% that users modify rmplocal.gfc to produce their own rmplocal.cfg,
+% but keep rmpgen.cfg unmolested so any document using rmpage can
+% specify it by saying \newcommand{\RMconfigfile}{rmpgen.cfg} in the
+% preamble.
+%
+% The idea is that you can write a document using your local config
+% file, and if you want to send it to someone else, specify:
+% \newcommand{\RMconfigfile}{rmpgen.cfg} in your preamble
+% before loading rmpage.sty. If the document is okay after that,
+% no further changes are needed. Or you could provide a config file
+% for one document: say you have a document called zarvox.tex; if you
+% provide a config file called zarvox.rmp, that will be loaded by
+% rmpage as the config file for zarvox.tex only.
+%
+% The multi-pronged approach might be over-the-top, but then again, it
+% might not. I suspect just having rmplocal.cfg and rmpgen.cfg
+% might be sufficient.
+%
+%
+\InputIfFileExists{\jobname.rmp}{}{
+ \InputIfFileExists{\RMconfigfile.cfg}{}{
+ \InputIfFileExists{\RMconfigfile}{}{
+ \InputIfFileExists{rmpgen.cfg}{}{
+ \RM@oclwarninfo{3}%
+ {Can't find file \jobname.rmp, file \RMconfigfile.cfg,\MessageBreak
+ file \RMconfigfile, or\MessageBreak
+ file rmpgen.cfg.\MessageBreak
+ Carrying on without a configuration file;\MessageBreak
+ some things might not work properly.
+ }
+ \ExecuteOptions{notstdmargins}% Is this still needed?
+ }
+ }
+ }
+}
+%
+% Only worry about unknown options after loading the config file
+% Used to not complain about unused option if using rmcv. Scrapped
+% this behaviour: it's a messy way of doing things.
+%
+% I could just drop this statement altogether, but it's been here a
+% while and I like it.
+%
+\DeclareOption*{
+ \RM@Warn{I don't know about the `\CurrentOption' option.}
+}
+% Process options in the order of declaration, rather than the order of
+% calling. That way, the various touch options don't need fiddling
+% with.
+%
+\RM@executehook{RM@BeforeProcessOptions}
+
+\RM@donewithoptionstrue
+\ProcessOptions
+%
+%%
+%%
+%% \section{Deal with paper sizes}
+%% =====================
+%%
+% First, deal with long paper sizes. Note that this code must come
+% \emph{before} the code to ensure landscape/portrait orientation.
+% And that code to ensure landscape/portrait orientation \emph{must}
+% come after this, because this code first ensures portrait
+% orientation, then divides down from that. Well \emph{I} know what I
+% mean\ldots
+%
+\RM@ocl{1}
+ {\typeout{Base paper dimensions:}
+ \RM@ttval{\paperheight}
+ \RM@ttval{\paperwidth}
+ }{}
+%
+% ensure portrait orientation; this must be done so the
+% \RM@portlandinvert flag below can be set correctly.
+\ifnum\paperheight<\paperwidth
+ \@tempdima=\paperwidth
+ \paperwidth=\paperheight
+ \paperheight=\@tempdima
+\fi
+%
+\ifcase\RM@longpapertype
+ \relax% 0 = do nothing
+ \or\paperheight=0.8750\paperheight% 1 = 7/8
+ \or\paperheight=0.7500\paperheight% 2 = 3/4
+ \or\paperheight=0.6667\paperheight% 3 = 2/3
+ \or\paperheight=0.6250\paperheight% 4 = 5/8
+ \or\paperheight=0.5000\paperheight% 5 = 1/2
+ \or\paperheight=0.3750\paperheight% 6 = 3/8
+ \or\paperheight=0.3333\paperheight% 7 = 1/3
+ \or\paperheight=0.2500\paperheight% 8 = 1/4
+ \or\paperheight=0.1250\paperheight% 9 = 1/8
+\else
+ \RM@Error{rmpage has a bug}{A long paper option has been
+ specified\MessageBreak that I don't recognise. Bad karma: get me fixed!}
+\fi
+%
+% If \RM@portlandinverttrue, then the portrait/landscape orientation
+% of the paper has been switched (ish). Like, if you've got A4
+% portrait, keep the paper that way up, and chop it into four bits to
+% get 1/4 A4, the 1/4 A4 sheets are looking at you landscape way
+% round, man. What a rotten explanation.
+%
+% For this to work, portrait orientation must have been forced before
+% the long size \paperheight reduction code immediately above.
+% Portrait/landscape is set to the user's preference below.
+%
+\relax
+\ifdim\paperheight<\paperwidth
+ \RM@portlandinverttrue
+\else
+ \RM@portlandinvertfalse
+\fi
+%
+%
+% Ensure that portrait and landscape really mean portrait and
+% landscape... This code was added because of the paper size
+% definitions above; the standard classes normally deal with this.
+%
+\ifRM@portrait
+ \ifdim\paperwidth>\paperheight
+ \@tempdima=\paperwidth
+ \paperwidth=\paperheight
+ \paperheight=\@tempdima
+ \fi% endifdim
+\else %if landscape
+ \ifdim\paperheight>\paperwidth
+ \@tempdima=\paperwidth
+ \paperwidth=\paperheight
+ \paperheight=\@tempdima
+ \fi% endifdim
+\fi% endifRM@portrait
+%
+% The final values of the paper dimensions are now set. If user code
+% changes them, the initial values should be reported. The final
+% values are reported at the end along with everything else.
+%
+%%
+%%
+%% \section{Deal with RM type sizes and PS founts etc}
+%% =========================================
+%%
+% This code below requests tight as the default typesetting tightness.
+% Not having tight in the default options lists above means that the
+% loadfount options can be over-ridden by tight/loose/.../loosest
+% options. If \RM@looseoption has not been set by anything, it is set
+% to tight. The tight/loose/.../loosest options set \RM@looseoption to
+% the specified value; and loadpsfount sets \RM@looseoption=2 (loose)
+% only if \RM@looseoption=205 (the initial value). So tight etc.
+% option can over-ride loadpsfount, but not vice-versa. This works
+% whether tight/loosest comes before or after loadpsfount in the options
+% list.
+%
+% Note that loadpsfounts sets \RM@looseoption=5 (sloppy) if you've
+% asked for two column typesetting and no other looseness. This is
+% *not* done if you've asked for a multiple column width. The
+% multicol package makes its own arrangements; it might be best to
+% use the tight option if you're asking for a multiple column width.
+% This is because the \sloppiness command changes lots of typesetting
+% parameters, and it might be the case that the parameters the multicol
+% package changes are set on the assumption that all other typesetting
+% parameters have their standard values. I don't know what the answer
+% is, I really don't.
+%
+% But according to Sebastian Rahtz's psnfss2e.tex, v 3.2, 1995/11/21,
+% the metrics produced by fontinst have changed since the original
+% advice was written (updated documentation would help, you
+% know---the documentation I got with fontinst in 1996 makes no
+% mention of this), so the suggestion that you should use looser
+% typesttting parameters no longer applies. Keep the support for this
+% behaviour, but don't change the typesetting parameters? Hmm. But
+% my experience shows that the founts are still quite tight, and you
+% get lots more linebreak problems with the PSNFSS founts than cmr.
+% So I think the thing to do is keep some loosening of some sort.
+% Looseish appears loose enough.
+%
+%
+\ifnum\RM@looseoption=205\def\RM@looseoption{0}\fi
+%
+%
+% \RM@ptsize=666 if no attempt has been made to load an rmsizeN package
+% AND no call is requested in this package
+%
+\ifnum\RM@ptsize=666
+ \else
+ \RequirePackage{rmsize\RM@ptsize}% only load if not already loaded
+ \fi
+%
+% The various options have set their counters, which rmpage leaves
+% undisturbed until the end, where they are reported with everything
+% else. So don't report them here.
+%
+%
+% Load founts using standard packages if asked...
+%
+%
+\ifRM@loadfount
+ \ifcase\RM@fountfamily%
+ % 0 cmr
+ \RM@Warn{You don't need to loadcmr using the rmpage package}
+ \or% 1 Avant Garde
+ \IfFileExists{avant.sty}{\RequirePackage{avant}}{
+ \RM@nofilew{Avant Garde}{avant.sty}}
+ \or% 2 Bookman
+ \IfFileExists{bookman.sty}{\RequirePackage{bookman}}{
+ \RM@nofilew{Bookman}{bookman.sty}}
+ \or% 3 Zapf Chancery
+ \IfFileExists{chancery.sty}{\RequirePackage{chancery}}{
+ \RM@nofilew{Zapf Chancery}{chancery.sty}}
+ \or% 4 Helvetica
+ \IfFileExists{helvet.sty}{\RequirePackage{helvet}}{
+ \RM@nofilew{Helvetica}{helvet.sty}}
+ \or% 5 New Century Schoolbook
+ \IfFileExists{newcent.sty}{\RequirePackage{newcent}}{
+ \RM@nofilew{New Century Schoolbook}{newcent.sty}}
+ \or% 6 Palatino
+ \IfFileExists{palatino.sty}{\RequirePackage{palatino}}{
+ \RM@nofilew{Palatino}{palatino.sty}}
+ \or% 7 Times
+ \IfFileExists{times.sty}{\RequirePackage{times}}{
+ \RM@nofilew{Times}{times.sty}}
+ \or% 8 Utopia
+ \IfFileExists{utopia.sty}{\RequirePackage{utopia}}{
+ \RM@nofilew{Utopia}{utopia.sty}}
+ \or% 9 Lucida casual
+ \IfFileExists{lucasual.sty}{\RequirePackage{lucasual}}{
+ \RM@nofilew{Lucida Casual}{lucasual.sty}}
+ \or% 10 Courier
+ \renewcommand{\rmdefault}{pcr}
+ \RM@Warn{The loadcourier option makes the default roman
+ fount\MessageBreak Courier. I think this is ugly and crude:
+ you might\MessageBreak be better off using the times package
+ and \protect\ttfamily}
+ \or% 11 Concrete
+ \IfFileExists{beton.sty}{\RequirePackage{beton}}{
+ \RM@nofilew{Concrete}{beton.sty}}
+ \or% 12 This fount width
+ \RM@Warn{You can't load 'this fount'; stop it!}
+ \or% 13 Lucida casual again
+ \def\RM@fountfamily{9}% sets \RM@fountfamily to std lucasual value
+ \IfFileExists{lucida-helvetica.sty}{\RequirePackage{lucida-helvetica}}{
+ \RM@nofilew{Lucida Casual}{lucida-helvetica.sty}}
+ \fi
+\fi
+%
+% Code to deal with the beton package; I don't like this, but I'm not
+% TeXnical enough to write anything I feel happier with.
+%
+% Written to work with beton 1.3 1995/03/05
+%
+% See corresponding \let\@setfontsize=\RM@old@setfontsize etc just
+% before running setwidth code.
+%
+% beton messes about with \baselineskip, but changes it
+% \AtBeginDocument. So a certain amount of jiggery-pokey is needed.
+%
+% The beton package must be loaded before rmpage. rmpage then uses
+% the guts of beton to change baselineskip to the beton value so we
+% can set textheight properly (assuming the beton option has been
+% specified).
+%
+\@ifpackageloaded{beton}{
+ \ifnum\RM@ifbeton=3\def\RM@ifbeton{1}\fi% beton loaded, no opt
+ \ifnum\RM@ifbeton=2\def\RM@ifbeton{0}\fi% beton loaded, beton opt
+ }{}
+%
+\ifnum\RM@ifbeton<3
+ \@ifpackagewith{beton}{standard-baselineskips}
+ {% if beton has been loaded with standard-baselineskips
+ \RM@ocl{2}{\typeout{rmpage thinks the beton package
+ has been loaded with standard-baselineskips}}{}
+ }
+ {% if beton has been loaded without standard-baselineskips
+ \ifnum\RM@ifbeton<2
+ \RM@ocl{2}{\typeout{rmpage thinks the beton package
+ has been loaded without standard-baselineskips}}{}
+ \ifnum\RM@ifbeton=1
+ \RM@oclwarninfo{3}{You should send the beton
+ option to rmpage \MessageBreak
+ if you're using the beton package. I'll
+ set \MessageBreak
+ \protect\textheight\space using beton
+ \protect\baselineskip\space anyway.}
+ \fi%endifnum\RM@ifbeton=1
+ % if beton has been loaded without standard-baselineskips
+ % use beton internals to change \baselineskip,
+ % after saving old size (restore after \textheight setting)
+ %
+ % Check this command from beton first\ldots
+ \CheckCommand*{\beton@new@setfontsize}[3]
+ {\edef\@tempa{\def\noexpand\@tempb####1<#2}%
+ \@tempa>##2<##3\@nil{\def\beton@baselineskip@value{##2}}%
+ \edef\@tempa{\noexpand\@tempb\beton@baselineskip@table<#2}%
+ \@tempa><\@nil
+ \ifx\beton@baselineskip@value\@empty
+ \def\beton@baselineskip@value{#3}%
+ \fi
+ \beton@old@setfontsize{#1}{#2}\beton@baselineskip@value}
+ % dun
+ \let\RM@ldf@baselineskip=\f@baselineskip
+ \let\RM@ldf@size=\f@size
+ \let\beton@old@setfontsize=\@setfontsize% Don't bugger about
+ \let\@setfontsize=\beton@new@setfontsize% unless necessary
+ \normalsize
+ \else
+ % if beton has not been loaded, complain and do nought.
+ \RM@Error{You must load beton before rmpage\MessageBreak
+ if you want to use the beton option with rmpage.}
+ {Either remove the beton option from
+ rmpage, or\MessageBreak
+ \protect\usepackage{beton} before
+ \protect\usepackage[beton]{rmpage}}
+ \fi%endifnum\RM@ifbeton<2
+ }
+\fi% endifnum\RM@beton<3
+%
+% (almost) End code to deal with the beton package; see just
+% before calling width setting code
+%%
+%%
+%% \section{Identify class}
+%%
+% 0=unknown, 1=article, 2=report, 3=letter, 4=book, 5=slides, 10=ltxdoc,
+% 11=ltxguide, 19=default unknown, 20=rmcv, 21=rmletter, 22=bithesis,
+% 23=ljmueepexam, 50=foils
+%
+% Note that only class numbers 0-11 are defined in rmpage; 20-23 are
+% defined in the config file, using the \RM@DefineNewClasses hook.
+%
+% For this code to work properly, the classes which are called loaded
+% by other classes need to be detected first, so that if you base (say)
+% bithesis on report, \RM@classtype ends up set to 22 (for bithesis),
+% rather than 2 (for report), which is what is needed. Because
+% \RM@DefineNewClasses is executed after the standard list of classes
+% below, this isn't something you normally need to think about.
+%
+% Of course, you can detect the loading of classes in the
+% \RMAfterProcessOptions hook if you like, or set \RM@classtype using
+% an option
+%
+% Execute the \RM@DefineNewClasses hook if it exists and if
+% \RM@classtype is less than 20 (that is, either a standard LaTeX
+% class or no class has been defined). This way, you can define
+% class types with options, and they won't be changed here.
+%
+\ifnum\RM@classtype<20
+ \RM@executehook{RM@DefineNewClasses}
+\fi
+%
+% If a class type hasn't been defined yet, try and detect one of the
+% standard classes. \RM@SetClassType sets \RM@ClassType to the given
+% value, if \RM@classtype is below that value and the given class has
+% been loaded.
+%
+\ifnum\RM@classtype=0
+ \RM@SetClassType{article}{1}
+ \RM@SetClassType{report}{2}
+ \RM@SetClassType{letter}{3}
+ \RM@SetClassType{book}{4}
+ \RM@SetClassType{slides}{5}
+ \RM@SetClassType{ltxdoc}{10}
+ \RM@SetClassType{ltxguide}{11}
+ \RM@SetClassType{foils}{50}
+ \RM@SetClassType{rmtest}{49}
+\fi% endifnum\RM@classtype
+%%
+%%
+%% \subsection{Set things up for specific classes}
+%%
+%% Defaults:
+%%
+%% \def\RM@textheightgroup{0}
+%% \def\RM@textwidthgroup{0}
+%% \@ifundefined{@ptsize}{\def\RM@ptsizegroup{0pt}}{\edef\RM@ptsizegroup{\@ptsize}}
+%%
+% \RM@textheightgroup = 1 for slides class, 0 for everything else
+% \RM@textwidthgroup = 0 for std classes except slides, 1 for slides,
+% 2 for foils, and 3 for other.
+% \RM@ptsizegroup = \@ptsize for std classes except slides,
+% 0=undefined
+\RM@OnClassType{0}
+ {\RM@Warn{I don't recognize this class;\MessageBreak
+ I'll behave partly as if you asked for an article.\MessageBreak
+ This behaviour is decidely iffy at the moment.}
+ \def\RM@textwidthgroup{3}% value for classes using non-standard \@ptsize
+ \def\RM@ptsizegroup{0}% Maybe not the right thing.
+ \def\RM@classtype{19}}{}
+% 1=article
+% 2=report
+% 3=letter
+% 4=book
+% 5=slides
+\RM@OnClassType{5}
+ {\def\RM@textheightgroup{1}% slides textheight setting
+ \def\RM@textwidthgroup{1}% slides textwidth setting
+ \RM@oclwarninfo{3}
+ {I'm not very good with slides yet. Good luck}}{}
+%6=ltxdoc; see config file
+%7=ltxguide
+%20=rmcv
+%21=rmletter
+%22=bithesis
+%23=ljmueepexam
+\RM@OnClassType{49}
+ {
+ \def\RM@textwidthgroup{3}% rmtest textwidth setting
+% \ifnum\@ptsize=17 \def\RM@ptsizegroup{0}\fi
+% \ifnum\@ptsize=20 \def\RM@ptsizegroup{1}\fi
+% \ifnum\@ptsize=25 \def\RM@ptsizegroup{2}\fi
+% \ifnum\@ptsize=30 \def\RM@ptsizegroup{3}\fi
+ \RM@oclwarninfo{3}
+ {rmtest class detected, you poor fool you^^J
+ Sit down and have a nice cup of tea.^^J
+ There's that's better, isn't it?}
+ }{}
+%50=foils
+\RM@OnClassType{50}
+ {
+ \def\RM@textwidthgroup{2}% foils textwidth setting
+ \ifnum\@ptsize=17 \def\RM@ptsizegroup{0}\fi
+ \ifnum\@ptsize=20 \def\RM@ptsizegroup{1}\fi
+ \ifnum\@ptsize=25 \def\RM@ptsizegroup{2}\fi
+ \ifnum\@ptsize=30 \def\RM@ptsizegroup{3}\fi
+ \RM@oclwarninfo{3}
+ {rmpage's foils class support is not well tested}
+ }{}
+%
+% Execute \RM@AfterProcessOptions if it exists
+%
+\RM@executehook{RM@AfterProcessOptions}
+%
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% The following code was taken from ltoutput.dtx. The assumption is
+% that odd pages are on the left and even pages on the right. That way
+% you have odd and even margins arranged so the inside (or outside)
+% margins are largest. But for some reason this assumption broke down
+% for the Excalibur manual (which ends up with odd page numbers on the
+% left). I must investigate.
+% %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \ifRM@twoside
+% \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
+% \let\@themargin\oddsidemargin
+% \else \let\@thehead\@evenhead
+% \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
+% \fi
+% \fi
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%%
+%% \section{Deal with printer/paper specific settings}
+%%
+% The following code needs to be reviewed for each printer/paper size
+% combination.
+%
+% Begin by setting default minimum clearances; the long paper sizes
+% introduce a complication, because using ISO A or B series sizes,
+% a long size of 2/3 or less needs to be turned $90\deg$ to retain
+% its portrait/landscape sense relative to the original sheet (does
+% that make sense?). The idea is this: if you want, say, 1/4 A4,
+% you can get it by cutting a sheet of A4 into little bits,
+% \emph{after} you've run it through the printer. So the printer
+% printing area limits that apply to a bit of 1/4 A4 landscape are the
+% limits that apply to straight A4 portrait.
+%
+% So the default minimum clearances are set to be the printer's default
+% portrait clearances if you've asked for portrait printing in a
+% straight size, or landscape clearances if you've asked for landscape
+% printing in a long size. If you've asked for a long size and
+% the \RM@portlandinvert switch has been set true, you'll get
+% portrait clearances if you've asked for landscape printing, and
+% landscape clearances if you've asked for portrait printing.
+%
+% Except that, in the case of long sizes above 1/2, you can only get
+% one long page on each full-size bit of paper, so the minimum
+% clearance on one side can be zero, because it's unlikely that
+% you'll be anywhere near the edge of the paper (this assumption
+% breaks down when you get to 7/8 A7, 3/4 A9, or 2/3 A10 on a DW520).
+%
+% I think it's right to maintain the appropriate clearance limit by
+% default if you ask for a long size which can be put many to a sheet
+% of paper, because you might want to do just that with dvidvi, and it'd
+% be a bit of a bugger if the last page in the sequence was missing a
+% bit. If you don't agree with me, you can change this behaviour
+% using the \RM@PrinterPaperSettings hook in the config file.
+%
+% Assuming that the leading edge of the paper travelling into the
+% printer is the top or left-hand edge of the typeset page, we have
+% this situation:
+%
+% If the paper size is 7/8, 3/4, or 2/3, and you've asked for
+% portrait printing, the minimum right clearance can be zero if
+% \RM@portlandinvert is true, and the minimum bottom clearance can be
+% zero if \RM@portlandinvert is false.
+%
+% If you've asked for landscape printing, the inverse situation
+% applies.
+%
+% But there is a certain amount of variation in paper size, and limit
+% to the accuracy with which you can cut, so I think it's appropriate
+% to set the minimum clearance to about 1 or 2mm, unless you've
+% specified fullbleedprinter. Time for another bloody parameter, call
+% it \RM@ptrpostol (for printer position tolerance), and set it for each
+% printer. This is added to the minclearance parameters after they
+% have been set (after the \RM@PrintPaperSettings hook's been
+% executed), so there's plenty of scope for setting it to whatever
+% you like.
+%
+% It's okay, I'm confused too.
+%
+% And if you don't like this behaviour, you can over-ride it for any
+% given paper size and printer combination in your config file. Good,
+% innit?
+%
+\ifRM@portrait
+ \ifRM@portlandinvert
+ \@tempswafalse
+ \else
+ \@tempswatrue
+ \fi
+\else
+ \ifRM@portlandinvert
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+\fi
+%
+%
+% Set portrait printer clearance settings (yech)
+% if (\RM@portrait and not \RM@portlandinvert)
+% or (not \RM@portrait and \RM@portlandinvert).
+%
+% Set landscape printer clearance settings
+% if (\RM@portrait and \RM@portlandinvert)
+% or (not \RM@portrait and not \RM@portlandinvert).
+%
+% Report which kind of setting's begin used, because everything here's
+% a bit confusing
+%
+\if@tempswa
+ \RM@ocl{1}{\typeout{Portrait printing clearance settings}}{}
+ \let\RM@minrightclearance\RM@ptrrportclear
+ \let\RM@minleftclearance\RM@ptrlportclear
+ \let\RM@minfootclearance\RM@ptrbportclear
+ \let\RM@minheadclearance\RM@ptrtportclear
+\else
+ \RM@ocl{1}{\typeout{Landscape printing clearance settings}}{}
+ \let\RM@minrightclearance\RM@ptrrlandclear
+ \let\RM@minleftclearance\RM@ptrllandclear
+ \let\RM@minfootclearance\RM@ptrblandclear
+ \let\RM@minheadclearance\RM@ptrtlandclear
+\fi
+%
+% Then set one clearance to 0pt if you've asked for 7/8, 3/4,
+% or 2/3 long paper; report again to explain what's happening.
+%
+\relax
+\ifnum\RM@longpapertype>0
+ \ifnum\RM@longpapertype<4
+ \RM@ocl{1}{\typeout
+ {Setting bottom page clearance to zero, because the requested
+ long\MessageBreak
+ paper type fits one to a straight page}}{}
+ \ifRM@portrait
+ \ifRM@portlandinvert
+ \def\RM@minrightclearance{0pt}
+ \else
+ \def\RM@minfootclearance{0pt}
+ \fi% endifRM@portlandinvert
+ \else
+ \ifRM@portlandinvert
+ \def\RM@minfootclearance{0pt}
+ \else
+ \def\RM@minrightclearance{0pt}
+ \fi% endifRM@portlandinvert
+ \fi% endifRM@portrait
+ \fi% endifRM@longpapertype<4
+\fi
+%
+%
+% Note that the values of the various \RM@ptr...clear parameters that
+% are used are the ones reported at the end of the package.
+% \RM@min[head|foot]clearances are reported after inital setting and
+% at the end. Aside from that, it's probably a good idea to report
+% the value of these various parameters before printer-specific code
+% gets the chance to screw things up: this is where debugging
+% information can be really useful. \RM@papertype,
+% \RM@longpapertype, and \RM@portlandinvert all have their final
+% values. If user code changes any of these, that should be reported,
+% along with the value before changing
+\RM@ocl{1}
+ {\typeout{Before printer specific settings}
+ \RM@tval{\RM@minrightclearance}
+ \RM@tval{\RM@minleftclearance}
+ \RM@tval{\RM@minheadclearance}
+ \RM@tval{\RM@minfootclearance}
+ \RM@tval{\RM@ptrrlandclear}
+ \RM@tval{\RM@ptrrlandclear}
+ \RM@tval{\RM@ptrblandclear}
+ \RM@tval{\RM@ptrtlandclear}
+ \RM@tval{\RM@ptrrportclear}
+ \RM@tval{\RM@ptrlportclear}
+ \RM@tval{\RM@ptrbportclear}
+ \RM@tval{\RM@ptrtportclear}
+ }{}
+%
+%
+% It might be best to have this code in a config file?
+%
+%
+%
+%
+% Because all manner of strange things can happen to the clearances
+% above, it might be best to set the \RM@min...clearance parameters to
+% their corresponding \RM@ptr...clear values on a printer-by-printer
+% basis.
+%
+% But I reckon most printers are A4 printers, so I've set the
+% \RM@min..clearance parameters to their corresponding \RM@ptr...clear
+% values for any printer. If you're printer needs something else, you
+% can set this by putting an \RM@OnPrinterType{} command in the
+% \RM@PrinterPaperSettings hook.
+%
+% It might also be a good idea to set \RM@jackuptrue for A3 portrait if
+% you've got an HP inkjet or similar printer with an over-large bottom
+% margin. I've done this for DW520 printers, because I like it that
+% way. You can of course over-ride this if you like.
+%
+%
+% If you need to set minimum clearances for particular printer/paper
+% combinations, set them using this hook, defined in the configuration
+% file..
+%
+\RM@executehook{RM@PrinterPaperSettings}
+%
+% And finally add \RM@ptrpostol to the minclearances. This is just a
+% fudge factor to cope with the fact that paper's not that accurately
+% cut, printers aren't perfectly accurate, and the real world wobbles
+% a bit. The job is complicated by the fact that the
+% \RM@min...clearances are commands, not lengths. I could define a
+% command to add to a command (ish), but that's a job for another day
+% and a major re-working of rmpage after it's settled down a bit.
+%
+\setlength\@tempdima{\RM@minfootclearance}
+\addtolength\@tempdima{\RM@ptrpostol}
+\edef\RM@minfootclearance{\the\@tempdima}
+%
+\setlength\@tempdima{\RM@minheadclearance}
+\addtolength\@tempdima{\RM@ptrpostol}
+\edef\RM@minheadclearance{\the\@tempdima}
+%
+\setlength\@tempdima{\RM@minrightclearance}
+\addtolength\@tempdima{\RM@ptrpostol}
+\edef\RM@minrightclearance{\the\@tempdima}
+%
+\setlength\@tempdima{\RM@minleftclearance}
+\addtolength\@tempdima{\RM@ptrpostol}
+\edef\RM@minleftclearance{\the\@tempdima}
+%
+%
+% Deal with mparclearance initial value here; it's scaled later (in
+% the width setting file). Should I report what's going on? I
+% suspect not: see how it goes. And \RM@ocltype won't exist soon; the
+% commented out stuff'll need changing if it's going to be kept.
+%
+\ifdim\RM@mparclearance=-666pt
+ \setlength\RM@mparclearance{0.04706\paperwidth}
+%\RM@ocltype{1}{Set short mparclearance}
+\fi
+\ifdim\RM@mparclearance=-667pt
+ \setlength\RM@mparclearance{0.09412\paperwidth}
+%\RM@ocltype{1}{Set long mparclearance}
+\fi
+%
+\ifdim\RM@maxmparwidth=-666pt
+ \setlength\RM@maxmparwidth{0.2353\paperwidth}
+%\RM@ocltype{1}{Set short maxmparwidth}
+\fi
+\ifdim\RM@maxmparwidth=-667pt
+ \setlength\RM@maxmparwidth{0.4706\paperwidth}
+%\RM@ocltype{1}{Set long maxmparwidth}
+\fi
+%
+% Check that \RM@mparclearance hasn't been set to something silly.
+%
+\@tempswafalse
+\ifdim\RM@mparclearance<0pt
+ \@tempswatrue
+\fi
+\ifdim\RM@mparclearance>\paperwidth
+ \@tempswatrue
+\fi
+\if@tempswa
+ \RM@Warn{\protect\RM@mparclearance has been set to a daft
+ value\MessageBreak
+ \protect\RM@mparclearance\space= \the\RM@mparclearance
+ }
+\fi
+%
+% Check that \RM@maxmparwidth hasn't been set to anything daft
+%
+\@tempswafalse
+\ifdim\RM@maxmparwidth<0pt
+ \@tempswatrue
+\fi
+\ifdim\RM@maxmparwidth>\paperwidth
+ \@tempswatrue
+\fi
+\if@tempswa
+ \RM@Warn{\protect\RM@maxmparwidth has been set to a daft
+ value\MessageBreak
+ \protect\RM@maxmparwidth\space= \the\RM@maxmparwidth
+ }
+\fi
+%
+% \RM@mparclearance and \RM@maxmparwidth now both have their initial
+% values. Report them along with the vertical clearances just below.
+%
+%
+% The easiest way of dealing with min[top,bot]margins is to ensure that
+% the min[head,foot]clearances are at least as big. Final values of
+% these parameters are reported at the end, and
+% \RM@min[top|bottom]margin isn't changed by rmpage (user code should
+% report any changes), so only report \RM@min[head|foot]clearance
+% here. But this might be confusing, so maybe report top and bottom
+% margin limits one day.
+%
+\RM@ocl{2}
+ {\typeout{Initial values:}
+ \RM@tval{\RM@minheadclearance}
+ \RM@tval{\RM@minfootclearance}
+ \RM@ttval{\RM@maxmparwidth}
+ \RM@ttval{\RM@mparclearance}
+ }{}
+%
+\ifdim\RM@minfootclearance<\RM@minbottommargin
+ \let\RM@minfootclearance\RM@minbottommargin
+\fi
+\ifdim\RM@minheadclearance<\RM@mintopmargin
+ \let\RM@minheadclearance\RM@mintopmargin
+\fi
+%%
+%%
+%% \section{Begin setting LaTeX's vertical layout parameters}
+%%
+% Set the head/foot clearance balance as a fraction of 24 (to bleh).
+% e.g., \@hfb= 18 gives: 0.75\@thfc=\thc, 0.25\@thfc=\tfc
+% 18/24 (24-18)/24
+%\RM@headfootbalance=12
+% This is now set by normalaltitude/high/low options. Default is
+% normalaltitude => \headfootbalance=12
+%
+% \baselineskip get played around with rather a lot. Might as well
+% report it here; who knows what might be going on?
+%
+\RM@ocl{1}{
+ \typeout{At first use of \protect\baselineskip:}
+ \RM@ttval{\baselineskip}}{}
+%
+% Re-define \headheight so you can fit a whole line in the headbox
+% (the standard classes leave the headbox too short!), or so that no
+% height at all is left for the header.
+%
+\@ifundefined{RMheadheight}{\let\RMheadheight\baselineskip}{}
+\ifRM@headers
+ \headheight=\RMheadheight
+\else
+ \headheight=0pt
+ \headsep=0pt
+\fi
+%
+% if you've asked for a page with no footers, allow no space for them.
+%
+\ifRM@footers
+ \relax
+\else
+ \footskip=0pt
+\fi
+%
+% Multiply \headsep according to the option used...
+%
+%
+\RM@scalebyoption{\headsep}{\RM@headsepoption}
+%
+% Multiply \footskip according to the option used...
+% Note that \footskip is the distance to the bottom of the box containing
+% the foot, so assume that this box is one line deep, and act accordingly...
+% Keep the explicit report of size before and after, because the
+% report typed by \RM@scalebyoption gives the value less \baselineskip
+%
+\RM@ocl{1}{
+ \typeout{Initial value:}
+ \RM@ttval{\footskip}
+ }{}
+%
+\addtolength\footskip{-\baselineskip}% add this back on after the multiplication
+\RM@scalebyoption{\footskip}{\RM@footskipoption}
+\addtolength\footskip{\baselineskip}% added back --- see above
+%
+% Footskip now has its final value which isn't changed by rmpage
+% (user code from a config file might change it, and if so should
+% report before and after). \footskip is reported at the end, so don't
+% report here.
+%
+%
+% Now check the limits on textheight
+% ----------------------------------
+%
+% \RM@[min|max]textheight...
+%
+%
+% Initial check for impossible values: set the two parameters to
+% values that allow rmpage to calculate a normal layout.
+\RM@ocl{2}{
+ \typeout{Initial values:}
+ \RM@tval{\RM@maxtextheight}
+ \RM@tval{\RM@mintextheight}
+ }{}
+%
+\ifdim\RM@maxtextheight<\topskip
+ \RM@Error{You've set \protect\RM@maxtextheight\space to a
+ value\MessageBreak that's too short for one line of text}
+ {Try increasing it...}
+\fi
+%
+\ifdim\RM@mintextheight>\RM@maxtextheight
+ \RM@Error{You've asked for a \protect\RM@mintextheight that is
+ greater\MessageBreak than
+ \protect\RM@maxtextheight}
+ {You'll have to change at least one of the two before I can
+ work\MessageBreak out a layout properly.}
+\fi
+
+% The value of \RM@maxtextheight can be anything. Before the code
+% below gets to work, it makes sense to ensure that \RM@maxtextheight
+% is no larger than what will fit on the paper, everything else
+% considered. \RM@min[foot|head]clearances have been set to at least
+% \RM@min[top|bottom]margins
+%
+\setlength\@tempdima{\paperheight}
+\addtolength\@tempdima{-\RM@minheadclearance}
+\addtolength\@tempdima{-\RM@minfootclearance}
+\addtolength\@tempdima{-\headheight}
+\addtolength\@tempdima{-\headsep}
+\addtolength\@tempdima{-\footskip}
+%
+% Initial check
+\ifdim\@tempdima<0pt
+ \RM@Error{The vertical printable region is too small---I
+ can't\MessageBreak calculate a valid layout}
+ {Your layout parameters ask for a negative
+ \protect\textheight. Major bummer.}
+\fi
+%
+% If \@tempdima<\topskip, there's no room for any text at all in the
+% text body. This is not the kind of layout rmpage was meant to come
+% up with, so test for it.
+%
+\ifdim\@tempdima<\topskip
+ \RM@Error{The vertical printable region is too small---I
+ can't\MessageBreak calculate a valid layout}
+ {Your layout parameters are asking for a
+ \protect\textheight\MessageBreak which is too short for
+ one line of text. Major bummer.}
+\fi
+%
+% \@tempdima is now set to the space available for \textheight.
+% Make sure that \RM@maxtextheight is no more than this:
+\ifdim\RM@maxtextheight>\@tempdima
+ \edef\RM@maxtextheight{\the\@tempdima}
+ \RM@ocl{1}
+ {\typeout{I've reduced \protect\RM@maxtextheight\space
+ to fit the available space}}{}
+\fi
+%
+% Likewise, \RM@mintextheight can be anything. It should be greater
+% than zero, and less than \RM@maxtextheight. Setting it to anything
+% else is daft.
+\ifdim\RM@mintextheight<0pt
+ \def\RM@mintextheight{0pt}
+ \RM@Warn{You asked for a negative \RM@mintextheight;\MessageBreak
+ I've increased it to 0pt.}
+\fi
+%
+\ifdim\RM@mintextheight>\RM@maxtextheight
+ \RM@Error{The vertical printable region is too short---I
+ can't\MessageBreak make \protect\textheight\space as
+ large as \protect\RM@mintextheight}
+ {Either reduce \protect\RM@mintextheight, or change other
+ layout parameters to\MessageBreak increase the space available
+ for \protect\textheight.}
+\fi
+%%
+%%
+%% \subsection{Textheight setting code begins here}
+%%
+% \headheight, \headsep, \footskip, \RM@mintextheight, and
+% \RM@maxtextheight all have their final values by now.
+%
+% Define sum of clearance above and below foot and head.
+%
+% \textheight is set as a fraction of \paperheight so that if you are
+% typesetting in 10pt, normallength, with headers and footers, on A4
+% paper, the clearance above and below the foot and head is the same as
+% it'd be if you'd used the standard classes. This applies to normal
+% and slides setting; the \textheights are different for each.
+%
+% Other length options scale this base fraction of \paperheight.
+%
+% \RM@jackup should be = \RM@totalfootclearance-\RM@minfootclearance at
+% the place marked %jackup point%. This is so the code below sets
+% vertical page parameters directly - rmpage won't let you print off
+% what it thinks the printing area is, but it's nice if you've set the
+% sizes yourself.
+%
+% The standard LaTeX article and report classes set \textheight like
+% this:
+% (from size10.clo)
+% \setlength\@tempdima{\paperheight}
+% \addtolength\@tempdima{-2in}
+% \addtolength\@tempdima{-1.5in}
+% \divide\@tempdima\baselineskip
+% \@tempcnta=\@tempdima
+% \setlength\textheight{\@tempcnta\baselineskip}
+%
+% (etc)
+%
+% In terms of the code below, the fixed length subtracted from
+% \paperheight, here 3.5in, is:
+%
+% 3.5in=\RM@totalheadfootclearance+\headheight+\headsep+\footskip+\topskip
+%
+% rmpage normallength setting gives the same \textheight as the standard
+% method if you're using headers and footers on A4 paper. This isn't
+% guaranteed, because of rounding errors, but I'd be very surprised if
+% they ever really changed anything.
+%
+% Set \textheight in two different ways (so far): one way for slides;
+% the other for everything else.
+%
+% Note that \RM@textheightgroup is defined above; this code is here
+% just to show what's been done.
+%
+% %Default textheight setting method is number 0
+% \def\RM@textheightgroup{0}
+%
+% % Slides class uses method 1 by default
+% \RM@OnClassType{5}{\def\RM@textheightgroup{1}}{}
+% % set things differently if you're using slides
+%
+% You can change the \RM@textheightgroup on a class-by-class basis
+% using \RM@OnClassType in the \RM@AfterProcessOptions hook, and you
+% can define a new textheight setting group by using
+% \RM@OnTextheightGroup{N}{<TeX code>} in the
+% \RM@BeforeTextheightSetting hook
+
+\RM@executehook{RM@BeforeTextheightSetting}
+%
+% \RM@textheightgroup should now have it's final value, which it
+% retains until the end of the package. So only report it at the end of
+% the package.
+%
+% The code block below has multipliers that increase \textheight by
+% about 1 line if you say touchlonger with normallength on A4; that's
+% about right, I reckon. (12.92pt to be precise). Larger steps are
+% inappropriate, or so I think at the momemt.
+%
+% It's geometrical series: multiply by 1.0772 for each step---
+% $\sqrt[12]{ 2.442660550}$ or thereabouts.
+%
+%%
+%%
+%% Set base \thfc for all classes except slides
+%% ............................................
+%%
+\RM@OnTextheightGroup{0}{
+ \ifcase\RM@lengthoption
+ \setlength\RM@totalheadfootclearance{3.5in}%0=stdlength
+ \ifRM@footers
+ \addtolength\RM@totalheadfootclearance{-\footskip}
+ \fi
+ \ifRM@headers
+ \addtolength\RM@totalheadfootclearance{-\headsep}
+ \addtolength\RM@totalheadfootclearance{-\headheight}
+ \fi
+ \addtolength\RM@totalheadfootclearance{-\topskip}
+ \or \setlength\RM@totalheadfootclearance{0.6034\paperheight}%1
+ \or \setlength\RM@totalheadfootclearance{0.5602\paperheight}%2
+ \or \setlength\RM@totalheadfootclearance{0.5200\paperheight}%3 shortest
+ \or \setlength\RM@totalheadfootclearance{0.4827\paperheight}%4
+ \or \setlength\RM@totalheadfootclearance{0.4481\paperheight}%5
+ \or \setlength\RM@totalheadfootclearance{0.4160\paperheight}%6 shorter
+ \or \setlength\RM@totalheadfootclearance{0.3862\paperheight}%7
+ \or \setlength\RM@totalheadfootclearance{0.3585\paperheight}%8
+ \or \setlength\RM@totalheadfootclearance{0.3328\paperheight}%9 short
+ \or \setlength\RM@totalheadfootclearance{0.3090\paperheight}%10
+ \or \setlength\RM@totalheadfootclearance{0.2868\paperheight}%11
+ \or \setlength\RM@totalheadfootclearance{0.2663\paperheight}%12 shortish
+ \or \setlength\RM@totalheadfootclearance{0.2294\paperheight}%13
+ \or \setlength\RM@totalheadfootclearance{0.2294\paperheight}%14
+ \or \setlength\RM@totalheadfootclearance{0.2130\paperheight}%15 norm
+ \or \setlength\RM@totalheadfootclearance{0.1977\paperheight}%16
+ \or \setlength\RM@totalheadfootclearance{0.1836\paperheight}%17
+ \or \setlength\RM@totalheadfootclearance{0.1704\paperheight}%18 longish
+ \or \setlength\RM@totalheadfootclearance{0.1582\paperheight}%19
+ \or \setlength\RM@totalheadfootclearance{0.1468\paperheight}%20
+ \or \setlength\RM@totalheadfootclearance{0.1363\paperheight}%21 long
+ \or \setlength\RM@totalheadfootclearance{0.1265\paperheight}%22
+ \or \setlength\RM@totalheadfootclearance{0.1175\paperheight}%23
+ \or \setlength\RM@totalheadfootclearance{0.1091\paperheight}%24 longer
+ \or \setlength\RM@totalheadfootclearance{0.1012\paperheight}%25
+ \or \setlength\RM@totalheadfootclearance{0.0940\paperheight}%26
+ \or \setlength\RM@totalheadfootclearance{0.0872\paperheight}%27 longest
+ \or \setlength\RM@totalheadfootclearance{0.0810\paperheight}%28
+ \or \setlength\RM@totalheadfootclearance{0.0752\paperheight}%29
+ \or \setlength\RM@totalheadfootclearance{0pt}% 30 fulllength
+ \else
+ \RM@Error{rmpage has a bug}{I don't know what to do with
+ a \protect\textheight\space setting option greater than 30}
+ \fi% endifcase\RM@lengthoption
+ }{}
+%%
+%%
+%% Set base \thfc for slides class only
+%% ....................................
+%%
+\RM@OnTextheightGroup{1}{
+ \ifcase\RM@lengthoption
+ \setlength\RM@totalheadfootclearance{3in}%0=stdlength
+ \ifRM@footers
+ \addtolength\RM@totalheadfootclearance{-\footskip}
+ \fi
+ \ifRM@headers
+ \addtolength\RM@totalheadfootclearance{-\headsep}
+ \addtolength\RM@totalheadfootclearance{-\headheight}
+ \fi
+ \addtolength\RM@totalheadfootclearance{-\topskip}
+ \or \setlength\RM@totalheadfootclearance{0.3983\paperheight}%1
+ \or \setlength\RM@totalheadfootclearance{0.3698\paperheight}%2
+ \or \setlength\RM@totalheadfootclearance{0.3433\paperheight}%3 shortest
+ \or \setlength\RM@totalheadfootclearance{0.3187\paperheight}%4
+ \or \setlength\RM@totalheadfootclearance{0.2958\paperheight}%5
+ \or \setlength\RM@totalheadfootclearance{0.2746\paperheight}%6 shorter
+ \or \setlength\RM@totalheadfootclearance{0.2549\paperheight}%7
+ \or \setlength\RM@totalheadfootclearance{0.2367\paperheight}%8
+ \or \setlength\RM@totalheadfootclearance{0.2197\paperheight}%9 short
+ \or \setlength\RM@totalheadfootclearance{0.2039\paperheight}%10
+ \or \setlength\RM@totalheadfootclearance{0.1893\paperheight}%11
+ \or \setlength\RM@totalheadfootclearance{0.1758\paperheight}%12 shortish
+ \or \setlength\RM@totalheadfootclearance{0.1632\paperheight}%13
+ \or \setlength\RM@totalheadfootclearance{0.1515\paperheight}%14
+ \or \setlength\RM@totalheadfootclearance{0.1406\paperheight}%15 norm
+ \or \setlength\RM@totalheadfootclearance{0.1305\paperheight}%16
+ \or \setlength\RM@totalheadfootclearance{0.1212\paperheight}%17
+ \or \setlength\RM@totalheadfootclearance{0.1125\paperheight}%18 longish
+ \or \setlength\RM@totalheadfootclearance{0.1044\paperheight}%19
+ \or \setlength\RM@totalheadfootclearance{0.0969\paperheight}%20
+ \or \setlength\RM@totalheadfootclearance{0.0900\paperheight}%21 long
+ \or \setlength\RM@totalheadfootclearance{0.0835\paperheight}%22
+ \or \setlength\RM@totalheadfootclearance{0.0775\paperheight}%23
+ \or \setlength\RM@totalheadfootclearance{0.0720\paperheight}%24 longer
+ \or \setlength\RM@totalheadfootclearance{0.0668\paperheight}%25
+ \or \setlength\RM@totalheadfootclearance{0.0620\paperheight}%26
+ \or \setlength\RM@totalheadfootclearance{0.0576\paperheight}%27 longest
+ \or \setlength\RM@totalheadfootclearance{0.0535\paperheight}%28
+ \or \setlength\RM@totalheadfootclearance{0.0496\paperheight}%29
+ \or \setlength\RM@totalheadfootclearance{0pt}% 30 fulllength
+ \else
+ \RM@Error{rmpage has a bug}{I don't know what to do with
+ a \protect\textheight\space setting option greater than 30}
+ \fi% endifcase\RM@lengthoption
+ }{}
+%
+%
+% Dealing with \RM@mintextheight and \RM@maxtextheight: ensure that
+% the limits aren't exceeded here, so we can check that we're still
+% printing within the specified printing area. Need to check that the
+% \RM@mintextheight and \RM@maxtextheight limits aren't exceeded
+% later, and check that the printing area is kept to after that. What
+% a mess.
+%
+% Minimum practical \textheight >= (integer x \baselineskip) + \topskip
+% Calculate this and bung it in \@tempdimb for now.
+%
+\setlength\@tempdimb{\RM@mintextheight}
+\addtolength\@tempdimb{-\topskip}
+\divide\@tempdimb by\baselineskip
+\@tempcnta=\@tempdimb
+\setlength\@tempdimb{\baselineskip}
+\multiply\@tempdimb by\@tempcnta
+\addtolength\@tempdimb{\topskip}
+% \@tempdimb is now at most 1 \baselineskip less than
+% \RM@mintextheight, and is a valid value for \textheight.
+% If \@tempdimb is too small, enlarge it by \baselineskip to ensure
+% that is big enough.
+\ifdim\@tempdimb<\RM@mintextheight\relax
+ \addtolength\@tempdimb{\baselineskip}
+\fi
+% Check that I've not made a mistake with the assumption above.
+\ifdim\@tempdimb<\RM@mintextheight\relax
+ \RM@Error{This isn't right}
+ {Rowland's got it wrong again; there's a bug here}
+\fi
+%
+% And now save this value; keep the original \RM@mintextheight
+% unchanged.
+%
+\edef\RM@minpractextheight{\the\@tempdimb}
+%
+% Now calculate the maximum \RM@totalheadfootclearance
+%
+\setlength\@tempdima{\paperheight}
+\addtolength\@tempdima{-\headheight}
+\addtolength\@tempdima{-\headsep}
+\addtolength\@tempdima{-\footskip}
+\addtolength\@tempdima{-\RM@minpractextheight}
+%
+\edef\RM@maxtotalheadfootclearance{\the\@tempdima}
+%
+% Now calculate \RM@maxpractextheight and
+% \RM@mintotalheadfootclearance. Note that minthfc is the minimum
+% *practical* value, not just the minimum space left.
+%
+\setlength\@tempdima{\RM@maxtextheight}
+\addtolength\@tempdima{-\topskip}
+\divide\@tempdima by\baselineskip
+\@tempcnta=\@tempdima
+\setlength\@tempdima{\baselineskip}
+\multiply\@tempdima by\@tempcnta
+\addtolength\@tempdima{\topskip}
+%
+% \@tempdimb can be smaller than \RM@maxtextheight, but not larger.
+% So set \RM@maxpractextheight now
+%
+\edef\RM@maxpractextheight{\the\@tempdima}
+%
+\setlength\@tempdima{\paperheight}
+\addtolength\@tempdima{-\headheight}
+\addtolength\@tempdima{-\headsep}
+\addtolength\@tempdima{-\footskip}
+\addtolength\@tempdima{-\RM@maxpractextheight}
+%
+\edef\RM@mintotalheadfootclearance{\the\@tempdima}
+%
+% \RM@maxpractextheight, \RM@minpractextheight are set
+% \RM@mintotalheadfootclearance, \RM@maxtotalheadfootclearance are set
+%
+%
+% Check that the calculated values don't yield an impossible task.
+%
+\ifdim\RM@maxpractextheight<\RM@minpractextheight\relax
+\RM@Error{I can't set \protect\textheight}
+ {The \protect\textheight\space limits you've asked for make
+ me\MessageBreak
+ calculate a maximum practical \protect\textheight\space that is
+ less\MessageBreak
+ than the minimum practical \protect\textheight}
+\fi
+%
+%
+% Now check that \RM@totalheadfootclearance is within bounds:
+%
+\ifdim\RM@totalheadfootclearance<\RM@mintotalheadfootclearance\relax
+ \RM@totalheadfootclearance=\RM@mintotalheadfootclearance
+ \RM@oclwarninfo{3}
+ {I had to increase the \protect\RM@totalheadfootclearance\space
+ to\MessageBreak
+ make \protect\textheight\space as small as
+ \protect\RM@maxtextheight}
+\fi
+%
+\ifdim\RM@totalheadfootclearance>\RM@maxtotalheadfootclearance\relax
+ \RM@totalheadfootclearance=\RM@maxtotalheadfootclearance
+ \RM@oclwarninfo{3}
+ {I had to decrease the \protect\RM@totalheadfootclearance\space
+ to\MessageBreak
+ make \protect\textheight\space as large as
+ \protect\RM@mintextheight}
+\fi
+%
+% \RM@totalheadfootclearance now has a value that should produce a
+% valid \textheight. But we still need to check that the text will
+% appear inside the allowed printing region, so: be pure, be vigilant,
+% behave!
+%
+% The eventual value of \textheight cannot become larger from this
+% point onwards, so issue an error message if \textheight does
+% exceed \RM@maxtextheight at the end of things.
+%
+% Note that \RM@maxpractextheight and \RM@minpractextheight are legal
+% final values for \textheight; use them if need be.
+%
+%
+\setlength\RM@totalheadclearance{\RM@totalheadfootclearance}
+\divide\RM@totalheadclearance 24\multiply\RM@totalheadclearance\RM@headfootbalance
+\setlength\RM@totalfootclearance{\RM@totalheadfootclearance}
+\addtolength\RM@totalfootclearance{-\RM@totalheadclearance}
+%
+% These clearances are reported here, again if jacked up, again if
+% reduced to fit inside limits, before \textheight is set, and after
+% \textheight is set. I reckon that's enough.
+%
+\RM@ocl{2}
+ {\typeout{Initially requested vertical clearances}
+ \RM@ttval{\RM@totalheadclearance}
+ \RM@ttval{\RM@totalfootclearance}
+ \RM@ttval{\RM@totalheadfootclearance}
+ }{}
+%
+% Jack up by \RM@minfootclearance-\RM@totalfootclearance if the flag
+% says so. That is, keep \RM@totalheadfootclearance the same,
+% but add
+% \RM@minfootclearance-\RM@totalfootclearance to \RM@totalfootclearance,
+% and subtract
+% \RM@minfootclearance-\RM@totalfootclearance from \RM@totalheadclearance.
+%
+% It's more straightforward to set \RM@totalfootclearance to
+% \RM@minfootclearance, then recalculate \RM@totalheadclearance.
+% Keep the calculation of the amount of lift, for information's sake.
+\ifRM@jackup
+ \ifdim\RM@totalfootclearance<\RM@minfootclearance \relax
+ \setlength\@tempdima{\RM@minfootclearance}
+ \addtolength\@tempdima{-\RM@totalfootclearance}
+ \setlength\RM@totalfootclearance{\RM@minfootclearance}
+ \setlength\RM@totalheadclearance{\RM@totalheadfootclearance}
+ \addtolength\RM@totalheadclearance{-\RM@totalfootclearance}
+ \RM@ocl{2}
+ {\typeout{Raise the text area by \the\@tempdima}
+ \RM@ttval{\RM@totalfootclearance}
+ \RM@ttval{\RM@totalheadclearance}}
+ {}
+ \fi% endifdim
+\fi% endifRM@jackup
+%
+% Once upon a time, there were weird and hideous calculations in this
+% part of the woods, but the fairy godmother waved her wand and replaced
+% them with nice friendly calculations that didn't have a tendency to
+% dress in leather trousers and consume interesting chemicals in the
+% dodgier parts of Amsterdam. So, no more fudge, not even chocolate
+% fudge cake, no matter how bad the munchies.
+%
+% Hweever, rounding errors were discovered then and might be a problem
+% even now. The old code had typical deviations of 0.001pt. I reckon
+% that small errors can be ignored, and I'll define small as less than
+% 1/3 of an output pixel. This is 0.08pt at 300dpi, or 0.02pt at
+% 1200dpi. So 0.01pt is negligible, and ten times larger than likely
+% rounding errors. (0.01pt is about 3.5 microns, or less than ten
+% wavelengths of visible light). This becomes relevant later on.
+%%
+%%
+%% Make sure the text will fit on the page
+%% .......................................
+%%
+\ifdim\RM@totalfootclearance<\RM@minfootclearance% was <\@tempdima
+ \ifnum\RM@lengthoption=30
+ \else% if \RM@lengthoption <> fulllength; don't warn if fulllength.
+ \RM@oclwarninfo{3}
+ {To keep inside the specified printing limits,\MessageBreak
+ I will have to increase the clearance between
+ the\MessageBreak
+ bottom of the last text and the bottom of the\MessageBreak
+ paper. If you are not using footers, you might\MessageBreak
+ try using the nofooter option\MessageBreak
+ \the\RM@totalfootclearance \space=
+ calculated clearance\MessageBreak
+ \RM@minfootclearance \space= allowed clearance}
+ \fi% endifnum\RM@lengthoption=30
+ \setlength\@tempdima{\RM@minfootclearance}
+ \addtolength\@tempdima{-\RM@totalfootclearance}
+ \addtolength\RM@totalfootclearance{\@tempdima}
+ \addtolength\RM@totalheadfootclearance{\@tempdima}
+ \fi% end\ifdim\RM@totalfootclearance<\RM@minfootclearance
+%
+\ifdim\RM@totalheadclearance<\RM@minheadclearance% was <\@tempdima
+ \ifnum\RM@lengthoption=30
+ \else% if \RM@lengthoption <> fulllength; don't warn if fulllength.
+ \RM@oclwarninfo{3}{%
+ To keep inside the specified printing limits,\MessageBreak
+ I will have to increase the clearance between
+ the\MessageBreak
+ top of the first text and the top of the \MessageBreak
+ paper. If you are not using headers, you\MessageBreak
+ might try using the noheader option\MessageBreak
+ \the\RM@totalheadclearance\space=
+ calculated clearance\MessageBreak
+ \RM@minheadclearance\space= allowed clearance}
+ \fi
+ \setlength\@tempdima{\RM@minheadclearance}
+ \addtolength\@tempdima{-\RM@totalheadclearance}
+ \addtolength\RM@totalheadclearance{\@tempdima}
+ \addtolength\RM@totalheadfootclearance{\@tempdima}
+ \fi
+%
+% Now then, \RM@totalheadfootclearance might have been enlarged by now,
+% to keep inside the specified printing limits. If
+% \RM@totalheadfootclearance is larger than
+% \RM@maxtotalheadfootclearance, I can't set \textheight to a value
+% large enough for \RM@mintextheight. But rounding errors are a
+% possibility... Deal with them like this:
+%
+% If thfc is too large (ie textheight will be smaller than mintextheight),
+% produce an error, unless the amount by which it is too large is
+% less than 0.01pt (assumed maximum rounding error), in which case thfc will
+% be set to minthfc.
+%
+\relax
+\ifdim\RM@totalheadfootclearance>\RM@maxtotalheadfootclearance\relax
+ \setlength\@tempdima{\RM@totalheadfootclearance}
+ \addtolength\@tempdima{-\RM@maxtotalheadfootclearance}
+ \addtolength\@tempdima{-0.01pt}
+ \relax
+ \ifdim\@tempdima>0pt
+ \RM@Error{I can't set \protect\textheight\space large enough}
+ {\protect\RM@mintextheight is too large for the printing
+ clearances\MessageBreak
+ and vertical options you have requested on this paper.}
+ \else
+ \RM@ocl{1}
+ {\tyopeout{Fudged thfc to maxthfc}
+ \RM@ttval{\RM@totalheadfootclearance}
+ \RM@ttval{\RM@maxtotalheadfootclearance}
+ }{}
+ \setlength\RM@totalheadfootclearance{\RM@maxtotalheadfootclearance}
+ \fi
+\fi
+%
+% If thfc is too small (ie textheight will be larger than maxtextheight),
+% produce an error, unless the amount by which it is too small is
+% less than 0.01pt (assumed maximum rounding error), in which case thfc will
+% be set to maxthfc.
+%
+\relax
+\ifdim\RM@totalheadfootclearance<\RM@mintotalheadfootclearance\relax
+ \setlength\@tempdima{\RM@totalheadfootclearance}
+ \addtolength\@tempdima{-\RM@mintotalheadfootclearance}
+ \addtolength\@tempdima{+0.01pt}
+ \relax
+ \ifdim\@tempdima<0pt
+ \RM@Error{I can't set \protect\textheight\space small
+ enough\MessageBreak This can't happen!}
+ {\protect\RM@maxtextheight\space is too small for the printing
+ clearances\MessageBreak
+ and vertical options you have requested on this paper.}
+ \else
+ \RM@ocl{1}
+ {\typeout{Fudged thfc to minthfc}
+ \RM@ttval{\RM@totalheadfootclearance}
+ \RM@ttval{\RM@mintotalheadfootclearance}
+ }{}
+ \setlength\RM@totalheadfootclearance{\RM@mintotalheadfootclearance}
+ \fi
+\fi
+%
+% And now recalculate \RM@totalheadclearance, and check for
+% significant rounding errors...
+%
+\setlength\@tempdima{\RM@totalheadfootclearance}
+\addtolength\@tempdima{-\RM@totalfootclearance}
+\setlength\@tempdimb{\@tempdima}
+\addtolength\@tempdimb{-\RM@totalheadclearance}
+\ifdim\@tempdimb<0pt
+ \setlength{\@tempdimb}{-\@tempdimb}
+\fi
+\ifdim\@tempdimb>0.02pt
+ \RM@Error{Houston, we have a problem}
+ {I've come across significant rounding errors in my
+ calculations.\MessageBreak
+ I'm not sure \protect\textheight\space will be set well.}
+\fi
+\setlength\RM@totalheadclearance\@tempdima
+%
+% By now, the totalhead/foot/headfootclearances should be set
+% correctly. \RM@totalheadclearance is allowed to be as much as
+% 0.02pt too large; \RM@totalheadfootclearance should be set to
+% a value that yields as valid \textheight directly, if it has been
+% limited by \RM@mintextheight or \RM@maxtextheight.
+%
+
+%
+%%
+%%
+%% Now calculate \textheight
+%% .........................
+%%
+%
+% What this code does is set \textheight to
+%
+% the (nearest lower):
+% (integer) x \baselineskip + \topskip, and then changes
+% \RM@totalheadfootclearance so that:
+%
+% \paperheight=
+% \footskip+\textheight+\headsep+\headheight+\totalheadfootclearance
+%
+% is still true
+%
+\RM@ocl{2}
+ {\typeout{Before calculating \protect\textheight}
+ \RM@ttval{\RM@totalfootclearance}
+ \RM@ttval{\RM@totalheadclearance}
+ \RM@ttval{\RM@totalheadfootclearance}}
+ {}
+%
+% Note that the code from here onward does not affect:
+% footskip, \headsep, \headheight, \topskip, \RM@mintextheight,
+% \RM@maxtextheight, or \paperheight. If the beton option has been
+% specified, \baselineskip will be reset to the value it had on
+% entering rmpage.
+%
+\setlength\@tempdima{\paperheight}
+\addtolength\@tempdima{-\RM@totalheadfootclearance}
+\addtolength\@tempdima{-\footskip}
+\addtolength\@tempdima{-\headsep}
+\addtolength\@tempdima{-\headheight}
+%
+% It should not be possible for \@tempdima to exceed the bounds
+% defined by \RM@maxtextheight and \RM@mintextheight. Check, and
+% issue an error if this has happened.
+%
+\ifdim\@tempdima>\RM@maxtextheight
+ \RM@Error{Something's wrong with \protect\textheight setting}
+ {The initial \protect\textheight\space guess is larger than
+ \protect\RM@maxtextheight. This shouldn't be possible.}
+\fi
+%
+\ifdim\@tempdima<\RM@mintextheight
+ \RM@Error{Something's wrong with \protect\textheight setting}
+ {The initial \protect\textheight\space guess is smaller than
+ \protect\RM@mintextheight. This shouldn't be possible.}
+\fi
+%
+% I think this intermediate value might be interesting at times
+%
+\RM@ocl{1}{
+ \typeout{First stab at \protect\textheight\space= \the\@tempdima}
+ }{}
+%
+% \@tempdima is now set to what I'd like \textheight to be,
+% but we need \textheight = (integer) x \baselineskip + \topskip
+%
+\addtolength\@tempdima{-\topskip}
+%
+% \@tempdima is now originally requested \textheight - \topskip
+%
+\setlength\@tempdimb{\@tempdima}
+\divide\@tempdima\baselineskip
+\@tempcnta=\@tempdima
+\setlength\@tempdima{\@tempdimb}
+%
+% \@tempcnta is now the integer referred to above; and \@tempdima is
+% \textheight-\topskip.
+%
+\setlength\textheight{\@tempcnta\baselineskip}
+\addtolength\textheight{\topskip}
+%
+% But check that \textheight isn't too small; it used to be the case
+% that \textheight might be one \baselineskip too small at this point.
+% This should never happen now, but check anyway and issue an error if
+% it has.
+%
+\ifdim\textheight<\RM@mintextheight\relax
+ \RM@Error{\protect\textheight's got no business being this small}
+ {Yet another bug needs fixing}
+\fi
+%
+\RM@ocl{2}
+ {\typeout{\protect\textheight\space is:}
+ \typeout{\space\space\space\the\@tempcnta\space x
+ \the\baselineskip\space+ \the\topskip\space= \the\textheight}
+ }{}
+%
+% The number of text lines is (integer) + 1
+%
+% \textheight is now (integer) x \baselineskip + \topskip
+%
+% Now I need to re-calculate \RM@thfc; it needs to be increase by the
+% difference between the originally requested \textheight and the one
+% I'm really going to use...
+%
+% The easiest way to find out what the originally requested
+% \textheight was is to add \topskip to \@tempdima
+%
+\addtolength\@tempdima{\topskip}
+%
+% And to get the difference between the originally requested \textheight
+% and the `real' one, just subtract the real one from \@tempdima (the
+% original request). This will give me a positive length (which is
+% tested for: if the length's not positive, something's wrong), which I
+% can add to \RM@thfc to increase the head and foot clearance to cope
+% with \textheight being smaller than it was, sort of thing.
+%
+\addtolength\@tempdima{-\textheight}
+\ifdim\@tempdima<0pt
+ \RM@Error{This can't happen; something's wrong}
+ {Hah! It has! rmpage has a bug; get Rowland to fix it.}
+\fi
+% \@tempdima is the amount by which textheight has shrunk
+\addtolength\RM@totalheadfootclearance{\@tempdima}
+% Increase \thc and \tfh proportionally to match:
+\setlength\@tempdimb{\@tempdima}
+\divide\@tempdimb 24\multiply\@tempdimb\RM@headfootbalance
+% \@tempdimb is the amount by which the top space should increase
+\addtolength\RM@totalheadclearance{\@tempdimb}
+\addtolength\@tempdima{\@tempdimb}
+% \@tempdima:= \@tempdima - \@tempdimb;
+% the amount by which the bottom space should increase
+\addtolength\RM@totalfootclearance{\@tempdima}
+%
+% So \textheight and footer/header clearances are now set.
+% All I need to do now is define \topmargin.
+%
+\setlength\topmargin{\RM@totalheadclearance}
+\addtolength\topmargin{-1in}
+%
+%
+%%
+%%
+%% \section{Change horizontal page parameters}
+%%
+% The code to set horizontal layout parameters derives from
+% rmpwnorm.pko v0.60.
+%
+% 0=unknown, 1=art, 2=rep, 3=lett, 4=book, 5=slides, 10=ltxdoc,
+% 11=ltxguide, 20=rmcv, 21=rmletter, 22=bithesis, 23=ljmueepexam
+% %
+% % All classes so far except slides use rat-setwidth-norm.pko to set
+% % horizontal parameters. At least that used to be the name; I've
+% % changed it to rmpwnorm.pko because of the malign influence of the
+% % evil Bill Gates and his pernicious Microsoft DOS.
+% % (RMPageWidthNORMal.PacKageOption).
+% %
+% % Retired rmpwslid.pko; rmpwnorm.pko now deals with slides as well.
+% % Perhaps I should now include the width-setting code in rmpage
+% % itself? Think on it.
+% %
+% \providecommand*{\RM@widthsetter}{rmpwnorm.pko}
+% %
+% % All sort of obsolete comments lurk below.
+% % % The slides class uses rat-setwidth-slides.pko to set horizontal
+% % % parameters. Almost: now using rmpwslid.pko because of That Man
+% % % Who's Name Shall Not Be Spoken Lest The Piles of a Thousand
+% % % Pensioners Afflict Thy Backside (TMWNSNBSLTPTPATB. Good acronym,
+% % % eh?)
+% % %
+% % % % TEMPORARILY STOPPED USED RSW-SLIDES FOR SLIDE WIDTH SETTING.
+% % % % USE IT AGAIN WHEN RSW-NORM IS STABLE AND CAN BE USED AS THE BASIS
+% % % % FOR A NEW VERSION OF RSW-SLIDES.
+% % % %
+% % % \RM@OnClassType{5}{\def\@ptsize{2}}{}% bodge to get rsw-norm to work
+% % % with slides class
+% % \RM@OnClassType{5}{\def\RM@widthsetter{rmpwslid.pko}}{}
+% %
+% % Execute hook if it exists; this one's so you can ask for any width
+% % setting file you like.
+%
+%%
+%%
+%% \subsection{Pre width setting: hook and checks}
+%%
+\RM@executehook{RM@BeforeWidthSetting}
+%
+% Check that \RM@mintextwidth and \RM@maxtextwidth aren't stupid
+% \@tempswatrue if they are daft.
+
+\@tempswafalse
+
+\relax
+\ifdim\@tempdima<0pt\relax
+ \setlength\@tempdima{-\@tempdima}
+\fi
+
+\relax
+\ifdim\RM@mintextwidth>\RM@maxtextwidth\relax
+ \@tempswatrue
+\fi
+
+\relax
+\ifdim\RM@mintextwidth>\paperwidth\relax
+ \@tempswatrue
+\fi
+
+\relax
+\if@tempswa
+ \RM@Error{You've set \protect\RM@[min/max]textwidth
+ to something daft}
+ {
+ \protect\RM@mintextwidth\space=\RM@mintextwidth\MessageBreak
+ \protect\RM@maxtextwidth\space=\RM@maxtextwidth\MessageBreak
+ \protect\paperwidth\space=\the\paperwidth\MessageBreak
+ }
+\fi
+%%
+%%
+%% \section{Width setting code proper}
+%%
+%% The code below (until `End of what was rmpwnorm') is rmpwnorm.pko,
+%% except a few bits which seem logically to belong
+%% elsewhere---command definintions etc.
+%%
+%% The code below is derived from: rat-setwidth-norm.pko;
+%% specifically, rmpwnorm.pko v0.60 1996/10/25. The changes history
+%% is now at the top of this file, below rmpage.sty's changes history.
+%
+%
+% Start out by setting \@tempdimb to preferred \textwidth depending on
+% \@ptsize and options.
+%%
+%%
+%% \subsection{Check for stuff that's not allowed in the slides class}
+%%
+% Are these checks really needed? I might get rid of them. But then
+% again\ldots
+\RM@OnClassType{5}
+ {\RM@ocl{1}{\typeout{Detected slides class}}{}
+ \ifnum\RM@textcols=1
+ \else
+ \RM@Error{Too many columns}
+ {The slides class only allows one column of text}
+ \fi
+%
+ \@ifundefined{@ptsize}{}
+ {\RM@Error{What typesize is this?}
+ {The slides class only allows one typesize}}
+%
+ \ifRM@adaptivecolsep
+ \RM@Error{You can't have adaptivecolumsep with the slides class}
+ {The slides class only allows one column of text}
+ \fi}{}
+
+%%
+%%
+%% \subsection{Check the \comname{textwidth} limits}
+%%
+% Some preliminary checks to ensure that the various horizontal
+% printing limits aren't asking for something impossible, and
+% hopefully give some useful information if the impossible has
+% been asked for.
+%
+% This code can reduce \RM@maxtextwidth to the maximum allowed
+% \textwidth; it can increase \RM@mintextwidth to 0pt is it's
+% negative to begin with.
+%
+%
+\RM@ocl{2}
+ {\typeout{Initial values:}
+ \RM@tval{\RM@mintextwidth}
+ \RM@tval{\RM@maxtextwidth}
+ }{}
+%
+\setlength\@tempdima{\paperwidth}
+\addtolength\@tempdima{-\RM@minrightclearance}
+\addtolength\@tempdima{-\RM@minleftclearance}
+\setlength\@tempdimb{\paperwidth}
+\addtolength\@tempdimb{-\RM@mininsidemargin}
+\addtolength\@tempdimb{-\RM@minoutsidemargin}
+%
+
+\@tempswafalse
+\ifdim\@tempdima<0pt \@tempswatrue \fi
+\ifdim\@tempdimb<0pt \@tempswatrue \fi
+\if@tempswa
+ \RM@Error{The horizontal printable region is too small;
+ I can't\MessageBreak calculate a valid layout}
+ {Your layout parameters ask for a negative
+ \protect\textwidth\MessageBreak Major bummer.}
+\fi
+%
+\ifdim\RM@mintextwidth>\RM@maxtextwidth
+ \RM@Error{I can't produce a layout with
+ \protect\RM@mintextwidth\space larger\MessageBreak than
+ \protect\RM@maxtextwidth}
+ {Change one or both of these parameters and try again}
+\fi
+%
+% Ensure that neither \RM@maxtextwidth nor \RM@mintextwidth are larger
+% than \@tempdim[a|b]. Note that the final values of
+% \RM@[min|max]textwidth are reported at the end; I only need to
+% report why the changes occurred here.
+%
+\ifdim\RM@maxtextwidth>\@tempdima
+ \edef\RM@maxtextwidth{\the\@tempdima}
+ \RM@ocl{1}
+ {
+ \typeout{I have reduced \protect\RM@maxtextwidth\space to fit
+ inside^^J\protect\RM@min[left/right]clearance\space limits}
+ }{}
+\fi
+%
+\ifdim\RM@maxtextwidth>\@tempdimb
+ \edef\RM@maxtextwidth{\the\@tempdimb}
+ \RM@ocl{1}
+ {
+ \typeout{I have reduced \protect\RM@maxtextwidth\space to fit
+ inside^^J\protect\RM@min[in/out]sidemarginclearance\space
+ limits.}
+ }{}
+\fi
+%
+% Now \RM@mintextwidth
+%
+\ifdim\RM@mintextwidth>\RM@maxtextwidth
+ \RM@Error{After reducing it to fit the available
+ space,\MessageBreak \protect\RM@maxtextwidth\space is now smaller
+ than\MessageBreak \protect\RM@mintextwidth. I can't produce a
+ valid layout}
+ {You need to change at least one of these parameters, or use
+ a\MessageBreak different size paper, or different horizontal
+ limits.}
+\fi
+%
+\ifdim\RM@mintextwidth<0pt
+ \def\RM@mintextwidth{0pt}
+ \RM@Warn{You've asked for a negative
+ \protect\RM@mintextwidth;\MessageBreak I've made it 0pt.}
+\fi
+%%
+%%
+%% \subsection{Set \comname{RM*ptperchar}}
+%%
+% \RM@fountfamily shouldn't be > 12. If it is, the fountfamily's
+% unknown. Issue a warning and set \RM@fountfamily to 12:
+% thisfountwidth.
+%
+\ifnum\RM@fountfamily>12
+ \RM@Warn{I don't know what fount \protect\RM@fountfamily\space =
+ \RM@fountfamily\space is.\MessageBreak
+ I'll pretend you meant 12: thisfountwidth\MessageBreak}
+ \def\RM@fountfamily{12}
+\fi
+%
+% Note that \RM@ptperchar is pre-calculated (with the text used for
+% \RM@fountfamily=12) so that it is not necessary to have the main body
+% fount selected before this code executes---this fount can in general
+% be selected anywhere: leave it up to the user.
+%
+% \RM@textwidthgroup should be set to one of the values below by now.
+% The \RM@BeforeSettingptperchar hook lets you change this if you want
+% to.
+%
+% Set \RM@ptperchar; N blocks of code:
+% \RM@textwidthgroup 0 = article, report, letter, book, and derivatives
+% \RM@textwidthgroup 1 = slides
+% \RM@textwidthgroup 2 = foiltex
+% \RM@textwidthgroup 3 = classes using non-standard values for \@ptperchar
+% \RM@textwidthgroup 4 = undefined classes (produces error currently; don't use)
+%
+\ifcase\RM@textwidthgroup\relax
+% 0=general
+%%
+%%
+%% Set \RM@ptperchar for std classes except slides
+%% ................................................
+%%
+ \@tempswafalse
+ \ifnum\RM@ptsizegroup < 0 \@tempswatrue \fi
+ \ifnum\RM@ptsizegroup > 3 \@tempswatrue \fi
+ \if@tempswa
+ \RM@Error{You can't have this point size. Sorry}
+ {rmpage doesn't support
+ \RM@ptsizegroup\space=\protect\RM@ptsizegroup\space
+ with this class}
+ \fi
+ \ifcase\RM@fountfamily% 0=cmr
+ \RM@setptperchar{4.39592pt}{4.81352pt}{5.16339pt}{0pt}
+ \or% 1=Avant Garde (pag)
+ \RM@setptperchar{4.8146pt}{5.27199pt}{5.77753pt}{0pt}
+ \or% 2=Bookman (pbk)
+ \RM@setptperchar{4.8823pt}{5.34612pt}{5.85876pt}{0pt}
+ \or% 3=Zapf Chancery (pzc)
+ \RM@setptperchar{3.46992pt}{3.79956pt}{4.16391pt}{0pt}
+ \or% 4=Helvetica (phv)
+ \RM@setptperchar{4.36852pt}{4.78352pt}{5.24222pt}{0pt}
+ \or% 5=New Century Schoolbook (pnc)
+ \RM@setptperchar{4.58647pt}{5.02219pt}{5.50377pt}{0pt}
+ \or% 6=Palatino (ppl)
+ \RM@setptperchar{4.38867pt}{4.80559pt}{5.2664pt}{0pt}
+ \or% 7=Times (ptr)
+ \RM@setptperchar{3.9714pt}{4.34868pt}{4.76569pt}{0pt}
+ \or% 8=Utopia (put)
+ \RM@setperchar{4.45232pt}{4.87529pt}{5.34279pt}{0pt}
+ \or% 9=Lucida casual (hlcn)
+ \RM@setptperchar{5.02287pt}{5.50003pt}{6.02745pt}{0pt}
+ \or% 10=Courier (pcr)
+ \RM@setptperchar{6.0506pt}{6.6254pt}{7.26073pt}{0pt}
+ \or% 11=Concrete (ccr)
+ \RM@setptperchar{4.40622pt}{4.82481pt}{5.28748pt}{0pt}
+ \or% 12=AN Other fount; set the fount before loading rmpage
+ \RM@setthisfountptperchar
+ \else% 13 and above=other
+ \RM@setptperchar{4.39592pt}{4.81352pt}{5.16339pt}{0pt}
+ \RM@Error{Truth is a mirage and death's an oasis:\MessageBreak
+ you've got cmr width. Let's call it a bug.}
+ {I don't recognize the fount family you requested; but
+ this fount\MessageBreak
+ family number should have been trapped by a check above.
+ This\MessageBreak
+ shouldn't have happened. It's one of them bug things}
+ \fi
+% Done setting \RM@ptperchar for std classes except slides
+%
+\or% 1=slides
+%%
+%%
+%% Set \RM@ptperchar for the slides class only
+%% ...........................................
+%%
+ \@tempswafalse
+ \ifnum\RM@ptsizegroup<0 \@tempswatrue \fi
+ \ifnum\RM@ptsizegroup>0 \@tempswatrue \fi
+ \if@tempswa
+ \RM@Error{You can't have this point size. Sorry}
+ {rmpage doesn't support
+ \RM@ptsizegroup\space=\protect\RM@ptsizegroup\space
+ with this class}
+ \fi
+ \ifcase\RM@fountfamily% 0=lcmss
+ \setlength\RM@ptperchar{10.2716pt}
+ \or% 1=Avant Garde (pag)
+ \setlength\RM@ptperchar{9.58444pt}
+ \or% 2=Bookman (pbk)
+ \setlength\RM@ptperchar{9.71921pt}
+ \or% 3=Zapf Chancery (pzc)
+ \setlength\RM@ptperchar{6.90758pt}
+ \or% 4=Helvetica (phv)
+ \setlength\RM@ptperchar{8.69641pt}
+ \or% 5=New Century Schoolbook (pnc)
+ \setlength\RM@ptperchar{9.1303pt}
+ \or% 6=Palatino (ppl)
+ \setlength\RM@ptperchar{8.73653pt}
+ \or% 7=Times (ptr)
+ \setlength\RM@ptperchar{7.90588pt}
+ \or% 8=Utopia (put)
+ \setlength\RM@ptperchar{8.86324pt}
+ \or% 9=Lucida casual (hlcn)
+ \setlength\RM@ptperchar{10.00424pt}
+ \or% 10=Courier (pcr)
+ \setlength\RM@ptperchar{12.04494pt}
+ \or% 11=Concrete (ccr)
+ \setlength\RM@ptperchar{9.13852pt}
+ \or% 12=AN Other fount; set the fount before loading rmpage
+ \RM@setthisfountptperchar
+ \else% 13 and above=other
+ \setlength\RM@ptperchar{10.2716pt}
+ \RM@Error{Truth is a mirage and death's an oasis:\MessageBreak
+ you've got lcmss width. Let's call it a bug.}
+ {I don't recognize the fount family you requested; but
+ this fount\MessageBreak
+ family number should have been trapped by a check above.
+ This\MessageBreak
+ shouldn't have happened. It's one of them bug things}
+ \fi%
+%
+%
+% Done setting \RM@ptperchar for the slides class only
+%
+\or% 2=foils
+%%
+%%
+%% Set \RM@ptperchar for the foils class only
+%% ...........................................
+%%
+ \@tempswafalse
+ \ifnum\RM@ptsizegroup<0 \@tempswatrue \fi
+ \ifnum\RM@ptsizegroup>4 \@tempswatrue \fi
+ \if@tempswa
+ \RM@Error{You can't have this point size. Sorry}
+ {rmpage doesn't support
+ \RM@ptsizegroup\space=\protect\RM@ptsizegroup\space
+ with this class}
+ \fi
+ \ifcase\RM@fountfamily% 0=fcmss
+ \RM@setptperchar{7.2472pt}{8.69832pt}{10.43463pt}{12.52324pt}
+ \or% 1=Avant Garde (pag)
+ \RM@setptperchar{8.31964pt}{9.9855pt}{11.97876pt}{14.37643pt}
+ \or% 2=Bookman (pbk)
+ \RM@setptperchar{8.43661pt}{10.1259pt}{12.14719pt}{14.57857pt}
+ \or% 3=Zapf Chancery (pzc)
+ \RM@setptperchar{5.99603pt}{7.19662pt}{8.63318pt}{10.3612pt}
+ \or% 4=Helvetica (phv)
+ \RM@setptperchar{7.5488pt}{9.06032pt}{10.86888pt}{13.0444pt}
+ \or% 5=New Century Schoolbook (pnc)
+ \RM@setptperchar{7.92543pt}{9.51236pt}{11.41116pt}{13.69524pt}
+ \or% 6=Palatino (ppl)
+ \RM@setptperchar{7.58362pt}{9.10211pt}{10.91902pt}{13.10458pt}
+ \or% 7=Times (ptm)
+ \RM@setptperchar{6.8626pt}{8.23671pt}{9.88087pt}{11.85864pt}
+ \or% 8=Utopia (put)
+ \RM@setperchar{7.69362pt}{9.23412pt}{11.0774pt}{13.29465pt}
+ \or% 9=Lucida casual (hlcn)
+ \RM@setptperchar{8.67952pt}{10.41745pt}{12.49692pt}{14.9983pt}
+ \or% 10=Courier (pcr)
+ \RM@setptperchar{10.45544pt}{12.54895pt}{15.05392pt}{18.06711pt}
+ \or% 11=Concrete (ccr) no 30pt with std .fd; 30pt size scaled from 25pt.
+ \RM@setptperchar{7.61395pt}{9.13852pt}{10.9627pt}{13.1552pt}
+ \or% 12=AN Other fount; set the fount before loading rmpage
+ \RM@setthisfountptperchar
+ \else% 13 and above=other
+ \RM@setptperchar{7.2472pt}{8.69832pt}{10.43463pt}
+ \RM@Error{Truth is a mirage and death's an oasis:\MessageBreak
+ you've got fcmss width. Let's call it a bug.}
+ {I don't recognize the fount family you requested; but
+ this fount\MessageBreak
+ family number should have been trapped by a check above.
+ This\MessageBreak
+ shouldn't have happened. It's one of them bug things}
+ \fi
+ % Done setting ptperchar for foils
+%
+\or% 3=non-standard ptperchar
+ \RM@setthisfountptperchar\relax
+\or% 4=other
+ \relax
+\else% > 3
+% error condition
+ \RM@Error{This shouldn't happen}
+ {An iffy \protect\RM@textwidthgroup\space
+ when setting \protect\RM@ptperchar. Call it a bug.}
+\fi% end setting ptperchar
+%
+% Finished setting \RM@ptperchar for all classes
+%
+%%
+%%
+%% \subsection{Set \comname{columnsep}}
+%%
+% Begin by setting \columnsep (and maybe \mparsep some time in the
+% future). It might be useful one day for the \textwidth setting code
+% (below) to know what these are.
+%
+% \columnsep is set to 10pt by article.cls. This is 2.3 10pt cmr chars,
+% 2.07 11pt, and 1.93 12pt. I reckon 2.07 char widths is a good thing to
+% try as a first guess. I suppose trying some \twocolumn stuff would be
+% the best way to if it's right... But the KOMA-script code sets
+% \columnsep to 12pt; this goes with its default 11pt body text size.
+% I think this means that setting \columnsep to 2.3\RM@ptperchar is a
+% good thing for starters.
+%
+% Don't do \columnsep stuff for foils or slides classes, because they
+% don't support multiple columns.
+% Do \columnsep stuff for std classes except slides...
+\RM@OnTextwidthGroup{1}
+ {\ifRM@adaptivecolsep
+ \setlength\columnsep{2.3\RM@ptperchar}% other value
+ \@tempswafalse
+ \ifnum\RM@ptsizegroup<0 \@tempswatrue \fi
+ \ifnum\RM@ptsizegroup>3 \@tempswatrue \fi
+ \if@tempswa
+ \RM@Warn{The adaptivecolsep option doesn't know about this
+ text\MessageBreak
+ point size option - this shouldn't matter\MessageBreak
+ \RM@ptsizegroup\space=\protect\RM@ptsizegroup}
+ \fi
+ \ifcase\RM@ptsize% 10pt is std \columnsep
+ \setlength\columnsep{2.3\RM@ptperchar}% 10pt value
+ \or
+ \setlength\columnsep{2.3\RM@ptperchar}% 11pt value
+ \or
+ \setlength\columnsep{2.3\RM@ptperchar}% 12pt value
+ \fi%endif\@ptsize
+ \fi% end\ifRM@adaptivecolsep
+%
+% Report `before' value only here; after value is reported at the end
+% of rmpage.
+ \RM@ocl{2}
+ {\typeout{Before scaling:}
+ \RM@ttval{\columnsep}}{}
+%
+% Multiply \columnsep according to the option used...
+ \RM@scalebyoption{\columnsep}{\RM@columnsepoption}
+ }{}
+%
+% End \columnsep stuff for std classes except slides
+%
+%
+% \columnsep stuff for odd classes
+%
+\RM@OnTextwidthGroup{3}
+ {\@ifundefined{columnsep}{}
+ {\ifRM@adaptivecolsep
+ \setlength\columnsep{2.3\RM@ptperchar}
+ \fi
+ \RM@ocl{2}
+ {\typeout{Before scaling:}
+ \RM@ttval{\columnsep}}{}
+ \RM@scalebyoption{\columnsep}{\RM@columnsepoption}
+ }
+ }{}
+%%
+%%
+%% \subsection{Set initial \comname{textwidth} values}
+%%
+% \RM@widthoption: 2=narrowest, 5=narrower, 8=narrow, 11=narrowish,
+% 14=normalwidth,
+% 17=widish, 20=wide, 23=wider, 26=widest,
+% 29=halfinchmargins, 30=oneinchmargins, 31=fullwidth.
+% 32=stdwidth
+%%
+%%
+%% \subsubsection{Set character-based initial \comname{textwidth}}
+%% ................................................
+%%
+% \@tempdimb is set to a requested textwidth - the preferred textwidth
+% calculated as the width of a certain number of characters. \@tempdima
+% is set to the maximum allowed textwidth based on the smallest allowed
+% margins. \textwidth is set to the smaller of these two dimensions.
+% Number of characters specified is (approximately) the number of
+% natural-width cmr characters corresponding to the set width.
+%
+% normalwidth is pretty much standard 2e; stdwidth is standard 2e.
+%
+% This part of the code ensures that \@tempdimb is greater than the
+% minimum allowed \textwidth (\RM@mintextwidth). A check is made
+% again for this condition after all the margins have been set.
+%
+% Different STDWIDTH SETTINGS for slides and everything else...
+%
+\RM@OnClassType{5}
+ {\RM@OnWidthOption{31}{33}{% 32=stdwidth settings from slides.cls
+ \setbox\@tempboxa\hbox{\rmfamily im}
+ \setlength\@tempdimb{.5\wd\@tempboxa}
+ \setlength\@tempdimb{65\@tempdimb}
+ }{}
+ }
+ {\RM@OnWidthOption{31}{33}{
+ \ifcase\RM@ptsizegroup% 32=stdwidth settings
+ \setlength\@tempdimb{345pt}% From size10.clo; 78.4819 chars
+ \or\setlength\@tempdimb{360pt}% From size11.clo; 74.7893 chars
+ \or\setlength\@tempdimb{390pt}% From size12.clo; 75.5318 chars
+ \else
+ \RM@Error{Invalid point size}{You've asked for a point
+ size that isn't 10, 11, or 12pt and for standard
+ \protect\textwidth\space. You can't have both.}
+ \fi}{}
+ }
+%
+% % Widths 29, 30, or 31: are the fixed-margin widths; the paper-based
+% % \textwidth guess is set to whatever the width needs to be, so set
+% % \@tempdimb to the largest practical value if one of these widths has
+% % been selected. BUT! you can ask for a fixed-margin width and then
+% % ask for characterwidthset... I reckon the thing to do is set the
+% % character-based \textwidth guess to the same value as the
+% % paper-based \textwidth guess for these fixed-margin widths---this
+% % job can only be done after the paper-based \textwidth guess has been
+% % calculated below. Oh, and issue a warning if the user's asked for a
+% % fixed-margin width and characterwidthset, 'cos that's silly.
+% %
+% \RM@OnWidthOption{28}{32}{
+% \@tempdimb=\paperwidth
+% }{}
+%
+% Widths 0--28 are scaled widths, so set base width.
+%
+% The base width is chosen to give, to $\pm 1\%$, the same number of
+% characters per line as the fixed lengths given in size[10|11|12].clo.
+% It doesn't give you identical line breaks with different founts,
+% because different founts are different (that's an important point,
+% that is), but you'll get a similar number of lines of text with
+% different founts.
+%
+% \RM@ttval{}
+\RM@OnWidthOption{-1}{29}{
+ \RM@OnTextwidthGroup{0}
+ {\@tempswafalse
+ \ifnum\RM@ptsizegroup<0 \@tempswatrue \fi
+ \ifnum\RM@ptsizegroup>3 \@tempswatrue \fi
+ \if@tempswa
+ \RM@Error{You can't have this point size. Sorry}
+ {rmpage doesn't support
+ \RM@ptsizegroup\space=\protect\RM@ptsizegroup\space
+ with this class}
+ \fi
+ \ifcase\RM@ptsizegroup% normalwidth settings for other std classes
+ \setlength\@tempdimb{785\RM@ptperchar}
+ \or\setlength\@tempdimb{748\RM@ptperchar}
+ \or\setlength\@tempdimb{755\RM@ptperchar}
+ \fi}{}
+ \RM@OnTextwidthGroup{1}{\setlength\@tempdimb{700\RM@ptperchar}}{}% normalwidth for slides
+ \RM@OnTextwidthGroup{2}
+ {\@tempswafalse
+ \ifnum\RM@ptsizegroup<0 \@tempswatrue \fi
+ \ifnum\RM@ptsizegroup>4 \@tempswatrue \fi
+ \if@tempswa
+ \RM@Error
+ {You can't have this point size. Sorry}
+ {rmpage doesn't support
+ \RM@ptsizegroup\space=\protect\RM@ptsizegroup\space
+ with this class}
+ \fi
+ \ifcase\RM@ptsizegroup% normalwidth settings for foils class
+ \setlength\@tempdimb{750\RM@ptperchar}
+ \or\setlength\@tempdimb{730\RM@ptperchar}
+ \or\setlength\@tempdimb{715\RM@ptperchar}
+ \or\setlength\@tempdimb{700\RM@ptperchar}
+ \fi}{}
+ \RM@OnTextwidthGroup{3}% normalwidth settings for odd classes
+ {\setlength\@tempdimb{750\RM@ptperchar}}{}
+ \divide\@tempdimb by10
+ \ifcase\RM@widthoption
+ \@tempdimb=0.7077\@tempdimb%0
+ \or\@tempdimb=0.7254\@tempdimb%1
+ \or\@tempdimb=0.7436\@tempdimb%2 narrowest
+ \or\@tempdimb=0.7621\@tempdimb%3
+ \or\@tempdimb=0.7812\@tempdimb%4
+ \or\@tempdimb=0.8007\@tempdimb%5 narrower
+ \or\@tempdimb=0.8207\@tempdimb%6
+ \or\@tempdimb=0.8413\@tempdimb%7
+ \or\@tempdimb=0.8623\@tempdimb%8 narrow
+ \or\@tempdimb=0.8839\@tempdimb%9
+ \or\@tempdimb=0.9060\@tempdimb%10
+ \or\@tempdimb=0.9286\@tempdimb%11 narrowish
+ \or\@tempdimb=0.9518\@tempdimb%12
+ \or\@tempdimb=0.9756\@tempdimb%13
+ \or\@tempdimb=1.0000\@tempdimb%14 norm
+ \or\@tempdimb=1.0250\@tempdimb%15
+ \or\@tempdimb=1.0506\@tempdimb%16
+ \or\@tempdimb=1.0769\@tempdimb%17 widish
+ \or\@tempdimb=1.1038\@tempdimb%18
+ \or\@tempdimb=1.1314\@tempdimb%19
+ \or\@tempdimb=1.1597\@tempdimb%20 wide
+ \or\@tempdimb=1.1887\@tempdimb%21
+ \or\@tempdimb=1.2184\@tempdimb%22
+ \or\@tempdimb=1.2489\@tempdimb%23 wider
+ \or\@tempdimb=1.2801\@tempdimb%24
+ \or\@tempdimb=1.3121\@tempdimb%25
+ \or\@tempdimb=1.3449\@tempdimb%26 widest
+ \or\@tempdimb=1.3785\@tempdimb%27
+ \or\@tempdimb=1.4130\@tempdimb%27
+ \else
+ \RM@Error{This can't happen}
+ {Urgh. rmpage has a bug, or something}
+ \fi
+ }{}
+
+%
+% Note that \RM@scalewidth only scales options 0--28
+%
+%
+%
+% \@tempdimb is maximum allowed \textwidth (character based)
+% \@tempdima will be maximum allowed \textwidth (paper based)
+% Now set \textwidth as in size\@ptsize.clo (almost)
+%
+% \RM@ocl{1}
+% {\typeout{Early Initial \protect\textwidth\space targets:^^J
+% % \space\space paper-based: \the\@tempdima^^J
+% \space\space char-based : \the\@tempdimb}
+% }{}
+%
+%
+%%
+%%
+%% \subsubsection{Set paper-based initial \comname{textwidth}}
+%% ............................................
+%%
+%
+% std 2e min margins from size\@ptsize.clo are 2in when summed.
+% margins used to be (and are now using A4 paper) (all measurements in inches):
+%
+% narrowest narrow normal wide widest
+% narrower narrowish widish wider
+% A4 5=2.8
+% A5 5=2
+%
+% \textwidth:
+% A4 137.9mm
+% -------
+%
+% NOTE: lucida casual wants to be 457.46pt=161mm wide (\normalwidth).
+% What to do? -----
+%
+% This means dropping 23mm. Hmm.
+%
+% Set \@tempdima to \paperwidth-based \textwidth:
+%
+\RM@OnWidthOption{31}{33}{%32 is stdwidth; do it the way size[n].clo does it
+ \setlength\@tempdima{-2in}
+ \addtolength\@tempdima{\paperwidth}
+ \@settopoint\@tempdima% Added for better compatibility
+ }{}
+\RM@OnWidthOption{30}{32}{%31 halfinchmargins
+ \setlength\@tempdima{-1in}
+ \addtolength\@tempdima{\paperwidth}
+ }{}
+\RM@OnWidthOption{29}{31}{%30 oneinchmargins
+ \setlength\@tempdima{-2in}
+ \addtolength\@tempdima{\paperwidth}
+ }{}
+\RM@OnWidthOption{28}{30}{%29 fullwidth
+ \setlength\@tempdima{0pt}
+ \addtolength\@tempdima{\paperwidth}
+ }{}
+%
+%
+% Erm, A4 margin is geometric mean of 2 and 2\sqrt{2} inches. This is
+% because the standard classes apply a minimum total margin of 2 inches;
+% this seems to be meant to apply to the smaller paper sizes, like A5.
+% I reckon it's too much of a gap for normalwidth. If you scale 2
+% inches up from A5 to A4, you get a gap of 2\sqrt{2} inches. That's
+% too big; so go for something in between. A geometric mean is the
+% right sort for this kind of job, hence the numbers below. My
+% reasoning doesn't convince me completely, but it's a ay of arriving at
+% a result I rather like.
+%
+% normalwidth A5 portrait: 1.6676in
+% normalwidth A4 portrait: 2.3664in
+%
+% normalwidth is 0.7138 of \paperwidth.
+%
+% scaling is arranged so that the width option beyond widest would
+% give a paper-based \textwidth of \paperwidth. The steps in between
+% are in a geomtric sequence, with an increment of \sqrt[15]{1/0.7138}
+%
+% Can anyone udnerstnad this gibbershni?
+\RM@OnWidthOption{-1}{29}{% 0-28
+ \setlength\@tempdima{0.7138\paperwidth}
+ \ifcase\RM@widthoption
+ \@tempdima=0.7300\@tempdima%0
+ \or\@tempdima=0.7466\@tempdima%1
+ \or\@tempdima=0.7636\@tempdima%2 narrowest
+ \or\@tempdima=0.7809\@tempdima%3
+ \or\@tempdima=0.7987\@tempdima%4
+ \or\@tempdima=0.8169\@tempdima%5 narrower
+ \or\@tempdima=0.8354\@tempdima%6
+ \or\@tempdima=0.8544\@tempdima%7
+ \or\@tempdima=0.8738\@tempdima%8 narrow
+ \or\@tempdima=0.8937\@tempdima%9
+ \or\@tempdima=0.9140\@tempdima%10
+ \or\@tempdima=0.9348\@tempdima%11 narrowish
+ \or\@tempdima=0.9560\@tempdima%12
+ \or\@tempdima=0.9778\@tempdima%13
+ \or\@tempdima=1.0000\@tempdima%14 norm
+ \or\@tempdima=1.0227\@tempdima%15
+ \or\@tempdima=1.0460\@tempdima%16
+ \or\@tempdima=1.0698\@tempdima%17 widish
+ \or\@tempdima=1.0941\@tempdima%18
+ \or\@tempdima=1.1189\@tempdima%19
+ \or\@tempdima=1.1444\@tempdima%20 wide
+ \or\@tempdima=1.1704\@tempdima%21
+ \or\@tempdima=1.1970\@tempdima%22
+ \or\@tempdima=1.2242\@tempdima%23 wider
+ \or\@tempdima=1.2520\@tempdima%24
+ \or\@tempdima=1.2805\@tempdima%25
+ \or\@tempdima=1.3096\@tempdima%26 widest
+ \or\@tempdima=1.3394\@tempdima%27
+ \or\@tempdima=1.3698\@tempdima%28
+ \else
+ \RM@Error{This can't happen}
+ {Urgh. rmpage has a bug, or something}
+ \fi
+ }{}
+%
+% Widths 29, 30, or 31: are the fixed-margin widths; the paper-based
+% \textwidth guess is set to whatever the width needs to be, so I used
+% to set \@tempdimb to the largest practical value if one of these
+% widths has been selected. BUT! you can ask for a fixed-margin width
+% and then ask for characterwidthset... I reckon the thing to do is set
+% the character-based \textwidth guess to the same value as the
+% paper-based \textwidth guess for these fixed-margin widths---this job
+% can only be done after the paper-based \textwidth guess has been
+% calculated below. Oh, and issue a warning if the user's asked for a
+% fixed-margin width and characterwidthset, 'cos that's silly.
+%
+\RM@OnWidthOption{28}{32}{
+ \ifnum\RM@setwidthby=1
+ \RM@Warn{You've asked for a fixed margin size
+ \protect\textwidth\MessageBreak
+ (half inch or one inch margins, or fullwidth),
+ as well\MessageBreak
+ as setting \protect\textwidth\space by the
+ character-based width\MessageBreak
+ only. This is silly: stop it.}
+ \fi
+% Set the character-based textwidth guess to the same value as the
+% paper-based textwidth guess.
+ \@tempdimb=\@tempdima
+ }{}
+%
+\RM@executehook{RM@AfterInitialTextwidthSetting}
+%
+% \@tempdima = paper-based textwidth guess
+% \@tempdimb = character-based textwidth guess
+%
+% Report these after allowing for multiple columns; you can work back
+% to what the values here should be, if you need to, or find out by
+% requesting onecolumn. This doesn't feel quite right, but I'm
+% trying to minimise reporting.
+%
+% Enlarge \@temdimb to accomodate multiple columns.
+% Make \@tempdimb =
+% \RM@textcols x \@tempdimb + (\RM@textcols-1) x \columnsep
+%
+% (but if stdwidth (widthoption = 32),
+% \@tempdimb = \RM@textcols x \@tempdimb )
+% Don't execute this code for the slides class, because slides can
+% only have one column. It doesn't matter now if you do, but future
+% changes might screw things up.
+\RM@OnClassType{5}{}
+ {\ifnum\RM@textcols<1
+ \RM@Error{This ain't right}
+ {\protect\RM@textcols is too small. This might be a bug.}
+ \else
+ \ifnum\RM@widthoption=32
+ \setlength\@tempdimb{\RM@textcols \@tempdimb}
+ \ifnum\RM@textcols>2
+ \RM@Warn{You can only have stdwidth with one or two
+ columns;\MessageBreak
+ You've asked for \RM@textcols\space columns\MessageBreak
+ The result might not be what you want.}
+ \fi
+ \else% every width except stdwidth
+ \setlength\@tempdimb{\RM@textcols \@tempdimb}
+ \addtolength\@tempdimb{\RM@textcols \columnsep}
+ \addtolength\@tempdimb{-\columnsep}
+ \fi
+ \fi}% endRM@OnClassType
+%%
+%%
+%% \subsection{Begin \comname{textwidth} checking and selection}
+%%
+% Now try to ensure that \textwidth will not exceed the
+% \RM@[min|max]textwidth limits. This test needs to be done again,
+% after \textwidth has been set, because \textwidth can shrink.
+%
+\ifdim\@tempdima<\RM@mintextwidth\@tempdima=\RM@mintextwidth\fi
+\ifdim\@tempdimb<\RM@mintextwidth\@tempdimb=\RM@mintextwidth\fi
+\ifdim\@tempdima>\RM@maxtextwidth\@tempdima=\RM@maxtextwidth\fi
+\ifdim\@tempdimb>\RM@maxtextwidth\@tempdimb=\RM@maxtextwidth\fi
+%
+% Reported here rather than elsewhere, because:
+% you can work back to the onecolumn values if needed (or find out by
+% asking for onecolumn)
+% running into the [min|max]textwidth limits should be apparent ---
+% you can find out by comparing values, or removing the limits if
+% needed
+% This doesn't feel quite right, but I'm trying to minimise reporting.
+%
+\RM@ocl{1}
+ {\typeout{Initial \protect\textwidth\space targets:^^J
+ \space\space paper-based: \the\@tempdima^^J
+ \space\space char-based : \the\@tempdimb}
+ }{}
+%
+%
+% Major revision of the code below on 25/2/96. This has been tidied,
+% and a properly thought-out algorithm implemented. Check the algorithm
+% and the code: I like it.
+%
+% I think it might be more elegant to force the initial value of
+% \textwidth to be small enough to fit in the available space, margin
+% offset considered. I'm not sure how to go about that---perhaps:
+% For the selected textwidth:
+% calculate inside/outside clearances
+% increase inside (say) clearance if needed
+% re-calculate outside clearance
+% increase outside clearance if needed
+% re-calculate inside clearance
+% re-calculate textwidth based on final clearances
+%
+% The idea above needs a fair bit of work---I think saving it for
+% version 2 is the thing.
+%
+%
+% But \textwidth must not get larger than
+% \paperwidth-\@minleftcl-\@minrightcl, or larger than
+% \paperwidth-\RM@mininsidemargin-\RM@minoutsidemargin (these are
+% normally zero length).
+%
+% The following code prevents that happening: both \@tempdima
+% (paper-basd textwidth guess) and \@tempdimb (character-based textwidth
+% guess) need to be checked, because they are not always both
+% considered.
+%
+% This code ensures that the requested \textwidth will fit on the
+% page if you're printing centred.
+%
+% Check min[left|right]margins:
+%
+\setlength\@tempdimc{\paperwidth}
+\addtolength\@tempdimc{-\RM@minleftclearance}
+\addtolength\@tempdimc{-\RM@minrightclearance}
+%
+\ifdim\@tempdimc<\@tempdima
+ \RM@oclwarninfo{3}
+ {Paper-based textwidth reduced from:\MessageBreak
+ \the\@tempdima\space to \the\@tempdimc\MessageBreak
+ because of min[left/right]clearance limits}
+ \setlength\@tempdima{\@tempdimc}
+ \fi
+%
+\ifdim\@tempdimc<\@tempdimb
+ \RM@oclwarninfo{3}
+ {Character-based textwidth reduced from:\MessageBreak
+ \the\@tempdimb\space to \the\@tempdimc\MessageBreak
+ because of min[left/right]clearance limits}
+ \setlength\@tempdimb{\@tempdimc}
+ \fi
+
+%
+% Check min[inside|outside]margins
+%
+\setlength\@tempdimc{\paperwidth}
+\addtolength\@tempdimc{-\RM@mininsidemargin}
+\addtolength\@tempdimc{-\RM@minoutsidemargin}
+%
+\ifdim\@tempdimc<\@tempdima
+ \RM@oclwarninfo{3}
+ {Paper-based textwidth reduced from:\MessageBreak
+ \the\@tempdima\space to \the\@tempdimc\MessageBreak
+ because of min[in/out]sidemargin encroachment\MessageBreak}
+ \setlength\@tempdima{\@tempdimc}
+ \fi
+%
+\ifdim\@tempdimc<\@tempdimb
+ \RM@oclwarninfo{3}
+ {Character-based textwidth reduced from:\MessageBreak
+ \the\@tempdimb\space to \the\@tempdimc\MessageBreak
+ because of min[in/out]sidemargin encroachment\MessageBreak}
+ \setlength\@tempdimb{\@tempdimc}
+ \fi
+
+%%
+%%
+%% Decide which \@tempdim to use for \textwidth
+%% ............................................
+%%
+% Before we get to here, I have ensured that if the user has asked
+% for a paper-based textwidth like oneinchmargins, the
+% character-based textwidth has been set to the same value. So if
+% you ask for character-based textwidth setting and oneinchmargins,
+% you still get oneinchmargins, which is the best sense that can be
+% made of the request.
+%
+% Ensure that the paper-based width is larger if you've asked for
+% character-based only width setting; or that the character-based
+% width is larger if you've asked for paper-based only width setting.
+%
+\ifcase\RM@setwidthby
+%0 = both
+\or% 1 = character-based only; make paper width very large
+ \setlength\@tempdima{16383pt}
+\or% 2= paper-based only; make character width very large
+ \setlength\@tempdimb{16383pt}
+\else
+ \RM@Error{Time for a cuppa}
+ {\protect\RM@setwidthby\space is too large.\MessageBreak
+ This is a species of bug}
+\fi
+
+%
+% Pick the narrower of the two widths (paper based or character
+% based) unless told otherwise
+%
+
+\ifdim\@tempdima>\@tempdimb
+ \RM@ocl{2}{\typeout{Using character-based \protect\textwidth}}{}
+ \setlength\textwidth{\@tempdimb}% Use character-based width if
+% paper-based width is larger
+\else
+ \RM@ocl{2}{\typeout{Using paper-based \protect\textwidth}}{}
+ \setlength\textwidth{\@tempdima}% Use paper-based width if
+% character-based width is larger
+\fi
+%
+% The paper-based \textwidth guess might have been shrunk to less
+% than \RM@mintextwidth by now, and been selected as the \textwidth to
+% choose. Test and produce an error if this is the case.
+%
+\ifdim\textwidth>\RM@maxtextwidth
+ \RM@Error
+ {\protect\textwidth\space has ended up larger than\MessageBreak
+ \protect\RM@maxtextwidth. This can't happen, can it?}
+ {Something very strange has happened to my brain.}
+\fi
+\ifdim\textwidth<\RM@mintextwidth
+ \RM@Error
+ {I can't make \protect\textwidth\space as wide as\MessageBreak
+ \protect\RM@mintextwidth. Reducing the offset might help.
+ \MessageBreak
+ \protect\textwidth\space= \the\textwidth\MessageBreak
+ \protect\paperwidth\space= \the\paperwidth\MessageBreak
+ \protect\RM@mininsidemargin\space=
+ \RM@mininsidemargin\MessageBreak
+ \protect\RM@minoutsidemargin\space=
+ \RM@minoutsidemargin\MessageBreak
+ \protect\RM@minleftclearance\space=
+ \RM@minleftclearance\MessageBreak
+ \protect\RM@minrightclearance\space=
+ \RM@minrightclearance\MessageBreak}
+ {The horizontal limits are such that I can't cope.
+ \MessageBreak
+ I'm afraid you'll have to sort this one out yourself.
+ \MessageBreak
+ Good luck.}
+\fi
+%%
+%%
+%% \subsection{Calculate margins etc}
+%%
+% Start calculating margins. Begin by calculating the value of
+% \evensidemargin; if \evensidemargin and \oddsidemargin are the same
+% (in the case of centred or onesided printing), \oddsidemargin is
+% eventually set to be the same as \evensidemargin. If \evensidemargin
+% and \oddsidemargin are different (in the case of notcentred and
+% twosided printing only), \oddsidemargin is calculated from
+% \evensidemargin; it is set to:
+% [(\paperwidth-\textwidth-\evensidemargin) - 2in]. Physically, this is
+% the size of the right margin on even numbered pages. The 2in is
+% subtracted because TeX measures from 1in into the page.
+%
+% \ifRM@centre \evensidemargin=0.5\@tempdima \fi
+% \ifRM@stdmargins and \ifRM@twoside \evensidemargin=0.6\@tempdima \fi
+% \ifRM@stdmargins and oneside \evensidemargin=0.4\@tempdima \fi
+% \ifnotRM@stdmargins and \ifRM@twoside \evensidemargin=0.4\@tempdima \fi
+% \ifnotRM@stdmargins and oneside \evensidemargin=0.6\@tempdima \fi
+%
+% Define a counter \RM@offsetfrac, set by midoffset option to 60 by default.
+% \ifRM@centre \RM@offsetfrac=50 \fi
+% \ifRM@stdmargins and oneside \RM@offsetfrac= 100-\RM@offsetfrac \fi
+% \ifnotRM@stdmargins and \ifRM@twoside \RM@offsetfrac= 100-\RM@offsetfrac \fi
+% then:
+% \setlength\evensidemargin {\paperwidth}
+% \addtolength\evensidemargin {-\textwidth}
+% \divide\evensidemargin by 100
+% \multiply\evensidemargin by \RM@offsetfrac
+% \addtolength\evensidemargin {-1in}
+%
+
+%%
+%%
+%% Horizontal offset
+%% .................
+%%
+\ifnum\RM@offsetoption<2
+ \RM@oclwarninfo{3}
+ {Using a touchlessoffset option with leastoffset gives
+ \MessageBreak
+ you an offset the other way. (poorly expressed-sorry.)
+ \MessageBreak
+ This might not be what you want.}
+\fi
+
+%
+% Note that the slides class produces centred pages by default; this
+% needs to be requested as the default option for the slides class by an
+% \ExecuteOptions in the config file. \rmpage's default config file
+% does this.
+%
+\ifcase\RM@offsetoption
+ \RM@offsetfrac=48%0
+ \or\RM@offsetfrac=49%1
+ \or\RM@offsetfrac=50%2 least
+ \or\RM@offsetfrac=51%3
+ \or\RM@offsetfrac=52%4
+ \or\RM@offsetfrac=53%5 less
+ \or\RM@offsetfrac=54%6
+ \or\RM@offsetfrac=55%7
+ \or\RM@offsetfrac=56%8 lessish
+ \or\RM@offsetfrac=57%9
+ \or\RM@offsetfrac=59%10
+ \or\RM@offsetfrac=60%11 norm
+ \or\RM@offsetfrac=63%12
+ \or\RM@offsetfrac=65%13
+ \or\RM@offsetfrac=68%14 moreish
+ \or\RM@offsetfrac=71%15
+ \or\RM@offsetfrac=74%16
+ \or\RM@offsetfrac=77%17 more
+ \or\RM@offsetfrac=80%18
+ \or\RM@offsetfrac=83%19
+ \or\RM@offsetfrac=87%20 most
+ \or\RM@offsetfrac=91%21
+ \or\RM@offsetfrac=94%22
+\fi
+
+% %
+% % NB:
+% % 50 -> 53 -> 56 -> 60; x [ (60/50) ^ (1/3) ] each step (1.0627)
+% % 60 -> 68 -> 77 -> 87; x [ (87/60) ^ (1/3) ] each step (1.1319)
+% %
+% % So make touch[more/less]offset multipliers be ^ (1/3) these two values:
+% % 1.0627 ^ (1/3) = 1.0205. Reciprocal = 0.9799
+% % increase by 2%; decrease by 2%
+% % 1.1319 ^ (1/3) = 1.0421. Reciprocal = 0.9596
+% % increase by 4%; decrease by 4%
+% %
+\ifRM@centre
+ \RM@offsetfrac=50
+\else
+ \ifRM@stdmargins
+ \ifRM@twoside
+ \relax
+ \else% if notcentre and RM@stdmargins and oneside
+ \RM@offsetfrac=-\RM@offsetfrac
+ \advance\RM@offsetfrac by 100
+ \fi% endiftwoside
+ \else% if notRM@stdmargins
+ \ifRM@twoside% if notcentre and notRM@stdmargins and twoside
+ \RM@offsetfrac=-\RM@offsetfrac
+ \advance\RM@offsetfrac by 100
+ \fi% endiftwoside
+ \fi% endifstdmargins
+\fi% endifcentre
+%%
+%%
+%% Initial \evensidemargin setting
+%% ...............................
+%%
+\setlength\evensidemargin {\paperwidth}
+\addtolength\evensidemargin {-\textwidth}
+\divide\evensidemargin by 100
+\multiply\evensidemargin by \RM@offsetfrac
+\addtolength\evensidemargin {-1in}
+%
+% Note that any changes to \evensidemargin are reported below.
+%
+\RM@ocl{1}{
+ \typeout{Initial \protect\evensidemargin\space request:
+ \the\evensidemargin}}{}
+%
+% Note that \RM@offsetfrac being a percentage causes rather large
+% rounding errors when calculating touch[more/less]offset. If this
+% matters, make \RM@offsetfrac a fraction of something larger and a
+% power of two (128? 256? 512?).
+%%
+%%
+%% Initial \evensidemargin checks
+%% ..............................
+%%
+% \evensidemargin is now set to the initial preferred value.
+% Now check that it is > (minleftclearance,minoutsidemargin) if 2side
+% or > (minleftclearance,mininsidemargin) if not2side
+%
+% Increase \evensidemargin if necessary; this code ensures that
+% \evensidemargin is larger than all restrictions placed on the gap
+% that is set by \evensidemargin (in twoside mode, this is
+% minoutsidemargin or minleftclearance; in oneside mode, this is
+% minleftclearance or mininsidemargin). This might affect the
+% final left/right margin ratio. Calculate marginparwidth later.
+%
+% Note that if \evensidemargin is increased, \textwidth must be
+% decreased by the same amount to keep the margin opposite \evenside
+% margin the same. This doesn't maintain the required relationship;
+% that's done in the next step.
+%
+\ifRM@twoside
+ \ifdim\RM@minleftclearance>\RM@minoutsidemargin
+ \setlength\@tempdima{\RM@minleftclearance}
+ \else
+ \setlength\@tempdima{\RM@minoutsidemargin}
+ \fi
+\else
+ \ifdim\RM@minleftclearance>\RM@mininsidemargin
+ \setlength\@tempdima{\RM@minleftclearance}
+ \else
+ \setlength\@tempdima{\RM@mininsidemargin}
+ \fi
+\fi
+\addtolength\@tempdima{-1in}
+\setlength\@tempdimb{\evensidemargin}
+\addtolength\@tempdimb{-\@tempdima}
+\@tempdimb=-\@tempdimb% change sign to ease my brain
+\ifdim\@tempdimb>0pt
+ \addtolength\evensidemargin{\@tempdimb}
+ \addtolength\textwidth{-\@tempdimb}
+ \RM@oclwarninfo{3}
+ {A: I had to increase \protect\evensidemargin\space by:
+ \MessageBreak
+ \the\@tempdimb\space to \the\evensidemargin\MessageBreak
+ and decrease \protect\textwidth by:\MessageBreak
+ \the\@tempdimb\space to \the\textwidth\MessageBreak}
+\fi
+%
+% If \evensidemargin has been increased, the margin opposite
+% \evensidemargin must also be increased to maintain the
+% relationship:
+% \evensidemargin/(sum of both margins) = \RM@offsetfrac
+%
+% The way to do this is to decrease \textwidth by b, where:
+% b = a (1-f)/f
+%
+% a=change in \evensidemargin, f=\RM@offsetfrac/100
+%
+% Note that the code below depends on \@tempdimb = increase in
+% \evensidemargin on entry, and leaves \@tempdimb = a (1-f)/f on
+% exit.
+%
+% And this jiggery-pokery is only needed if \@tempdimb>0.
+%
+% First some paranoia:
+\ifnum\RM@offsetfrac=0
+ \RM@Error
+ {\protect\RM@offsetfrac=0; it should never be this value}
+ {rmpage has a bug that needs fixing}
+ \fi
+% The job itself... gets buggered up without that bloody \relax. Why?
+\relax
+\ifdim\@tempdimb>0pt
+ % First calculate 100x(1-f), leaving the result in \@tempcnta
+ \@tempcnta=100
+ \advance\@tempcnta by-\RM@offsetfrac
+ % Now multiply a by 100 x (1-f)
+ \multiply\@tempdimb by\@tempcnta
+ % And finally divide by (f x 100)
+ \divide\@tempdimb by\RM@offsetfrac
+ % \@tempdimb is now a (1-f)/f, so subtract it from \textwidth:
+ \addtolength\textwidth{-\@tempdimb}
+ \RM@oclwarninfo{3}
+ {B: I had to decrease \protect\textwidth\space by:\MessageBreak
+ \the\@tempdimb\space to \the\textwidth}
+\fi
+%
+% Finished calculating \evensidemargin.
+%%
+%%
+%% Re-check \textwidth and margins
+%% ...............................
+%%
+% Now check \textwidth; check that:
+% [\paperwidth-(1"+\evensidemargin+\textwidth)]
+% < (\RM@minrightclearance,\RM@mininsidemargin) if 2side
+% or < (\RM@minrightclearance,\RM@minoutsidemargin) if not2side
+%
+% reduce \textwidth if necessary
+%
+%
+\setlength\@tempdimb{\paperwidth}
+\addtolength\@tempdimb{-1in}
+\addtolength\@tempdimb{-\evensidemargin}
+\addtolength\@tempdimb{-\textwidth}
+%
+\ifRM@twoside
+ \ifdim\RM@minrightclearance>\RM@mininsidemargin
+ \setlength\@tempdima{\RM@minrightclearance}
+ \else
+ \setlength\@tempdima{\RM@mininsidemargin}
+ \fi
+\else
+ \ifdim\RM@minrightclearance>\RM@minoutsidemargin
+ \setlength\@tempdima{\RM@minrightclearance}
+ \else
+ \setlength\@tempdima{\RM@minoutsidemargin}
+ \fi
+\fi%
+%
+\addtolength\@tempdimb{-\@tempdima}
+\@tempdimb=-\@tempdimb% change sign to ease my brain
+\ifdim\@tempdimb>0pt
+ \addtolength\textwidth{-\@tempdimb}
+ \RM@oclwarninfo{3}
+ {C: I had to decrease \protect\textwidth\space by:\MessageBreak
+ \the\@tempdimb\space to \the\textwidth}
+\fi
+%
+% If \textwidth has been reduced, one could equally say that the
+% margin opposite \evensidemargin has been increased. So
+% \evensidemargin must also be increased to maintain the
+% relationship:
+% \evensidemargin/(sum of both margins) = \RM@offsetfrac
+% but this must be done without increasing the margin opposite
+% \evensidemargin; an amount must be added to \evensidemargin, and
+% the same amount subtracted from \textwidth. Good, isn't this?
+%
+% The thing to do is increase \evensidemargin and decrease \textwidth
+% by an amount a, where
+%
+% a = b f/(1-f)
+%
+% b = increase in margin opposite \evensidemargin
+% f = \RM@offsetfrac
+%
+% Note that the code below needs the increase in the margin opposite
+% \evensidemargin to be in \@tempdimb on entry, and leaves b f/(1-f)
+% in \@tempdimb on exit.
+%
+% And this jiggery-pokery is only needed if \@tempdimb>0.
+% First some paranoia:
+\ifnum\RM@offsetfrac=0
+ \RM@Error
+ {\protect\RM@offsetfrac=0; it should never be this value}
+ {rmpage has a bug that needs fixing}
+\fi
+% The job itself...
+\relax
+\ifdim\@tempdimb>0pt\relax
+ % First calculate b x 100 x f, leaving the result in \@tempdimb
+ \@tempdimb=\RM@offsetfrac\@tempdimb
+ % Then calculate 100x(1-f), leaving the result in \@tempcnta
+ \@tempcnta=100
+ \advance\@tempcnta by-\RM@offsetfrac
+ % Now divide by 100 x (1-f)
+ \divide\@tempdimb by\@tempcnta
+ % \@tempdimb is now b f/(1-f), so subtract it from \textwidth and
+ % \evensidemargin:
+ \addtolength\textwidth{-\@tempdimb}
+ \addtolength\evensidemargin{\@tempdimb}
+ \RM@oclwarninfo{3}
+ {D: I had to decrease \protect\textwidth\space by:\MessageBreak
+ \the\@tempdimb\space to \the\textwidth\space\MessageBreak
+ and increase \protect\evensidemargin\space by\MessageBreak
+ \the\@tempdimb\space to \the\evensidemargin}
+\fi
+%
+% There, now doesn't that feel better?
+%%
+%%
+%% Calculate \oddsidemargin
+%% ........................
+%%
+% Now calculate \oddsidemargin. \osm must be set equal to \esm if printing
+% onesided or centred; if printing twosided, \osm must be set to the size of the
+% right margin on even pages.
+%
+% begin by assuming that we are printing (onesided or centred)
+\setlength\oddsidemargin{\evensidemargin}
+% Then change \osm if we are printing (twosided and notcentred)
+\ifRM@twoside
+ \ifRM@centre
+ \relax
+ \else% if (twoside and notcentre)
+% set osm to size of right margin on even pages
+ \setlength\oddsidemargin{\paperwidth}
+ \addtolength\oddsidemargin{-2in}
+ \addtolength\oddsidemargin{-\evensidemargin}
+ \addtolength\oddsidemargin{-\textwidth}
+ \fi% endifRM@centre
+\fi% endifRM@twoside
+%%
+%%
+%% Re-check \textwidth
+%% ...................
+%%
+% And finally, ensure that \textwidth is still big enough\ldots
+%
+\ifdim\textwidth<\RM@mintextwidth
+ \RM@Error
+ {I can't make \protect\textwidth as wide as
+ \protect\RM@mintextwidth.\MessageBreak
+ See the log file for more details}
+ {If I've only complained about this problem once on this run,
+ \MessageBreak
+ try centred printing, or just a reduced offset.}
+\fi
+%%
+%%
+%% Calculate \marginparwidth and \marginparsep
+%% ...........................................
+%%
+% Begin by working out a new value of \marginparsep:
+%
+\RM@ocl{1}
+ {\typeout{Initial value:}
+ \RM@ttval{\marginparsep}}{}
+%
+\RM@scalebyoption{\marginparsep}{\RM@mparsepoption}
+%
+% Now that marginparsep has its final value, calculate marginparwidth...
+% Keep the reports, because things get quite hairy here and I might
+% forget what's going on...
+%
+\ifRM@twoside
+ \if@reversemargin
+ \RM@ocl{1}
+ {\typeout{marginparwidth setting: twoside, reversemarginpars}}{}
+ \setlength\marginparwidth{\oddsidemargin}
+ \addtolength\marginparwidth{1in}
+ \else
+ \RM@ocl{1}
+ {\typeout{marginparwidth setting: twoside, normalmarginpars}}{}
+ \setlength\marginparwidth{\evensidemargin}
+ \addtolength\marginparwidth{1in}
+ \fi% endif@reversemargin
+\else
+ \if@reversemargin
+ \RM@ocl{1}
+ {\typeout{marginparwidth setting: oneside, reversemarginpars}}{}
+ \setlength\marginparwidth{\evensidemargin}
+ \addtolength\marginparwidth{1in}
+ \else
+ \RM@ocl{1}
+ {\typeout{marginparwidth setting: oneside, normalmarginpars}}{}
+ \setlength\marginparwidth{\paperwidth}
+ \addtolength\marginparwidth{-\textwidth}
+ \addtolength\marginparwidth{-\evensidemargin}
+ \addtolength\marginparwidth{-1in}
+ \fi% endif@reversemargin
+\fi% endifRM@twoside
+%
+% Minor bobble: if you're printing in more than one column, marginal
+% notes end up in the margin nearest the current column, so the smallest
+% margin provides the limit... What with one thing and another,
+% the easiest way of finding out which one this is is by calculating the
+% size of the margins, to the left and right, and testing.
+%
+% Only do this check for classes other than slides, because slides can
+% only have one column.
+\RM@OnClassType{5}{}
+ {\ifnum\RM@textcols=1
+ \else
+ \RM@ocl{1}
+ {\typeout{marginparwidth setting: multicolumn setttings}}{}
+ \setlength{\marginparwidth}{\paperwidth}
+ \addtolength{\marginparwidth}{-\textwidth}
+ \addtolength{\marginparwidth}{-\evensidemargin}
+ \addtolength{\marginparwidth}{-2in}
+ \ifdim\marginparwidth>\evensidemargin
+ \setlength{\marginparwidth}{\evensidemargin}
+ \fi
+ \addtolength{\marginparwidth}{1in}
+ \fi}% endRM@OnClassType
+%
+% Use the one typeout for both reports; hopefully more efficient that
+% otherwise. Certainly uglier.
+%
+\RM@ocl{1}
+ {\typeout
+ {Assumed size of marginal paragraph
+ margin = \the\marginparwidth^^JInitial value:}
+ \RM@ttval{\RM@mparclearance}}{}
+%
+\RM@scalebyoption{\RM@mparclearance}{\RM@mparclearoption}
+%
+% \marginparwidth is now as big as the margin space the notes will
+% appear in, and \RM@mparclearance has its final value.
+%
+% Finish calculating \marginparwidth...
+%
+% The minimum space allowed between the edge of the paper and the mpar is
+% \RM@mparclearfrac * \paperwidth; this product is placed in
+% \@tempdimb. If the specified min[left|right]clearance is greater
+% than this value, the min[l|r]clearance is used instead.
+%
+%
+%
+% Gap between note and text
+\addtolength\marginparwidth{-\marginparsep}
+%
+% I wish I knew why some of these ifs don't work the way I expect.
+%
+\relax
+\ifdim\RM@minrightclearance>\RM@minleftclearance\relax
+ \@tempdima=\RM@minrightclearance
+ \RM@ocl{1}{\typeout{\protect\RM@minrightclearance\space is greater than
+ \protect\RM@minleftclearance}}{}
+\else
+ \@tempdima=\RM@minleftclearance
+ \RM@ocl{1}{\typeout{\protect\RM@minleftclearance\space is greater than
+ \protect\RM@minrightclearance}}{}
+\fi% endifdim
+
+\relax
+\ifdim\@tempdima<\RM@mparclearance\relax
+ \@tempdima=\RM@mparclearance
+ \RM@ocl{1}{\typeout{\protect\RM@mparclearance\space is greater than
+ \protect\RM@min[left/right]clearance}}{}
+\fi% endifdim
+
+% \@tempdima is now the larger of \RM@minlclearance,
+% \RM@minrclearance, and \RM@mparclearance. Use this dimension
+% as the minimum marginal paragraph clearance.
+
+\RM@ocl{1}
+ {\typeout{\protect\marginparwidth\space reduced by
+ \the\@tempdima\space (space to the paper's edge)^^J
+ \space\space\space to \the\marginparwidth}}{}
+
+\addtolength\marginparwidth{-\@tempdima}
+
+%
+% Final value is reported at the end of rmpage
+%
+\RM@ocl{1}{
+ \typeout{Initial value}
+ \RM@ttval{\RM@maxmparwidth}
+ }{}
+
+\RM@scalebyoption{\RM@maxmparwidth}{\RM@maxmparwidthoption}
+
+\ifdim\marginparwidth>\RM@maxmparwidth% 2in std 2e
+ \setlength\marginparwidth{\RM@maxmparwidth}
+ \RM@ocl{1}
+ {\typeout
+ {\protect\marginparwidth\space reduced to
+ \the\marginparwidth\space
+ (\protect\RM@maxmparwidth limit)}
+ }{}
+\fi
+%
+\ifdim\marginparwidth<0pt\marginparwidth=0pt\fi
+\ifdim\marginparwidth<\RM@ptperchar% Too small to hold one average character
+ \RM@oclwarninfo{3}
+ {\protect\marginparwidth\space=
+ \the\marginparwidth; this is less than one\MessageBreak
+ character wide. If you intend to use marginal\MessageBreak
+ notes, you probably need to enlarge the margin\MessageBreak
+ that marginal notes appear in}
+\fi%endifdim\marginparwidth<\RM@ptperchar
+%
+% END OF THE SECTION THAT WAS REVISED 25/2/96.
+%%
+%%
+%% \subsection{Check column width for legibility}
+%%
+\RM@ocl{2}{
+ \typeout{Before calculating column width:}
+ \RM@ttval{\textwidth}
+ }{}
+%
+\setlength{\@tempdima}{\textwidth}
+%
+% Now calculate one column width. \rmpage can handle any number of
+% columns; there's options up to 10 columns, which is the multicol
+% package limit. You can create an option to set \RM@textcols to
+% anything you like.
+%
+% Only do this check for classes other than slides, because slides can
+% only have one column.
+\RM@OnClassType{5}{}
+ {\ifnum\RM@textcols=0
+ % Avoid dividing by zero...
+ \RM@Error{You can't have zero columns}
+ {\protect\RM@textcols\protect is zero.
+ This shouldn't happen.}
+ \else
+ \@tempcnta=\RM@textcols
+ \advance\@tempcnta by-1
+ \addtolength\@tempdima{-\@tempcnta\columnsep}
+ \divide\@tempdima by\RM@textcols
+ \fi}% endRM@OnClassType
+%
+%
+\RM@ocl{2}{
+ \typeout{\space\space\space
+ the width of one column = \the\@tempdima}
+ }{}
+% Do odd things to measure character width of one column
+%
+\addtolength\@tempdima{\@tempdima}% 2 x column width
+\@tempcnta=\@tempdima
+\setlength\@tempdimb{0.2\RM@ptperchar}% ptperchar / 5
+\divide\@tempcnta by\@tempdimb% characters wide x 10
+%
+% It'd be tricky to get this information anywhere else in rmpage et al.
+% Always at least log this information.
+%
+\RM@ocl{3}
+ {\typeout
+ {\space\space\space
+ the width of one column = \the\@tempcnta\space (characters x 10)
+ }}
+ {\PackageInfo{rmpage}
+ {the width of one column = \the\@tempcnta\space characters x 10 wide}}
+%
+% Warn if there's too many or too few characters across one column.
+% Standard spread of columnwidth according to the textbooks is 1.5-2.5 x
+% the width of the alphabet. I use a more sophisticated way of
+% measuring the width of a character than just banging down a complete
+% (lower-case) alphabet (not that it makes any difference to legibility,
+% I wouldn't have thought). My way gives a points-per-character
+% measurement of about 12\% more than the simple way, so the textbook
+% textwidth spread is about 39 (43.7) to 65 (75) characters (my measured
+% characters in brackets. Seen the 75 character upper limit before?).
+%
+% Rather than be overly proscriptive, merely warn if column width
+% exceeds normal width or is less than 41 characters (measured my way;
+% that's about 37 textbook characters). I've entered the warning
+% separately for each point size in case I feel like changing my mind
+% later on, and varying things for each point size.
+%
+% I feel there should be a more elgant way of doing this, but I can't
+% figure one out yet.
+%
+\def\RM@toowideQ#1#2{\relax\ifnum #1>#2 \relax
+ \protect\RM@oclwarninfo{3}
+ {\protect\textwidth\space is too wide for comfy reading}\fi}
+\def\RM@toonarrowQ#1#2{\relax\ifnum #1<#2 \relax
+ \protect\RM@oclwarninfo{3}
+ {\protect\textwidth\space is too narrow for comfy reading}\fi}
+
+% Different code for slides, because slides can only have one typesize
+% and doesn't define \@ptsize
+\RM@OnClassType{5}% slides code
+{\RM@toowideQ{\@tempcnta}{700}
+\RM@toonarrowQ{\@tempcnta}{410}}{}
+%
+% std classes except slides
+\RM@OnTextwidthGroup{0}
+{\ifcase\RM@ptsizegroup \relax
+% 10pt
+ \RM@toowideQ{\@tempcnta}{785}
+ \RM@toonarrowQ{\@tempcnta}{410}
+\or% 11pt
+ \RM@toowideQ{\@tempcnta}{748}
+ \RM@toonarrowQ{\@tempcnta}{410}
+\or% 12pt
+ \RM@toowideQ{\@tempcnta}{755}
+ \RM@toonarrowQ{\@tempcnta}{410}
+\else% unknown
+ \RM@Warn{I don't know what this point size is}
+\fi
+}{}% end std classes except slides
+%%
+
+% foils class
+\RM@OnTextwidthGroup{2}{
+\ifcase\RM@ptsizegroup \relax
+% 17pt
+ \RM@toowideQ{\@tempcnta}{750}
+ \RM@toonarrowQ{\@tempcnta}{410}
+\or% 20pt
+ \RM@toowideQ{\@tempcnta}{730}
+ \RM@toonarrowQ{\@tempcnta}{410}
+\or% 25pt
+ \RM@toowideQ{\@tempcnta}{715}
+ \RM@toonarrowQ{\@tempcnta}{410}
+\or% 30pt
+ \RM@toowideQ{\@tempcnta}{700}
+ \RM@toonarrowQ{\@tempcnta}{410}
+\else% unknown
+ \RM@Warn{I don't know what this point size is}
+\fi}{}% end foils class settings
+%
+% odd classes
+\RM@OnTextwidthGroup{3}{
+ \RM@toowideQ{\@tempcnta}{785}
+ \RM@toonarrowQ{\@tempcnta}{410}
+}{}% end odd class stuff
+%
+% local odd classes; these limits are extreme.
+\RM@OnTextwidthGroup{4}{
+ \RM@toowideQ{\@tempcnta}{785}
+ \RM@toonarrowQ{\@tempcnta}{410}
+}{}% end local odd classes checking
+%
+\let\RM@toowideQ\@undefined
+\let\RM@toonarrowQ\@undefined
+%%
+%% End of what was rmpwnorm
+%% ------------------------
+%%
+%%
+%% \subsection{Post width setting hook}
+%%
+\RM@executehook{RM@AfterWidthSetting}
+%%
+%%
+%% \section{End of page layout setting}
+%%
+%%
+%%
+%% \section{Begin miscellaneous stuff}
+%%
+% Everything below here is extra bits and bobs: stuff to change
+% linebreaking (or paragraph forming?) parameters, and some code to
+% change the \today command. And right at the end is the `tell the
+% user what I've done' code, and some \lets to free up memory (it
+% says here).
+%%
+%%
+%% \subsection{Change typesetting parameters}
+%%
+% Many of the values below were recommended by Alan Jeffries
+%
+% Code below from latex.ltx; consider using the sloppiness commands to
+% re-define \fussy and \sloppy? --- \sloppy is used by default by
+% LaTeX's standard classes for \twocolumn setting. See notes above: the
+% values suggested by Jeffries for fontinst founts shouldn't be used
+% anymore: Sebastian Rahtz says the metrics have been changed
+% (11/95). But they're still tighter than cmr and give bad line
+% breaks too often for my liking, but looseish seems a better
+% looseness now. Perhaps I might change the sloppiness command so
+% that the looseish settings are used for a loose, and everything is
+% changed around that? I'd greatly appreciate anybody's opinion on
+% this one: my head's exploded.
+%
+% setting by default
+% % \def\sloppy{%
+% % \tolerance 9999%
+% % \emergencystretch 3em%
+% % \hfuzz .5\p@
+% % \vfuzz\hfuzz}
+% % \def\sloppypar{\par\sloppy}
+% % \def\endsloppypar{\par}
+% % \def\fussy{%
+% % \emergencystretch\z@
+% % \tolerance 200%
+% % \hfuzz .1\p@
+% % \vfuzz\hfuzz}
+%
+%
+% sloppiness{0}=fussy LaTeX
+% sloppiness{1}=fussier
+% sloppiness{2}=close to Alan Jeffries's suggestion for fontinst founts
+% sloppiness{3}=sloppier
+% sloppiness{4}=sloppiest
+% sloppiness{5}=sloppier than sloppy
+%
+\def\sloppiness#1{\@tempcnta=#1
+ \ifnum\@tempcnta<0
+ \GenericError{}
+ {You've asked for a negative looseness}
+ {See the rmpage package documentation for further information}
+ {Change your document when you get the chance;
+ I'll assume you meant 0 for now}
+ \@tempcnta=0
+ \fi
+ \ifnum\@tempcnta>5
+ \GenericError{}
+ {You've asked for a looseness greater than 5}
+ {See the rmpage package documentation for further information}
+ {Change your document when you get the chance;
+ I'll assume you meant 4 for now}
+ \@tempcnta=5
+ \fi
+ \ifcase\@tempcnta
+ % 0
+ \relax
+ \tolerance200
+ \pretolerance100
+ \emergencystretch0em
+ \hfuzz0.1pt
+ \leftskip0pt
+ \rightskip0pt
+ \hyphenpenalty50
+ \exhyphenpenalty50
+ \doublehyphendemerits10000
+ %\interlinepenalty0 Don't affect pagebreaking (yet?)
+ %\clubpenalty150
+ %\widowpenalty150
+ \or%1
+ \tolerance400
+ \pretolerance200
+ \emergencystretch0.03\textwidth% default 0
+ \hfuzz0.1pt
+ \leftskip0pt
+ \rightskip0pt minus 0.1pt
+ \hyphenpenalty=25
+ \exhyphenpenalty=35
+ \doublehyphendemerits5000
+ \or%2
+ \tolerance800% default 200
+ \pretolerance400% default 100
+ \emergencystretch0.06\textwidth% default 0; AJ says 2em
+ \hfuzz0.1pt%default 0.1pt
+ \leftskip0pt%default 0; AJ says 0pt-1pt;
+ \rightskip0pt minus 0.15pt%default 0; AJ says 0pt-1pt;
+ \hyphenpenalty0% AJ value; default 50
+ \exhyphenpenalty25% AJ value; default 50.
+ \doublehyphendemerits2500% AJ value; default 10000;
+ \or%3
+ \tolerance1200
+ \pretolerance600
+ \emergencystretch0.09\textwidth
+ \hfuzz0.1pt
+ \leftskip0pt
+ \rightskip0pt minus 0.23pt
+ \hyphenpenalty0
+ \exhyphenpenalty12
+ \doublehyphendemerits1000
+ \or%4
+ \tolerance1600
+ \pretolerance800
+ \emergencystretch0.12\textwidth% default 0; AJ says 2em for fontinst fonts
+ \hfuzz0.1pt
+ \leftskip0pt minus0.1pt
+ \rightskip0pt minus0.34pt
+ \hyphenpenalty=0
+ \exhyphenpenalty=0
+ \doublehyphendemerits100
+ \or%5 --- sloppier than sloppy for psfounts in 2 cols
+ \tolerance9999
+ \pretolerance1600
+ \emergencystretch0.21\textwidth%
+ \hfuzz0.1pt
+ \vfuzz0.5pt
+ \leftskip0pt minus0.15pt
+ \rightskip0pt minus0.5pt
+ \hyphenpenalty0
+ \exhyphenpenalty0
+ \doublehyphendemerits0
+ \else
+ \GenericError{}
+ {This can't happen}
+ {See the rmpage package documentation for further information}
+ {Maybe it has; I think I have a bug}
+ \fi
+ \if@twocolumn
+ \emergencystretch0.5\emergencystretch
+ \fi
+}
+%
+% Then set the level of typesetting tightness that has been set by the
+% code above.
+%
+\sloppiness{\RM@looseoption}
+%%
+%%
+%% \subsection{Change date format if asked}
+%%
+\ifRM@nicedate% From nicedate.sty; changed
+ \def\today{%
+ \ifcase\day\or 1st\or 2nd\or 3rd\or 4th\or 5th\or%
+ 6th\or 7th\or 8th\or 9th\or 10th\or 11th\or 12th\or 13th\or 14th\or%
+ 15th\or 16th\or 17th\or 18th\or 19th\or 20th\or 21st\or 22nd\or%
+ 23rd\or 24th\or 25th\or 26th\or 27th\or 28th\or 29th\or 30th\or%
+ 31st\else 666th\fi\space%
+ \ifcase\month\or%
+ January\or February\or March\or April\or May\or June\or %
+ July\or August\or September\or October\or November\or %
+ December\else yraunaJ\fi\space%
+ \number\year}%
+ \fi
+
+%%
+%%
+%% \subsection{Report final layout etc parameters}
+%%
+\RM@ocl{3}
+ {
+ \typeout{\RM@percentsign}
+ \typeout{\RM@percentsign\space -----------------------}
+ \typeout{\RM@percentsign\space LaTeX layout parameters}
+ \typeout{\RM@percentsign\space -----------------------}
+ \typeout{\RM@percentsign}
+ \RM@ttval{\paperheight}
+ \RM@ttval{\textheight}
+ \RM@ttval{\paperwidth}
+ \RM@ttval{\textwidth}
+ }
+ {
+ \PackageInfo{rmpage}{LaTeX layout parameters}
+ \RM@infotheval{\paperheight}
+ \RM@infotheval{\textheight}
+ \RM@infotheval{\paperwidth}
+ \RM@infotheval{\textwidth}
+ }% end \RM@ocl{3}: report main final values
+
+\RM@ocl{2}{
+ \RM@ttval{\topmargin}
+ \RM@ttval{\headsep}
+ \RM@ttval{\headheight}
+ \RM@ttval{\footskip}
+ \RM@ttval{\columnsep}
+ \RM@ttval{\marginparsep}
+ \RM@ttval{\marginparwidth}
+ \RM@ttval{\evensidemargin}
+ \RM@ttval{\oddsidemargin}
+ \ifRM@nicedate
+ \typeout{\RM@percentsign\space ! Redefined the
+ \protect\today\space command}
+ \fi
+ \ifnum\RM@looseoption=0
+ \else
+ \typeout{\RM@percentsign\space Changed LaTeX linebreaking parameters:}
+ \RM@ttval{\tolerance}
+ \RM@ttval{\pretolerance}
+ \RM@ttval{\emergencystretch}
+ \RM@ttval{\hfuzz}
+ \RM@ttval{\leftskip}
+ \RM@ttval{\rightskip}
+ \RM@ttval{\hyphenpenalty}
+ \RM@ttval{\exhyphenpenalty}
+ \RM@ttval{\doublehyphendemerits}
+ \typeout{\RM@percentsign\space End changed LaTeX linebreaking parameters}
+ \fi
+ \typeout{\RM@percentsign}
+ \typeout{\RM@percentsign\space ---------------------------}
+ \typeout{\RM@percentsign\space End LaTeX layout parameters}
+ \typeout{\RM@percentsign\space ---------------------------}
+ \typeout{\RM@percentsign}
+ \setlength\@tempdima{\paperwidth}
+ \addtolength\@tempdima{-\textwidth}
+ \typeout{\space\space\space
+ \paperwidth-\textwidth = \the\@tempdima}
+ \setlength\@tempdimb{\oddsidemargin}
+ \addtolength\@tempdimb{1in}
+ \setlength\@tempdima{\evensidemargin}
+ \addtolength\@tempdima{1in}
+ \typeout{\space\space\space
+ \evensidemargin + 1in = \the\@tempdima}
+ \typeout{\space\space\space
+ \oddsidemargin + 1in = \the\@tempdimb}
+ \setlength\@tempdima{\evensidemargin}
+ \addtolength\@tempdima{1in}
+ \setlength\@tempdima{-\@tempdima}
+ \addtolength\@tempdima{\paperwidth}
+ \addtolength\@tempdima{-\textwidth}
+ \typeout{\space\space\space
+ opposite evensidemargin = \the\@tempdima}
+ \setlength\@tempdima{\oddsidemargin}
+ \addtolength\@tempdima{1in}
+ \setlength\@tempdima{-\@tempdima}
+ \addtolength\@tempdima{\paperwidth}
+ \addtolength\@tempdima{-\textwidth}
+ \typeout{\space\space\space
+ opposite oddsidemargin = \the\@tempdima}
+ \RM@ttval{\baselineskip}
+ \typeout{\protect\rmpage\space package parameters}
+ \RM@ttval{\RM@totalfootclearance}
+ \RM@ttval{\RM@totalheadclearance}
+ \RM@tval{\RM@minrightclearance}
+ \RM@tval{\RM@minleftclearance}
+ \RM@tval{\RM@minheadclearance}
+ \RM@tval{\RM@minfootclearance}
+ \RM@tval{\RM@mintextwidth}
+ \RM@tval{\RM@maxtextwidth}
+ \RM@tval{\RM@mintextheight}
+ \RM@tval{\RM@maxtextheight}
+ \RM@tval{\RM@minbottommargin}
+ \RM@tval{\RM@mintopmargin}
+ \RM@tval{\RM@mininsidemargin}
+ \RM@tval{\RM@minoutsidemargin}
+ \RM@ttval{\RM@ptperchar}
+ \RM@ttval{\RM@offsetfrac}
+ \RM@tval{\RM@textcols}
+ \RM@ttval{\RM@mparclearance}
+ \RM@ttval{\RM@maxmparwidth}
+ \RM@tval{\RM@ifbeton}
+ \ifcase\RM@looseoption
+ \typeout{tight typesetting}
+ \or\typeout{looseish typesetting}
+ \or\typeout{loose typesetting}
+ \or\typeout{looser typesetting}
+ \or\typeout{loosest typesetting}
+ \or\typeout{psuedo sloppy typesetting}
+ \else
+ \ifnum\RM@looseoption=205
+ \RM@Error{Undefined typesetting tightness}
+ {A bug has evolved: Rowland should fix this.}
+ \else
+ \RM@Error{Unknown typesetting tightness}
+ {A silly bug has evolved: Rowland should
+ be hassled for inventing it}
+ \fi% endifnum
+ \fi% endifcase
+}{}% end \RM@ocl{2}: report final values
+
+\RM@ocl{1}{
+ \RM@ttval{\RM@widthoption}
+ \RM@ttval{\RM@lengthoption}
+ \RM@ttval{\RM@headsepoption}
+ \RM@ttval{\RM@footskipoption}
+ \RM@ttval{\RM@columnsepoption}
+ \RM@ttval{\RM@mparsepoption}
+ \RM@ttval{\RM@mparclearoption}
+ \RM@ttval{\RM@offsetoption}
+ \RM@ttval{\RM@totalheadfootclearance}
+ \RM@tval{\RM@mintotalheadfootclearance}
+ \RM@tval{\RM@maxtotalheadfootclearance}
+ \RM@tval{\RM@maxpractextheight}
+ \RM@tval{\RM@minpractextheight}
+ \RM@tval{\RM@classtype}
+ \RM@tval{\RM@textheightgroup}
+ \RM@tval{\RM@textwidthgroup}
+ \RM@tval{\RM@printertype}
+ \RM@tval{\RM@ptrrlandclear}
+ \RM@tval{\RM@ptrllandclear}
+ \RM@tval{\RM@ptrtlandclear}
+ \RM@tval{\RM@ptrblandclear}
+ \RM@tval{\RM@ptrrportclear}
+ \RM@tval{\RM@ptrlportclear}
+ \RM@tval{\RM@ptrtportclear}
+ \RM@tval{\RM@ptrbportclear}
+ \RM@tval{\RM@ptrpostol}
+ \RM@tval{\RM@papertype}
+ \RM@tval{\RM@longpapertype}
+ \ifRM@portlandinvert
+ \typeout{\space\space\space
+ \protect\RM@portlandinvert\space is true}
+ \else
+ \typeout{\space\space\space
+ \protect\RM@portlandinvert\space is false}
+ \fi
+ \ifRM@portrait
+ \typeout{\space\space\space
+ \protect\RM@portrait\space is true}
+ \else
+ \typeout{\space\space\space
+ \protect\RM@portrait\space is false}
+ \fi
+ \RM@tval{\RM@ptsize}
+ \RM@tval{\RM@ptsizegroup}
+ \typeout{End \protect\rmpage\space package parameters}
+ \RM@OnClassType{5}{}{% Not for slides class
+ \typeout{\space\space\space
+ Point size: 1\@ptsize pt}
+ \RM@tval{\@ptsize}}
+}{}% end \RM@ocl{1}: report final values
+%%
+%%
+%% \subsection{Re-set \comname{baselineskip} if needed after beton changes}
+%%
+% If beton settings have been made, it's probably best to re-set the
+% selected fount size to what it was before I selected \normalsize
+% with beton's \baselineskip. But it's got to be done after all the
+% reporting, so the correct value of \comname{baselineskip} is reported.
+%
+% If a new size/baselineskip pair was selected because the beton
+% option had been specified, and the beton package loaded, un-do the
+% changes using the saved values. This is probably unnecessary, but
+% you never know what might be making assumptions about things.
+%
+\@ifpackagewith{beton}{standard-baselineskips}{}% Do nought if ...
+ {
+% If beton was loaded without the standard-baselineskips option,
+% reset the fount size/baselineskip to whatever it was before rmpage
+% changed it to what rmpage thinks beton will change it to. Can't say
+% I like this, but do you have a better idea?
+ \ifnum\RM@ifbeton<2
+ \let\@setfontsize=\beton@old@setfontsize
+ \fontsize{\RM@ldf@size}{\RM@ldf@baselineskip}
+ \selectfont
+ \fi% endifnum\RM@ifbeton<2
+ }
+
+%%
+%%
+%% \subsection{Erm, a message about warnings in the log file}
+%%
+\ifRM@infowarned
+ \RM@Warn{I have printed some warnings in the log file}
+\fi% endifRM@infowarned
+%
+%
+%%
+%%
+%% \section{Free up some space}
+%%
+%%
+%% \subsection{Empty stuff from rmpage}
+%%
+% The following \let\XXX=\@empty construction allegedy clears memory. I
+% don't know where I got the idea, but I'll try it and see if it works.
+%
+\let\RM@chatlevel\@undefined
+\let\RM@ocl\@undefined
+\let\RM@oclwarninfo\@undefined
+\let\RM@ttval\@undefined
+\let\RM@tval\@undefined
+\let\RM@looseoption\@undefined
+\let\RM@classtype\@undefined
+\let\RM@fountfamily\@undefined
+\let\RM@lengthoption\@undefined
+\let\RM@widthoption\@undefined
+\let\RM@offsetoption\@undefined
+\let\RM@printertype\@undefined
+\let\RM@papertype\@undefined
+\let\RM@ptrrportclear\@undefined
+\let\RM@ptrlportclear\@undefined
+\let\RM@ptrtportclear\@undefined
+\let\RM@ptrbportclear\@undefined
+\let\RM@ptrrlandclear\@undefined
+\let\RM@ptrllandclear\@undefined
+\let\RM@ptrtlandclear\@undefined
+\let\RM@ptrblandclear\@undefined
+\let\RM@minoutsidemargin\@undefined
+\let\RM@mininsidemargin\@undefined
+\let\RM@mintopmargin\@undefined
+\let\RM@minbottommargin\@undefined
+\let\RM@minrightclearance\@undefined
+\let\RM@minleftclearance\@undefined
+\let\RM@minfootclearance\@undefined
+\let\RM@minheadclearance\@undefined
+\let\RM@maxmparwidth\@undefined
+\let\RM@footersfalse\@undefined
+\let\RM@footerstrue\@undefined
+\let\ifRM@footers\@undefined
+\let\RM@headersfalse\@undefined
+\let\RM@headerstrue\@undefined
+\let\ifRM@headers\@undefined
+\let\ifRM@loadfount\@undefined
+\let\RM@loadfounttrue\@undefined
+\let\RM@loadfountfalse\@undefined
+\let\ifRM@nicedate\@undefined
+\let\RM@nicedatetrue\@undefined
+\let\RM@nicedatefalse\@undefined
+\let\ifRM@adaptivecolsep\@undefined
+\let\RM@adaptivecolseptrue\@undefined
+\let\RM@adaptivecolsepfalse\@undefined
+\let\ifRM@centre\@undefined
+\let\RM@centretrue\@undefined
+\let\RM@centrefalse\@undefined
+\let\ifRM@twoside\@undefined
+\let\RM@twosidetrue\@undefined
+\let\RM@twosidefalse\@undefined
+\let\RM@textcols\@undefined
+\let\ifRM@portrait\@undefined
+\let\RM@portraittrue\@undefined
+\let\RM@portraitfalse\@undefined
+\let\ifRM@stdmargins\@undefined
+\let\RM@stdmarginstrue\@undefined
+\let\RM@stdmarginsfalse\@undefined
+\let\ifRM@infowarned\@undefined
+\let\RM@infowarnedtrue\@undefined
+\let\RM@infowarnedfalse\@undefined
+\let\RM@ifbeton\@undefined
+\let\RM@ldf@baselineskip\@undefined
+\let\RM@ldf@size\@undefined
+\let\RM@OnPortraitPaperSize\@undefined
+\let\RM@OnLandscapePaperSize\@undefined
+\let\RM@OnPrinterType\@undefined
+\let\RM@PrinterPaperSettings\@undefined
+\let\RM@longpapertype\@undefined
+\let\RM@Error\@undefined
+\let\RM@Warn\@undefined
+\let\RM@portlandinverttrue\@undefined
+\let\RM@portlandinvertfalse\@undefined
+\let\ifRM@portlandinvert\@undefined
+\let\RM@ptrpostol\@undefined
+\let\RM@widthsetter\@undefined
+\let\RM@OnClassType\@undefined
+\let\RM@textheightgroup\@undefined
+\let\RM@BeforeProcessOptions\@undefined
+\let\RM@AfterProcessOptions\@undefined
+\let\RM@DefineNewClasses\@undefined
+\let\RM@PrinterPaperSettings\@undefined
+\let\RM@BeforeWidthSetting\@undefined
+\let\RM@AfterWidthSetting\@undefined
+\let\RM@scalebyoption\@undefined
+\let\ifRM@jackup\@undefined
+\let\RM@jackupfalse\@undefined
+\let\RM@jackuptrue\@undefined
+\let\RM@noffilew\@undefined
+\let\RM@notinexecuteoptions\@undefined
+\let\RM@SetClassType\@undefined
+\let\RM@OnClassExecuteOptions\@undefined
+\let\RM@OnTextheightGroup\@undefined
+\let\RM@totalheadfootclearance\@undefined
+\let\RM@totalfootclearance\@undefined
+\let\RM@totalheadclearance\@undefined
+\let\RM@OnPaperSize\@undefined
+\let\RM@infotheval\@undefined
+\let\RM@minpractextheight\@undefined
+\let\RM@maxtotalheadfootclearance\@undefined
+\let\RM@maxpractextheight\@undefined
+\let\RM@mintotalheadfootclearance\@undefined
+\let\RM@setpsloose\@undefined
+\let\RM@SetLengthAtLeast\@undefined
+\let\RM@DefLengthAtLeast\@undefined
+\let\RM@textwidthgroup\@undefined
+\let\RM@ptsizegroup\@undefined
+\let\RM@AfterInitialTextwidthSetting\@undefined
+%%
+%%
+%% \subsection{Clear rmpwnorm stuff}
+%%
+\let\RM@setptperchar\@undefined
+\let\RM@ptperchar\@undefined
+\let\RM@offsetfrac\@undefined
+\let\RM@OnWidthOption\@undefined
+\let\RM@setthisfountptperchar\@undefined
+% \let\@undefined
+% \let\@undefined
+%
+%
+% don't \let\RM@ptsize\@undefined; maybe want to see it in document
+%
+% Finis
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/rmpage/rmpage.tex b/macros/latex/contrib/rmpage/rmpage.tex
new file mode 100644
index 0000000000..c87f865e1d
--- /dev/null
+++ b/macros/latex/contrib/rmpage/rmpage.tex
@@ -0,0 +1,5528 @@
+% copyright 1996 and 1997 R. McDonnell
+% email rebecca@astrid.u-net.com
+
+\documentclass[11pt,loose,twoside,touchwider,longish,
+ noheaders,a4paper,notstdmargins]{report}
+
+\usepackage{rmpage,% rmstuffnew,
+shortvrb,tabularx,layout,xspace}
+
+% Extracted from rmstuffnew.sty
+\makeatletter
+% Might as well
+%
+\newcommand*{\OzTeX}{O\kern-.03em z\kern-.15em\TeX}
+\newcommand*{\OzTools}{O\kern-.03em z\kern-.10em Tools}
+% This command is horrible and doesn't work right with LaTeX2e.
+% Please forgive it.
+%
+% Could probably re-implement \unit with 2e's requiremathmode stuff. RTFM.
+%
+\newcommand*{\unit}[1]{\ifmmode\@unit{\hbox{#1}}\else$\@unit{\hbox{#1}}$\fi}%
+
+\let\units=\unit
+
+\def\@unit#1{{\setbox0=\hbox{#1}\ifdim\wd0<1.125em\,\else\>\fi\box0}}
+
+
+% at char for tt family
+\newcommand*{\at}{\char'100}
+\makeatother
+% End extracted from rmstuffnew.sty
+
+%
+% Note: Search and replace %% \DeclareOption -> \asleepoption
+% \DeclareOption -> \awakeoption
+%
+\def\awakefount{\mdseries\ttfamily}
+\def\asleepfount{\mdseries\ttfamily\slshape}
+\def\awakeoption#1{\item[{\awakefount#1}]}
+\def\asleepoption#1{\item[{\asleepfount#1}]}
+
+\newenvironment{ikkystuff}{\begin{quotation}\small}{\end{quotation}}
+
+\newcommand*{\keypress}[1]{{\ttfamily #1}}
+\newcommand*{\filename}[1]{{\ttfamily #1}}
+\newcommand*{\packname}[1]{{\sffamily #1}}
+\DeclareRobustCommand*{\comname}[1]{{\ttfamily\makeatletter\bs #1\makeatother}}
+\newcommand*{\envname}[1]{{\ttfamily #1}}
+\newcommand*{\classname}[1]{{\ttfamily #1}}
+\newcommand*{\optname}[1]{{\ttfamily #1}}
+
+\newcommand*{\rmpage}{\classname{rmpage}\xspace}
+
+\MakeShortVerb{\|}
+
+\author{Rowland McDonnell\\
+\texttt{rebecca@astrid.u-net.com}}
+
+\title{The \packname{rmpage} package\\Alpha documentation---trust
+nothing!}
+
+\date{Some time ago}
+
+\edef\RMsaveparskip{\the\parskip}
+\edef\RMsaveparindent{\the\parindent}
+
+\newcommand{\shorty}{\setlength\parskip{\RMsaveparskip}%
+\setlength\parindent{\RMsaveparindent}}
+
+\newcommand{\squish}{\setlength\itemsep{0pt}}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+
+The \rmpage package lets you change page layout parameters in small
+steps over a range of values using options. It can set |\textwidth|
+appropriately for the main fount, and ensure that the text fits inside
+the printable area of a printer.
+
+An \rmpage-formatted document can be typeset identically without
+\rmpage after a single cut and paste operation. Local configuration
+can set defaults: for all documents; or by class, by printer, and by
+paper size.
+
+The geometry package is better if you want to set layout parameters to
+particular measurements.
+
+\end{abstract}
+
+
+\tableofcontents
+
+\chapter{Introduction}
+
+This documentation needs re-writing and tidying up, and \rmpage needs
+finishing, but the package is 99\% finished even if the
+documentation's a mess -- I'm not happy with it but it's probably
+usable, so here it is.
+
+The \packname{rmpage} package has five files:
+\filename{rmpage.tex} (documentation), \filename{rmpage.sty} (the
+package file itself), \filename{rmplocal.gfc} (a configuration file),
+and \filename{rmpgen.cfg} (another configuration file), and
+\filename{readme}.
+
+Only \filename{rmpage.sty} and \filename{rmpgen.cfg} \emph{need} to be
+on your \TeX\ search path -- read on to find out more about
+configuring \packname{rmpage}.
+
+I seem to have ground to a halt on this package -- it's worked fairly
+well for some time and I don't seem to have been able to get things
+together to sort out the documentation and stuff. I've come across
+one bug only in the last year, so I thought the best idea would be to
+upload the package to CTAN so someone else could use it, and perhaps
+any feedback I get might persuade me to pull my finger out and tidy it
+all up.
+
+The \filename{dtx} files aren't ready to be typeset yet---this is the
+only \LaTeX able documentation.
+
+What I do with \rmpage in the future depends mainly on what you tell
+me: if you've used \rmpage (or decided not to), I would consider it a
+great kindness if you told me why. I'm also interested in what you
+like and dislike, any suggestions you have, and anything else about
+this package and its documentation---an email message just saying
+`\rmpage is rubbish, \packname{geometry}'s much better for\ldots'
+would be useful if that's what you think.
+
+The chapters on how things work and all the options still need a lot
+of work, and the chapter on configuration isn't how I'd like it to be.
+This document will eventually be finished and included in a proper
+\filename{.dtx} file. I thought releasing this package now was best,
+because I've suddenly become employed, and this final polishing will
+take quite a long time.
+
+\rmpage sets \LaTeX\ page layout parameters to user-controlled
+values, without the user having to deal with particular measurements,
+check whether the result will fit inside the printing area of the
+selected printer, and so on. This is done with options like:
+\optname{wider}, \optname{noheaders}, \optname{lower}, and
+\optname{morecolsep}; all changable layout parameters can be varied
+in small steps over a range of values.
+
+\rmpage only changes parameters like \comname{textwidth} and
+\comname{columnsep}: those lengths that affect where the text goes on
+the page and how much of the page it occupies. It doesn't change
+layout parameters that affect the internal appear of your text, such
+as paragraph indents, spacing around section headings and the like.
+One of the design aims was to make changing page layout similar to a
+wysiwyg word processor, where you can use the mouse to fiddle with the
+page layout, making things a bit bigger and smaller until it's just
+right.
+
+There's a configuration file for you to play with and hooks galore:
+\rmpage is meant to be configured the way you want it---if you
+normally use A4 paper and produce most documents without headers, you
+can configure \rmpage to give you that by default, over-ridable by
+passing options from your document. If you follow the instructions,
+local configuration won't stop you producing documents with a modified
+layout that typeset identically on different systems---you can even
+copy the modified layout data into your document, and it'll typeset
+identically on a \LaTeX\ installation without \rmpage.
+
+The package is meant to be used directly in \LaTeX\
+documents, and for creating local classes. I have used it, for
+example, to create a class for producing theses according to the
+regulations. I can play about with the layout as much as I like,
+because \rmpage will ensure that the final document is within
+specification---some of the code that does this can be seen in the
+configuration file.
+
+
+Aside: this documentation was hell to write---I hadn't realized what a
+monster this package was until I came to document it. With a bit of
+luck, you'll be able to use \rmpage as your flexible friend like I do.
+I never write a \LaTeX\ document without it. And strangely, even
+though \rmpage has been over a year in the making, and has been used
+constantly in that time, I spotted lots of improvements that needed
+doing and bugs that needed removing while I was writing this
+documentation, which I didn't start seriously until I thought I'd
+finished the first release version of the package. I have a suspicion
+that writing detailed documentation of software is a very, very useful
+part of getting it right, especially when the software's moderately
+complicated. Personally, I'm now suspicious of anything that isn't
+documented thoroughly; I've looked at the various packages I've got
+from CTAN and use myself, and I find that those with thorough, clear
+documentation of what they do \emph{and} how they do it are the ones
+that seem most usesful and flexible. The poorer-documented packages
+appear to be less well thought out and less able to do things my way,
+rather than the author's. By the way, when I refer to an explanation
+of how something works, I'm not talking about the annotated code with
+added jargon that the \LaTeX\ core appears to be turning into. This
+is fairly useful and probably inevitable, but people like me who
+aren't expert hackers can't understand it and can't find out how to
+understand it, which is worse.
+
+
+\section{\LaTeX's standard classes}
+
+\label{gen:standardclassproblems}
+
+\LaTeX's standard classes have all been designed well, and the
+\LaTeXe\ versions have a cunning way of calculating
+\comname{textwidth} and \comname{textheight} that adapts the page
+layout to the size of paper, which is useful for people like me who
+never print on US letter paper.
+
+But the standard \LaTeX\ page layout was intended for paper sizes near
+US letter, and assumes you'll be using headers and footers. If
+you're not, things begin to look a bit off; your printed
+pages have a larger white space at the top than at the bottom, which
+looks `bottom heavy'---standard typographical design has the larger
+gap at the bottom rather than the top, which looks better to the eye,
+even if only because we're used to it. Personally, I rarely use
+headers, which means the standard \LaTeX\ classes produce an
+unpleasant output most of the time. And for some reason, the standard
+classes don't allow enough space in the header box for type sizes
+bigger than 10pt. This is one of life's inexplicable mysteries.
+
+If you have different sized margins, the standard classes always make
+the outside margin the larger one, and the margins are in fixed
+proportions to each other. This is fine for conventional typeography,
+but not so good if you're formatting things to go in a ring-binder,
+for example. Some flexibility in this matter would be good.
+
+And there's the matter of the fixed text height and width of the
+standard classes. Now then, this is a good idea in one respect,
+because the user doesn't get to typeset lines that are too long or too
+short without having to do a bit of work. On the other hand, I for
+one have often \LaTeX ed a letter which has \emph{just} run on to two
+pages; being able to extend the page a small amount would be good
+under these circumstances. Admittedly, \LaTeXe\ introduced the
+\comname{enlargethispage} command which can help out, but if you make
+a page more than one or two lines longer this way, the results look a
+bit iffy---this command only extends \comname{textheight}, which
+reduces the size of the bottom margin, and can make the page look
+bottom-heavy.
+
+A more subtle problem with the standard fixed widths is that one
+factor affecting the ease of reading is the line width in characters,
+not in inches. So if you're using a fount with a different number of
+characters per inch, you can end up with a line that is noticably too
+long (Zapf Chancery), or too short (Lucida Casual).
+
+\section{How does \rmpage help?}
+
+\rmpage has options (the details come later) to format a page for
+typesetting with or without headers or footers, and always leaves
+enough space for a \comname{normalsize} line of text in the header
+box. You can specify which margin you want to be the larger one, and
+adjust the relative proportions of the inside and outside margins.
+And there are options to change: the width and height of the text
+taking into account the size of the main text fount; the position of
+the text on the page (up and down, and left and right); space between
+columns, above footers, below headers; size and position of marginal
+paragraphs; and lots, lots, more, so hurry! Buy now while the sale's
+still on!
+
+\rmpage isn't like the \packname{geometry} package: you rarely work
+with measurements\@. \rmpage's options are of the form:
+\optname{wider}/\optname{narrower} or
+\optname{moreheadsep}/\optname{lessheadsep}, and they scale sizes up
+and down over a large range in fairly small steps if you want. And
+unlike the \packname{Koma-Script} bundle of packages, you're not
+limited to a fixed aspect ratio printing area. Not that there's
+anything wrong with \packname{Koma-Script} or \packname{geometry}:
+they do a different job.
+
+\rmpage can take into account different founts, number of columns, and
+all sorts of things, including the physical printing area of your
+printer.
+
+Options exist to change all (I think I got them all) of \LaTeX's basic
+page layout parameters, and some new parameters that I created for:
+setting the size of marginal paragraphs, and changing the position of
+the text area in relation to the paper area. There are some \LaTeX\
+page layout parameters that you don't get to affect
+directly; this is because of the way I looked at page layout when I
+wrote \rmpage. These include \comname{evesidemargin},
+\comname{topmargin}, and some others, which are fine for a computer
+assembling a page, but not so good for me, trying to describe a
+layout I want in terms I like.
+
+I have paramaterized everything that didn't run away, so you can, for
+example, write a thesis class that limits the text area as
+specified in the regulations, but still allows the user some
+flexibility if it's needed.
+
+And \rmpage knows about a lot more paper sizes, including envelopes
+and ISO long sizes, which it attempts to handle in an intelligent
+fashion (it knows one's likely to want to print out 1/3 A3 on A4
+paper, for example).
+
+\section{Installing \rmpage}
+
+You can install \rmpage by running \LaTeX\ on the file
+\filename{rmpage.ins}. The \filename{dtx} files might be useful if
+you want to dig around inside \rmpage, otherwise throw them away with
+the \filename{ins} files. Put the \filename{sty}, \filename{pko},
+\filename{cfg}, and \filename{gfc} files somewhere in your \TeX\
+search path.
+
+The file \filename{rmpage.sty} is the package you call from your
+\LaTeX\ document, and the \filename{cfg} files contains most of the
+options and locally-configurable things. Please don't change any of
+these files---make a copy called \filename{rmplocal.cfg} of either:
+\filename{rmpgen.cfg} or \filename{rmplocal.gfc}, and change that
+instead. The file \filename{rmplocal.gfc} is the same as
+\filename{rmpgen.cfg} with some options commented out to make it
+faster.
+
+\rmpage is meant to be configured to suit you; I suggest that everyone
+changes the default options in \filename{rmplocal.cfg}. Don't do this
+just yet unless you really want to---have a read of
+chapter~\ref{chap:use} and section~\ref{optcfg:settingup} first.
+
+
+\section{Compatibility}
+\label{intro:compatibility}
+
+\rmpage has been tested with the June 1996 release of \LaTeX. It
+appears to work well with the \classname{article}, \classname{report},
+\classname{letter}, \classname{book}, and \classname{slides} classes,
+and a number of local classes based on these. \rmpage doesn't work
+well with the \classname{ltxdoc} class, because of what
+\classname{ltxdoc} does with marginal paragraphs. Mind you,
+\classname{ltxdoc} doesn't seem to have much success with marginal
+paragraphs anyway. \rmpage seems happy with the \classname{ltxguide}
+class, but I've not tested it thoroughly.
+
+Because \rmpage only changes \LaTeX\ parameters at the beginning of a
+\LaTeX\ run, it doesn't in general have trouble working with other
+packages and classes as long as \rmpage is loaded last. \rmpage
+includes code to help it work with the \packname{PSNFSS} packages, the
+\packname{beton} package, and the \packname{foils} class. The
+\packname{beton} package needed a little extra work because it changes
+\comname{baselineskip} after all packages have been loaded;
+\packname{foils} uses four (rather than three) extra-large base point
+sizes, which again took a little extra code. The \packname{PSNFSS}
+package support is just for convenience, so you can load a fount with
+one option rather than a \comname{usepackage} command and an option
+to \rmpage.
+
+In general, if \rmpage is loaded after the document's normal size
+fount has been selected, and after the document class has finished
+setting the various text layout parameters, there should be no
+problems---. If you are combining \rmpage with a package that also
+changes page layout parameters, you will have to find out how both
+packages work to ensure you get what you want. Loading \rmpage last
+is usually enough to ensure everything works right. For example,
+\rmpage must be loaded after \packname{setspace} has been used to set
+the line spacing for a document, so that \rmpage can set
+\comname{textheight} to a valid value.
+
+\begin{ikkystuff}
+Two things to watch for are changes to the main document
+fount, and changes to \comname{baselineskip}. \rmpage calculates
+\comname{textheight} as an integer multiple of \comname{baselineskip}
+plus \comname{topskip}. If these are changed after \rmpage has been
+called, you'll probably have lots of bad page breaks.
+\comname{textwidth} is normally taken to be a certain number of
+average-sized characters; if \rmpage has a false idea about the
+typeface and size you are using, \comname{textwidth} will probably
+not be set appropriately.
+
+If you ensure that normal size in the normal body fount with the
+normal \comname{baselineskip} has been selected before loading
+\rmpage, everything should always be fine. The \packname{beton}
+package sets \comname{baselineskip} \comname{AtBeginDocument}; other
+packages and classes which do this kind of thing will almost certainly
+need attention to get \rmpage to work right.
+\end{ikkystuff}
+
+\section{What made me write \rmpage}
+
+I started using \LaTeX~2.09 about eight or nine years ago when I was
+an undergraduate ('ere, Colin, 'ave you got a word processor on that
+bloody great workstation of yours? No, but I've got something
+better\ldots) and quickly realised that the standard formats looked
+daft on A4 paper. No worries, there was this \packname{a4l} style
+file that sort of sorted things out. After a bit, I wanted slightly
+wider columns, sometimes centred on the page and sometimes not. I
+found out how to write style files and eventually I ended up with a
+suite of simple style files that let you fiddle with the printing area
+by selecting one file for the kind of text area you wanted: centred,
+not centred, wide, very wide, long, standard \LaTeX\ length, my
+standard length, all hard-coded to A4 paper with no headers.
+
+I was chewing over the idea of introducing the idea of paper sizes
+myself, so I could write style files that weren't hard-coded to any
+particular paper size, when \LaTeXe\ came out with the job already
+done, and packages you could pass options to and all that good stuff.
+
+So what I did was use my original \LaTeX\ 2.09 packages to form the
+basis of the original \rmpage, which let you do everything the
+original styles did, but all in one file instead of over a dozen, and
+let you format your text on any size paper with or without headers or
+footers. I decided what I really wanted was a package that gave me
+wysiwyg-style flexibility (you know, the way you can extend line
+length just a bit with the mouse, without worrying about the actual
+numbers) without producing poor layouts, and taking advantage of
+\LaTeX's `extensive macro capability'\footnote{Whoever first used this
+phrase should be shot, after the politicians but before the lawyers}
+to build in a bit of intelligence.
+
+I looked at the \LaTeXe\ way of calculating the text region, and used
+those ideas in my package, and started adding options to change more
+aspects of the printing area. And more, and more, and more. The
+result was a mess that could change almost anything, and supported any
+size paper, different printers, and so.
+
+The transmogrification from the original large mess to the current
+large mess was in two main steps: I started out by tidying up bits of
+code piecemeal, rationalized command names and the like, and tried to
+work out how everything worked together. I'd done as much of this as
+I could, then started to document \rmpage systematically for myself,
+making notes on what I intended to change when I'd finished
+documenting the package.
+
+Eventually I got fed up, and decided that a good spring cleaning was
+in order. I read some typeography books, some British Standards
+(which are mainly ISO standards too, so I'm not being parochial)
+looked at the \packname{koma-script}, \packname{vmargin}, and
+\packname{geometry} packages, and cleaned up the code good and proper,
+none of this pussy-footing around with careful plans. I parameterized
+some things which had escaped the first time round, changed the
+numbers to give a rational, \ae sthetically pleasing, and functional
+spread of values for everything\footnote{That's my story, and I'm
+sticking to it.}, and got the whole thing more-or-less sorted, with a
+few extra bits thrown in where they were missing. The result seems
+much more useful that my original careful plan would have produced, so
+I'm happy. Writing the documentation has smoothed out several things
+I wasn't very happy with to begin with, improved some features, added
+some others, and unearthed more bugs than was reasonable given that
+I'd tested the bloody thing, honest.
+
+\section{Future plans}
+
+What I do with \rmpage depends mainly on what you tell me; if you've
+used \rmpage (or decided not to), I would consider it a great kindness
+if you let me know what you think about it---two words or two pages:
+whatever you might tell me would be useful and appreciated. I'm
+interested in what you like and dislike, any suggestions you have, and
+anything else about this package and its documentation, gonzo
+ontology, the books of Harlan Ellison and Robert Anton Wilson, good
+beer, fast bikes, and prawn crackers, but don't worry about most of
+that.
+
+I intend to make the \rmpage code more elegant, and make \rmpage more
+\emph{useful}---if you think of any useful changes or additions,
+please let me know. Of course I'll try to fix any bugs and
+misfeatures that you report.
+
+I'm working on reducing the restrictions on the use of options---I
+hope to arrange things so that more options can be used in an
+\comname{ExecuteOptions} statement, and things like that.
+
+A project that I'll finish eventually is a version of \rmpage that can
+be processed with \packname{doc} and \packname{docstrip} in the
+conventional way, but don't hold your breath---it's taken me perhaps
+two years to get this far. But I will fix bugs quicker than that.
+
+\chapter{Using \rmpage}
+\label{chap:use}
+
+Section~\ref{use:changingpagelayout} on
+page~\pageref{use:changingpagelayout} of this chapter describes how to
+use \rmpage to change the page layout. The sections before that are
+background information intended to explain the jargon and conventions
+I use in this document, and a little about the philosophy behind
+\rmpage---all of which should make the rest of this an easier read.
+
+\rmpage is a \LaTeX{} package written to change the page layout. You
+can control it with options, and by editing a configuration file.
+You don't need to edit the configuration file for \rmpage to be
+useful, but doing so can save you time and effort. I suggest you read
+this chapter and play with \rmpage a little, then read
+chapter~\ref{chap:config} on page~\pageref{chap:config} to find out
+about local configuration.
+
+\rmpage is a normal \LaTeX\ package, so put:
+\begin{verbatim}
+\usepackage{rmpage}
+\end{verbatim}
+in the preamble of your document.
+
+You can pass options directly to \rmpage in the optional argument of
+the \comname{usepackage} command, but I almost always put all my
+options in the optional argument of the \comname{documentclass}
+command. This is because \rmpage uses several standard options; if I
+made a habit of passing options to \rmpage directly, I might forget
+that the document class needs to know about (for example) the
+\optname{twocolumn} option.
+
+\rmpage was designed to change \LaTeX's page layout parameters, but it
+doesn't change all of them in a direct way---read on to see what I
+mean. If you aren't familiar with \LaTeX's basic page layout
+parameters, have a look at a copy of the \LaTeX\ manual, ask a
+convenient guru, or use the \packname{layout} package to show you what
+they are---I think that what they are is obvious from their names, but
+I'm not a Finnish \LaTeX\ novice, so my opinion is clearly suspect.
+
+Figure~\ref{fig:layout} on page~\pageref{fig:layout} shows the output
+from the \packname{layout} package's \comname{layout} command. I've
+fooled the \comname{layout} command into thinking this is a one-sided
+document, and this document is formatted without headers, so you can't
+see clearly that there is a box of height \comname{headheight} a
+distance \comname{headsep} above the main text body. This box
+contains the header, if one exists.
+
+\section{\rmpage's view of a page}
+
+The user interface to \rmpage takes the view that a page consists of
+a physical paper size, with a non-printable border around its inside
+edge. \rmpage will not produce a layout that attempts to put ink
+beyond the printable region thus defined.
+
+\rmpage considers the \emph{main text block} to consist of the header,
+body text, and footer. This is the region that \rmpage moves up and
+down with \optname{altitude} options, and left to right with
+\optname{offset} options. The body text is part of the main text
+block, and is the matter that fits inside the area defined by
+\comname{textwidth} and \comname{textheight}.
+
+Marginal paragraphs stick on the side of the main text block. They
+begin a certain distance from the side of the body text, and extend to
+within a certain distance of the edge of the page, or to a certain
+maximum width.
+
+The space between the main text block and the edge of the paper: top,
+bottom, left, and right; is considered as four different margins,
+measured from the edges of the paper. \LaTeX's
+\comname{evensidemargin}, \comname{oddsidemargin}, and
+\comname{topmargin} parameters measure margins differently, from a
+point one inch in from the top left hand corner of the paper.
+
+Asking for \optname{noheaders} or \optname{nofooters} reduces the size
+of the space left for the approriate element to
+0\units{pt}---respectively \comname{headheight} \emph{and}
+\comname{headsep}, or \comname{footskip}, so the main text block might
+consist of body text only.
+
+\section{Parameter naming conventions}
+
+I refer to various parameters in this document, so you might find it
+useful to know what the names are supposed to mean.
+
+In general, parameter names ending in |clearance|, |clear|, or
+|margin| refer to a distance from the edge of the paper. Parameter
+names containing |sep| refer to a distance between text elements on
+the page. |mpar| means marginal paragraph; |width| refers to
+horizontal dimensions; |height| or |length| refer to vertical
+dimensions.
+
+Parameter names ending in |option| contain numbers that control what
+value the parameter referred to is set to. Parameter names containing
+|min| or |max| are minimum or maximum limits for the parameter
+referred to.
+
+All \rmpage's parameters and commands begin with \comname{RM}; those
+beginning with \comname{RM@} are not meant to be set outside a class,
+package, or configuration file. The one exception to this is the
+\comname{sloppiness} command.
+
+
+\section{Don't read me}
+
+Without any options specified by your document or the configuration
+file, on paper about A4 or US letter size, \rmpage will produce a
+slightly different format to the standard classes: \comname{textwidth}
+and the position of the text body on the page will be a fraction of a
+point different; everything else should be the same (if not, you've
+found a fault---please let me know). Smaller paper sizes, around A5
+or half US letter, will have a noticeable wider \comname{textwidth}.
+You can force \rmpage to make \comname{textwidth} and
+\comname{textheight} identical to the standard values (so line and
+page breaks are not changed) with the \optname{stdwidth} and
+\optname{stdlength} options; main text block positioning is never
+identical to standard.
+
+\rmpage with the standard configuration file follows \LaTeX's defaults
+and produces layouts very close to standard \LaTeX. You can change
+this by editing the configuration file---see chapter~\ref{chap:config}
+for the details. I wrote \rmpage expecting that everyone would edit
+the configuration file to match their preferences; for example, if you
+usually don't use headers, or if you usually don't print on US letter
+paper.
+
+If you are using typefaces other than the standard Computer Modern
+Roman, or a package that changes \comname{baselineskip}, have a look
+at section~\ref{intro:compatibility} on
+page~\pageref{intro:compatibility} and
+section~\ref{use:changingpagelayout} on
+page~\pageref{use:changingpagelayout}---there are things that need
+doing to avoid a poor layout.
+
+The observant will notice that I prefer spelling things according to
+the Oxford English Dictionary, rather than Webster's. Fear not: I
+realize that \LaTeX\ follows US English convention, so \rmpage
+includes options spelt both ways where there's a difference.
+
+\section{Option naming conventions}
+
+\rmpage's options are largely of the form: \optname{narrowest},
+\optname{narrower}, \optname{narrowish}, \optname{normalwidth}; or
+\optname{mostheadsep}, \optname{moreheadsep},
+\optname{moreishheadsep}, \optname{normalheadsep}. These two examples
+are each part of an option set (they continue with \optname{widish}
+and \optname{lessishheadsep}). Any option without \optname{touch} or
+\optname{t@uch} in its name is considered a main option.
+
+You should use only one main option from each set at a time---if you
+do use more than one, \rmpage will apply the settings of the option
+that is declared last in the package file.
+
+The \optname{touch} options all step up or down one third of the way
+(usually in a geometrical sequence) to the next main option. The
+\optname{t@uch} options are identical, but can only be used in class
+and package files. The following two examples produce an identical
+\comname{textwidth}:
+\begin{verbatim}
+\usepackage[wider,t@uchwider,touchwider]{rmpage}
+\usepackage[widest,touchnarrower]{rmpage}
+\end{verbatim}
+
+The following three examples produce a smoothly increasing
+\comname{textwidth}:
+\begin{verbatim}
+\usepackage[touchwider]{rmpage}
+\usepackage[widish,touchnarrower]{rmpage}
+\usepackage[widish]{rmpage}
+\end{verbatim}
+
+It's complete okay, but slightly silly because it has no effect, to
+combine, say, \optname{touchwider} and \optname{touchnarrower}.
+
+\section{Changing the page layout}
+\label{use:changingpagelayout}
+
+\rmpage is controlled by options passed to it in the conventional way,
+and by various things you can do to the configuration file. This
+section explains the basic use of most of the options.
+Chapter~\ref{chap:alltheoptions} on page~\pageref{chap:alltheoptions}
+lists all the options and what they do. Chapter~\ref{chap:config} on
+page~\pageref{chap:config} deals with the configuration file.
+
+
+\subsection{Width of the main text block}
+
+\label{use:width}
+
+According to the text books, the optimum width of a block of text is
+about 1.5--2.5 alphabets in the main fount. This is about 45--75
+characters (including spaces and punctuation) or ordinary English
+prose. When you set the width of the main text block, \rmpage
+measures the width of one column, and warns you if it exceeds these
+limits. Note that the standard width is at the upper limit for
+optimum readability; any increase will produce a warning. I very
+strongly suggest you use multiple columns if you find yourself using a
+width wider than \optname{widish}.
+
+\rmpage has options for producing multiple column layouts: see
+section~\ref{use:multiplecolumns} on
+page~\pageref{use:multiplecolumns} for more details. If you are
+producing displayed material (a single large table on a page, for
+example), read the section below, called `On other width setting
+controls'.
+
+\rmpage sets the width of the main text block (the header, body text,
+and footer) with these options, which are referred to as the width
+option set:
+\begin{tabbing}
+\optname{narrowest}, \= \optname{narrower}, \= \optname{narrow}, \=
+\optname{narrowish}.\kill
+\optname{widest}, \> \optname{wider}, \> \optname{wide}, \>
+\optname{widish}, \\
+\optname{normalwidth},\\
+\optname{narrowest}, \> \optname{narrower}, \> \optname{narrow}, \>
+\optname{narrowish}.
+\end{tabbing}
+
+Make sure you only use one of the above options at a time. The
+\optname{touch} options can be used with any of the main options; they
+are often exactly what's needed what used alone: \optname{touchwider}
+and \optname{touchlonger} have often reduced my document's
+page count to what I wanted.
+
+The options:
+\begin{tabbing}
+\optname{touchwider} \= \optname{touchnarrower} \\
+\optname{t@uchwider} \> \optname{t@uchnarrower}
+\end{tabbing}
+give a width one third of the way towards the next main option. The
+\optname{t@uch} options can only be used in a class or package file.
+
+There are four main width options that pay no attention to the
+\optname{touch} options. They are:
+\begin{tabbing}
+\optname{halfinchmargins} \= \kill
+\optname{stdwidth} \> Exactly the width calculated by the standard classes\\
+\optname{fullwidth} \> The full width of the printable region\\
+\optname{oneinchmargins} \>
+The left and right margins sum to 2\units{in}---average 1\units{in}\\
+\optname{halfinchmargins} \>
+The left and right margins sum to 1\units{in}---average 0.5\units{in}
+\end{tabbing}
+The \optname{fullwidth} option fills the width of the printable region
+as well as it can, ensuring the specified relationship between the
+inside and outside margins. You will usually get a larger
+\optname{textwidth} if you also ask for \optname{centre} or
+\optname{center}; see section~\ref{use:horizontalpos} on
+page~\pageref{use:horizontalpos}.
+
+The \optname{one-} and \optname{halfinchmargins} options give inside
+and outside margins of that measurement only if you are printing
+centred; otherwise, the average margin size is as specified (e.g.,
+inside 1.2\units{in}, outside 0.8\units{in}; $(1.2 + 0.8) / 2 = 1$)
+
+\subsubsection{Other width setting controls}
+
+The initial \comname{textwidth} is normally calculated as the smaller
+of two different widths: one, a certain number of characters; the
+other, a certain fraction of the \comname{paperwidth}. The precise
+figures depend on the width options you've used.
+
+This is not always appropriate---for example, if you are producing
+a weekly timetable on A4 landscape paper, I can't see why
+\rmpage should pay attention to the character-based width. So I
+created these options:
+\begin{tabbing}
+\optname{characterwidthset} \= Choose the character-based width
+regardless \\
+\optname{paperwidthset} \> Choose the paper-based width regardless \\
+\optname{bothwidthset} \> Default: choose the smaller of the two
+widths\\
+\end{tabbing}
+
+Note that \rmpage never ignores its paper-based limits: saying
+\optname{characterwidthset} will produce a printable layout that takes
+notice of all the restrictions documented elsewhere.
+
+I've provided a \optname{ringbinding} option which sets the minimum
+allowed inside margin to at least 15\units{mm} if you are printing in
+portrait orientation, and does nothing but warn you if you are using
+landscape orientation. It's probably not a good idea to use this with
+long paper sizes, but no check is made.
+
+\subsection{Length of the main text block}
+\label{use:length}
+
+\rmpage sets the height of the main text block (the header, body text,
+and footer) with these options, which are referred to as the length
+option set:
+\begin{tabbing}
+\optname{shortest}, \= \optname{shorter}, \= \optname{short}, \=
+\optname{shortish}.\kill
+\optname{longest}, \> \optname{longer}, \> \optname{long}, \>
+\optname{longish}, \\
+\optname{normallength},\\
+\optname{shortest}, \> \optname{shorter}, \> \optname{short}, \>
+\optname{shortish}.
+\end{tabbing}
+Make sure you only use one of the above options at a time. The
+\optname{touch} options can be used with any of the main options; they
+are often exactly what's needed what used alone: \optname{touchwider}
+and \optname{touchlonger} have often reduced my document's
+page count to what I wanted.
+
+The options:
+\begin{tabbing}
+\optname{touchlonger} \= \optname{touchshorter} \\
+\optname{t@uchlonger} \> \optname{t@uchshorter}
+\end{tabbing}
+give a width one third of the way towards the next main option. The
+\optname{t@uch} options can only be used in a class or package file.
+
+
+The height you get is (where $Z$ is an integer; the body text is $Z+1$
+lines long):
+\begin{displaymath}
+Z \times \mbox{\comname{baselineskip}} + \mbox{\comname{topskip}} +
+\mbox{\comname{headheight}} + \mbox{\comname{headsep}} +
+\mbox{\comname{footskip}}
+\end{displaymath}
+
+The length of the main text block is set to be a certain fraction of
+\comname{paperheight}, so \comname{textheight} will increase if you
+turn headers or footers off.
+
+\subsection{Headers and footers}
+\label{use:headfoot}
+
+\rmpage doesn't select a page style to use or not use headers or
+footers---you've got to arrange for that to be done separately with a
+\comname{pagestyle} command. It does calculate a page layout that does
+or does not allow space for a header or a footer. If you turn
+footers off and forget to choose a footer-free page style, the result
+is mildly comical.
+
+You can allow space (or not) for headers and footers using these
+options:
+\begin{tabbing}
+\optname{headers} \= \optname{noheaders} \\
+\optname{footers} \> \optname{nofooters}
+\end{tabbing}
+Telling \rmpage not to allow space for either headers or footers will increase
+\comname{textheight}, and vice-versa. See section~\ref{use:length}
+for more about this.
+
+\LaTeX's standard classes allow a box 12\units{pt} high for headers.
+This is too small for point sizes greater than 12\units{pt}, so
+\rmpage changes the size of the box containing the header to be
+\comname{baselineskip}. If you want to use a header which is a
+different height to that, define the command \comname{RMheadheight} to
+be whatever the height is before calling \rmpage. For example, if
+your header is to be 32\units{pt} high, do this:
+\begin{verbatim}
+\providecommand{\RMheadheight}{32pt}
+\usepackage{rmpage}
+\end{verbatim}
+
+If you don't usually use headers, I suggest that you edit the
+configuration file so, by default, \rmpage calculates a page layout
+that doesn't allow space for them. See chapter~\ref{chap:config} on
+page~\pageref{chap:config} for how to do this.
+
+These options let you change the space between the header and the body
+text---use only one of these at a time:
+\begin{tabbing}
+\optname{lessishheadsep} \= \optname{moreheadsep} \=
+\optname{moreishheadsep} \kill
+\optname{mostheadsep} \> \optname{moreheadsep} \>
+\optname{moreishheadsep} \\
+\optname{normalheadsep} \\
+\optname{lessishheadsep} \> \optname{lessheadsep} \> \optname{leastheadsep}
+\end{tabbing}
+
+These options let you change the space between the footer and the body
+text---use only one of these at a time:
+\begin{tabbing}
+\optname{lessishfootskip} \= \optname{morefootskip} \=
+\optname{moreishfootskip} \kill
+\optname{mostfootskip} \> \optname{morefootskip} \>
+\optname{moreishfootskip} \\
+\optname{normalfootskip} \\
+\optname{lessishfootskip} \> \optname{lessfootskip} \> \optname{leastfootskip}
+\end{tabbing}
+The \optname{footskip} options scale the gap between the \emph{top} of the
+footer and the bottom of the body text---the calculation assumes that
+the footer is one line high. The standard \LaTeX\ parameter
+\comname{footskip} is the distance from the bottom of the body text
+to the bottom of the footer.
+
+Both the option sets above have corresponding \optname{touch}
+options---these can be used with any of the main options above:
+\begin{tabbing}
+\optname{touchmorefootskip} \= \optname{touchlessfootskip} \\
+\optname{t@uchmorefootskip} \> \optname{t@uchlessfootskip}\\
+\optname{touchmoreheadsep} \> \optname{touchlessheadsep}\\
+\optname{t@uchmoreheadsep} \> \optname{t@uchlessheadsep}
+\end{tabbing}
+These options increase or decrease the corresponding parameter one
+third of the way towards the value given by the next main option.
+
+
+\subsection{Position of the main text block}
+
+\subsubsection{Vertical position}
+\label{use:verticalpos}
+
+You can raise and lower the position of the main text block on the page
+using the altitude set of options:
+\begin{tabbing}
+\optname{highest} \= \optname{higher} \= \optname{lower} \= \optname{highish} \kill
+\optname{highest} \> \optname{higher} \> \optname{high} \> \optname{highish}\\
+\optname{normalaltitude}\\
+\optname{lowish} \> \optname{low} \> \optname{lower} \> \optname{lowest}
+\end{tabbing}
+Be sure you only use one of the main options above at a time. The
+\optname{touch} options below can be used with any of the main options.
+
+The options:
+\begin{tabbing}
+\optname{touchhigher} \= \optname{touchlower} \\
+\optname{t@uchhigher} \> \optname{t@uchlower}
+\end{tabbing}
+give a width one third of the way towards the next main option. The
+\optname{t@uch} options can only be used in a class or package file.
+
+The text books say that the white space at the bottom of a page should
+be larger than the white space at the top. \LaTeX's and \rmpage's
+standard setting splits the space evenly between top and bottom; this
+results in an apparently larger space at the bottom---the printing
+appears to finish at the bottom of the body text, because the footer
+is usually just a page number.
+
+The altitude options consider the top margin to be the space above the
+top of the header box, and the bottom margin to be the space below the
+footer baseline. They work by changing the ratio between these two
+spaces; the sum of the top and bottom margins is not changed.
+
+But if you ask for a page layout which would result in text exceeding
+the various vertical limits, \rmpage will increase the top or bottom
+margin as appropriate without attempting to retain a fixed ratio
+between them. For example, if the layout would extend 2\units{mm} off
+the top of the printable area, the top margin would be increased by
+2\units{mm} and the bottom margin would remain the same.
+
+This is different to the horizontal position options, which do ensure
+a fixed ratio between the inside and outside margins; if the inside
+margin is reduced, the outside margin is reduced to retain the
+requested proportions.
+
+These two ways of doing things were deliberate design decisions; if
+anyone thinks I've got it wrong, please email me and try to persuade
+me that you're right.
+
+\subsubsection{Horizontal position}
+\label{use:horizontalpos}
+
+The horizontal positioning of the main text block is controlled by
+three types of options which: vary the ratio between the larger and
+smaller margins, switch the larger margin from the inside to the
+outside, and force both margins to be the same size or not.
+
+The options:
+\begin{tabbing}
+\optname{notcentre} or \optname{notcenter} \= \kill
+\optname{centre} or \optname{center} \> Equal inside and outside
+margins \\
+\optname{notcentre} or \optname{notcenter} \> Usually unequal inside
+and outside margins.
+\end{tabbing}
+control whether or not the text will be centred horizontally. Using
+the \optname{centre} option forces the inside and outside margins to be
+the same; the \optname{notcentre} option means they can be different.
+Be sure you only use one of these options at a time.
+
+The options:
+\begin{tabbing}
+\optname{notstdmargins} \= \kill
+\optname{stdmargins} \> Outside margin larger \\
+\optname{notstdmargins} \> Inside margin larger
+\end{tabbing}
+control which of the two margins on a page will be the larger when you
+have requested a \optname{notcentre}d layout. \LaTeX's convention,
+and standard typographical convention, has the larger of the two
+margins on the outside. This is given by \optname{stdmargins} (an
+abbreviation for standard margins). The \optname{notstdmargins}
+option gives the opposite effect---it is not standard practice to have
+the inside margin larger than the outside margin, although it is
+useful when you're producing material for a ring binder.
+Be sure you only use one of these options at a time.
+
+
+
+You can shift the main text block from right to left using the
+\optname{offset} set of options:
+\begin{tabbing}
+\optname{lessishoffset} \= \optname{moreoffset} \= \optname{moreishoffset} \kill
+\optname{mostoffset} \> \optname{moreoffset} \> \optname{moreishoffset}\\
+\optname{normaloffset}\\
+\optname{lessishoffset} \> \optname{lessoffset} \> \optname{leastoffset}\\
+\end{tabbing}
+These options change the difference between the inside and outside
+margin: \optname{leastoffset} gives you centred printing, with equal
+inside and outside margins. \optname{mostoffset} produces inside and
+outside margins in the proportions $87\% : 13\%$.
+
+These options produce a particular ratio between the inside and
+outside margins. If you have asked for a very wide
+\comname{textwidth} which is limited by the non-printing margin of
+your printer, \comname{textwidth} might be reduced to produce margins
+in the requested proportions. If you have symmetrical left and right
+non-printing margins on your printer, you can only completely fill the
+available width if you request centred printing with the
+\optname{centre} or \optname{leastoffset} options.
+
+Be sure you only use one of the main options above at a time. The
+\optname{touch} options below can be used with any of the main options.
+
+The options:
+\begin{tabbing}
+\optname{touchmoreoffset} \= \optname{touchlessoffset} \\
+\optname{t@uchmoreoffset} \> \optname{t@uchlessoffset}
+\end{tabbing}
+give an offset one third of the way towards the next main option. The
+\optname{t@uch} options can only be used in a class or package file.
+
+An oddity to watch out for is this: \optname{leastoffset} produces the
+least offset between the left and right margins, namely none. If you
+use the \optname{leastoffset} and the \optname{touchlessoffset}
+options together, you get what I call a negative offset. That is, if
+you've asked for \optname{stdmargins}, you'll end up with a larger
+inside margin than outside, and if you've asked for
+\optname{notstdmargins}, you get a larger outside margin than inside.
+\rmpage will draw your attention to this is it happens.
+
+\subsection{Marginal paragraphs}
+\label{use:marginalparapgraphs}
+
+Marginal paragraphs begin a distance \comname{marginparsep} away from
+the side of the main text block, and extend to a distance
+\comname{RM@mparclearance} from the edge of the paper. The maximum
+width of a marginal paragraph is given by \comname{RM@maxmparwidth}.
+
+With a conventional layout on paper similar to A4, marginal paragraphs
+usually fill the space from \comname{marginparsep} (about 4\units{mm})
+away from the main text block, to \comname{RM@mparclearance} (about
+10\units{mm}) in from the edge of the paper.
+\comname{RM@maxmparwidth} (about 50\units{mm}) is not usually a limit.
+
+All of these parameters can be controlled by options.
+\comname{marginparsep} is a standard \LaTeX\ length which is initially
+set by the class file; the other two are \rmpage commands, and are
+initially set to a fraction of \comname{paperwidth}.
+
+The options:
+\begin{tabbing}
+\optname{leastmparsep} \= \optname{moremparsep} \=
+\optname{moreishmparsep} \kill
+\optname{mostmparsep} \> \optname{moremparsep} \>
+\optname{moreishmparsep} \\
+\optname{normalmparsep} \\
+\optname{leastmparsep} \> \optname{lessmparsep} \>
+\optname{lessishmparsep}
+\end{tabbing}
+control the size of the gap between the marginal paragraph and the
+main text block.
+
+Be sure you only use one of the main options above at a time. The
+\optname{touch} options below can be used with any of the main options.
+
+The options:
+\begin{tabbing}
+\optname{touchmoremparsep} \= \optname{touchlessmparsep} \\
+\optname{t@uchmoremparsep} \> \optname{t@uchlessmparsep}
+\end{tabbing}
+give an offset one third of the way towards the next main option. The
+\optname{t@uch} options can only be used in a class or package file.
+
+The options:
+\begin{tabbing}
+\optname{lessmparclearance} \= \optname{lessishmparclearance} \=
+\optname{moreishmparclearance}\kill
+\optname{mostmparclearance} \> \optname{moremparclearance} \>
+\optname{moreishmparclearance}\\
+\optname{normalmparclearance} \\
+\optname{lessmparclearance} \> \optname{lessishmparclearance} \>
+\optname{leastmparclearance}
+\end{tabbing}
+control the size of the gap between the marginal paragraph and the
+edge of the paper.
+
+Be sure you only use one of the main options above at a time. The
+\optname{touch} options below can be used with any of the main options.
+
+The options:
+\begin{tabbing}
+\optname{touchmoremparclearance} \= \optname{touchlessmparclearance} \\
+\optname{t@uchmoremparclearance} \> \optname{t@uchlessmparclearance}
+\end{tabbing}
+give an offset one third of the way towards the next main option. The
+\optname{t@uch} options can only be used in a class or package file.
+
+The options:
+\begin{tabbing}
+\optname{lessmaxmparwidth} \= \optname{lessishmaxmparwidth} \=
+\optname{moreishmaxmparwidth}\kill
+\optname{mostmaxmparwidth} \> \optname{moremaxmparwidth} \>
+\optname{moreishmaxmparwidth}\\
+\optname{normalmaxmparwidth} \\
+\optname{lessmaxmparwidth} \> \optname{lessishmaxmparwidth} \>
+\optname{leastmaxmparwidth}
+\end{tabbing}
+control the maximum size of marginal paragraphs; marginal paragraphs
+usually stop \comname{RM@mparclearance} away from the edge of the
+paper, but there is the additional limit that marginal paragraphs
+cannot be larger than {RM@maxmparwidth}.
+
+Be sure you only use one of the main options above at a time. The
+\optname{touch} options below can be used with any of the main options.
+
+The options:
+\begin{tabbing}
+\optname{touchmoremaxmparwidth} \= \optname{touchlessmaxmparwidth} \\
+\optname{t@uchmoremaxmparwidth} \> \optname{t@uchlessmaxmparwidth}
+\end{tabbing}
+give an offset one third of the way towards the next main option. The
+\optname{t@uch} options can only be used in a class or package file.
+
+If you want an unusual layout with a very much larger than usual
+maximum marginal paragraph width, or a very much larger than usual gap
+between the marginal paragraph and the edge of the paper, the
+\optname{largebase} options will double the initial size of these
+parameters. This means that all the sizes produced by the
+corresponding options above are doubled. The \optname{normalbase}
+options give the default size.
+
+The additional options:
+
+\noindent\begin{tabularx}{\textwidth}{lX}
+&\\
+\optname{normalbasemaxmparwidth} & Normal maximum size marginal
+paragraphs \\
+\optname{largebasemaxmparwidth} & Double sized maximum size marginal
+paragraphs \\
+\optname{normalbasemparclear} & Normal gap between the edge of the paper
+and the end of marginal paragraphs. \\
+\optname{largebasemparclear}& Double sized gap between the edge of the paper
+and the end of marginal paragraphs. \\
+&\\
+\end{tabularx}
+are intended to be used only when the range of sizes
+given by the conventional options aren't enough; \optname{more} and
+\optname{touchmore} combine to double the size of any of the marginal
+paragraph parameters (the precise factor is 2.0394).
+
+\subsection{Multiple columns}
+\label{use:multiplecolumns}
+
+There are two things to consider with a multiple column layout: the
+text columns themselves, and the gap in between.
+
+\subsubsection{The width of text columns}
+
+If you are producing a layout with more than one column, \rmpage
+usually needs to know how many columns, because it takes into account
+the width of each text column, measured against the width of the
+average character.
+
+If you're using \LaTeX's standard \optname{onecolumn} or
+\optname{twocolumn} options, \rmpage takes note:
+\begin{tabbing}
+\optname{onecolumn} \= Default. Produce a layout assuming one text column \\
+\optname{twocolumn} \> Produce a layout assuming two text columns
+\end{tabbing}
+You must pass these options to the class file by placing them in the
+optional argument to the \comname{documentclass} command, or your text
+will not be set in the number of columns you expect.
+
+You might be producing a multiple column layout using the
+\packname{multicol} package. If so, you should use different options
+passed to \rmpage to tell it how many text columns your document will
+be set in. The following options---\optname{onecolumnwidth} is the
+default---tell \rmpage to calculate a layout
+assuming the text body will be set in the named number of text columns:
+\par
+\vspace{\baselineskip}
+\begin{raggedright}
+\optname{tencolumnwidth}
+\optname{ninecolumnwidth}
+\optname{eightcolumnwidth}
+\optname{sevencolumnwidth}
+\optname{sixcolumnwidth}
+\optname{fivecolumnwidth}
+\optname{fourcolumnwidth}
+\optname{threecolumnwidth}
+\optname{twocolumnwidth}
+\optname{onecolumnwidth}
+\end{raggedright}
+\vspace{\baselineskip}
+
+% \begin{tabbing}
+% \optname{sevencolumnwidth} \= \kill
+% \optname{tencolumnwidth} \> Produce a layout assuming ten text columns\\
+% \optname{ninecolumnwidth} \> Produce a layout assuming nine text
+% columns\\
+% \optname{eightcolumnwidth} \> Produce a layout assuming eight text
+% columns\\
+% \optname{sevencolumnwidth} \> Produce a layout assuming seven text
+% columns\\
+% \optname{sixcolumnwidth} \> Produce a layout assuming six text columns\\
+% \optname{fivecolumnwidth} \> Produce a layout assuming five text columns\\
+% \optname{fourcolumnwidth} \> Produce a layout assuming four text
+% columns\\
+% \optname{threecolumnwidth} \>Produce a layout assuming three text columns \\
+% \optname{twocolumnwidth} \> Produce a layout assuming two text columns\\
+% \optname{onecolumnwidth} \> Default. Produce a layout assuming one text column
+% \end{tabbing}
+Make sure you only use one of the twelve options above at a time.
+
+If you are producing a document with different numbers of columns in
+different places, try starting out by telling \rmpage that you are
+using the smallest number of columns in your document. For example,
+if your document has three columns in some places and four columns in
+others, pass the \optname{threecolumnwidth} option to \rmpage. If the
+width needs changing after that, begin by trying the \optname{width}
+options in section~\ref{use:width} on page~\pageref{use:width}.
+
+\subsubsection{The space between columns}
+
+The main options:
+\begin{tabbing}
+\optname{lessishcolsep} \= \optname{morecolsep} \=
+\optname{moreishcolsep} \kill
+\optname{mostcolsep} \> \optname{morecolsep} \>
+\optname{moreishcolsep} \\
+\optname{normalcolsep} \\
+\optname{lessishcolsep} \> \optname{lesscolsep} \> \optname{leastcolsep}
+\end{tabbing}
+increase or decrease the separation between the columns---they scale
+the standard \LaTeX\ \comname{columnsep} parameter. The default
+\optname{normalcolsep} option does nothing---you get \LaTeX's standard
+column separation. Make sure you only use one of these main options
+above at a time.
+
+The \optname{touch} options below are meant to be used with any of the
+main options, and increase or decrease the gap between the columns one
+third of the way towards the next main option.
+\begin{tabbing}
+\optname{touchmorecolsep} \= \optname{touchlesscolsep} \\
+\optname{t@uchmorecolsep} \> \optname{t@uchlesscolsep}\\
+\end{tabbing}
+
+If you don't like \LaTeX's standard \comname{columnsep}, the options
+below calculate a different default value:
+
+\noindent
+\begin{tabularx}{\textwidth}{lX}
+&\\
+\optname{adaptivecolumnsep} & Calculates a normal \comname{columnsep}
+which is 2.3 times the average character width of the selected
+fount---a 0.1\units{pt} increase for 10\units{pt} Computer Modern
+Roman; quite a bit different for other founts.\\
+\optname{noadaptivecolumnsep} & Default: gives you the standard
+\comname{columnsep}, which can be changed by any of the
+\optname{colsep} options above\\
+&\\
+\end{tabularx}
+
+The \comname{columnsep} produced by the \optname{adaptivecolumnsep}
+option can be scaled by any of the \optname{colsep} options.
+
+
+\subsection{Paper size}
+\label{use:papersize}
+
+\rmpage knows about three types of paper size options: main size, long
+size, and orientation.
+
+\subsubsection{Orientation---landscape or portrait}
+\label{use:orientation}
+
+There are two options to select the paper orientation:
+\begin{tabbing}
+\optname{landscape} \= Ensures that the longest side is horizontal\\
+\optname{portrait} \> Default. Ensures that the shortest side is
+horizontal
+\end{tabbing}
+Make sure you only use one of these at a time.
+
+\subsubsection{Long sizes}
+\label{use:longpapersizes}
+
+A long paper size is based on a larger paper size; it formed by
+cutting off the specified fraction of a parent paper size, divided
+along the longer edge. For example, the common long size 2/3~A4 is
+$210\units{mm} \times 2/3 297\units{mm} = 210\units{mm} \times
+198\units{mm}$.
+
+These sizes are only formally defined for ISO A and B sizes. \rmpage
+will make any main paper size into a long size with one of these
+options:
+\begin{tabbing}
+notlongpaper \= Default. Does nothing.\\
+7/8longpaper \> Multiply the parent paper size length by 7/8 \\
+3/4longpaper \> Multiply the parent paper size length by 3/4 \\
+2/3longpaper \> Multiply the parent paper size length by 2/3 \\
+5/8longpaper \> Multiply the parent paper size length by 5/8 \\
+1/2longpaper \> Multiply the parent paper size length by 1/2 \\
+3/8longpaper \> Multiply the parent paper size length by 3/8 \\
+1/3longpaper \> Multiply the parent paper size length by 1/3 \\
+1/4longpaper \> Multiply the parent paper size length by 1/4 \\
+1/8longpaper \> Multiply the parent paper size length by 1/8
+\end{tabbing}
+Make sure you only use one of these options at a time. They must be
+used with a main paper size option; the \optname{letterpaper} main
+paper size option is used by default.
+
+The resulting paper size is made \optname{portrait} by default, or
+\optname{landscape} if you've used that option, and printing limits
+are calculated based on the assumption that you will be printing on
+the parent paper size. That is, \rmpage assumes that if you've asked
+for 2/3 long A4, you'll be printing on the top 2/3 of a sheet of A4,
+not a cut sheet of 2/3~A4. Or that if you've asked for 1/4 long A4,
+you'll be printing 4 pages on one sheet of A4.
+
+See the chapters~\ref{chap:htw} and~\ref{chap:config} to find out how
+and why this is done, and how to change these assumptions.
+
+\subsubsection{Main sizes}
+\label{use:mainpapersizes}
+
+There's a lot more paper sizes available now; have a look at
+sections~\ref{optrmp:paper-sizes} and~\ref{optcfg:papersizes} for the
+full list. Any of the main paper sizes can be turned into a long paper
+size (see the section on long paper sizes above), and any paper size
+can be made landscape or portrait.
+
+The available paper sizes include:
+\begin{tabbing}
+\optname{dlpaper} and \optname{c7/6paper} \= \kill
+\optname{letterpaper}, \optname{executivepaper}, \\
+and \optname{legalpaper}. \> US paper sizes \\
+\optname{a0paper} to \optname{a10paper} \> ISO stationery sizes \\
+\optname{b0paper} to \optname{b10paper} \> ISO poster sizes \\
+\optname{c0paper} to \optname{c7paper} \> ISO envelopes \\
+\optname{dlpaper} and \optname{c7/6paper} \> ISO envelopes \\
+\optname{no10envelopepaper} \> US envelopes \\
+\optname{foolscapefoliopaper} \> obsolete stationery \\
+\end{tabbing}
+There's over 70 sizes in all---to find out how paper sizes are
+declared to \rmpage, and how to add new one, see chapters~\ref{chap:htw}
+and~\ref{chap:config}.
+
+\subsection{Founts}
+\label{use:founts}
+
+The standard \LaTeX\ classes calculate a \comname{textwidth} on the
+assumption that you will be using Computer Modern Roman as the main
+body text fount. But the legibility of a line of text depends in
+part on the the width of a line measured in characters, and
+different founts have a different average character widths, so it's
+sensible to calculate a different \comname{textwidth} if you're using
+a different main body text fount.
+
+\rmpage will calculate an appropriate \comname{textwidth} if you use
+one of the options below to tell it what you are using as your main
+body text fount.
+\begin{tabbing}
+\optname{lucasualwidth} \= \kill
+\optname{avantwidth} \> \packname{PSFNSS} Adobe Avant Garde. \\
+\optname{bookmanwidth} \> \packname{PSFNSS} Adobe Bookman. \\
+\optname{chancerywidth} \> \packname{PSFNSS} Adobe Zapf Chancery.\\
+\optname{cmrwidth} \> Default. Computer Modern Roman. \\
+\optname{concretewidth} \> Donald Knuth's Concrete Roman. \\
+\optname{courierwidth} \> \packname{PSFNSS} Adobe Courier. \\
+\optname{helvetwidth} \> \packname{PSFNSS} Adobe Helvetica. \\
+\optname{lucasualwidth} \> \packname{bh} Lucida casual. \\
+\optname{newcentwidth} \> \packname{PSFNSS} Adobe New Century Schoolbook. \\
+\optname{palatinowidth} \> \packname{PSFNSS} Adobe Palatino. \\
+\optname{timeswidth} \> \packname{PSFNSS} Adobe Times. \\
+\optname{utopiawidth} \> \packname{PSFNSS} Adobe Utopia. \\
+\optname{thisfountwidth} \> Bases \comname{textwidth} on the
+currently selected fount.
+\end{tabbing}
+The \optname{thisfountwidth} is useful if you are using a fount not
+covered by the standard options: it works by measuring the average
+character width of the fount that was selected when \rmpage was
+loaded. For this to work properly, you must ensure that the main body
+text fount has been selected before loading \rmpage. For example, if
+you are loading Adobe Baskerville in your preamble, you could ask
+\rmpage to set an appropriate \comname{textwidth} like this:
+\begin{verbatim}
+\documentclass[thisfountwidth]{article}
+\renewcommand{\rmdefault}{pgm}
+\rmfamily
+\usepackage{rmpage}
+\begin{document}
+...
+\end{verbatim}
+If you haven't told \rmpage to shut up with the \optname{yorkshire}
+option, it will tell you which fount it's using as the basis for
+\comname{textwidth}---this is useful for people like me who get
+horribly confused by the details of fount selection.
+
+If you want to use one of the \packname{PSNFSS} packages to load a
+fount as well as set a \comname{textwidth} based on this fount, you
+can use one of these options:
+\begin{tabbing}
+\optname{loadchancery} \= \kill
+\optname{loadavant} \> Requires the \packname{avant} package. \\
+\optname{loadbookman} \> Requires the \packname{bookman} package.\\
+\optname{loadchancery} \> Requires the \packname{chancery} package.\\
+\optname{loadhelvet} \> Requires the \packname{helvet} package.\\
+\optname{loadnewcent} \> Requires the \packname{newcent} package.\\
+\optname{loadpalatino} \> Requires the \packname{palatino} package.\\
+\optname{loadtimes} \> Requires the \packname{times} package.\\
+\optname{loadutopia} \> Requires the \packname{utopia} package.
+\end{tabbing}
+Each of these \optname{loadfount} options does three things:
+\begin{enumerate}
+\item Loads the named package
+\item Calculates a \comname{textwidth} based on the named fount
+\item Sets the typesetting parameters to looser values.
+\end{enumerate}
+
+The typesetting parameters are only loosened a little. The change
+does not affect the \LaTeX{} commands \comname{fussy} and
+\comname{sloppy}, so using the \comname{onecolumn} and
+\comname{twocolumn} commands will over-ride this change. You can
+duplicate the effect of this loosening with the \comname{sloppiness}
+command---see section~\ref{use:tightness} on
+page~\pageref{use:tightness} for more details.
+
+If you've asked for a \optname{twocolumn} layout, you get typesetting
+parameters close to the standard \LaTeX\ sloppy values, unless you
+over-ride this looseness. Because the \packname{multicol} package
+makes its own arrangements, you don't get the sloppy values if you
+asked for \optname{twocolumnwidth} to \optname{tencolumnwidth};
+\rmpage sets the typesetting parameters as if you were using a one
+column layout. Please email me if you have any thoughts on this
+matter.
+
+The three \optname{loadfount} options below are a little different to
+the \packname{PSNFSS} fount loading options above:
+
+\noindent
+\begin{tabularx}{\textwidth}{lX}
+%
+&\\
+%
+\optname{loadconcrete} & Requires the \packname{beton} package;
+calculates \comname{textheight} based on \packname{beton}'s modified
+\comname{baselineskip}; sets \comname{textwidth} for Concrete Roman;
+doesn't loosen typesetting. See section~\ref{use:beton} on
+page~\pageref{use:beton} for more on \packname{beton}.\\
+%
+\optname{loadcourier} & Makes the default roman fount Courier, sets an
+appropriate \comname{textwidth}, and asks for \optname{loose}
+typesetting. I think this is ugly and crude: you might be better off
+using the \packname{times} package and \comname{ttfamily}\\
+%
+\optname{loadlucasual} & Requires the \packname{lucasual} package;
+sets loose typesetting and a \comname{textwidth} to match Lucida
+Casual. Needs the \packname{lucasual} files;
+available from CTAN at \filename{fonts/psfonts/bh/lucasual/}. \\
+%
+&\\
+\end{tabularx}
+
+
+\subsection{Printers}
+\label{use:printers}
+
+It can be useful to let \rmpage know about your intended output
+device, because it can ensure that the layout it produces will fit
+inside the printable region of the paper. At the moment, there
+aren't very many printer options that match real printers. As I get
+more information, I shall add more real printer options.
+
+You can add an option for your own printer, or change the way your
+\rmpage installation set non-printing margins for your printer---the
+details are described in section~\ref{cfg:printertype} on
+page~\pageref{cfg:printertype}.
+
+The available printer options that I'l admit to here are:
+\begin{tabbing}
+\optname{pessimisticprinter} \= \kill
+\optname{fullbleedprinter} \> Prints right to the edge of the paper\\
+\optname{generalprinter} \> This should be fine for anyone\\
+\optname{optimisticprinter} \> \\
+\optname{pessimisticprinter} \> Uses the largest non-printing margins
+I've found\\
+\optname{dw500printer} \> Any HP 500 series inkjet\\
+\optname{dw600printer} \> Any HP 600 series inkjet\\
+\end{tabbing}
+
+\subsection{Date format}
+\label{use:dateformat}
+
+You can change the way the \comname{today} command prints the date
+with the options below:
+\begin{tabbing}
+\optname{ukdate} \= \optname{othernicedate} \= \kill
+\optname{ukdate} \> \optname{nicedate} \> 5th November 1693\\
+\optname{usdate} \> \optname{othernicedate} \> Default: July 4, 1776
+\end{tabbing}
+Only the \optname{ukdate} and \optname{nicedate} options make any
+changes: the \optname{usdate} and \optname{othernicedate} options do
+nothing.
+
+The options names happened like this: I once wrote a \LaTeX\ style
+file called \packname{nicedate}, which produced the same effect as
+\rmpage's \optname{nicedate} option---I like dates printed like that,
+you see. When I included the \packname{nicedate} code in \rmpage, it
+made sense to add a complementary option; hence \optname{othernicedate}.
+
+\optname{othernicedate} seems preferable to \optname{nastydate}, but
+it's not terribly memorable, so I created the synonyms
+\optname{ukdate} and \optname{usdate}. I'm not keen on these option
+names, but I can at least remember them. If you can think of
+something different, please let me know.
+
+\subsection{The \packname{beton} package}
+\label{use:beton}
+
+The easy way of using Frank Jensen's \packname{beton} package---to use
+Donald Knuth's Concrete Roman founts---with \rmpage is to pass the
+\optname{loadconcrete} option to \rmpage. This will load the
+\packname{beton} package, and set vertical and horizontal layout
+parameters for the Concrete Roman founts:
+\begin{verbatim}
+\documentclass[loadconcrete,concrete-math]{article}
+\usepackage{rmpage}
+\end{verbatim}
+The example above tells \rmpage to load the concrete founts using the
+\packname{beton} package. All global options are passed to all
+packages, so \packname{beton} and \rmpage are passed
+\optname{loadconcrete} and \optname{concrete-math}. \rmpage ignores
+\optname{concrete-math} and acts on \optname{loadconcrete}; while
+\packname{beton} ignores \optname{loadconcrete} and acts on
+\optname{concrete-math}.
+
+Because the \packname{beton} package changes \comname{baselineskip},
+but the changes don't take effect until the \verb|begin{document}|
+command has been executed, and \rmpage needs to know about the value
+of \comname{baselineskip} when it's setting \comname{textheight}, the
+\packname{beton} package needs special support in \rmpage.
+Everything's taken care of if you use the \optname{loadconcrete}
+option. If you want to load \packname{beton} with a
+\comname{usepackage} command, you should do this:
+\begin{itemize}
+\item Load \packname{beton} before \rmpage
+\item Pass the \optname{beton} option to \rmpage
+\item Pass the \optname{concretewidth} option to \rmpage---see
+section~\ref{use:founts} on page~\pageref{use:founts}.
+\end{itemize}
+Like this, for example:
+\begin{verbatim}
+\documentclass[beton,concretewidth]{report}
+\usepackage{beton}
+\usepackage{rmpage}
+\begin{document}
+...
+\end{verbatim}
+There's no need to pass the \optname{beton} option to \rmpage if
+you're also passing the \optname{stdbaselineskip} option to
+\packname{beton}, but it will do no harm.
+
+\rmpage needs code that is in \packname{beton}~v1.3, 5th March 1995,
+to get things right. This version of \packname{beton} was current in
+August 1996. I've made \rmpage check the definition of the
+\packname{beton} command it uses, but if you have any doubts that
+\rmpage is doing its job properly, you can try this:
+\begin{verbatim}
+\documentclass[beton,chatty]{article}
+\usepackage{beton}
+\usepackage{rmpage}
+\begin{document}
+\typeout{\the\baselineskip\space according to beton}
+\end{document}
+\end{verbatim}
+Look through the console output for the lines that look like this
+(the numbers will vary depending on paper size etc):
+\begin{verbatim}
+\textheight is:
+ 48 x 13.0pt + 10.0pt = 634.0pt
+\end{verbatim}
+This is a report of the number of lines in the text body ($48+1=49$ in
+this case), and how the final \comname{textheight} is arrived at. The
+second number---13\units{pt} in this case---is \comname{baselineskip}
+as seen by \rmpage. If this number is the same as the
+\comname{baselineskip} according to \packname{beton}---as reported on
+the console---everything's probably okay. (The last term in the sum
+above is \comname{topskip}).
+
+\subsection{Typesetting parameters}
+\label{use:tightness}
+
+\LaTeX's \comname{sloppy} command tells \TeX\ to be less fussy about
+linebreaking. It's sometimes useful to be able to tell \TeX\ to be
+less fussy than normal, but not as sloppy as \comname{sloppy}. A good
+example is typesetting with founts installed by Alan Jeffries's
+\packname{fontInst} package----for example, the founts in the
+\packname{PSNFSS} bundle of packages. Because these founts have a
+tighter inter-word space to Computer Modern Roman, Alan Jeffries
+recommends slightly looser typesetting parameters to usual, but not as
+loose as \comname{sloppy}---the values were reported by Sebastian
+Rahtz in his `Notes on setup of PostScript fonts for \LaTeX2', 14th
+August 1994. Oh dear: but Rahtz reports in `\filename{PSNFSS2e.tex}'
+(05/11/96) that \packname{fontinst} now produces founts with looser
+inter-word spacing, and suggests that the extra looseness is no longer
+required. I reckon a little extra looseness helps (the founts do seem
+to be tighter than the computer modern family), so the
+\optname{loadPSfount} options have been changed to use the
+\optname{looseish} settings normally, or the \optname{sloppyish}
+settings if you've asked for two columns.
+
+(What \packname{fontInst} mainly does is make \filename{vf},
+\filename{tfm}, \filename{fd}, and \filename{sty} files from
+\filename{afm} files, so you can use with \LaTeX\ founts which haven't
+been created with {\sffamily\scshape Metafont}. It's available from
+CTAN.)
+
+\rmpage has an option that selects similar typesetting parameters, and
+variants: two fussier and two sloppier. Each option can in effect be
+selected at any point in your document, using the \comname{sloppiness}
+command as shown.
+\begin{tabbing}
+\optname{looseish} \= \kill
+\optname{tight} \> Default. Standard \LaTeX\ \comname{fussy} settings. |\sloppiness{0}|\\
+\optname{looseish} \> |\sloppiness{1}| \\
+\optname{loose} \> Similar to Jeffries's suggestion |\sloppiness{2}| \\
+\optname{looser} \> |\sloppiness{3}|\\
+\optname{loosest} \> |\sloppiness{4}|\\
+\optname{sloppyish} \> For two columns |\sloppiness{5}|\\
+\end{tabbing}
+The default changes to \optname{loose} if you have use a
+\optname{loadfount} option which loads a \packname{FontInst} fount.
+See section~\ref{use:founts} on page~\pageref{use:founts} for more
+information.
+
+Note that \sloppiness{0} is \emph{not} equivalent to \fussy; because
+standard \LaTeX's \comname{sloppy} and \comname{fussy} commands
+change fewer parameters to \rmpage's \comname{sloppiness} commands,
+the \comname{fussy} command won't give you fussy typsetting if used
+after one of \rmpage's typesetting commands or options.
+
+
+\chapter{Old Using \rmpage}
+
+
+
+
+
+\section{Some options}
+
+\rmpage is more useful when you start using options: there's quite a
+lot of them, grouped in fairly consistently named sets. For example,
+you can select \rmpage's normal \comname{textwidth} by saying
+\optname{normalwidth}. If you want a slightly larger
+\comname{textwidth}, use the \optname{widish} option instead. The
+\optname{wide}, \optname{wider}, and \optname{widest} options will
+give you a progressively wider \comname{textwidth}. On the other
+hand, you can use the \optname{narrowish} option to get a slightly
+narrower \comname{textwidth} to standard, and the
+\optname{narrow},\optname{narrower}, and \optname{narrowest} options
+do exactly what you might expect.
+
+When you are dealing with a set of options like the width options
+above (all 13 of them; there's four odd ones I've not mentioned), be
+sure you only use one at a time. \rmpage doesn't check, and you can
+get unexpected results if there's more than one option used from each
+set.
+
+\begin{description}\shorty
+
+\item[Text width]
+%
+\optname{narrowest}, \optname{narrower},
+\optname{narrow}, \optname{narrowish}, \optname{normalwidth},
+\optname{wideish}, \optname{wide}, \optname{wider}, and
+\optname{widest}
+%
+ select a progressively larger \comname{textwidth}.
+%
+\optname{fullwidth} gives you the widest \comname{textwidth} that'll
+fit inside the printing region; \optname{stdwidth} selects the same
+width as you would get with the standard classes;
+\optname{oneinchmargins} selects a \comname{textwidth} that gives you
+an average margin size of one inch---the inside and outside margins
+add up to two inches; \optname{halfinchmargins} is similar, but the
+inside and outside margins add up to one inch rather than two.
+
+\rmpage looks out for the \optname{onecolumn} and \optname{twocolumn}
+options, and calculates a possibly larger \comname{textwidth} if you
+say \optname{twocolumn}. The class file is responsible for telling
+\TeX\ to set text in two columns, so these options shouldn't be passed
+to \rmpage only.
+
+If you're using the \packname{multicol} package, you can pass to
+\rmpage the options: \optname{twocolumnwidth},
+\optname{threecolumnwidth}, \optname{fourcolumnwidth}, and so on up to
+\optname{tencolumnwidth}. This will give you a \comname{textwidth}
+based on that number of columns.
+
+\item[Text height]
+%
+\optname{shortest}, \optname{shorter}, \optname{short},
+\optname{shortish}, \optname{normallength}, \optname{longish},
+\optname{long}, \optname{longer}, \optname{longest} select a
+progressively longer \comname{textheight}.
+%
+\optname{fulllength} gives you the longest \comname{textheight} that
+will fit inside the printing region; \optname{stdlength} gives you
+the \comname{textheight} you'd get with the standard class.
+
+\item[Headers and footers]
+%
+The \optname{headers} and \optname{footers} option leave space for
+headers and footers respectively; \optname{noheaders} and
+\optname{nofooters} give you page layout designed for no headers or
+no footers, respectively.
+
+\optname{leastheadsep}, \optname{lessheadsep},
+\optname{lessishheadsep}, \optname{normalheadsep},
+\optname{moreishheadsep}, \optname{moreheadsep}, and
+\optname{mostheadsep} enlarge and shrink the gap between the top of
+the text body and the bottom of the header; they work by scaling the
+standard value---\optname{normalheadsep} does nothing.
+
+\optname{leastfootskip}, \optname{lessfootskip},
+\optname{lessishfootskip}, \optname{normalfootskip},
+\optname{moreishfootskip}, \optname{morefootskip}, and
+\optname{mostfootskip} enlarge and shrink the gap between the bottom of
+the text body and the bottom of the footer; they work by scaling the
+standard value---\optname{normalfootskip} does nothing.
+
+\item[Positioning the text body horizontally]
+%
+\rmpage looks out for the standard \LaTeX\ class options:
+\optname{twoside} and \optname{oneside}. \rmpage will produce a
+layout either giving you a text body intended for printing on one side
+of the paper, or alternating with odd pages on a right-hand page, and
+even pages on a left-hand page.
+
+The \optname{centre} (or \optname{center}) option places the text body
+on the page with equal margins to the left and right. The
+\optname{notcentre} (or \optname{notcenter}) option places the text
+body with possibly unequal margins to the left and right.
+
+If you've asked for \optname{notcentre}, you will find that the larger
+margin is on the inside (intended for ring-binding). This effect is
+produced with the \optname{notstdmargins} option. The
+\optname{stdmargins} options reverses this, so the larger margin is on
+the outside (just like the standard classes).
+
+\optname{leastoffset}, \optname{lessoffset},
+\optname{lessishoffset}, \optname{normaloffset},
+\optname{moreishoffset}, \optname{moreoffset}, and
+\optname{mostoffset} enlarge and shrink the difference between the
+larger and smaller margin. \optname{leastoffset} gives you
+\optname{centre}d printing; there are subtle differences between
+\optname{leastoffset} and \optname{centre}.
+
+\item[Positioning the text body vertically]
+%
+\optname{lowest}, \optname{lower}, \optname{low}, \optname{lowish},
+\optname{normalaltitude}, \optname{highish}, \optname{high},
+\optname{higher}, and \optname{highest}, shift the text body up and
+down the page---they are referred to as the altitude option set in
+this document (I know, but do you have any better ideas?)
+
+\item[Paper and printers]
+%
+\optname{landscape} and \optname{portrait} force that orientation,
+whatever the size paper.
+
+There's lots of new paper sizes: see section~\ref{gen:papersizes} on
+page~\pageref{gen:papersizes}. You can ask for
+\optname{7/8longpaper}, \optname{3/4longpaper},
+\optname{5/8longpaper}, and so on down to \optname{1/8longpaper}.
+This calculates what's called a long paper size, based on the main
+paper size selected, by dividing the main paper size into the
+specified fraction along the long edge. For example, A4 is
+$210\units{mm} \times 297\units{mm}$; 1/3 long A4 is $210\units{mm}
+\times 99\units{mm}$.
+
+\optname{lj4printer} tells \rmpage you're using a Hewlett-Packard
+LaserJet 4 printer, and it'll calculate your page layout using
+appropriate non-printing margins. There are similar options for
+several other printers; you can add your own printer if it's not
+already here, and set any to be your default. For more details, see
+section~\ref{optcfg:printers} on page~\pageref{optcfg:printers}.
+
+\end{description}
+
+\section{Some other options}
+
+
+Several option sets have corresponding \optname{touch} options. These
+options increase or decrease whatever the parameter is by an amount in
+between the current main option and the next one. Generally, the
+sequence of values is a smooth geometrical one.
+
+For example, passing \optname{wide,} \optname{touchwider} to \rmpage
+gives you a \comname{textwidth} a third of the way up from \optname{wide}
+to \optname{wider}. \optname{wider,} \optname{touchnarrower} gives
+you a \comname{textwidth} a third of the way down from
+\optname{wider} to \optname{wide}.
+
+A touch option can be used with a main option (any option which doesn't
+have \optname{touch} or \optname{t@uch} in the name is a main option;
+not all main options have \optname{touch} options). The
+\optname{t@uch} options should only be used in class and package
+files. They have exactly the same effect as a \optname{touch}
+option, so saying \optname{wider,} \optname{touchnarrrower,}
+\optname{t@uchnarrower} gives you the same width as \optname{wider,}
+\optname{touchwider}.
+
+\begin{description}\shorty
+
+\item[Text width setting]
+%
+\optname{paperwidthset} makes \rmpage set the \comname{textwidth} going by
+paper-based \comname{textwidth} only; \optname{characterwidthset} goes
+by character-based \comname{textwith} only, but still pays attention
+to the printing limits specified by the paper size and printer
+selected. \optname{bothwidthset} is the default setting.
+
+\optname{paperwidthset} was created so I could produce a layout for a
+time-table, fitting on A4 landscape paper. Paying attention to the
+number of characters in a line is inappropriate for that job, hence
+the option. The other two options are the natural complements.
+
+\end{description}
+
+
+The \optname{touchlonger}, \optname{touchshorter},
+\optname{touchwider}, and \optname{touchnarrower} options increase or
+decrease \comname{textheight} or \comname{textwidth} one third of the
+way (in a geometrical sequence) towards the next main increment. That
+is, if you've said \optname{wide} and \optname{touchwider}, the width
+you get will be one third of the way towards the width given by
+\optname{wider}.
+
+
+\section{Layout details}
+\label{gen:layout}
+
+The standard \LaTeX\ package, \packname{layout}, displays all the page
+layout parameters and their values. This document loads the package
+and uses the \comname{layout} command to display the values. You can
+see the results of the \comname{layout} command in figure~\ref{fig:layout}.
+
+\begin{figure}[h!t]
+\noindent
+% dirty trick to fool \layout into producing a diagram for one page
+% only, that can float where it needs to.
+\begin{parbox}{\textwidth}\makeatletter
+ {
+ \relax
+ \makeatletter
+ \if@twoside\relax
+ \@twosidefalse
+ \typeout{twoside fudge}
+ \layout
+ \makeatletter
+ \@twosidetrue
+ \makeatother
+ \else
+ \typeout{No twoside fudge}
+ \layout
+ \fi
+ }\makeatother
+\end{parbox}
+{\footnotesize
+\vspace*{8\baselineskip}}
+\caption{The output of the \comname{layout} command \label{fig:layout}}
+\thispagestyle{plain}
+\end{figure}
+
+Note that the layout for this document was calculated by \rmpage,
+which was told to leave no space for a header with the
+\optname{noheaders} option; that is why both \comname{headheight} and
+\comname{headsep} have zero size.
+
+
+\section{Paper sizes}
+\label{gen:papersizes}
+
+\rmpage knows about lots of paper sizes, including ISO long sizes.
+The ISO standard which defines the A and B series of sizes also
+defines long sizes. For example, A4 paper is defined as $210 \times
+297\units{mm}$. The long size $1/3\units{A4}$ is $210 \times
+99\units{mm}$---the long size is the base size divided into the
+specifed number of parts along the long edge. Because you can apply
+this division to any piece of paper you like, \rmpage is happy to make
+non-ISO sizes into ISO-style long sizes. This means that Americans
+who want to print small booklets with two pages fitting on one sheet
+of letter paper can produce pages very easily with \rmpage, by asking
+for \optname{letterpaper} and \optname{1/2longpaper}. You can do the
+same thing with A4 paper, but why not just ask for \optname{a5paper}?
+One commonly-used long size is 2/3 A4, which is often used for company
+invoices and commercial letters; it's often used in landscape
+orientation ($210\units{mm} \times 198\units{mm}$) so it fits neatly
+into a world designed for A4-wide paper.
+
+\begin{ikkystuff}
+If you are going to print two pages on one sheet of US letter paper,
+as I suggested, \rmpage standard way of deciding what to set the
+non-printing margins to might be inappropriate. If so, look at
+the printer paper setting code in the configuration file, and specify
+clearances for the appropriate printer and paper combinations.
+Section~\ref{cfg:printerpaper} on page~\pageref{cfg:printerpaper} has
+more details on this.
+
+A good reason for not asking for \optname{a4paper} and then
+\optname{1/2longpaper}, is that if the configuration file has
+particular settings for A5 paper, it won't apply them to this long
+paper size, even though it's the same physical size. A good reason
+for doing so is that you might want that.
+\end{ikkystuff}
+
+\rmpage accepts these paper options (and more):
+
+\begin{tabbing}
+\optname{a0paper} \= to \= \optname{a10paper}, \\
+\optname{b0paper} \> to \> \optname{b10paper}, \\
+\optname{c0paper} \> \optname{c7paper},\= \optname{c7/6paper},\= \optname{dlpaper},
+\optname{no10envelopepaper},\\
+etc\\
+\end{tabbing}
+
+Options not listed here include some non-ISO envelope sizes, old
+British book sizes and so on: the odder sizes are kept in the
+configuration file. See section~\ref{optcfg:papersizes} on
+page~\pageref{optcfg:papersizes} for more details.
+
+You can get a long size by passing one of these options along with a
+paper size option: \optname{notlongpaper}, \optname{7/8longpaper},
+\optname{3/4longpaper}, \optname{2/3longpaper},
+\optname{5/8longpaper}, \optname{1/2longpaper},
+\optname{3/8longpaper}, \optname{1/3longpaper},
+\optname{1/4longpaper}, or \optname{1/8longpaper}.
+
+\rmpage makes an honest attempt to work out how you'll be printing
+these long sizes out (see section \ref{htw:paperprinter}), but its
+decision might apply limits that aren't what you want. If so, you'll
+have to add some code to the configuration file to over-ride its
+guess. Section~\ref{cfg:printerpaper} on page~\pageref{cfg:printerpaper} has
+more on how to do this.
+
+
+By the way, because A3 printers aren't unheard of, and because you can
+print (say) 1/3 long A2 on A3 paper, it makes perfect sense to include
+an option to define A2 paper. It seemed churlish not to go all the
+way up to A0. 2/3 A4 is apparently a size commonly used for printing
+business invoices and the like. If anyone really does use \rmpage for
+producing A3 pages, please let me know---it's something I've been
+wondering about.
+
+If anyone would like to let me know about more US paper sizes, I'd be
+happy to include them in future versions of \rmpage.
+
+
+\section{Setting the body text size}
+\label{gen:bodytextsize}
+
+There's more detail on how this works in
+sections~\ref{htw:textheightcalculation}
+and~\ref{htw:textwidthcalculation}.
+
+The range of values available for \comname{textwidth} and
+\comname{textheight} is a compromise. I wanted to keep the number of
+options down, produce a wide spread of values, with a small minimum
+step size.
+
+The way things have turned out, the step size from one length option
+to the next is, in general, different to the step size from one width
+option to the next. So you can't maintain a particular balance of
+top:outside and bottom:inside margins (or whatever) by moving up to
+the next width and length option. There's no easy way round this---I
+wrote \rmpage to set \comname{textheight} and \comname{textwidth}
+independently, because that seemed most sensible at the time. To
+ensure a fixed aspect ratio would mean I would have to re-write it to
+include code to scale up and down through a range of aspect ratios,
+which might have to be related to the aspect ratio of the paper, and
+allow you to scale the overall size of the text body up and down.
+This is a big job. I'd like to be able to set the text size that way
+as well as the way \rmpage does it at the moment, but it'll have to
+wait---I suspect I'll have to re-structure the entire package to be
+able to support both ways of doing things without getting completely
+mixed up.
+
+I decided to set both the width and height of the text body by scaling
+up and down geometric series. The \comname{textheight} series was
+chosen by deciding that the \optname{longest} length should fill an
+ordinary page of A4, assuming a 6\units{mm} non-printing border. The
+\optname{normallength} length was set to the standard value (this is
+only strictly true if you're using headers and footers), which defined
+the geometric series. The \optname{shortest} length on A4 is about
+163\units{mm}, just over half the page. It turns out that the series
+produces a central minimum step (\optname{normallength} plus
+\optname{touchlonger}) that is about one line (13\units{pt}, near
+enough), so I think it's appropriate.
+
+The \comname{textwidth} paper-based width series was derived
+similarly; the final values give a spread based on a \optname{widest}
+value that fills an A4 page to within about 7\units{mm} of the edge,
+and down to just over half the page. The \comname{textwidth}
+character-based width series has been more of a headache; the current
+(\filename{rmpwnorm.pko v 0.52}) version gives a spread from about 75
+characters in the middle, to about 98 and 57 characters at the
+extremes. The central minimum step (\optname{normalwidth} plus
+\optname{touchlonger}) is just under 2~characters, which seems
+suitably small. The problem with the character-based width setting is
+that the standard \comname{textwidth} is at the upper limit for easy
+reading; the widest available width, being wider than this, is far,
+far, far too wide for easy reading; but the minimum
+\comname{textwidth} doesn't get close to the minimum
+\comname{textwidth} for easy reading. But that probably won't matter
+too much; the minimum width is less than half an A4 page if you're
+using 11\units{pt} Computer Modern Roman in one column, which seems
+small enough for most things I can think of (you might want a layout
+which places figures and extensive side notes in the margin; if most
+of the marginal note space were to be filled, having a very large
+margin and small \comname{textwidth} makes sense.)
+
+
+\section{Founts-}
+\label{gen:founts}
+
+
+\section{Marginal paragraphs-}
+\label{gen:mpars}
+
+\rmpage looks at the everything including the sunspot cycle and the
+phase of the moon when it calculates the width of marginal paragraphs.
+Section~\ref{optcfg:mpars} on page~\pageref{optcfg:mpars} lists all the
+options that control marginal paragraph size, and has some more
+information.
+
+Note this: the default margin for marginal notes is the outside
+margin for twosided printing, and the right-hand margin for one sided
+printing. The standard \LaTeX\ command \comname{reversemarginpar}
+will reverse the marginal note placement; \comname{normalmarginpar}
+will put it back to normal. If you are printing twocolumn, the
+marginal notes end up in the nearest margin.
+
+\rmpage pays attention to all of this, and makes the marginal notes as
+large as possible given the margin they will appear in. The size is
+constrained by various parameters, controlled by the
+\optname{maxmparwidth}, \optname{mparsep}, and \optname{mparclearance}
+sets of options.
+
+The |clearance| parameter---the length \comname{RM@mparclearance}---is
+the minimum gap between the marginal note and the edge of the paper,
+subject to the additional restraint of the available printing area.
+It's hardwired to 0.4\units{in} in standard \LaTeXe; \rmpage sets it
+to be a fraction of \comname{paperwidth} which works out to be
+0.4\units{in} if you're using US letter paper. The |sep|
+parameter---the length \comname{marginparsep}---is the gap between the
+marginal note and the body text---this is a standard \LaTeX\
+parameter. The |maxwidth| parameter---the length
+\comname{RM@maxmparwidth}---is the maximum allowed width: 2\units{in}
+in standard \LaTeX, a fraction of \comname{paperwidth} which works out
+to 2\units{in} if you're using US letter paper with \rmpage. There
+are also the \optname{small} and \optname{large}
+\optname{basemparclear} and \optname{basemaxmparwidth} options. The
+large versions of these options set the normal parameter size to twice
+the usual default value.
+
+So if you're going to switch to \comname{reversemarginpar} in your
+document, do so \emph{before} you load \rmpage. If you're going to
+switch from one to the other, before you load \rmpage select the one
+which allows the least space for marginal paragraphs.
+
+If you're deeply interested in the workings of marginal paragraph size
+and placement, have a look at the \filename{dtx} files: I think the
+basic idea is obvious. Note that the parameters
+\verb|\RM@mparclearance| \verb|\RM@maxmparwidth| can be set to any
+positive value by one of the hooks (\verb|\RM@PrinterPaperSettings|
+might be a good one to use) in your configuration file: negative
+values are used by way of flags to set initial values.
+
+
+\section{The configuration files}
+
+\rmpage uses a configuration file to do lots of stuff. The way it
+works is this: if you're \LaTeX ing with \rmpage a file called
+\filename{ermintrude.tex}, and a file \filename{ermintrude.rmp} exists
+on the \TeX\ search path, then \filename{ermintrude.rmp} is used by
+\rmpage as the configuration file for that run. If not, then \rmpage
+looks for a file given by the command \comname{\RMconfigfile}. If
+that file exists (if the command hasn't been defined before \rmpage is
+loaded, it's set to \filename{rmplocal}; the file is searched for with
+and without the \filename{cfg} extension added). If that file can't
+be found, \rmpage looks for \filename{rmpgen.cfg}, which is a
+standard configuration file with everything enabled.
+
+The file \filename{rmplocal.gfc} is meant to be renamed
+\filename{rmplocal.cfg} and changed locally. Have a read of the
+comments in the file first, and change the optional argument to the
+\comname{ProvidesFile} command to say that the file's been changed by
+you.
+
+The idea is that you don't change \filename{rmpgen.cfg}; it exists so
+everyone has a standard configuration file that will produce identical
+results. You can tell \rmpage to use it in any given document by
+saying:
+\begin{verbatim}
+|\newcommand{\RMconfigfile}{rmpgen.cfg}|
+...
+\usepackage{rmpage}
+\end{verbatim}
+in the preamble of the document, \emph{before} loading \rmpage. But please
+ do change \filename{rmplocal.cfg}, if you like.
+
+The configuration file exists for these things:
+\begin{itemize}
+
+\item Declare additional standard options
+
+\item Declare user options
+
+\item Set local defaults
+
+\item Place code in various hooks to be executed inside \rmpage, for
+supporting local classes, particular combinations of printer and
+paper, and so on.
+
+\end{itemize}
+
+Every installation of \rmpage should have a modified configuration
+file for at least one reason: option processing is slow, and the fewer
+options you have, the faster it works. Folk with twin 225MHz
+PPC604e processors, or something huge and humming with the word `Sun'
+on the front probably don't care about \LaTeX ing speed, but I do.
+
+The idea is this: edit \filename{rmpgen.cfg} and comment out all
+the options you think you won't often use. You can always uncomment
+them later. There's quite a few of these standard options that are
+commented out to begin with; you might want to uncomment some of them
+(if, for example, you're in the habit of printing on crown folio
+paper). By the way, don't add or delete anything anywhere above the
+local option declaration section; if you do, upgrading to a new
+version of \rmpage might turn out to be more awkward than you'd like,
+and I'll come round and pester you, steal all your milk and put my
+feet up on the sofa.
+
+Setting local defaults isn't hard either: there's an
+\comname{ExecuteOptions} statement with my local defaults in it.
+Take them out and replace them with what you want. If you use a
+LaserJet 4 printer and US letter paper, and most of your output goes
+into ring binders, say:
+\begin{verbatim}
+\ExecuteOptions{lj4printer,letterpaper,usdate,notstdmargins}
+\end{verbatim}
+Note that I've assumed someone printing on US letter paper want dates
+formatted US style. If you don't want \optname{notstdmargins}, say
+\optname{stdmargins}.
+
+There are some options that you can't specify in any
+\comname{ExecuteOptions} statement seen by \rmpage: the \optname{touch}
+options aren't allowed---they must be executed after their
+corresponding `ordinary' options, which can't be arranged if they're
+bunged in an \comname{ExecuteOptions} statement. Try it if you
+like: \rmpage will whinge at you.
+
+If you want to declare a new printer type, for example, just copy one
+of the existing option declarations to the section marked
+`\textsc{begin local option declaration}', change the name and the
+parameters, and there you go.
+
+You might want to set up particular printer/paper settings; there's a
+place for that and an example of how to do it in
+\filename{rmplocal.cfg}. Have a look and a fiddle: if I could do it,
+it shouldn't be hard for someone as clever as you.
+
+Adding code to the hooks in a useful fashion is best left to those who
+like fiddling around: have a look at the guts of \filename{rmpage.dtx}
+and so on. Hopefully you'll get the hang of how I did things, and
+you'll be able to add code to suit your installation. I intend to
+document the whole thing properly eventually, but I only have 24 hours
+in each day. Try to stick to the conventions I've established: it'll
+make it more likely that your code will work properly with future
+versions of \rmpage. My intention is to keep things more-or-less as
+they are, but this is the first version on public release, and I don't
+know what changes will be needed yet.
+
+\section{Sending \rmpage-formatted documents elsewhere}
+
+There's a few potential problems with sending to other people
+documents that you've formatted with the help of \rmpage. One is that
+they might not have \rmpage, and another is that even if they do have
+\rmpage, it is possible that you have specified options that produce
+layout parameters that are dependent on your particular printer, which
+your recipient might not have, and even if they do have that
+particular printer, they might have local configuration
+code---particularly printer/paper specific settings---that produces a
+slightly different result.
+
+There's several different things you might do, depending on the
+circumstances---the thing to do is think about where your document's
+going, what's going to happen to it, and how you want it formatted.
+
+In the usual run of things, a document that's been formatted with
+\LaTeX\ and intended for general release is likely to be printed on A4
+paper and US letter paper, so you have installation-dependent
+differences\footnote{A4 paper is $210\units{mm} \times 297\units{mm}$
+or $8.27\units{inches} \times 11.69\units{inches}$; US letter paper
+is $8.5\units{inches} \times 11\units{inches}$ or $215.9\units{mm}
+\times 279.4\units{mm}$} even without \rmpage---it's always worth
+checking that this difference won't cause a problem (so US authors:
+check that your document works on A4 paper, and everyone else in the
+world make an effort for those isolated Americans. Look, just go
+metric, will you? I read maps in miles and drink beer in
+pints\footnote{real pints, not your sawn-off US version}, but really,
+metric units make life so much easier. If us \emph{and} the Italians
+have made the switch, so can you. Italians? Yes, Italians: just
+which empire do you think is referred to in the phrase `Imperial
+units' Yes, that's right, the Roman Empire. How about advancing into
+the 19th century before the 21st begins, eh? Sorry, a minor rant, but
+one that I think should be made occasionally.)
+
+Ignoring paper sizes for the moment, if your recipent has a copy of
+\rmpage, format your document with the \optname{pessimisticprinter}
+option, ensure that the result is acceptable, and send the thing.
+
+If your local configuration file has non-printer-specific settings
+that affect the output, you might send a copy of it (included in the
+preamble of your file before the |\usepackage{rmpage}| command,
+using the \envname{filecontents} environment) under the name
+\filename{jobname.rmp}. That is, if the document is in a file called
+\filename{canes-venaciti.tex}, call the configuration file
+\filename{canes-venaciti.rmp} and it will be used as the
+configuration file for that document only.
+
+Or you could run \LaTeX\ with the \optname{chatty} option specified to
+\rmpage, and copy all the page layout parameters from the console
+window and paste them into the preamble of your document. If your
+version of \LaTeX\ doesn't allow you to copy text from the console
+window (\OzTeX~2.0 for the Macintosh does; I don't know about other
+versions), copy the text from the \filename{log} file. Then comment
+out the call to \rmpage. The problem with this is that it fixes
+everything, including paper sizes, so a recipient who uses A4 paper
+won't be impressed if they\footnote{A useful way of avoiding he/she
+that has an ancient history} get a document hard-formatted for US
+letter paper, and vice-versa. Of course, you could provide two sets
+of page layout parameters, with a note to the recipient to choose one
+or the other. This is messy, but it might produce the most reliable and
+legible results.
+
+A possible way round the paper problem is to assume that no-one will
+be printing on anything other than US letter or A4 paper, and the
+people receiving the document won't mind if the layout isn't very
+good. That way, you might use the \optname{letter4paper} paper size.
+This paper size is $210\units{mm} \times 8.5\units{inches}$, and
+documents formatted with it will fit on A4 and US letter paper without
+formatting changes. Mind you, the results won't be very nice, and
+worse on US letter paper than on A4---\optname{letter4paper} pages
+printed on A4 will be a little too short, which enlarges the gap at
+the bottom. Very often, this isn't too noticeable. But
+\optname{letter4paper} pages printed on US letter paper will have the
+text body too far to the left, which tends to look very awkward.
+
+\section{Speed and what to do about it}
+
+\rmpage chews up a lot of processor time when it is being processed at
+the start of a \LaTeX\ run, but adds nothing to subsequent processing
+time---all it does is change page layout parameters. Narrow columns
+or short pages give \TeX\ a harder time in line and page breaking,
+which might increase processing time, but I wouldn't worry about that
+if I were you---the underfull \comname{hbox}es and \comname{vbox}es
+will cause you more problems that the extra 0.2s time.
+
+One verion of \rmpage (v0.65) added 18.5\units{s} to a \LaTeX\ run on
+my Mac. The same version of \rmpage added 19.1s to the processing
+time when I used it with the comments left in (before being processed
+by \packname{docstrip}). This is an increase of 0.6s or 3\%.
+Version~0.86 added 16\units{s} with comments, or 15\units{s} without,
+an increase of 7\%. In this case, file size was reduced from
+200\units{K} to 85\units{K}. It seems that, on my computer, the main
+benefit of using \packname{docstrip} to remove comments from an input
+file is reduced file size, not reduced processing time. A
+not-terribly-formal test concluded that each character in the first
+argument to each \comname{DeclareOption} command added about
+10\units{ms} to processing time---I saved 1.6\units{s} with
+version~0.72 by commenting-out eight options containing 176
+characters.
+
+My computer is a Macintosh Performa 475 12/160 with a 25MHz 68LC040
+microprocessor; I am told this processor is roughly equivalent to a
+40MHz 80486SX. For the tests noted above I used OzTeX version 2.0.1
+and 2.1 under system B1 7.1 P5 SU3.
+
+You can speed up \rmpage quite a lot. A large amount of the time
+taken by \rmpage is in processing options---\LaTeXe's option
+processing mechanism is very slow. Commenting out options in the
+config file is very effective at reducing processing time (it's the
+length of the option names, not the amount of code, that increases
+this processing time).
+
+For example, \rmpage version~0.66 increased the time to process a
+document by 21.2s; with 73 options commented out, \rmpage only added
+12.1s. This is an improvement of nearly 60\%. This is why there are
+two config files supplied with \rmpage: a slow one with all the
+options enabled, and a faster one with some options commented out.
+
+You can make \rmpage work faster by commenting out (don't delete
+them---you never know when you might need them) all the options you
+think you won't use very often. If you do want to use one of these
+commented-out options, uncomment it (and all the options in the same
+group---you'll see what this means when you look at the file) and
+leave it uncommented. The Alpha text editor for Macintoshes can
+comment out a group of lines if you select the lines and press
+\keypress{cmd-D}; it can reverse the process if you press
+\keypress{cmd-opt-D}. I expect other text editors can do the same job
+somehow: it might be worth finding out how to do this with your text
+editor if you don't already know
+
+Some versions of \TeX\ under some operating systems take quite a time
+to find files to be input. If this is the case on your computer, you
+might be able to reduce processing time quite a lot by placing
+frequently-used files in a place that is searched early on. I have a
+list of folders in my \filename{TeX-inputs} folder that looks a bit
+like this:
+
+\begin{verbatim}
+aa LaTeX
+ab Rat2e <--- rmpage is in here
+ab tools
+ac mfnfss
+ac other 2e <--- other people's packages
+ac other fd
+ac PSNFSS
+ba .cfg files etc
+ba other 2.09
+ba Rat old
+bb chicken <--- Liverpool John Moore's University logo
+bb new fds
+bb other LaTeX
+bb some AMS-LaTeX
+za afm
+za fontinst
+za fontinst examples
+za fontinst inputs
+zz Graphics
+zz Plain
+zz Rat ex + tmp
+\end{verbatim}
+
+It's a compromise between speed and ease of management: I can change
+parts of my \LaTeX\ system without getting a headache, and it's not
+too slow for me. The commonly-used folders are prefixed
+\filename{aa}, \filename{ab}, end so on; the rarely used ones are
+prefixed \filename{zz}. My version of \LaTeX\ is set up to search the
+folders early on in the alphabet first: this is not necessarily the
+case with any other version of \LaTeX, even versions of \OzTeX\ with
+the \filename{tex-inputs} list specified differently.
+
+Some \TeX\ implementations take a lot of time to search multiple
+directories, and are faster with fewer directories to search. If this
+is the case with your implementation, putting your input files into
+fewer directories might help. The only way I know to find if this is
+the case is to sit down and do lots of tests: it might be quicker in
+the long run not to bother.
+
+
+\chapter{A brief lecture on typography}
+
+I'm not a professional typographer, and this won't turn you into one.
+Caveat emptor\footnote{buyer beware}, and remember how much this cost
+you. If you want to learn about typography, do the sensible thing and
+get some books out of the library. But given that I'm giving you
+typographical controls, I'd better give you some idea how to use them
+intelligently. If you have any expertise in typography and think you
+can do better than this, please do! You've got my email address\ldots
+
+The notes below are what I think are the main points of ordinary
+typography the average \LaTeX\ user needs to know about, dealing with
+the areas of typography that \rmpage gives you new control over; this
+had no pretensions to being a course in typography---visit that
+library!
+
+\section{Introduction}
+
+The usual reason for writing something is so that people can read and
+digest the content---the reader is usually not interested in the form
+of written work, just the words themselves. It follows that the form
+in which your words are presented should usually be un-noticed by the
+reader: easy to read, conventional, and pleasing to the eye. The
+eye-catching typography used by advertisers does have its
+place, but this short piece concentrates on mundane typography:
+setting chunks of text, one word after another, line after line, to
+form a document which is unobtrusive to read. After all, if you were
+battling with the mathematics of elastohydrodynamics, you wouldn't
+appreciate a layout that was as hard to decipher as the content.
+
+First thing is this: it's easy to make a right mess of things when you
+can control the layout of a page, but many of the mistakes one can
+make are in setting the paragraph indentation, vertical space around
+displayed material, headings, and the like. \rmpage doesn't touch
+these, so you can forget about fouling up that area of design for
+now. As for the things you can control: don't stray too far from the
+normal settings, and the results should be fine.
+
+The easiest mistake to make is in setting the width of the body
+text---\comname{textwidth} in \LaTeX\ terms. Typography texts warn
+that the most common fault is making the body text too narrow (less
+than about 45 average characters); but my experience is that the
+average non-typographer is more likely to make the body text too wide
+(more than about 75 average characters).
+
+The best advice to begin with is follow convention---most books on
+typography make the point that your design has succeeded if no-one
+notices it, so stick with the conventional. Of course, you've got to
+find out what conventional is. Look at professionally designed
+typography: at how the text body sits on the page of a book, and in
+magazines and newspapers---is the text high, low, or in the middle?
+closer to the binding edge or the outside edge? How big, in visual
+relationship to each other and the text body, are the margins top,
+bottom, inside and outside? What about columns of text in magazines and
+newspapers---how wide are they, what's the gap between columns like
+in relationship to the column width, the size of the average word
+space, and the page margins? How does the column width affect
+readability---think about the effect of column width on line-breaking
+and the flow of reading.
+
+You'll notice that conventionally, lines of text longer than about 75
+characters are avoided, as are lines less than about 45 characters;
+and the outside margin is usually larger than the inside margin, for
+the very straighforward reason that the outside margin is the one
+that's most delicate and most handled. If it's big, damage to the
+paper is less likely to deface the text. The bottom margin is usually
+bigger than the top margin for the same reason---and even though this
+reason is a sound practical one, if you produce a page with a smaller
+bottom margin than top margin, it looks very odd to most people. It's
+also fairly conventional for the aspect ratio of the text to match the
+aspect ratio of the paper---if the text is half the width of the
+paper, it'll be half the height as well.
+
+The standard \LaTeX\ classes produce a page layout that's generally in
+line with those conventions, so if you don't pass extreme options to
+\rmpage, you can't go far wrong. Of course, if you're aiming for a
+particular effect for a good reason, such as filling a page with a
+time-table, you might want the longest and widest text area possible.
+If you find that you \emph{are} using an extreme option (\optname{longest},
+for example), think very carefully about why you are doing it, what
+effect this option produces, and whether this is desirable. If you're
+just trying to cram that much text on one page, two columns is
+probably better.
+
+Because typography is to some extent an artistic endeavour, there is
+no such thing as an ideal layout, although some are clearly
+inappropriate. But after a few hours at the keyboard, it's easy to
+lose the ability to judge the passing of time, let alone the effect a
+design has on a new reader. I find that it often pays to trust
+initial reactions, especially when comparing a set of alternatives.
+So, if you're in doubt about which of your final two choices to use,
+ask someone else what they think of them.
+
+\section{Positioning the text body}
+
+Convention has it that the outside margin is larger than the inside
+margin, and that the bottom margin is larger than the top margin.
+It's not unusual to match the sizes of the outside margin and the top
+margin. The \packname{Koma-script} documentation reports that Jan
+Tschichold recommends that the bottom margin should be twice the size
+of the top margin, and the outside margin should be twice the size of
+the inside margin.
+
+The reason \rmpage defaults to having the inside margin larger than
+the outside margin is this: most of what I typeset ends up in
+ring-binders, where you need a large inside margin to avoid punching
+holes in the text. You can change this default setting by editing an
+\comname{ExecuteOptions} statement in the configuration file---see
+chapter~\ref{chap:config}. You can change this default in the
+\filename{rmplocal.cfg} file by putting the \optname{stdmargins}
+option in the default \comname{ExecuteOptions} statement. If you
+don't like the amount by which the inside margin is bigger than the
+outside margin---bearing in mind that one convention has the outside
+margin matching the top margin---you can change it with the
+\optname{offset} option set.
+
+If the top margin looks bigger than the bottom margin, the page looks
+`bottom heavy' and rather odd. It is possible that the only reason
+for this is that everyone lays out pages with a smaller top margin,
+but follow this convention to begin with. \rmpage actually makes the
+top and bottom margins the same size, just as the standard classes do;
+the bottom margin looks larger because the bottom margin
+\emph{appears} to begin at the bottom of the text body; \LaTeX\
+measures it from the bottom of the footer.
+
+i couldn't figure out a reliable way of getting \rmpage to calculate
+\emph{apparent} ratios of top and bottom margins, so you'll have to
+balance this by eye. The \optname{altitude}, \optname{long}, and
+\optname{short} option sets can help.
+
+\section{Size of the text body}
+
+Conventionally, one text column is 1.5 to 2.5 alphabets wide; the
+standard \LaTeX\ widths give you about 2.5 alphabets wide (which is
+about the average width of 75 characters of normal prose, hence
+Lamport's comment in the \LaTeX\ book. 1.5 alphabets is about 44
+average characters, but \rmpage warns when you get below 39 characters
+wide---\TeX's a better line breaker than a human typesetter. \rmpage
+warns you if you exceed the 75---39 character limits; too wide and too
+narrow are both awkward to read, and too narrow makes for rotten line
+breaks.\footnote{I'm lying: \rmpage warns when you exceed the
+standard number of characters per line, which is 78.5 characters for
+10pt, 74.8 for 11pt, and 75.5 characters for 12pt.} \rmpage does
+report the final \comname{textwidth} in terms of what it thinks are
+average characters, which should help to give you an idea of what's
+going on.
+
+If you must fill a very wide space, try using multiple columns. If
+you must use narrow columns, ragged right setting sometimes looks
+better, although a multiple-column narrow-columned layout might need
+to have \comname{columnsep} adjusted with \rmpage's \optname{colsep}
+options---look at a newspaper to get the idea.
+
+The problem with long lines is this: when you get to the end of one
+line, you need to find the start of the next one. If the lines are
+too long, this job is made harder. The problem with short lines is
+twofold: the job of finding the start of a line is a bother, so the
+less you have to do it the better; and short lines make for rotten
+line breaks, which makes it harder to follow the text.
+
+Tschichold recommends that the aspect ratio of the text body be made
+to match the aspect ratio of the paper. This refers to the
+\emph{apparent} aspect ratios---apparent paper size depends on the
+binding used, and apparent text body size depends on the nature of the
+headers and footers. I couldn't come up with a reliable way of
+calculating the comparative apparent aspect ratios, so if you want
+these aspect ratios matched, you'll have to do it by eye. The
+\optname{altitude}, \optname{offset}, \optname{long}, \optname{short},
+\optname{wide}, \optname{narrow} option sets can help. Note that to
+my eye at least, matching aspect ratios often matters less than
+matching top and outside margins, which does appear often to make a
+big difference to my comfort with a layout on small (A5 or so) pages.
+And in any case, the match need not be spot on---but quite what near
+enough is can't be specified exactly. Sometimes an
+almost-but-not-quite match is fine, sometimes it looks awful and
+you're better off with a deliberate `I'm clearly not trying to match
+these dimensions' layout.
+
+\section{Typefaces}
+
+The main thing the average \LaTeX\ user is concerned with is
+legibility, and the computer modern typefaces score highly here. I
+have just seen a volume of conference proceedings (Proceedings of the
+Applied Optics Divisional Conference of The Insitute of Physics, held
+at Reading 16--19 September 1996) in which most papers were produced
+with \LaTeX, using the publisher's style file. To my eye, the papers
+typeset in Times look most legible at a glance; the papers typeset in
+Computer Modern feel easier to read when you get down to it. I
+mention this to make the point that just because something looks
+right, doesn't mean that it's easier to read---not that Times is
+anything but a famously legible typeface.
+
+As a general rule, serif typefaces are easier to read in blocks of
+text, and sans serif typefaces are easier to read as isolated words
+or phrases. This explains the choice of typeface on road signs and in
+newspapers. Typefaces with a heavy emphasis on vertical strokes---such
+as the Bodoni beloved of US newspaper headlines---disrupt the
+left-right flow of reading, whereas typefaces with a more horizontal
+emphasis, such as Times or Baskerville, ease the left-right flow of
+reading.
+
+Choosing founts is a tricky thing---read those typography books! But
+there are some rules which can help you produce pleasant, legible
+pages. Before a real expert shoots me down in flames, I don't claim
+that the list below is `rules for the correct use of typefaces'---it's
+just, erm, `received wisdom', sort of.
+
+\begin{itemize}
+
+\item Always use a serif typeface for your body text.
+
+\item Keep the number of type faces and type families in a design to a
+minimum---use bold, italic, different sized, and maybe slanted
+type faces from the one family where appropriate.
+
+\item Always follow convention---don't invent a new convention
+unless you really need to.
+
+\item Don't mix similar but different typefaces---Times for the body
+copy and New Century Schoolbook for captions looks awful.
+
+\item But do mix very different typefaces---Times for the body copy
+and Helvetica (which I personally loath with a deep loathing) for
+captions or headings, for example, can be very effective.
+
+\item Use a body text size from 9\units{pt} to 12\units{pt}; some
+books suggest no more than 11\units{pt} for body text, and I reckon
+10\units{pt} is a bit too small at 300\unit{dpi}, but fine at
+600\unit{dpi}.
+
+\item Never, ever, underline unless you absolutely have to on pain of
+severe dandruff.
+
+\item And George Orwell said in his rules for good English,
+break any of these rules rather than do anything outright barbarous.
+
+\end{itemize}
+
+
+\chapter{All the options (rmpage v0.69 and rmplocal.cfg v0.11)}
+
+\label{chap:alltheoptions}
+
+Most of the options in \rmpage work by setting an internal paramters,
+which is later used to decide what value to set something to as part
+of a more involved calculation. Sometimes more than one parameter is
+used in this decision. The description of each option tells you what
+this parameter is set to, and what effect the option has.
+
+
+
+
+\section{Options in \rmpage}
+
+This is a list of the options contained in the file \rmpage; there's
+lots more in the configuration file. None of the options in \rmpage
+are commented out, nor are any of the options in the configuration
+file \filename{rmpgen.cfg}. Some of the options in the configuration file
+\filename{rmplocal.gfc} have been commented out for speed's sake; this file
+will be used by \rmpage if you rename it \filename{rmplocal.cfg}
+
+\subsection{Reporting dimensions and tracing calculations}
+
+
+These options control the amount of stuff that \rmpage litters your
+console window with. They do this by setting the \verb|\RM@chatlevel|
+parameter, which is looked at by a bunch of reporting commands---look
+at \rmpage for the details about these. The default is
+\optname{taciturn}; you get a handful of dimensions and warnings get
+printed on the console. I expect that most people won't find
+\optname{garrulous} useful. The \optname{yorkshire} causes \rmpage to
+print nought: this is a British regional joke that I'm allowed to make
+because I live in Lancashire, which is another British regional joke.
+(C.f. Ian MacMillan on `4th Column', BBC R4 6/10/96: ``'Ey oop. All
+right. That should be enough for a column. Y'see, I'm from South
+Yorkshire, and we don't talk a lot.')
+
+\begin{description}\shorty\squish
+\awakeoption{garrulous} \rmpage reports everything I thought might be
+useful someday. It used to be worse. Sets \verb|\RM@chatlevel| to 0
+
+\awakeoption{chatty} \rmpage reports all \LaTeX\ layout parameters that
+it changes, plenty of \rmpage's own parameters, and some information
+about what's going on as it caluculates them. Sets \verb|\RM@chatlevel| to 1
+
+\awakeoption{taciturn} Default. \rmpage reports the height and width of the
+text and paper, the width of the text in characters, and a few other
+things. Warnings are also printed. Sets \verb|\RM@chatlevel| to 2.
+
+\awakeoption{yorkshire} Allows \rmpage to print errors only, although
+warnings are put in the log file with a few other bits. Sets
+\verb|\RM@chatlevel| to 3
+\end{description}
+
+\subsection{Paper sizes}
+\label{optrmp:paper-sizes}
+
+More paper types are defined in the configuration file, as are the
+long paper sizes. Each paper size is given a code number, because
+it's easier and faster to check for a number than a name. If you want
+to define your own paper sizes, I suggest you use code numbers above
+1000 so that future versions of \rmpage don't have standard sizes than
+conflict with your sizes. The paper size number 0 doesn't have much of a
+role in life yet, but I'm working on it.
+
+The \optname{landscape} and \optname{portrait} options force the paper
+size to be in that orientation; the standard class swap
+\comname{textheight} and \comname{textwidth} when you ask for
+landscape. Landscape orientation is defined as the long side being
+horizontal; portrait orientation is defined as the short side
+horizontal. 2/3 A4 is usually used in landscape orientation ($210
+\times 198\units{mm}$, as are DL envelopes. Some printer drivers,
+when dealing with DL envelopes, call `landscape', `portrait', and
+vice-versa.
+
+\rmpage knows about lots of sizes; some of them are large, obsolete, or
+untrimmed paper sizes which I don't expect will be directly useful to
+anyone. It just seemed inelegant to leave them out. Perhaps
+I have a warped sense of \ae sthetics. If you have a Macintosh with
+QuickDraw~GX, you can tell your printer driver about any paper size
+that your printer is physically able to deal with, so these odd sizes
+might be more useful than I think.
+
+If any Americans would like to send me the dimensions of some more US
+paper sizes (including envelopes), I'll include them in future
+versions. The only places I could find US paper size data were
+\LaTeX\ classes and my printer's manual.
+
+According to BS4000:
+\begin{quotation}
+ The ISO A series is based on A0, with a surface
+area of $1\units{m}^{2}$. Each ISO B paper size is a geometric mean between
+adjacent A sizes, with sides in the same proportions.
+
+Each size shall be acheived by dividing the size immediately above it
+into two equal parts, the division being parallel to the shorter
+side. Consequently, the areas of two successive sizes shall be in the
+ratio $2:1$.
+
+All the size in each series shall be geometrically similar to one
+another.
+\end{quotation}
+
+What this means is that the ratio of the sides must be $1:\sqrt{2}$,
+so that A0 is $841\units{mm} \times 1189\units{mm}$.
+
+Tolerances are specified thus:
+
+\begin{tabbing}
+$150\mathrm{mm}<\mathrm{sizes}\leq 600\mathrm{mm}$ \= $\pm2 \mathrm{mm}$\kill
+$\mathrm{sizes}\leq 150 \mathrm{mm}$ \> $\pm1.5 \mathrm{mm}$ \\
+$150\mathrm{mm}<\mathrm{sizes}\leq 600\mathrm{mm}$ \> $\pm2 \mathrm{mm}$\\
+$600\mathrm{mm}<\mathrm{sizes}\mathrm{mm}$ \> $\pm3 \mathrm{mm}$\\
+\end{tabbing}
+
+Long ISO sizes are created by dividing ordinary ISO sizes into slices,
+cutting parallel to the short edge, e.g.,
+
+\begin{tabbing}
+1/3 A4 \= $99 \times 210$ \\
+1/4 A4 \> $74 \times 210$ \\
+1/8 A8 \> $13 \times 74 $ \\
+\end{tabbing}
+
+2/3 A4 is apparently a common size commercially, used for invoices and
+the like. It is defined as $198 \times 210 \mathrm{mm}$. Note that
+the standard defines sizes to the nearest millimetre, but \rmpage does
+\emph{not} round the calculated long sizes, nor does it ensure that
+only ISO sizes are processed by the `long' options.
+
+\rmpage does not limit you to making long sizes out of ISO paper only
+because you can chop up any bit of paper you like. The reason \rmpage
+does not round long sizes to the nearest millimetre is that if you are
+printing on a piece of ready-cut long paper, \rmpage's maximum
+deviation from the specified size, 0.5\unit{mm}, is within tolerance;
+and if you are making your own long paper by cutting up a straight
+size, rounding to the nearest millimetre on a 1/8 size could result in
+a 4\unit{mm} error by the time you cut the strip furthest from your
+datum edge, which is outside the specified tolerance for the size of
+the sheet you are cutting. The fact that not rounding is easier to
+code is, of course, entirely co-incidental and played no part in the
+design decision.
+
+Data source for the old British book sizes: Pears Cyclopedia, 68th
+edition, 1959-1960. Pelham Books Ltd., 1959. (General Compendium,
+page N13). A, B, and other untrimmed sizes taken from BS4000. C3,
+C4, C5, C6, DL, and non-ISO envelope sizes taken from BS4264. C0, C1,
+C2, C7, and C7/6 taken from The Cambridge Factfinder, Cambridge
+University Press, 1993.
+
+
+Each paper type is given a number:
+
+\begin{tabbing}
+0=undefined, 1=letter, 2=legal, 3=executive,\\
+9=letter4paper\\
+10=a0, \= \ldots , \= 20=a10 (a4=14, a5=15)\\
+30=b0, \> \ldots , \> 40=b10\\
+50=c0, \> \ldots , \> 57=c7, 58=dl, 59=c7/6,\\
+64=bslargelegalenvelope, \= 65=bscalendarenvelope\kill
+60=bspopseedenvelope, \> 61=bspopnonisoenvelope, \\
+62=bsbrochureenvelope, \> 63=bslegalenvelope,\\
+64=bslargelegalenvelope, \> 65=bscalendarenvelope\\
+66=no10envelopepaper\\
+85=medium quarto, \= 80=imperial quarto, \= 81=imperial octavo\kill
+70=foolscap folio, \> 71=foolscap quarto, \> 72=foolscap octavo\\
+73=crown folio, \> 74=crown quarto, \> 75=crown octavo\\
+76=royal folio, \> 77=royal quarto, \> 78=royal octavo\\
+79=imperial folio, \> 80=imperial quarto, \> 81=imperial octavo\\
+82=large crown octavo\\
+83=demy quarto, \> 84=demy octavo\\
+85=medium quarto, \> 86=medium octavo\\
+93=sra0, \= 94=sra1, \= 95=sra2\kill
+90=ra0, \> 91=ra1, \> 92=ra2,\\
+93=sra0, \> 94=sra1, \> 95=sra2\\
+98=metric large quad crown paper, \= 99=metric quad demy paper\kill
+96=metric double crown paper, \> 97=metric quad crown paper\\
+98=metric large quad crown paper, \> 99=metric quad demy paper\\
+100=metric small quad royal paper\\
+\end{tabbing}
+
+The paper types are divided up like this:
+\begin{tabbing}
+10 \= C sizes plus dlpaper defined by 10 options: for envelopes, etc.
+\= (50-59)\kill
+ 3 \> US sizes recognised by 3 options \> (1-3)\\
+ 1 \> bodge size recognised by 1 option \> (9)\\
+11 \> A sizes defined by 11 options: for writing paper, books, etc. \>
+(10-20)\\
+11 \> B sizes defined by 11 options: for posters, etc. \> (30-40)\\
+10 \> C sizes plus dlpaper defined by 10 options: for envelopes, etc.
+ \> (50-59)\\
+ 6 \> BS4264 envelope sizes defined by 6 options: \> (60-65)\\
+ 1 \> US envelope size defined by 1 option: \> (66)\\
+17 \> old British sizes defined by 18 options. \> (70-86)\\
+11 \> BS4000 untrimmed sizes defined by 11 options \> (90-100)\\
+\\
+71 \> different paper sizes defined by 72 options.
+\end{tabbing}
+
+
+
+\begin{description}\shorty\squish
+
+\awakeoption{letterpaper} Sets |\RM@papertype| to 1
+-- 11in by 8.5in
+
+\awakeoption{legalpaper} Sets |\RM@papertype| to 2
+-- 14in by 8.5in
+
+\awakeoption{executivepaper} Sets |\RM@papertype| to 3
+-- 10.5in by 7.25in
+
+\awakeoption{a4paper} Sets |\RM@papertype| to 14
+-- 297mm by 210mm
+
+\awakeoption{a5paper} Sets |\RM@papertype| to 15
+-- 210mm by 148mm
+
+\awakeoption{b5paper} Sets |\RM@papertype| to 35
+-- 250mm by 176mm
+
+\awakeoption{c6paper} Sets |\RM@papertype| to 56
+-- 162mm by 114mm
+
+\awakeoption{dlpaper} Sets |\RM@papertype| to 58
+220mm by 110mm. Ordinary envelopes.
+
+\awakeoption{no10envelopepaper} Sets |\RM@papertype| to 66
+9.5in by 4.12in. Ordinary US envelopes.
+
+\end{description}
+
+% long paper type numbers:
+%
+% 0 = not long (or 1)
+% 1 = 7/8 2 = 3/4 3 = 2/3 4 = 5/8 5 = 1/2
+% 6 = 3/8 7 = 1/3 8 = 1/4 9 = 1/8
+%
+% long paper options in rmplocal.cfg
+
+\subsection{Typesetting tightness}
+\label{optrmp:tightness}
+
+These options only exists because \rmpage can load the
+\packname{PSNFSS} founts, and Karl Berry says that these founts
+(produced with \packname{FontInst}) have too little slack in the
+inter-word space for \TeX\ to be able to form paragraphs well with the
+standard typesetting parameters.
+
+These options must be executed before the \optname{load<fount>}
+options. That's inevitable if I have these option declarations before
+the \optname{load<fount>} option declarations, and use
+\comname{ProcessOptions} rather than \comname{ProcessOptions*}. This
+is so that these options can over-ride the default typesetting
+tightness (\optname{looseish}) requested by the \optname{load<fount>}
+options.
+
+\begin{description}\shorty\squish
+\awakeoption{tight} Default. Leaves the typesetting parameters alone. Defines
+\verb|\RM@looseoption| to be 0.
+
+\awakeoption{looseish} Changes the typesetting parameters to be
+something in between the adjacent options. Defines
+\verb|\RM@looseoption| to be 1
+
+\awakeoption{loose} Changes the typesetting parameters to something
+close to Alan Jeffries's recommendations. Defines \verb|\RM@looseoption|
+to be 2
+
+\awakeoption{looser} Changes the typesetting parameters to be
+something in between the adjacent options. Defines
+\verb|\RM@looseoption| to be 3
+
+\awakeoption{loosest} Changes the typesetting parameters to something
+close to twice as sloppy as Karl Berry's recommendations. Defines
+\verb|\RM@looseoption| to be 4
+
+\awakeoption{sloppyish} Changes the typesetting parameters to be even
+looser than \verb|\sloppy|, for two column typesetting with
+\packname{PSFNSS} founts. Defines \verb|\RM@looseoption| to be 5.
+
+\end{description}
+
+
+\subsection{Textheight setting}
+\label{optrmp:textheight}
+
+These request a \comname{textheight} shorter or longer than normal.
+If you allow space for headers and footers with the \optname{headers}
+and \optname{footers} options, \optname{normallength} gives you the
+same \comname{textheight} as you'd get with the standard classes. The
+other lengths are scaled up and down from the normal value in a
+geometrical sequence. (Actually, the total space above and below the
+text body including headers and footers is the dimension that's scaled
+in a geometrical sequence, but that shouldn't bother you too much.)
+
+The \optname{touchlength} options add or subtract one from the value
+set here.
+
+There are also \optname{stdlength} and \optname{fulllength} options in
+the configuration file; see section~\ref{optcfg:odd-lengths} on
+page~\pageref{optcfg:odd-lengths}.
+
+\begin{description}\shorty\squish
+\awakeoption{shortest} Sets |\RM@lengthoption=3|; this
+number gives you: $|\RM@totalheadfootclearance|=0.5200|\paperheight|$
+\awakeoption{shorter} Sets |\RM@lengthoption=6|
+\awakeoption{short} Sets |\RM@lengthoption=9|
+\awakeoption{shortish} Sets |\RM@lengthoption=12|
+\awakeoption{normallength} Default. Sets |\RM@lengthoption=15|; this
+number gives you: $|\RM@totalheadfootclearance|=0.2130|\paperheight|$
+\awakeoption{longish} Sets |\RM@lengthoption=18|
+\awakeoption{long} Sets |\RM@lengthoption=21|
+\awakeoption{longer} Sets |\RM@lengthoption=24|
+\awakeoption{longest} Sets |\RM@lengthoption=27|; this
+number gives you: $|\RM@totalheadfootclearance|=0.0872|\paperheight|$
+\end{description}
+%
+%
+\subsection{Headers and footers}
+
+These options only deal with the gap between text body and the header
+(or footer). See section~\ref{optrmp:hfonoff} on
+page~\pageref{optrmp:hfonoff} for options to turn the headers and footers
+on and off.
+
+The way these options work is by setting a parameter which is passed
+to the |\RM@scalebyoption| command, to scale the required page layout
+parameter by a value in a geometric sequence. Have a look at the
+command in \rmpage for the details.
+
+\comname{headsep} is just multiplied by the requested value.
+\comname{footskip} is the distance from the bottom of the text body to
+the bottom of the footer. To approximate a scaling of the distance
+between the top of the footer and the bottom of the text, \rmpage
+assumes that the footer is a single line that is \comname{baselineskip}
+high, and subtracts \comname{baselineskip} from \comname{footskip}
+before scaling, and adds it back afterwards. This seems to work well
+enough.
+
+The value set by the options below can be modified by the
+\optname{touchheadsep} and \optname{touchfootskip} options, which add
+or subtract one from the appropriate parameter.
+
+% Headsep is scaled by option
+%
+\begin{description}\shorty\squish
+\awakeoption{leastheadsep} Sets |\RM@headsepoption=3|
+\awakeoption{lessheadsep} Sets |\RM@headsepoption=6|
+\awakeoption{lessishheadsep} Sets |\RM@headsepoption=9|
+\awakeoption{normalheadsep} Default. Sets |\RM@headsepoption=12|
+\awakeoption{moreishheadsep} Sets |\RM@headsepoption=15|
+\awakeoption{moreheadsep} Sets |\RM@headsepoption=18|
+\awakeoption{mostheadsep} Sets |\RM@headsepoption=21|
+%
+% Footskip is scaled by option
+%
+\awakeoption{leastfootskip} Sets |\RM@footskipoption=3|
+\awakeoption{lessfootskip} Sets |\RM@footskipoption=6|
+\awakeoption{lessishfootskip} Sets |\RM@footskipoption=9|
+\awakeoption{normalfootskip} Default. Sets |\RM@footskipoption=12|
+\awakeoption{moreishfootskip} Sets |\RM@footskipoption=15|
+\awakeoption{morefootskip} Sets |\RM@footskipoption=18|
+\awakeoption{mostfootskip} Sets |\RM@footskipoption=21|
+\end{description}
+%
+% The marginpar setting options are now in rmplocal.cfg
+
+\subsection{Columnsep}
+\label{optrmp:columnsep}
+
+\comname{columnsep} is a standard \LaTeX\ parameter: it is the space
+in between columns of text on a multiple column page. The
+\optname{colsep} options scale \comname{columnsep} using the internal
+\comname{RM@scalebyoption} command: see
+section~\ref{htw:headfootmpar} on page~\pageref{htw:headfootmpar}
+for details. Briefly, \optname{normalcolsep} does nothing;
+\optname{mostcolsep} multiplies \comname{colsep} by 2.5;
+\optname{leastcolsep} divides \comname{columnsep} by 2.5; and
+intermediate options use a factor in between along a geometrical
+sequence.
+
+There are corresponding \optname{touchcolsep} options. They must be
+executed after these main options, which is easily arranged---see
+section~\ref{optcfg:touchoptions} on page~\pageref{optcfg:touchoptions} for
+the details.
+
+\begin{description}\shorty\squish
+\awakeoption{leastcolsep} Sets \comname{RM@columnsepoption} to 3
+\awakeoption{lesscolsep} Sets \comname{RM@columnsepoption} to 6
+\awakeoption{lessishcolsep} Sets \comname{RM@columnsepoption} to 9
+\awakeoption{normalcolsep} Default. Sets \comname{RM@columnsepoption} to 12
+\awakeoption{moreishcolsep} Sets \comname{RM@columnsepoption} to 15
+\awakeoption{morecolsep} Sets \comname{RM@columnsepoption} to 18
+\awakeoption{mostcolsep} Sets \comname{RM@columnsepoption} to 21
+\end{description}
+
+
+If \comname{RM@adaptivecolseptrue}, then \comname{columnsep} is set to
+be a fraction of the number of points per character. This isn't
+always appropriate, and the flag is set to false by default.
+
+\begin{description}\shorty\squish
+\awakeoption{adaptivecolsep} \comname{columnsep} is set to be 2.3
+times the width of one average character, according to \rmpage's
+reckoning. This new value can be scaled by the
+\optname{mostcolsep} to \optname{leastcolsep} options.
+
+The standard \comname{columnsep} is 2.03 times the width of one
+average 10\units{pt} Computer Modern Roman character. This is a
+useful option if you are creating a style based on a fount size larger
+than 12\units{pt}. Otherwise, it seems to be a good idea on Mondays,
+Wednesdays, and Fridays; not so good on Tuesdays, Thursdays, and
+Saturdays; and on Sundays, I write Ogham on tree bark.
+
+\awakeoption{noadaptivecolsep} Default. \comname{columnsep} is not
+changed from its default value, although it might be scaled by the
+\optname{mostcolsep} to \optname{leastcolsep} options.
+
+\end{description}
+%
+% stdmargins: large margin outside, small margin inside.
+% notdstdmargins: large margin inside, small margin outside.
+%
+%
+% Note that the width option setting options need to be executed in
+% the order they are declared here: so that you can increment or
+% decrement narrowest---widest; but stdwidth, half and one inchmargins,
+% and fullwidth are all fixed options.
+%
+% One easy way of ensuring this is to keep these options declared in
+% this order and use \ProcessOptions rather than \ProcessOptions*
+%
+\subsection{Width of the text body}
+\label{optrmp:textwidth}
+
+The width options let you ask for a larger or smaller
+\comname{textwidth}. Following the basic idea of the standard
+classes, \rmpage calculates two different \comname{textwidths}: one
+is based on the number of characters in a line; the other is based on
+the size of the paper. The smaller of these two guesses is used as
+the basis for the final \comname{textwidth}---\comname{textwidth} is
+also constrained by \comname{RM@mintextwidth},
+\comname{RM@maxtextwidth}, \comname{RM@mininsidemargin},
+\comname{RM@minoutsidemargin}, \comname{RM@minleftclearance}, and
+\comname{RM@minrightclearance}.
+
+\rmpage is inclined to print out warnings if it has to change its
+preferred \comname{textwidth} because of one of the above
+restrictions---the \optname{yorkshire} option will silence these
+warnings if you find them irritating.
+
+The \optname{normalwidth} option gives a \comname{textwidth} close to
+the standard \LaTeX\ width on US letter or A4 paper, where the
+character-based width is usually used (wide founts like Lucida Casual
+are the exception to this). \comname{textwidth} is larger than usual
+if you print on smaller paper, where the paper-based
+\comname{textwidth} is used. The options ranging out to
+\optname{widest} and \optname{narrowest} request a
+\comname{textwidth} varying in a smooth geometrical sequence, but
+remember that the smaller of the two widths (character-based and
+paper-based) is used, and there are several other restrictions on
+\comname{textwidth}, so this smooth progression may not be apparent
+as you step up or down through the options. The gory details are in
+the file \filename{rmpnorm}.
+
+You can control which of the two widths---character-based or
+paper-based---is used as the final \comname{textwidth}. See the next
+section (section~\ref{gen:widthsettingcontrol}) for details.
+
+The \optname{stdwidth} option forces \rmpage to calculate the
+\comname{textwidth} in the same way as the standard classes, except
+that the final value is still subject to the restrictions listed
+above. So it is possible to ask for \optname{stdwidth} and get a
+\comname{textwidth} that is not what you'd've got with the a standard
+class. \rmpage will warn you if this happens.
+
+\begin{description}\shorty\squish
+
+\awakeoption{widest} Paper-based textwidth is set to 1.3096 times the
+\optname{normalwidth} value; character-based textwidth is set to 1.9761
+times the \optname{normalwidth} value. Sets \comname{RM@widthoption} to 26
+
+\awakeoption{wider} Sets \comname{RM@widthoption} to 23
+
+\awakeoption{wide} Sets \comname{RM@widthoption} to 20
+
+\awakeoption{wideish} Sets \comname{RM@widthoption} to 17
+
+\awakeoption{normalwidth} Default. Paper-based \comname{textwidth} is
+set to |0.7138\paperwidth|; character-based \comname{textwidth} is set
+to 78.5 characters (10\units{pt}), 74.8 characters (11\units{pt}), or
+75.5 characters (12\units{pt})---this produces a character-based
+\comname{textwidth} very close to the standard width setting code.
+Sets \comname{RM@widthoption} to 14
+
+\awakeoption{narrowish} Sets \comname{RM@widthoption} to 11
+
+\awakeoption{narrow} Sets \comname{RM@widthoption} to 8
+
+\awakeoption{narrower} Sets \comname{RM@widthoption} to 5
+
+\awakeoption{narrowest} Paper-based textwidth is set to 0.7636 times the
+\optname{normalwidth} value; character-based textwidth is set to 0.5061
+times the \optname{normalwidth} value. Sets \comname{RM@widthoption} to 2
+
+%
+% The touchwidth options are in rmplocal.cfg now.
+%
+\awakeoption{stdwidth} Attempts to produce a page with the same
+\comname{textwidth} as the standard classes would give. Sets
+\comname{RM@widthoption} to 32
+
+\awakeoption{halfinchmargins} Attempts to produce a page with a total
+horizontal margin space of one inch. If you have asked for
+\optname{centre}d printing, \rmpage will try to produce half inch
+margins either side.
+Sets \comname{RM@widthoption} to 31
+
+\awakeoption{oneinchmargins} Attempts to produce a page with a total
+horizontal margin space of two inches. If you have asked for
+\optname{centre}d printing, \rmpage will try to produce one inch
+margins either side.
+Sets \comname{RM@widthoption} to 30
+
+\awakeoption{fullwidth} Produces the widest possible
+\comname{textwidth} given all other restrictions. Sets
+\comname{RM@widthoption} to 29
+%
+\end{description}
+
+\subsection{Width setting control}
+\label{gen:widthsettingcontrol}
+
+These control which dimensions \rmpage takes notice of when setting
+\comname{textwidth}---\rmpage can look at the size of the paper and
+the number of characters when it's setting \comname{textwidth}.
+Normally it looks at both, and picks the one that results in the
+smallest \comname{textwidth}. The code that does this is in the width
+setting \filename{pko} file; it works out what to do based on the
+value of the |\RM@setwidthby| command.
+
+If you ask for one of these widths: \optname{oneinchmargin},
+\optname{halfinchmargin}, and \optname{fullwidth}, you shouldn't also
+ask for \optname{characterwidthset}, because the width options ask
+for widths that are inherently based on the size of the paper.
+\rmpage will point out this mistake if you make it, and carry on as if
+you'd not said \optname{characterwidthset}.
+
+I'm not that keen on these option names, especially
+\optname{bothwidthset} which is formed in a regular sequence with the
+other two, and ends up both ugly and not very descriptive; if you can
+come up with something better, please let me know.
+
+%
+% 0 = set width by character and paper-based widths (default)
+% 1 = set width by character-based width only
+% 2 = set width by paper-based width only
+%
+% The bothwidth option is redundant, which is a good thing because I
+% really don't like the name
+
+\begin{description}\shorty\squish
+\awakeoption{bothwidthset} Default. Use both paper and character
+based \comname{textwidth} requests to set \comname{textwidth}.
+Defines|\RM@setwidthby| to be 0
+
+\awakeoption{characterwidthset} Use the character based \comname{textwidth}
+request only to set \comname{textwidth}. Defines |\RM@setwidthby| to be 1
+
+\awakeoption{paperwidthset} Use the paper based \comname{textwidth}
+request only to set \comname{textwidth}. Defines |\RM@setwidthby| to be 2
+\end{description}
+%
+
+
+\subsection{Margins}
+\label{optrmp:margins}
+
+The options in this section control the horizontal position of the
+text body. The \optname{twoside} and \optname{oneside} options are
+standard options that \rmpage understand; the rest of them are new in
+\rmpage.
+
+It's probably best to read about all of these options, not just some
+of them, because they all interact to some extent.
+
+
+\begin{description}\shorty\squish
+
+\awakeoption{twoside} Places the text body for printing on both sides
+of the paper, taking into account the requested offest and which
+margin you want to be the larger one (inside or out).
+
+Sets \verb|\RM@twosidetrue| and \verb|\@mparswitchtrue|; the latter
+step is performed by the standard classes. I'm not certain this is
+the right thing to do; it means you get the standard classes' effect
+if you pass this option to \rmpage only. But you might want to avoid
+the standard classes' effect\ldots{} But if you're that clever, you
+can reset the switch yourself.
+
+
+\awakeoption{oneside} Default. Places the text body for printing on
+both sides of the paper, taking into account the requested offest and
+which margin you want to be the larger one (inside or out). Sets
+\verb|\RM@twosidefalse|
+
+\awakeoption{centre} Forces the left and right margins to be the same
+size. Sets \verb|\RM@centretrue|.
+
+\awakeoption{notcentre} Default. Allows the left and right margins
+to be different sizes. Sets \verb|\RM@centrefalse|
+
+\end{description}
+
+
+The options in the list below control which margin is the larger one.
+Conventional book typesetting and \LaTeX\ makes the outside margin the
+larger one; \rmpage makes the inside margin the larger one. This is
+because most of what I produce is bound in loose-leaf ring-binders,
+where having a small inside margin often results in a holes in the
+text.
+
+You can change this default setting by changing the
+\optname{notstdmargins} option to \optname{stdmargins} in the default
+\comname{ExecuteOptions} statement in your local configuration file.
+You will find this statement just below the line in the configuration
+file that reads: \textsc{change this line to match your local
+preferences}.
+
+\begin{description}\shorty\squish
+
+\awakeoption{stdmargins} Default. Outside margin is the larger one. Sets
+\comname{RM@stdmarginstrue}
+
+\awakeoption{notstdmargins} Inside margin in the larger
+one. Sets \comname{RM@stdmarginsfalse}
+
+\end{description}
+
+
+You can control the relative proportions of the inside and outside
+margins with the \optname{offset} options.
+These offset options don't do anything if the centre option has been
+specified.
+
+The default offset is 60\% of the total horizontal margin space in the
+larger margin, 40\% in the smaller. This the the standard \LaTeXe\
+offset. \optname{leastoffset} gives you equal margins;
+\optname{touchlessoffset} and \optname{leastoffset} together makes the
+nominally larger margin into the smaller one, by a small amount.
+\rmpage will warn you if this happens. \optname{mostoffset} puts
+87\% of the total horizontal margin space into the larger margin; this
+is about as far over to one side as your printer is likely to be able
+to print.
+
+There are \optname{touchoffset} options in the standard configuration
+files---see section~\ref{optcfg:touchoptions} on page~\pageref{optcfg:touchoptions}
+
+Have a look at \filename{rmpnorm} for more details if you need them.
+
+
+\begin{description}\shorty\squish
+\awakeoption{leastoffset} 50\% larger margin. Sets \comname{RM@offsetoption} to 2
+\awakeoption{lessoffset} 53\% larger margin. Sets \comname{RM@offsetoption} to 5
+\awakeoption{lessishoffset} 56\% larger margin. Sets \comname{RM@offsetoption} to 8
+\awakeoption{normaloffset} Default. 60\% larger margin. Sets \comname{RM@offsetoption} to 11
+\awakeoption{moreishoffset} 68\% larger margin. Sets \comname{RM@offsetoption} to 14
+\awakeoption{moreoffset} 77\% larger margin. Sets \comname{RM@offsetoption} to 17
+\awakeoption{mostoffset} 87\% larger margin. Sets \comname{RM@offsetoption} to 20
+\end{description}
+
+The touchoffset options must be executed after the offset options.
+This is easy to arrange: just declare the options with the
+\optname{touch} options after the main options, and use
+\comname{ProcessOptions} rather than \comname{ProcessOptions*} (that
+is, these options must be processed in the order of declaration,
+rather than the order given in the calling commands).
+
+\subsection{Number of columns}
+
+Note that the standard classes set the \comname{@twocolumn} flag true
+or false, depending. \rmpage doesn't, and works quite happily without
+it.
+
+The config file has \optname{onecolumnwidth} to
+\optname{tencolumnwidth} options, which change \comname{textwidth} but
+don't change the number of columns that \LaTeX\ typesets text in. You
+can use the \packname{multicol} package to do that.
+
+\begin{description}\shorty\squish
+
+\awakeoption{onecolumn} Default. This standard option is recognised
+by \rmpage. This option makes the standard classes typeset one column
+to a page; \rmpage\ calculates a character-based \comname{textwidth}
+based on this. Defines \comname{RM@textcols} to be 1.
+
+\awakeoption{twocolumn} This standard option is recognised by \rmpage.
+This option makes the standard classes typeset two columns to a page;
+\rmpage\ calculates a character-based \comname{textwidth} based on
+this. Defines \comname{RM@textcols} to be 2.
+
+\end{description}
+
+\subsection{Paper orientation}
+
+These options really do force the appropriate orientation; the
+standard classes just swap \comname{textheight} and
+\comname{textwidth} when asked for \optname{landscape}. Remember that
+you'll most likely want to print your envelopes landscape, even if
+your printer driver thinks you mean portrait (Hewlett Packard's
+DeskWriter series 6.0 printer driver gets this wrong. Oops.) And
+2/3~A4 is usually used in landscape orientation, even though you'll
+probably think it's portrait---I know I did.
+
+\begin{description}\shorty\squish
+
+\awakeoption{portrait} Default. Forces \comname{textwidth} to be less
+than \comname{textheight}. Sets |\RM@portraittrue|
+
+\awakeoption{landscape} Forces \comname{textwidth} to be more than
+\comname{textheight}. Sets |\RM@portraitfalse|
+
+\end{description}
+
+\subsection{Headers and footers}
+\label{optrmp:hfonoff}
+
+Allows space for headers and footers, or not, as you wish. These
+options \emph{do not} affect the contents of headers and footers in
+any way: if you want to change the \LaTeX\ \comname{pagestyle}, you
+must do that separately.
+
+Turning headers and footers on and off changes \comname{textheight}:
+this is because of the way \rmpage calculates \comname{textheight}.
+
+\rmpage first calculates the sum of the blank space above and below
+all the text on the page; this is a constant fraction of
+\comname{paperheight} for any given length option. What is left over
+after space has been allowed for headers and footers is
+\comname{textheight}
+
+\begin{description}\shorty\squish
+\awakeoption{noheaders} Produce a layout for pages without headers.
+Sets |\RM@headersfalse|; this results in \comname{headheight} and
+\comname{headsep} being set to 0\units{pt}.
+
+\awakeoption{headers} Default. Produce a layout for pages with
+headers. Sets |\RM@headerstrue|; this results in \comname{headheight}
+being set to \comname{baselineskip}.
+
+\awakeoption{nofooters} Produce a layout for pages without footers.
+Sets |\RM@footersfalse|; this results in \comname{footskip} being set
+to 0\units{pt}
+
+\awakeoption{footers} Default. Produce a layout for pages with
+footers. Sets |\RM@footerstrue|.
+
+\end{description}
+
+\subsection{Positioning the text body vertically}
+\label{optrmp:altitude}
+
+These options affect the ratio between the gap below all the text and
+the gap above all the text. The \optname{touchaltitude}
+options change this ratio in increments of $1/24$.
+
+\begin{description}\shorty\squish
+
+\awakeoption{highest} Top:bottom space = 0:8. Sets
+|\RM@headfootbalance=0|
+
+\awakeoption{higher} Top:bottom space = 1:8. Sets
+|\RM@headfootbalance=3|
+
+\awakeoption{high} Top:bottom space = 2:8. Sets
+|\RM@headfootbalance=6|
+
+\awakeoption{highish} Top:bottom space = 3:8. Sets
+|\RM@headfootbalance=9|
+
+\awakeoption{normalaltitude} Default. Top:bottom space = 4:8. Sets
+|\RM@headfootbalance=12|
+
+\awakeoption{lowish} Top:bottom space = 5:8. Sets
+|\RM@headfootbalance=15|
+
+\awakeoption{low} Top:bottom space = 6:8. Sets
+|\RM@headfootbalance=18|
+
+\awakeoption{lower} Top:bottom space = 7:8. Sets
+|\RM@headfootbalance=21|
+
+\awakeoption{lowest} Top:bottom space = 8:8. Sets
+|\RM@headfootbalance=24|
+
+\end{description}
+
+\subsection{Changing the date format}
+
+
+\begin{description}\shorty\squish
+
+\awakeoption{usdate} Default. Sets |\RM@nicedatefalse|, which causes
+nothing to happen; the \comname{today} command is unmolested.
+
+\awakeoption{ukdate} Sets |\RM@nicedatetrue|, which causes the
+\comname{today} command to be re-defined to produce a date of the form
+`4th April 1984'. This is the setting I use as a default; I do this
+by putting the \optname{ukdate} option in the local settings
+\comname{ExecuteOptions} statement in my local configuration file.
+
+\end{description}
+%
+% The option to load founts and set textwidth by fount size are now
+% in rmplocal.cfg
+%
+% Printer types were:
+% 0=fullbleed, 1=general, 2=dw520, 3=dw600, 4=pessimistic
+%
+% all printer options are now in rmplocal.cfg
+%
+% Printer types are:
+% 0=fullbleed, 1=general, 2=pessimistic, 3=optimistic
+% 10=dw300 11=dw500 12=dw600 (HP deskwriter inkjet series)
+% 20=lj2 21=lj3 22=lj4 (HP laserjet laser printer series)
+% 30=canonbjx bubblejet something (Canon bubblejet inkjet series)
+% 40+ whatever else comes up
+%
+% The figures for all these printers are guesses, except for the DW500
+% and DW600: any data on printing margins for the printers above or
+% other commonly-used printers would be gratefully received. I need to
+% know about printing limits at the top, bottom, left, and right for
+% portrait and landscape modes, and whether the data is what the book
+% says or what you measured (preferrably both, but anything'll help).
+% If anyone really uses LaTeX with an A3 printer, do tell: it's
+% something I've been wondering about.
+%
+%
+\subsection{Dealing with the \packname{beton} package}
+\label{optrmp:beton}
+
+The code to let \rmpage work with \packname{beton} felt rather
+complicated to write. The thing about the \packname{beton} package
+is that it changes \comname{baselineskip} to something non-standard.
+\rmpage needs to know what \comname{baselineskip} is so that it can
+set \comname{textheight}, but \packname{beton}'s changes aren't made
+until the \comname{AtBeginDocument} hook is executed by \LaTeX, which
+is after \rmpage has been loaded. I had to steal code from
+\packname{beton}~v1.3 to deal with this, which might cause problems if you
+try to use \rmpage with other versions of \packname{beton}.
+
+
+The result is that if you are using the \packname{beton} package
+without passing it the \optname{standard-baselineskips} option, you should
+specify either the \optname{beton} or the \optname{nobeton} option to
+\rmpage: the first option uses \packname{beton}'s modified
+\comname{baselineskip} to set \comname{textheight}; the second option
+uses the standard \comname{baselineskip}, and can be ommitted if you
+have specified the \optname{standard-baselineskips} option to
+\packname{beton}.
+
+
+The problem with the \optname{beton} option is that if you specify it,
+\rmpage uses code stolen from the guts of \packname{beton}~version~1.3
+to set the appropriate \comname{baselineskip}. There is no guarantee
+that this code will work with other versions of \packname{beton}.
+
+\begin{description}\shorty\squish
+\awakeoption{beton} calculate a \comname{textheight}
+based on the \packname{beton} package's \comname{baselineskip}
+
+\awakeoption{nobeton} calculate a \comname{textheight}
+based on the standard \comname{baselineskip}
+
+Both these options set the |\RM@ifbeton| command to a number. It's
+played about with before and after here. The final value of the
+|\RM@ifbeton| command is given these meanings within \rmpage:
+\end{description}
+
+\noindent
+\begin{tabularx}{\textwidth}{lX}
+
+0&\packname{beton} package loaded and the \optname{beton} option
+specified\\
+
+1&The \packname{beton} package has been loaded with neither the
+\optname{beton} nor the \optname{nobeton} option specified\\
+
+2&\packname{beton} package loaded and the \optname{beton} option not specified\\
+
+3& The \packname{beton} package not loaded with neither the
+\optname{beton} nor the \optname{nobeton} option specified\\
+
+4& The \packname{beton} package not loaded and the \optname{nobeton}
+option specified.
+
+\end{tabularx}
+
+
+
+
+\section{From the configuration file}
+
+The following options are all from the configuration file. There's
+nothing magical about this: they could all just as easily be in
+\filename{rmpage.sty} at the point where the configuration file is
+loaded. But the idea is that you can change the configuration file,
+but not \rmpage, and \rmpage works faster with fewer option. So
+comment out any of these options that you don't use very often (please
+don't delete them: you never know when you might need them).
+
+The distributed configuration file \filename{rmpgen.cfg} has no
+options commented out; this means it's quite slow. The distributed
+configuration file \filename{rmplocal.gfc} does have some options
+commented out---\rmpage works faster using this file. \rmpage will
+not use \filename{rmplocal.gfc} as a configuration file unless you
+tell it to. The most straightforward way to get \rmpage to use this faster
+configuration file is to rename it \filename{rmplocal.cfg}.
+
+The idea is that you don't change \filename{rmpgen.cfg} at all: it's
+intended to be a standard configuration file that any document can use
+to produce identical output on any system by saying
+|\newcommand{\RMconfigfile}{rmpgen.cfg}| in the preamble before the
+|\usepackage{rmpage}| command.
+
+If you are short of disc space, you could delete
+\filename{rmpgen.cfg}, but you might find you have to re-install it
+one day to process a file that requires it.
+
+\filename{rmplocal.cfg} is intended to be changed by anyone. Please
+read the comments in the file first, add a comment at the start of the
+file to identify it as yours, and a note to the same effect in the
+optional argument of the \comname{ProvidesFile}: life can get very
+confused otherwise. Don't add or delete anything except comment
+characters between the \comname{ProvidesFile} command and the line
+\texttt{LOCAL CODE BELOW HERE PLEASE}. Make sensible changes below
+the line \texttt{LOCAL CODE BELOW HERE PLEASE}; read the comments in
+the configuration file and \filename{rmpage.dtx}, and use the commands
+I use for doing things. If you do this, your code should work
+perfectly with future versions of \rmpage.
+
+In the list below, options that look like this: {\asleepfount
+obscurefunction}, are commented out in \filename{rmplocal.gfc}, whilst
+options that look like this: {\awakefount usefulfunction}, are not
+commented out.
+
+
+\subsection{Other paper sizes}
+\label{optcfg:papersizes}
+
+There are some notes on paper sizes in section~\ref{optrmp:paper-sizes}
+on page~\pageref{optrmp:paper-sizes}. I suspect that the larger sizes
+and untrimmed sizes will be useless, but it seemed churlish to leave
+them out.
+
+
+\begin{description}\shorty\squish
+\asleepoption{undefinedpaper} Sets |\RM@papertype| to 0 -- does
+nothing to \comname{paperheight} or \comname{paperwidth}. This paper
+type has no purpose in life, yet.
+
+\asleepoption{letter4paper} Sets |\RM@papertype| to 9; this paper size
+is an unholy bodge with the width of A4 and the height of US
+letter. Documents typeset with this paper size will fit on A4 and US
+letter paper, and look terrible on both. Size is 210mm by 8.5in.
+
+\asleepoption{a0paper} Sets |\RM@papertype| to 10
+-- 1189mm by 841mm
+
+\asleepoption{a1paper} Sets |\RM@papertype| to 11
+-- 841mm by 594mm
+
+\asleepoption{a2paper} Sets |\RM@papertype| to 12
+-- 594mm by 420mm
+
+\awakeoption{a3paper} Sets |\RM@papertype| to 13
+-- 420mm by 297mm
+
+
+\awakeoption{a6paper} Sets |\RM@papertype| to 16
+-- 148mm by 105mm
+
+\asleepoption{a7paper} Sets |\RM@papertype| to 17
+-- 105mm by 74mm
+
+\asleepoption{a8paper} Sets |\RM@papertype| to 18
+-- 74mm by 52mm
+
+\asleepoption{a9paper} Sets |\RM@papertype| to 19
+-- 52mm by 37mm
+
+\asleepoption{a10paper} Sets |\RM@papertype| to 20
+-- 37mm by 26mm
+
+\asleepoption{b0paper} Sets |\RM@papertype| to 30
+-- 1414mm by 1000mm
+
+\asleepoption{b1paper} Sets |\RM@papertype| to 31
+-- 1000mm by 707mm
+
+\asleepoption{b2paper} Sets |\RM@papertype| to 32
+-- 707mm by 500mm
+
+\asleepoption{b3paper} Sets |\RM@papertype| to 33
+-- 500mm by 353mm
+
+\awakeoption{b4paper} Sets |\RM@papertype| to 34
+-- 353mm by 250mm
+
+
+\awakeoption{b6paper} Sets |\RM@papertype| to 36
+-- 176mm by 125mm
+
+\awakeoption{b7paper} Sets |\RM@papertype| to 37
+-- 125mm by 88mm
+
+\asleepoption{b8paper} Sets |\RM@papertype| to 38
+-- 88mm by 62mm
+
+\asleepoption{b9paper} Sets |\RM@papertype| to 39
+-- 62mm by 44mm
+
+\asleepoption{b10paper} Sets |\RM@papertype| to 40
+-- 44mm by 31mm
+
+\asleepoption{c0paper} Sets |\RM@papertype| to 50
+-- 1297mm by 917mm
+
+\asleepoption{c1paper} Sets |\RM@papertype| to 51
+-- 917mm by 648mm
+
+\asleepoption{c2paper} Sets |\RM@papertype| to 52
+-- 648mm by 458mm
+
+\asleepoption{c3paper} Sets |\RM@papertype| to 53
+-- 458mm by 324mm
+
+\asleepoption{c4paper} Sets |\RM@papertype| to 54
+-- 324mm by 229mm
+
+\awakeoption{c5paper} Sets |\RM@papertype| to 55
+-- 229mm by 162mm
+
+\asleepoption{c7paper} Sets |\RM@papertype| to 57
+-- 114mm by 81mm
+
+\asleepoption{c7/6paper} Sets |\RM@papertype| to 59
+-- 162mm by 81mm
+
+\asleepoption{bspopseedenvelopepaper} Sets |\RM@papertype| to 60
+-- 152mm by 102mm. BS4264 UK post office preferred envelope: seed packets,
+wage slips, general packaging. The name is one I invented.
+
+\asleepoption{bspopnonisoenvelopepaper} Sets |\RM@papertype| to 61 --
+229mm by 102mm. BS4264 UK post office preferred envelope: gen
+commercial, non iso sizes. The name is one I invented.
+
+\asleepoption{bsbrochureenvelopepaper} Sets |\RM@papertype| to 62 --
+254mm by 178mm. BS4264 envelope; bulky A5, catalogues, brochures.
+ The name is one I invented.
+
+\asleepoption{bslegalenvelopepaper} Sets |\RM@papertype| to 63 --
+270mm by 216mm.\newline%Horrid bodge
+ BS4264 envelope; legal docs, catalogues, photos. The
+name is one I invented.
+
+\asleepoption{bslargelegalenvelopepaper} Sets |\RM@papertype| to 64 --
+305mm by 127mm. BS4264 envelope; insurance policies, legal docs. The
+name is one I invented.
+
+\asleepoption{bscalendarenvelopepaper} Sets |\RM@papertype| to 65 --
+381mm by 254mm. BS4264 envelope; bulky docs, calendars. The name is
+one I invented.
+
+\awakeoption{foolscapfoliopaper} Sets |\RM@papertype| to 70
+-- 13.5in by 8.5in
+
+\asleepoption{foolscappaper} Sets |\RM@papertype| to 70
+-- 13.5in by 8.5in
+
+\asleepoption{foolscapquartopaper} Sets |\RM@papertype| to 71
+-- 8.5in by 6.75in
+
+\asleepoption{foolscapoctavopaper} Sets |\RM@papertype| to 72
+-- 6.75in by 4.25in
+
+\asleepoption{crownfoliopaper} Sets |\RM@papertype| to 73
+-- 15in by 10in
+
+\asleepoption{crownquartopaper} Sets |\RM@papertype| to 74
+-- 10in by 7.5in
+
+\asleepoption{crownoctavopaper} Sets |\RM@papertype| to 75
+-- 7.5in by 5in
+
+\asleepoption{royalfoliopaper} Sets |\RM@papertype| to 76
+-- 20in by 12.5in
+
+\asleepoption{royalquartopaper} Sets |\RM@papertype| to 77
+-- 12.5in by 10in
+
+\asleepoption{royaloctavopaper} Sets |\RM@papertype| to 78
+-- 10in by 6.25in
+
+\asleepoption{imperialfoliopaper} Sets |\RM@papertype| to 79
+-- 22in by 15.5in
+
+\asleepoption{imperialquartopaper} Sets |\RM@papertype| to 80
+-- 15in by 11in
+
+\asleepoption{imperialoctavopaper} Sets |\RM@papertype| to 81
+-- 11in by 7.5in
+
+\asleepoption{largecrownoctavopaper} Sets |\RM@papertype| to 82
+-- 8in by 5.25in
+
+\asleepoption{demyoquartopaper} Sets |\RM@papertype| to 83
+-- 11.25in by 8.75in
+
+\asleepoption{demyoctavopaper} Sets |\RM@papertype| to 84
+-- 8.75in by 5.625in
+
+\asleepoption{mediumquartopaper} Sets |\RM@papertype| to 85
+-- 12in by 9.5in
+
+\asleepoption{mediumoctavopaper} Sets |\RM@papertype| to 86
+-- 9.5in by 6in
+
+\asleepoption{ra0paper} Sets |\RM@papertype| to 90
+-- 1270mm by 960mm
+
+\asleepoption{ra1paper} Sets |\RM@papertype| to 91
+-- 1270mm by 960mm
+
+\asleepoption{ra2paper} Sets |\RM@papertype| to 92
+-- 1270mm by 960mm
+
+\asleepoption{sra0paper} Sets |\RM@papertype| to 93
+-- 1280mm by 900mm
+
+\asleepoption{sra1paper} Sets |\RM@papertype| to 94
+-- 900mm by 840mm
+
+\asleepoption{sra2paper} Sets |\RM@papertype| to 95
+-- 640mm by 450mm
+
+\asleepoption{metricdoublecrownpaper} Sets |\RM@papertype| to 96
+-- 770mm by 505mm
+
+\asleepoption{metricquadcrownpaper} Sets |\RM@papertype| to 97
+-- 1010mm by 770mm
+
+\asleepoption{metriclargequadcrownpaper} Sets |\RM@papertype| to 98
+-- 1060mm by 820mm
+
+\asleepoption{metricquaddemypaper} Sets |\RM@papertype| to 99
+-- 1030mm by 890mm
+
+\asleepoption{metricsmallquadroyalpaper} Sets |\RM@papertype| to 100
+--\newline%Horrid bodge
+1270mm by 960mm
+
+\end{description}
+
+The long paper sizes are described in detail in
+section~\ref{optrmp:paper-sizes} on page~\pageref{optrmp:paper-sizes}.
+
+\begin{description}\shorty\squish
+
+\asleepoption{notlongpaper} Sets |\RM@longpapertypelong| to 0; not
+long---the default.
+
+\asleepoption{7/8longpaper} Sets |\RM@longpapertypelong| to 1; 7/8
+long. The selected paper size has its longest dimension multiplied by
+7/8.
+
+\awakeoption{3/4longpaper}Sets |\RM@longpapertypelong| to 2; 3/4
+long. The selected paper size has its longest dimension multiplied by
+3/4.
+
+\awakeoption{2/3longpaper}Sets |\RM@longpapertypelong| to 3; 2/3
+long. The selected paper size has its longest dimension multiplied by
+2/3.
+
+\asleepoption{5/8longpaper}Sets |\RM@longpapertypelong| to 4; 5/8
+long. The selected paper size has its longest dimension multiplied by
+2/3.
+
+\asleepoption{1/2longpaper}Sets |\RM@longpapertypelong| to 5; 1/2 long.
+The selected paper size has its longest dimension multiplied by 1/2.
+This is slightly different for asking for the next size down in an ISO
+series; these long sizes are not rounded to the nearest millimetre, as
+are standard ISO paper sizes, and code which sets things up for
+particular printer/paper combinations does not recognize 1/2 long A3
+as A4 (for example).
+
+\asleepoption{3/8longpaper}Sets |\RM@longpapertypelong| to 6; 3/8
+long. The selected paper size has its longest dimension multiplied by
+3/8.
+
+\awakeoption{1/3longpaper}Sets |\RM@longpapertypelong| to 7; 1/3
+long. The selected paper size has its longest dimension multiplied by
+1/3.
+
+\awakeoption{1/4longpaper}Sets |\RM@longpapertypelong| to 8; 1/4
+long. The selected paper size has its longest dimension multiplied by
+1/4.
+
+\asleepoption{1/8longpaper}Sets |\RM@longpapertypelong| to 9; 1/8
+long. The selected paper size has its longest dimension multiplied by
+1/8.
+
+\end{description}
+%%
+%%
+\subsection{Marginal paragraph options}
+\label{optcfg:mpars}
+
+The width of a marginal paragraph is set to the space left in the
+appropriate margin, taking into account all the limits. \rmpage
+thinks the appropriate margin is this: in the case of multi-column
+printing, the smallest margin; in the case of one sided printing,
+normal marginal paragraph placement, in the outside margin; in the
+case of one sided printing, reverse marginal paragraph placement, in
+the inside margin; in the case of two sided printing, normal marginal
+paragraph placement, in the outside margin; and in the case of two
+sided printing, reverse marginal pragraph placement, in the inside
+margin.
+
+The size is calculated on this basis: the standard \LaTeX\ length
+\comname{margin\-par\-sep} gives the space between the text body and the
+marginal paragraph. The new length \comname{RM@mparclearance} gives
+the minimum space between the outside edge of the marginal paragraph
+and the edge of the paper (subject to the additional restrictions of
+\comname{RM@minrightclearance} and \comname{RM@minleftclearance} (but
+not \comname{RM@mininsidemargin} or \comname{RM@minoutsidemargin};
+these apply to the text body only). Within these limits,
+\comname{marginparwidth} cannot be set to greater than the length
+\comname{RM@maxmparwidth}.
+
+This way of setting marginal paragraphs is derived from the standard
+\LaTeXe\ method, which uses 2\units{in} as the largest allowed size,
+and 0.4\units{in} as the minimum gap to the edge of the paper.
+\rmpage's equivalent parameters
+
+You can scale the size of \comname{marginparsep},
+\comname{RM@mparclearance}, and \comname{RM@max\-mpar\-width} using the
+\optname{mparsep}, \optname{mparclearance}, and
+\optname{maxmparwidth} option sets. Look at section~\ref{gen:mpars} on
+page~\pageref{gen:mpars} for more on marginal paragraphs.
+
+If you think that the base value of any of these lengths is too small,
+you can do something about it. With \comname{marginparsep}, you could
+use the \comname{setlength} command to set it to a different value
+before loading \rmpage. For example,
+\begin{verbatim}
+\setlength{\marginparsep}{2\marginparsep}
+\usepackage{rmpage}
+\end{verbatim}
+
+Because the other two parameters are given their initial values in
+\rmpage, this technique won't work. The initial values of
+\comname{RM@mparclearance} and \comname{RM@max\-mpar\-width} are
+calculated as a certain fraction of \comname{paperwidth}; the initial
+value of the appropriate parameter is doubled if you specify the
+\optname{largebasemparclear} or \optname{largebasemaxmparwidth}
+options. You can set either of these parameters in the configuration
+file---the values -666\units{pt} and -667\units{pt} are reserved by
+\rmpage as flag values; any positive length that's not too long is
+okay. Read the source and consider setting these parameters on a
+class-by-class basis if you do need to change them.
+
+
+%%
+%% marginparsep is scaled by option
+The \comname{mparsep} options scale the \comname{marginparsep} length
+using \comname{RM@scale\-by\-option}. See section~\ref{htw:headfootmpar}
+on page~\pageref{htw:headfootmpar} for the details.
+
+\begin{description}\shorty\squish
+\awakeoption{leastmparsep} Sets \comname{RM@mparsepoption} to 3
+\awakeoption{lessmparsep} Sets \comname{RM@mparsepoption} to 6
+\awakeoption{lessishmparsep} Sets \comname{RM@mparsepoption} to 9
+\awakeoption{normalmparsep} Default. Sets \comname{RM@mparsepoption} to 12
+\awakeoption{moreishmparsep} Sets \comname{RM@mparsepoption} to 15
+\awakeoption{moremparsep} Sets \comname{RM@mparsepoption} to 18
+\awakeoption{mostmparsep} Sets \comname{RM@mparsepoption} to 21
+\end{description}
+%%
+
+The \optname{...basemparclear} options need to be executed after
+\comname{paperwidth} has been set. Easily done with
+\comname{ProcessOptions} rather than \comname{ProcessOptions*}, and
+the papersize setting options declared above rather than below. The
+\comname{small\-base\-mpar\-clear} value is set after option processing if
+no other value has been set. If \comname{RM@mpar\-clear\-ance} is
+-666\unit{pt}, the normalbasemparclear value is set; if it's
+-667\unit{pt}, the largebaselinemparclear value is set. The larger
+value is double the smaller value. This setting is done just
+after the \comname{RM@PrinterPaperSettings} hook is executed, which is
+well after \comname{paperwidth} is set. This value is scaled by
+option (using the \comname{RM@mparclearoption} passed to the
+\comname{RM@scalebyoption} command) just before it's used, so one can
+use the \comname{RM@BeforeWidthSetting} hook to change things.
+
+\begin{description}\shorty\squish
+\asleepoption{normalbasemparclear} Default. Sets \comname{RM@mparclearance}
+to -666pt.
+\asleepoption{largebasemparclear} Sets \comname{RM@mparclearance} to -667pt
+%%
+\asleepoption{normalbasemaxmparwidth} Default. Sets \comname{RM@maxmparwidth} to -666pt
+\asleepoption{largebasemaxmparwidth} Sets \comname{RM@maxmparwidth} to -667pt
+\end{description}
+
+The gap between the edge of the paper and the edge of a marginal
+paragraph is 0.4\units{in} (10.16\units{mm}) with \LaTeX's standard
+classes. \rmpage changes this by introducing a new parameter,
+\comname{RM@mparclearance}, which is calculated as a fraction of
+\comname{paperwidth}. Normal \comname{RM@mparclearance} with A4
+portrait paper is 9.88\units{mm}; 0.4\unit{in} with US letter paper).
+
+Touch options for \comname{RM@mparclearance} and
+\comname{RM@maxmparwidth} have been added now.
+
+\begin{description}\shorty\squish
+\awakeoption{leastmparclearance} Sets \comname{RM@mparclearoption} to 3
+\awakeoption{lessmparclearance} Sets \comname{RM@mparclearoption} to 6
+\awakeoption{lessishmparclearance} Sets \comname{RM@mparclearoption} to 9
+\awakeoption{normalmparclearance} Default. Sets \comname{RM@mparclearoption} to 12
+\awakeoption{moreishmparclearance} Sets \comname{RM@mparclearoption} to 15
+\awakeoption{moremparclearance} Sets \comname{RM@mparclearoption} to 18
+\awakeoption{mostmparclearance} Sets \comname{RM@mparclearoption} to 21
+\end{description}
+
+\comname{RM@maxmparwidth} is set as a fraction of
+\comname{paperwidth}, such that with portrait US letter paper, you get
+2\units{in} as standard, just like the standard classes. It's scaled
+by option (see section~\ref{htw:headfootmpar} on
+page~\pageref{htw:headfootmpar} for the details). If you want to
+change the default base value of \comname{RM@maxmparwidth}, the
+\comname{RM@BeforeWidthSetting} hook is an ideal place to do it.
+
+\begin{description}\shorty\squish
+\awakeoption{leastmaxmparwidth} Sets \comname{RM@maxmparwidthoption} to 3
+\awakeoption{lessmaxmparwidth} Sets \comname{RM@maxmparwidthoption} to 6
+\awakeoption{lessishmaxmparwidth} Sets \comname{RM@maxmparwidthoption} to 9
+\awakeoption{normalmaxmparwidth} Default. Sets \comname{RM@maxmparwidthoption} to 12
+\awakeoption{moreishmaxmparwidth} Sets \comname{RM@maxmparwidthoption} to 15
+\awakeoption{moremaxmparwidth} Sets \comname{RM@maxmparwidthoption} to 18
+\awakeoption{mostmaxmparwidth} Sets \comname{RM@maxmparwidthoption} to 21
+\end{description}
+%%
+%%
+\subsection{Touch options}
+\label{optcfg:touchoptions}
+
+All the \optname{touch} options add or subtract one from a counter
+that is used to control the size of a page layout parameter. The
+effect of this is to give the layout parameter a size in between the
+`main' sizes. That is, if you ask for \optname{wide} and
+\optname{touchwider}, \comname{textwidth} is set to a value 1/3 of
+the way (in a geometrical sequence) from \optname{wide} to
+\optname{wider}. This results in even step sizes: \optname{wide},
+\optname{touchwider}, and \optname{t@uchwider} give a width the same
+as \optname{wider} and \optname{touchnarrower}.
+
+The \optname{touch} options are intended to be used in documents; the
+\optname{t@uch} options are intended to be used in class files. The
+reason is this: a class designer can develop a suitable layout by
+passing options to \rmpage. When this is done, the options passed to
+\rmpage can be passed using the \comname{PassOptionsToPackage}
+command in a class file. Any \optname{touch} options should be
+turned into \optname{t@uch} options, so that the controlled parameter
+can be incremented or decremented by a \optname{touch} option in a
+document. Whether this is a good thing is unclear, but it's
+certainly deliberate.
+
+Note that all the \optname{touch} options need to be executed after
+their corresponding `straight' options. To ensure this, none of the
+\optname{touch} can be allowed in an \comname{ExecuteOptions}
+statement. The \comname{RM@notinexecuteoptions} is used in each of
+these option declarations: it produces an error message if used before
+the \comname{RM@donewithoptions} flag is set true, which is
+immediately before the \comname{ProcessOptions} statement.
+
+You can find out more about the affected layout parameters by looking
+at the documentation for the main options corresponding to the
+\optname{touch} options listed here.
+
+\begin{description}\shorty\squish
+\asleepoption{t@uchlonger} Adds 1 to \comname{RM@lengthoption}
+\asleepoption{t@uchshorter} Adds -1 to \comname{RM@lengthoption}
+\awakeoption{touchlonger} Adds 1 to \comname{RM@lengthoption}
+\awakeoption{touchshorter} Adds -1 to \comname{RM@lengthoption}.
+See section~\ref{optrmp:textheight}.
+%%
+\awakeoption{touchmorecolsep} Adds 1 to \comname{RM@columnsepoption}
+\awakeoption{touchlesscolsep} Adds -1 to \comname{RM@columnsepoption}
+\asleepoption{t@uchmorecolsep} Adds 1 to \comname{RM@columnsepoption}
+\asleepoption{t@uchlesscolsep} Adds -1 to \comname{RM@columnsepoption}.
+See section~\ref{optrmp:columnsep}.
+%%
+\awakeoption{touchmoremparsep} Adds 1 to \comname{RM@mparsepoption}
+\awakeoption{touchlessmparsep} Adds -1 to \comname{RM@mparsepoption}
+\asleepoption{t@uchmoremparsep} Adds 1 to \comname{RM@mparsepoption}
+\asleepoption{t@uchlessmparsep} Adds -1 to \comname{RM@mparsepoption}.
+See section~\ref{optcfg:mpars}.
+%%
+\awakeoption{touchmorefootskip} Adds 1 to \comname{RM@footskipoption}
+\awakeoption{touchlessfootskip} Adds -1 to \comname{RM@footskipoption}
+\asleepoption{t@uchmorefootskip} Adds 1 to \comname{RM@footskipoption}
+\asleepoption{t@uchlessfootskip} Adds -1 to \comname{RM@footskipoption}.
+See section~\ref{optrmp:hfonoff}.
+%%
+\awakeoption{touchmoreheadsep} Adds 1 to \comname{RM@headsepoption}
+\awakeoption{touchlessheadsep} Adds -1 to \comname{RM@headsepoption}
+\asleepoption{t@uchmoreheadsep} Adds 1 to \comname{RM@headsepoption}
+\asleepoption{t@uchlessheadsep} Adds -1 to \comname{RM@headsepoption}.
+See section~\ref{optrmp:hfonoff}.
+%%
+\awakeoption{t@uchwider} Adds 1 to \comname{RM@widthoption}
+\asleepoption{t@uchnarrower} Adds -1 to \comname{RM@widthoption}
+\awakeoption{touchwider} Adds 1 to \comname{RM@widthoption}
+\awakeoption{touchnarrower} Adds -1 to \comname{RM@widthoption}.
+See section~\ref{optrmp:textwidth}.
+%%
+\asleepoption{t@uchmoreoffset} Adds 1 to \comname{RM@offsetoption}
+\asleepoption{t@uchlessoffset} Adds -1 to \comname{RM@offsetoption}
+\awakeoption{touchmoreoffset} Adds 1 to \comname{RM@offsetoption}
+\awakeoption{touchlessoffset} Adds -1 to \comname{RM@offsetoption}.
+See section~\ref{optrmp:margins}.
+%%
+\asleepoption{t@uchhigher} Adds -1 to \comname{RM@headfootbalance}
+\asleepoption{t@uchlower} Adds 1 to \comname{RM@headfootbalance}
+\awakeoption{touchhigher} Adds -1 to \comname{RM@headfootbalance}
+\awakeoption{touchlower} Adds 1 to \comname{RM@headfootbalance}.
+See section~\ref{optrmp:altitude}.
+%%
+\asleepoption{t@uchlessmparclearance} Adds -1 to \comname{RM@mparclearoption}
+\asleepoption{t@uchmoremparclearance} Adds 1 to \comname{RM@mparclearoption}
+\asleepoption{touchlessmparclearance} Adds -1 to \comname{RM@mparclearoption}
+\asleepoption{touchmoremparclearance} Adds 1 to \comname{RM@mparclearoption}.
+\newline% Horrid bodge
+See section~\ref{optcfg:mpars}.
+%%
+\asleepoption{t@uchlessmaxmparwidth} Adds -1 to \comname{RM@maxmparwidthoption}
+\asleepoption{t@uchmoremaxmparwidth} Adds 1 to \comname{RM@maxmparwidthoption}
+\asleepoption{touchlessmaxmparwidth} Adds -1 to \comname{RM@maxmparwidthoption}
+\asleepoption{touchmoremaxmparwidth} Adds 1 to \comname{RM@maxmparwidthoption}.
+\newline% Horrid bodge
+See section~\ref{optcfg:mpars}.
+%%
+\end{description}
+
+\subsection{More length options}
+\label{optcfg:odd-lengths}
+
+These options need to be executed after the \optname{touchlength}
+options; otherwise, they'd be in \filename{rmpage.sty}.
+
+
+Most of the \comname{textheight} setting options are in \rmpage
+proper; see \ref{optrmp:textheight} on page~\pageref{optrmp:textheight}.
+
+\begin{description}\shorty\squish
+\awakeoption{fulllength} Sets |\RM@lengthoption=30|. Makes
+\comname{textheight} as long as possible, taking into account the
+various restrictions and the need to keep \comname{textheight} to an
+integer number times \comname{baselineskip} plus \comname{topskip}.
+
+\awakeoption{stdlength} Sets |\RM@lengthoption=0|. Makes
+\comname{textheight} the size it would be if you were using the
+standard \LaTeX\ classes. I'm not sure I've checked everything that
+needs to be checked to ensure that this option always does what you'd
+expect, but I think I have. Note that \rmpage still takes notice of
+footers and headers when you use this option, so you can get the
+standard \comname{textheight} with different vertical positioning of
+the text body.
+
+\end{description}
+
+\subsection{Number of columns}
+
+If you are typesetting text in more than one column, \rmpage needs to
+know so that it can set \comname{textwidth} appropriately.
+
+The standard \LaTeX\ options \optname{onecolumn} and \optname{twocolumn}
+are recognized by \rmpage.
+
+The \optname{...columnwidth} options tell \rmpage that you will be
+typesetting your text in that number of columns, but the only effect
+of the options is to change the \comname{textwidth} calculation. If
+you want to change the number of columns that your text is set in, you
+can use a package like \packname{multicol}.
+
+\begin{ikkystuff}
+These options affect only the character-based \comname{textwidth}
+calculation---for any given width option (\optname{normalwidth},
+\optname{narrower}, or whatever) one text column is allowed to be a
+certain number of characters wide. Use the \optname{...columnwidth}
+options to tell \rmpage how many columns wide your text is, so it can
+calculate \comname{textwidth} appropriately.
+
+\rmpage makes the character-based \comname{textwidth} guess equal to a
+certain number of characters times the number of columns, plus
+\comname{columnsep} times one less than the number of columns.
+\end{ikkystuff}
+
+If your text is something like a single large table (for example, a
+timetable), it might be more appropriate to use the
+\optname{paperwidthset} option to set \comname{textwidth} using the
+paper-based \comname{textwidth} only.
+
+\begin{description}\shorty\squish
+
+\awakeoption{onecolumnwidth} Default.
+ Defines \comname{RM@textcols} to 1
+
+\awakeoption{twocolumnwidth} Defines \comname{RM@textcols} to 2
+
+\awakeoption{threecolumnwidth} Defines \comname{RM@textcols} to 3
+
+\asleepoption{fourcolumnwidth} Defines \comname{RM@textcols} to 4
+
+\asleepoption{fivecolumnwidth} Defines \comname{RM@textcols} to 5
+
+\asleepoption{sixcolumnwidth} Defines \comname{RM@textcols} to 6
+
+\asleepoption{sevencolumnwidth} Defines \comname{RM@textcols} to 7
+
+\asleepoption{eightcolumnwidth} Defines \comname{RM@textcols} to 8
+
+\asleepoption{ninecolumnwidth} Defines \comname{RM@textcols} to 9
+
+\asleepoption{tencolumnwidth} \packname{multicol}'s limit.
+Defines \comname{RM@textcols} to 10
+
+\end{description}
+%%
+%%
+\subsection{Loading founts}
+
+All the options below change how \comname{textwidth} is set, and the
+options with \optname{load} in their name also call one of the
+standard \packname{PSNFSS} packages to load the fount (aside from
+Lucida Casual and Concrete, which aren't \packname{PSFNSS} founts,
+and Courier, which is handled anomalously).
+
+\begin{ikkystuff}
+The only Lucida typeface I have is Lucida Casual, so that's the only
+Lucida typeface that \rmpage deals with explicitly. If you do use
+others, you can have an appropriate \comname{textwidth} set using the
+\optname{thisfountwidth} option.
+
+Given that the \packname{PSFNSS} distribution has support for all the
+Lucida founts, I could be persuaded to include explicit support for
+them in \rmpage if anyone's interested.
+\end{ikkystuff}
+
+Remember that \comname{textwidth} is usually set to be a certain
+number of character wide. Well, not all founts have the same number
+of characters per inch. If you say \optname{timeswidth} to \rmpage,
+it will calculate a \comname{textwidth} based on the measured average
+width of one character in Times of the specified size.
+
+This means that while the standard \LaTeX\ classes would give you a
+\comname{text\-width} that is far too wide for the Times fount (which is
+generally narrower than Computer Modern Roman), \rmpage will give you
+a \comname{textwidth} that is pretty much the same number of
+characters across, which means you retain good legibility (as well as
+similar line and page breaks).
+
+If you say \optname{loadtimes}, \rmpage changes its \comname{textwidth}
+calculation, loads the \packname{PSNFSS} package that loads the Times
+fount family, and (very important, this is) changes the typesetting
+parameters to similar values to the ones suggested by Karl Berry, the
+chap who wrote the \packname{fontinst} program that generated the
+virtual founts used to typeset the \packname{PSNFSS} founts.
+
+If you specify a looseness option yourself---see
+section~\ref{optrmp:tightness} on page~\pageref{optrmp:tightness}---it will
+over-ride the standard looseness set by a \optname{loadfount} option.
+The \optname{load\-concrete} option requests standard tight typesetting,
+and is anyway not recommended: if you want to use the concrete founts,
+try the \packname{beton} package, which does a very good job of
+setting up \LaTeX\ to use these founts. \rmpage can work happily with
+\packname{beton}: see section~\ref{optrmp:beton} on
+page~\pageref{optrmp:beton}.
+
+You can tell \rmpage to set the \comname{textwidth} based on the width
+of a fount it doesn't know about with the \optname{thisfountwidth}
+option. If you use this option, \rmpage will calculate a
+\comname{textwidth} based on the size of the fount that is current
+when \rmpage is loaded. So if you want a \comname{textwidth} based on, say,
+Grunge Update (family name fgr on my computer), you could say:
+\begin{verbatim}
+\documentclass[thisfountwidth,12pt]{article}
+\renewcommand{\rmdefault}{fgr}
+\rmfamily
+\usepackage{rmpage}
+
+\begin{document}
+
+...
+
+\end{verbatim}
+
+\rmpage will tell you which fount it is working with, and the results
+of its calculations. If you get confused by \LaTeX's fount selection
+scheme, read the manual; it confuses me too.
+
+The fount options work like this: each option sets the
+\comname{RM@fountfamily} command to a particular value. Any option
+which sets the \comname{RM@loadfount} flag true forces code later on
+in \rmpage to load the appropriate fount, most of them using one of
+the standard \packname{PSNFSS} packages. The fount loading code is
+written specially for each fount; there's no easy way to add more
+founts to the list that's already dealt with. But you could add code to
+the \comname{RM@AfterProcessOptions} hook if you want to do this; I
+suggest that this code loads the fount, selects it, and defines
+\comname{RM@fountfamily} to be 12, to make the width setting code
+measure its width. There are no hooks in \filename{rmpwnorm.pko} to
+add this sort of thing.
+
+\begin{ikkystuff}
+The thing about using the \optname{loadfount} options is that the
+standard \packname{PSNFSS} packages don't always set the default main
+document typeface (the one you get when you ask for
+\comname{rmfamily}) to be the fount you've asked for. So if you say
+\optname{loadhelvet}, you'll get a \comname{textwidth} based on the
+width of the Helvetica typeface, but Helvetica is the fount you get
+when you ask for \comname{sffamily}, which might not be what you want.
+
+The thing to do is be sure which typeface will be the main document
+face, and ask \rmpage to set the \comname{textwidth} accordingly. You
+might use the appropriate \optname{loadfount} option for this, or load
+the founts you want with separate calls to the appropriate packages in
+your document's preamble.
+\end{ikkystuff}
+
+If you don't have the file needed to load the requested fount
+family, \rmpage complains.
+
+Fount families are set like this:
+\begin{verbatim}
+0=cmr
+1=avant garde 2=bookman 3=zapf chancery 4=helvetica
+5=new century schoolbook 6=palatino 7=times 8=utopia
+9=lucida casual 10=courier 11=concrete 12=this fount width
+13=lucida casual dirty trick
+\end{verbatim}
+
+The dirty trick works like this: if you ask for
+\optname{loadlucidacasual}, rather than \optname{loadluccasua}
+(\comname{RM@fountfamily} 13), the fount loading code later on does a
+|\RequirePackage{lucida-casual}|, and then sets
+\comname{RM@fountfamily} to 9. This lets Rowland use his own
+\filename{.fd} files for Lucida Casual, and allows access to the
+standard \filename{.fd} files. The option to do this is in Rowland's
+curious option section of the configuration file.
+
+
+\begin{description}\shorty\squish
+
+\asleepoption{cmrwidth} Computer modern roman; redundant
+options.\newline% horrid bodge
+Defines \comname{RM@fountfamily} to 0
+
+\asleepoption{loadcmr} Loads nothing; does whinge a little.
+
+\awakeoption{avantwidth} Avant Garde. Defines \comname{RM@fountfamily} to 1
+
+\awakeoption{loadavant} Requires the \packname{avant} package.
+
+\awakeoption{bookmanwidth} Bookman. Defines \comname{RM@fountfamily} to 2
+
+\awakeoption{loadbookman} Requires the \packname{bookman} package.
+
+\awakeoption{chancerywidth} Zapf Chancery. Defines \comname{RM@fountfamily} to 3
+
+\awakeoption{loadchancery} Requires the \packname{chancery} package.
+
+\awakeoption{helvetwidth} Helvetica. Defines \comname{RM@fountfamily} to 4
+
+\awakeoption{loadhelvet} Requires the \packname{helvet} package.
+
+\awakeoption{newcentwidth} New Century Schoolbook. Defines \comname{RM@fountfamily} to 5
+
+\awakeoption{loadnewcent} Requires the \packname{newcent} package.
+
+\awakeoption{palatinowidth} Palatino. Defines \comname{RM@fountfamily} to 6
+
+\awakeoption{loadpalatino} Requires the \packname{palatino} package.
+
+\awakeoption{timeswidth} Times. Defines \comname{RM@fountfamily} to 7
+
+\awakeoption{loadtimes} Requires the \packname{times} package.
+
+\awakeoption{utopiawidth} Utopia. Defines \comname{RM@fountfamily} to 8
+
+\awakeoption{loadutopia} Requires the \packname{utopia} package.
+
+\awakeoption{lucasualwidth} Lucida casual. Defines \comname{RM@fountfamily} to 9
+
+\awakeoption{loadlucasual} Requires the \packname{lucasual} package.
+%% lucida-casual option is now in rmplocal.cfg
+%%
+
+\awakeoption{courierwidth} Courier. Defines \comname{RM@fountfamily} to 10
+
+\asleepoption{loadcourier} This option makes the default roman fount
+Courier. I think this is ugly and crude: you might be better off
+using the times package and \comname{ttfamily}
+
+\awakeoption{concretewidth} Concrete. Defines \comname{RM@fountfamily} to 11
+
+\asleepoption{loadconcrete} This option loads the \packname{beton}
+package and sets \comname{textwidth} for the Concrete Roman founts.
+
+\awakeoption{thisfountwidth} Bases \comname{textwidth} on the current
+fount.\newline% horrid bodge
+Defines \comname{RM@fountfamily} to 12
+
+%%
+\end{description}
+
+\subsection{Stuff for beton support}
+
+\begin{description}\shorty\squish
+\awakeoption{standard-baselineskips} Passes this option to
+\packname{beton} so \rmpage can detect whether this option's been
+passed to \packname{beton}.
+\asleepoption{oldstyle-equation-numbers} Passes this option to
+\packname{beton}.
+\asleepoption{concrete-math} Passes this option to
+\packname{beton}.
+\end{description}
+%%
+%%
+\subsection{Other synonyms for some options}
+
+Why oh why oh why do I have to make my package speak US English?
+(mutter mumble grumble). Yes, all right, it's how the convention's
+worked out. And I've put the original options to change the
+\comname{today} command here too. (It's like this: I once had a
+\LaTeX~2.09 style file called \packname{nicedate} that changed the
+\comname{today} command into something I liked. Then I wrote \rmpage,
+and included the \packname{nicedate} code, activated by the
+\optname{nicedate} option. Obviously, the \optname{nicedate} option
+needed a complementary option, and the obvious name for this option
+was \optname{nastydate}, which eventually got turned into
+\optname{othernicedate}. After I started turning \rmpage into
+something for the rest of the world to look at (which it wasn't
+originally), I added the \optname{ukdate} and \optname{usdate}
+options. But I still like \optname{nicedate}, so I've kept it. So
+there.)
+
+\begin{description}\shorty\squish
+
+\awakeoption{othernicedate} The same as \optname{usdate}; does nothing
+
+\awakeoption{nicedate} The same as \optname{ukdate}; changes date
+format.
+
+\asleepoption{verbose} Synonym for chatty
+\asleepoption{silent} Synonym for yorkshire
+\asleepoption{errorshow} Synonym for yorkshire
+\asleepoption{warningshow} Synonym for taciturn
+\asleepoption{infoshow} Synonym for chatty
+\asleepoption{debugshow} Synonym for garrulous
+
+
+%%
+%% And I object to this, I really do. Why can't people learn to
+%% spell properly?
+%%
+
+\asleepoption{center} The same as \optname{centre}
+
+\asleepoption{notcenter} The same as \optname{notcentre}
+
+\end{description}
+%%
+\subsection{Margin options}
+\label{optcfg:margins}
+
+\begin{description}\shorty\squish
+
+\awakeoption{ringbinding} This option sets the minimum allowed inside
+margin to be at least 15\units{mm} if you are printing in portrait
+orientation. It's in the config file because it must be executed
+after the \optname{landscape} and \optname{portrait} options. It does
+nothing but warn you if you use it in landscape orientation.
+
+Beware that this option takes no notice of long paper sizes at all,
+and is likely to give iffy results if you combine it with them. If
+you have any thoughts about this option, please email me---I'm not
+terribly happy with it.
+
+\end{description}
+
+\subsection{Printer options}
+\label{optcfg:printers}
+
+Each printer option must set these ten parameters:
+
+\begin{description}\shorty\squish
+
+\item[\comname{RM@printertype}] A code number, defined below. This
+number is used by \rmpage to keep track of the printer used; you can
+tell \rmpage to do things for certain printers and not for others.
+
+\item[\comname{RM@ptrrportclear}] The non-printing margin on the
+right-hand side in portrait orientation
+
+\item[\comname{RM@ptrlportclear}] The non-printing margin on the
+left-hand side in portrait orientation
+
+\item[\comname{RM@ptrtportclear}] The non-printing margin at the
+top in portrait orientation
+
+\item[\comname{RM@ptrbportclear}] The non-printing margin at the
+bottom in portrait orientation
+
+\item[\comname{RM@ptrrlandclear}] The non-printing margin on the
+right-hand side in landscape orientation
+
+\item[\comname{RM@ptrllandclear}] The non-printing margin on the
+left-hand side in landscape orientation
+
+\item[\comname{RM@ptrtlandclear}] The non-printing margin at the
+top in landscape orientation
+
+\item[\comname{RM@ptrblandclear}] The non-printing margin at the
+bottom in landscape orientation
+
+\item[\comname{RM@ptrpostol}] Nominally, the amount you expect the
+position of the paper to vary. The value of this command is added to
+each of the \comname{ptr...clear} parameters before they are used.
+
+\end{description}
+
+Printer types are:
+\par
+\noindent
+\begin{tabbing}
+0=fullbleed \= 1=general \= 2=pessimistic \= 3=optimistic\\
+10=dw300 \> 11=dw500 \> 12=dw600 \> (HP deskwriter inkjet series)\\
+20=lj2 \> 21=lj3 \> 22=lj4 \> (HP laserjet laser printer series)\\
+30=canonbjx (Canon bubblejet flurble) \\
+40+ others (whatever comes up)\\
+1000+ local printers to avoid clashes\\
+\end{tabbing}
+
+The figures for all these printers are guesses, except for the DW500
+and DW600: any data on printing margins for the printers above or
+other commonly-used printers would be gratefully received. I need to
+know about printing limits at the top, bottom, left, and right for
+portrait and landscape modes, and whether the data is what the book
+says or what you measured (preferrably both, but anything'll help).
+If anyone really uses \LaTeX\ with an A3 printer, do tell: it's
+something I've been wondering about.
+
+When I've got a better idea of what's going on, I'll define more
+printer options.
+
+\comname{RM@ptrpostol} generally set to 1\unit{mm} (paper sizes are to
+$\pm2$\unit{mm}), except for our DW520 which I keep a careful eye on.
+
+\begin{description}\shorty\squish
+
+\awakeoption{fullbleedprinter} Lets you print all the way to the
+edge of the paper.
+\begin{verbatim}
+\def\RM@printertype{0}
+\def\RM@ptrrportclear{0mm} \def\RM@ptrrlandclear{0mm}
+\def\RM@ptrlportclear{0mm} \def\RM@ptrllandclear{0mm}
+\def\RM@ptrtportclear{0mm} \def\RM@ptrtlandclear{0mm}
+\def\RM@ptrbportclear{0mm} \def\RM@ptrblandclear{0mm}
+\def\RM@ptrpostol{0mm}
+\end{verbatim}
+
+\awakeoption{generalprinter} Arbitrary settings that probably ensure
+a layout inside the printing area on most A4 printers.
+\begin{verbatim}
+\def\RM@printertype{1}
+\def\RM@ptrrportclear{8mm} \def\RM@ptrrlandclear{8mm}
+\def\RM@ptrlportclear{8mm} \def\RM@ptrllandclear{8mm}
+\def\RM@ptrtportclear{8mm} \def\RM@ptrtlandclear{8mm}
+\def\RM@ptrbportclear{15mm} \def\RM@ptrblandclear{15mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\asleepoption{pessimisticprinter} This uses the worst limits I can remember
+meeting, so it force documents inside the printing area on any printer.
+\begin{verbatim}
+\def\RM@printertype{2}
+\def\RM@ptrrportclear{10mm} \def\RM@ptrrlandclear{19mm}
+\def\RM@ptrlportclear{10mm} \def\RM@ptrllandclear{10mm}
+\def\RM@ptrtportclear{10mm} \def\RM@ptrtlandclear{10mm}
+\def\RM@ptrbportclear{19mm} \def\RM@ptrblandclear{10mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\asleepoption{optimisticprinter} This uses the best limits I'd expect
+from a real printer.
+\begin{verbatim}
+\def\RM@printertype{3}
+\def\RM@ptrrportclear{3mm} \def\RM@ptrrlandclear{3mm}
+\def\RM@ptrlportclear{3mm} \def\RM@ptrllandclear{3mm}
+\def\RM@ptrtportclear{3mm} \def\RM@ptrtlandclear{3mm}
+\def\RM@ptrbportclear{3mm} \def\RM@ptrblandclear{3mm}
+\def\RM@ptrpostol{0.5mm}
+\end{verbatim}
+
+\asleepoption{dw300printer} A guess.
+\begin{verbatim}
+\def\RM@printertype{11}
+\def\RM@ptrrportclear{6mm} \def\RM@ptrrlandclear{15mm}
+\def\RM@ptrlportclear{6mm} \def\RM@ptrllandclear{7mm}
+\def\RM@ptrtportclear{7mm} \def\RM@ptrtlandclear{6mm}
+\def\RM@ptrbportclear{15mm} \def\RM@ptrblandclear{6mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\asleepoption{dw500printer} Hewlett-Packard's specification for its
+DeskWriter and DeskJet 500/510/520/540 printers.
+\begin{verbatim}
+\def\RM@printertype{11}
+\def\RM@ptrrportclear{6mm} \def\RM@ptrrlandclear{15mm}
+\def\RM@ptrlportclear{6mm} \def\RM@ptrllandclear{7mm}
+\def\RM@ptrtportclear{7mm} \def\RM@ptrtlandclear{6mm}
+\def\RM@ptrbportclear{15mm} \def\RM@ptrblandclear{6mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\awakeoption{dw600printer} Measured from a particular HP 600 series
+inkjet printer, with a bit added.
+\begin{verbatim}
+\def\RM@printertype{12}
+\def\RM@ptrrportclear{5mm} \def\RM@ptrrlandclear{15mm}
+\def\RM@ptrlportclear{5mm} \def\RM@ptrllandclear{2mm}
+\def\RM@ptrtportclear{2mm} \def\RM@ptrtlandclear{5mm}
+\def\RM@ptrbportclear{15mm} \def\RM@ptrblandclear{5mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\asleepoption{lj2printer} an arbitrary guess
+\begin{verbatim}
+\def\RM@printertype{20}
+\def\RM@ptrrportclear{7mm} \def\RM@ptrrlandclear{7mm}
+\def\RM@ptrlportclear{7mm} \def\RM@ptrllandclear{7mm}
+\def\RM@ptrtportclear{7mm} \def\RM@ptrtlandclear{7mm}
+\def\RM@ptrbportclear{7mm} \def\RM@ptrblandclear{7mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\asleepoption{lj3printer} an arbitrary guess
+\begin{verbatim}
+\def\RM@printertype{21}
+\def\RM@ptrrportclear{6mm} \def\RM@ptrrlandclear{6mm}
+\def\RM@ptrlportclear{6mm} \def\RM@ptrllandclear{6mm}
+\def\RM@ptrtportclear{6mm} \def\RM@ptrtlandclear{6mm}
+\def\RM@ptrbportclear{6mm} \def\RM@ptrblandclear{6mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\asleepoption{lj4printer} an arbitrary guess
+\begin{verbatim}
+\def\RM@printertype{22}
+\def\RM@ptrrportclear{5mm} \def\RM@ptrrlandclear{5mm}
+\def\RM@ptrlportclear{5mm} \def\RM@ptrllandclear{5mm}
+\def\RM@ptrtportclear{5mm} \def\RM@ptrtlandclear{5mm}
+\def\RM@ptrbportclear{5mm} \def\RM@ptrblandclear{5mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\asleepoption{canonbjxprinter} an arbitrary guess
+\begin{verbatim}
+\def\RM@printertype{22}
+\def\RM@ptrrportclear{7mm} \def\RM@ptrrlandclear{12mm}
+\def\RM@ptrlportclear{7mm} \def\RM@ptrllandclear{7mm}
+\def\RM@ptrtportclear{7mm} \def\RM@ptrtlandclear{7mm}
+\def\RM@ptrbportclear{12mm} \def\RM@ptrblandclear{7mm}
+\def\RM@ptrpostol{1mm}
+\end{verbatim}
+
+\end{description}
+
+\subsection{Rowland's curious options}
+
+
+These are curious options, defined by me (RJMM) to perform dark and
+eldritch deeds. These aren't intended for hoi polloi, mainly 'cos
+they're a bit iffy in places, but I like them and they might give
+you some ideas.
+
+
+Our DW520 isn't quite to spec.
+
+\begin{description}\shorty\squish
+
+\awakeoption{R+R-dw520printer}
+\begin{verbatim}
+\def\RM@printertype{2}
+\def\RM@ptrrportclear{7mm} \def\RM@ptrrlandclear{15mm}
+\def\RM@ptrlportclear{6mm} \def\RM@ptrllandclear{7mm}
+\def\RM@ptrtportclear{7mm} \def\RM@ptrtlandclear{7mm}
+\def\RM@ptrbportclear{15mm} \def\RM@ptrblandclear{6mm}
+\def\RM@ptrpostol{0.5mm}
+\end{verbatim}
+
+\awakeoption{lucidacasualwidth} Lucida casual
+Defines \comname{RM@fountfamily} to 9
+
+\awakeoption{loadlucidacasual} A dirty trick to load my .fd version of
+lucida casual rather than the PSNFSS version. If you
+\optname{loadlucidacasual}, \comname{RM@fountfamily} is set to 9 after
+the \packname{lucida-casual} package has been
+\comname{RequirePackage}d. That's done by code further on in rmpage,
+specially written for this dirty trick.
+\end{description}
+
+I have written packages that do the same job as the standard
+\filename{size10.clo} etc., files, but for larger sizes. Because the
+standard \LaTeX\ \comname{@ptsize} parameter is intended to be a
+single digit, and I want to use several different sizes, I have
+defined a new parameter that holds the point size of the main body
+type, the command \comname{RM@ptsize}. This parameter is only
+defined for my larger sizes.
+
+Because my size packages can be loaded before or after \rmpage, and
+because both need to know about the point size, \rmpage says
+\begin{verbatim}
+\providecommand{\RM@ptsize}{666}
+\end{verbatim}
+before the extra size options are executed. The options set
+\comname{RM@ptsize} to the appropriate value if this hasn't already
+been done. All my other packages that recognize the larger point size
+options do something similar.
+
+The other thing that \rmpage does with these larger point size
+options is set \comname{@ptsize} to the 12\unit{pt} value; this is to
+fool sections of \rmpage into thinking that it's dealing with a
+12\units{pt} fount.
+
+\begin{description}\shorty\squish
+\awakeoption{14pt} Sets \comname{RM@ptsize} to |14| if needed and
+sets \comname{@ptsize} to 2 (meaning 12\units{12}, to fool \rmpage)
+\awakeoption{24pt} Sets \comname{RM@ptsize} to |24| if needed and
+sets \comname{@ptsize} to 2 (meaning 12\units{12}, to fool \rmpage)
+
+\awakeoption{36pt} Sets \comname{RM@ptsize} to |36| if needed and
+sets \comname{@ptsize} to 2 (meaning 12\units{12}, to fool \rmpage)
+
+\end{description}
+
+
+
+
+
+
+\chapter{How things work}
+\label{chap:htw}
+
+\section{\comname{textheight} calculation}
+\label{htw:textheightcalculation}
+
+The way \rmpage decides on the value of \comname{textheight} is this:
+the length options set a length called
+\comname{RM@totalheadfootclearance} to be certain fraction of the
+\comname{paperheight}. The value of this command will be the sum of
+the blank space above the header and below footer, after it has been
+checked against several restrictions.
+
+\begin{ikkystuff}
+If the \optname{noheaders} option has used, \comname{headheight} and
+\comname{headsep} are both set to 0\units{pt}; if the
+\optname{nofooters} option has been used, \comname{footskip} is set
+to 0\units{pt}. So a given length option will fill the page to the
+same extent whether or not headers or footers are used; turning
+headers and footers off will increase \comname{textheight}.
+\end{ikkystuff}
+
+The first check that's made is that the \comname{textheight} produced
+by this value of \comname{RM@totalheadfootclearance} will not exceed
+the bounds set by \comname{RM@mintextheight} and
+\comname{RM@maxtextheight}. These two commands are intended to be set
+by local code on a class-by-class basis in the configuration file,
+using the \comname{RM@OnClassType} command in the
+\comname{RM@AfterProcessOptions} hook, and define the allowed range of
+\comname{textheight}.
+%
+This check defines the commands:
+\begin{verbatim}
+\RM@maxpractextheight and \RM@mintotalheadfootclearance
+\RM@minpractextheight and \RM@maxtotalheadfootclearance
+\end{verbatim}
+They are calculated from the user supplied limits; they are based on the
+largest and smallest values that \comname{textheight} is allowed to
+have, given the limits of the discrete values it is allowed to take.
+The \comname{practextheight} parameters are unused at the moment;
+they might come in handy one day.
+
+The total space above and below the footer is divided into two: a
+certain fraction of this space to the gap at the top, the rest to the
+gap at the bottom. These two lengths are saved in
+\comname{RM@totalheadclearance} and \comname{RM@totalfootclearance}.
+The \optname{altitude} options control this division of space---see
+section~\ref{optrmp:altitude} on page~\pageref{optrmp:altitude}.
+
+Checks are then made to ensure that nothing will be printed outside
+the allowed printing region along the vertical axis. This is defined
+by the lengths \comname{RM@minheadclearance} and
+\comname{RM@minfootclearance}, which are initially set to the
+non-printing margin top and bottom. \rmpage ensures that these two
+lengths are at least as large as either \comname{RM@mintopmargin} or
+\comname{RM@minbottommargin}, as appropriate---these two parameters
+are intended to be set class-by-class, so you can ensure that your
+layout meets regulations, for example.
+
+\rmpage issues warnings if it decides to make either the top or bottom
+gap larger to fit the text inside the printing region. The warnings
+are issued because changing the top or bottom gap changes the
+\comname{textheight} and vertical position of the text on the page;
+you might have been expecting a smooth increment from the last
+\optname{altitude} or \comname{length} option, or a particular balance
+of space above and below the text given by a particular
+\optname{altitude} option, and it might be useful to know that you've
+not got what you might expect.
+
+
+Finally, \comname{textheight} is set to a value such that:
+\begin{displaymath}
+|\textheight| = \mathrm{integer} \times |\baselineskip| + |\topskip|
+\end{displaymath}
+
+The values of the three \comname{RM@total...clearance} parameters are
+increased to match the reduction in the size of \comname{textheight},
+and \comname{topmargin} is set to whatever it needs to be.
+
+The apparently special case of \optname{stdlength} is handled by
+setting \comname{RM@totalheadfootclearance} to a value that will
+yield the same \comname{textheight} as the standard classes; the
+\classname{book}, \classname{article}, \classname{report}, and
+\classname{letter} classes use one value; the \classname{slides}
+class another. Have a look at \filename{rmpage.dtx} and the standard
+class files to see how this is done. Note that \rmpage gives you the
+same \comname{textheight} as the standard classes whether or not you
+are using headers or footers---the number of text body lines on the
+page is always the same (at least, it always has been in testing).
+There are exceptions to this: it is possible to ask \rmpage to
+position a \optname{stdlength} page on the paper in such a fashion
+that the text would end up outside the printable region. In this
+case, \rmpage will issue a warning and reduce \comname{textheight} to
+fit inside the allowed area.
+
+\begin{ikkystuff}
+The parameters that define the available printing region along the
+vertical axis are \comname{RM@minheadclearance} and
+\comname{RM@minfootclearance}. The values of these
+\comname{RM@...clearance} parameters are set printer by printer, and
+possibly paper-size by paper-size. \rmpage ensure that they are at
+least as large as either {RM@mintopmargin} or
+\comname{RM@minbottommargin}, as appropriate.
+
+If the particular combination of printer and paper has set the flag
+\comname{RM@jackup} to be true, \rmpage will lift the printing region
+to clear an over-large non-printing margin at the bottom of the page.
+This is useful for people with Hewlett-Packard inkjet printers. There
+is no similar facility for automatically lowering the printing region
+or shifting it sideways. This is because a larger than expected
+space at the bottom of the page is rarely a problem, but lower than
+normal or shifted sidedways is usually a problem. These effects may
+be achieved, but you have to do it by using options to have the
+specific effect you want.
+
+Each printer option must define the commands:
+\begin{center}
+\begin{tabular}{lll}
+\comname{RM@ptrrportclear}&\comname{RM@ptrlportclear}&\comname{RM@ptrtportclear}\\
+\comname{RM@ptrbportclear}&\comname{RM@ptrrlandclear}&\comname{RM@ptrllandclear}\\
+\comname{RM@ptrtlandclear}&\comname{RM@ptrblandclear}&\comname{RM@ptrpostol}\\
+\end{tabular}
+\end{center}
+
+They define the non-printing clearances in
+landscape and portrait orientation, and the assumed maximum positional
+error. Code can be added in the \comname{RM@PrinterPaperSettings}
+hook to set particular clearances for particular combinations of
+printer and paper (to cope with, for example, the 19\units{mm}
+non-printing margin at the bottom of an envelope fed into an HP
+DeskWriter 520, which is much larger than the 15\units{mm}
+non-printing margin at the bottom of a normal bit of paper).
+
+
+The \packname{beton} package changes \comname{baselineskip}, but does
+so at the start of the document, using the \comname{AtBeginDocument}
+hook provided by standard \LaTeX. \rmpage needs to know what the
+\comname{baselineskip} of the main document fount will be. To get
+round this problem, \rmpage steals some code from \packname{beton} so
+it can set \comname{baselineskip} to the value it will have after
+\comname{AtBeginDocument}. When the vertical page parameters have
+been calculated, \rmpage puts \comname{baselineskip} back to its
+initial value.
+
+None of this happens unless you load the \packname{beton} package, and
+specify the \packname{beton} option to \rmpage. If you don't want
+\rmpage to use \packname{beton}'s \comname{baselineskip}, specify the
+\optname{nobeton} option to \rmpage. Note that you must load the
+\packname{beton} package before you load \rmpage. Sorry.
+\end{ikkystuff}
+
+\section{\comname{textwidth} calculation}
+\label{htw:textwidthcalculation}
+
+The way \comname{textwidth} is worked out is this: two different
+\comname{textwidth} initial guesses are calculated---one based on the
+width of a certain number of characters allowed in each column, the
+other based on a certain fraction of \comname{paperwidth}---and the
+smaller one is used as the basis for the final \comname{textwidth}.
+The particular number of characters and fraction of \comname{paperwidth}
+is set by the \optname{width} option specified. The default
+\optname{normalwidth} option gives a character-based width very close
+to standard, but the paper-based width is quite a bit larger than
+standard. This is only significant when \rmpage uses the paper-based
+width, as it usually does when you are printing on A5 paper.
+
+\begin{ikkystuff}
+The technique of choosing the smaller of two \comname{textwidth}s:
+one based on the number of characters, and the other based on the
+size of the paper, was derived from the standard classes' way of doing
+things---a fixed width (different for each size) is compared to
+$\mbox{\comname{paperwidth}}-2\units{in}$, and the smaller is used. The
+fixed width is different for each size; the conventional classes use
+hardwired sizes, and the \classname{slides} class uses $65/2 \times
+\mbox{width of (|\hbox{\rmfamily im}|)}$.
+
+\rmpage asks for a normal text-based width based on the same number of
+characters as the standard widths, and compares this to a paper-based
+width that is calculated as $0.7138 \times \mbox{\comname{paperwidth}}$. The
+fraction used gives a larger \comname{textwidth} than the standard
+classes when typesetting on A5 paper, but a smaller \comname{textwidth}
+when typesetting large founts on A4 paper.
+
+The normal character-based \comname{textwidth} calculated by \rmpage
+is different to that calculated by the standard classes because the
+standard classes round calculated dimensions down to the next lowest
+integer number of points. I think this is a mistake, because it
+introduces an unnecessary error in margin sizes, so \rmpage doesn't do
+it (unless you're asking for \optname{stdwidth}, which does truncates
+the calculated value of \comname{textwidth} only).
+
+The special widths: \optname{oneinchmargins},
+\optname{halfinchmargins}, and \optname{fullwidth}, all set the
+paper-based textwidth to a fixed value to leave the specified amount
+of space either side, assuming that you have asked for
+\optname{centre}d printing (\optname{fullwidth} leaves no space).If
+you haven't, the total space either side will add up to what you'd
+expect, but you can get 1.5\units{in} on one side, and 0.5\units{in}
+on the other, for example, if you're using \optname{oneinchmargins}.
+
+\optname{stdwidth} sets both the paper and character-based initial
+guesses to the same value as the standard classes. If the selected
+initial \comname{textwidth} value isn't reduced, the result will be
+the same as the standard classes' calculations (insert standard
+disclaimer here---not because I'm afraid of being sued, but because I
+think you should check that the value of \comname{textwidth} is what
+it should be if it's really important. This is because I think this
+is a complicated piece of software because \TeX's piggin' awful for
+doing maths, and I've not verified the algorithm to my own
+satisfaction. I have tested it, and it appears to work the way I
+want, so that'll have to do for now.)
+
+\end{ikkystuff}
+
+The first check ensures that this first guess is within the bounds of
+\comname{RM@mintextwidth} or \comname{RM@maxtextwidth}. If it's not,
+it's made big or small enough.
+
+\begin{ikkystuff}
+If you've asked for \optname{characterwidthset}, then the paper-based
+\comname{textwidth} is set to a large value; similarly, if you've
+asked for \optname{paperwidthset}, the character-based
+\comname{textwidth} is set to a large value. If you've asked for an
+inherently paper-based width like \optname{oneinchmargins}, both the
+paper and character-based \comname{textwidth}s are set to the
+appropriate value. So if you also ask for
+\optname{characterwidthset}, \rmpage will give you
+\optname{oneinchmargins} anyway, and a complaint.
+\end{ikkystuff}
+
+Now the smallest of the two \comname{textwidth}s is selected as the
+one to use for real, and \rmpage calculates \comname{evensidemargin}
+based on the requested offset---the proportions in which the available
+horizontal space is divided between the larger and smaller margins
+(see section~\ref{optrmp:margins} on page~\pageref{optrmp:margins} for the
+details).
+
+\begin{ikkystuff}
+When \rmpage checks \comname{textwidth}, it takes into account
+whether you're printing two sided or not. The checking code looks a
+bit complicated, because there are two sets of limits that apply to
+the horizontal extent of the text: \comname{RM@minrightclearance} and
+\comname{RM@minleftclearance}; and \comname{RM@minoutsidemargin} and
+\comname{RM@mininsidemargin}. \rmpage looks at the appropriate limits.
+
+The \comname{left} and \comname{right} \comname{minclearance}
+parameters define the possible printing region, as set for the
+requested printer and paper combination; all text must fit inside
+these limits. The \comname{inside} and \comname{outside}
+\comname{minmargin} parameters define the permitted extent of the main
+body text, excluding marginal paragraphs. The \comname{minmargin}
+parameters are defined to be |0pt| by default; they were introduced so
+that I could write a thesis class which had to ensure particular
+minimum margins to meet the regulations. You can see how I used them
+in the \comname{RM@AfterProcessOptions} hook definition in the
+configuration file.
+\end{ikkystuff}
+
+If \comname{evensidemargin} is too small to allow the text to print
+on the page, it is increased, and \comname{textwidth} decreased to
+maintain the requested offset proportions.
+
+Then the right-hand edge of \comname{textwidth} is checked to ensure
+that it is within the allowed printing region. If it's not,
+\comname{textwidth} is reduced. If so, \comname{evensidemargin} must
+be increased to maintain the requested offset proportions, and
+\comname{textwidth} reduced by the same amount to keep the right-hand
+margin the same size.
+
+
+\begin{ikkystuff}
+If you've asked for \comname{fullwidth}, \rmpage won't attempt to
+retain the offset proportions, nor will it issue as many warnings
+about decreasing things to fit.
+\end{ikkystuff}
+
+When that's done, \comname{oddsidemargin} is set to the appropriate
+value: equal to \comname{evensidemargin} if you've asked for one sided
+or centred printing; or equal to the right-hand margin on an
+even-numbered page if you're printing two sided and not centred.
+
+And finally, \rmpage checks that the final value of
+\comname{textwidth} is still larger than \comname{RM@mintextwidth}.
+If it's not, \rmpage can't do anything about it, so just issues an
+error message.
+
+
+\section{Hooks}
+\label{htw:hooks}
+
+There's five hooks:
+
+\begin{tabbing}
+\comname{RM@BeforeProcessOptions}, \= \comname{RM@AfterProcessOptions},\\
+\comname{RM@PrinterPaperSettings}, \\
+\comname{RM@BeforeWidthSetting}, \> \comname{RM@AfterWidthSetting}.\\
+\end{tabbing}
+
+\begin{description}\shorty
+
+\item[\comname{RM@BeforeProcessOptions}] This hook is executed just
+before \comname{ProcessOptions}, and before the \comname{RM@donewithoptions}
+flag has been set to true, so options which can only be
+specified in an \comname{ExecuteOptions} statement can be requested.
+
+\item[\comname{RM@AfterProcessOptions}] This hook is executed well after
+\comname{ProcessOptions}. It is executed after most of the fiddling
+about prior to working out page parameters has been done, just after
+the current class has been identified, but before class-specific code
+is executed. This is the hook to use if you want to add a new class:
+you should preferably set \comname{RM@classtype} with a new option,
+declared either directly in the config file, or by using the
+\comname{RM@BeforeProcessOptions} hook. Then put class-specific code in
+the \comname{RM@AfterProcessOptions} hook; use the \comname{RM@OnClassType}
+command.
+
+\item[\comname{RM@PrinterPaperSettings}] This hook is executed after the
+standard printer/paper specific code has been executed. Use the
+\comname{RM@OnPrinterType}, \comname{RM@OnPortraitPaperType},
+\comname{RM@OnLandscapePaperType}, and \comname{RM@On\-Paper\-Type} commands
+here.
+
+\item[\comname{RM@BeforeWidthSetting}] If you want to use a different
+file for width setting, define \comname{RM@widthsetter} to be the name of the
+file in this hook. The \comname{RM@OnClassType} command can be used to
+select which class this file should be used for. This hook is
+executed after the \comname{RM@OnClassType} command has been set by the
+standard code, and just before the width setting file is loaded.
+
+\item[\comname{RM@AfterWidthSetting}] This hook is executed on returning
+from the width setting file. It's here for \ae sthetic reasons.
+
+\end{description}
+
+\section{Marginal paragraphs}
+\label{htw:mpars}
+
+There is more on setting the size of marginal paragraphs in
+section~\ref{htw:headfootmpar} on page~\pageref{htw:headfootmpar}.
+
+If you are going to use marginal notes in your document, ensure that
+you specify \comname{normalmarginpar} or \comname{reversemarginpar}
+\emph{before} loading \rmpage. This is because \rmpage calculates the
+size of marginal paragraphs based on the space available, and if
+\rmpage thinks you're going to put marginal notes in the margin which
+is largest, and you really put them in the margin that is smallest,
+it'll get the calculation wrong and you'll have marginal notes that
+don't fit on the page.
+
+If you're going to switch between \comname{normalmarginpar} and
+\comname{reversemarginpar} in your document, select whichever one puts
+the marginal notes in the smallest margin before you load \rmpage.
+Messy, I know---sorry.
+
+The standard \LaTeX\ classes, report and article, create marginal
+paragraphs that are a fixed distance away from the text, with a
+minimum clearance from the edge of the paper of 0.8in (one sided
+printing), or 0.4in (two sided printing), and a maximum
+width of 2in.
+
+\rmpage says yah boo sucks to all this.
+
+\section{Dealing with different classes}
+
+\rmpage gives each class a number; the number of the current class is
+stored in the command \comname{RM@classtype}. Classes are detected in
+\rmpage, and in the config file. More than one class can have been
+loaded; the idea is that the first loaded class is defined as the
+current class.
+
+\section{Different paper types and printers}
+\label{htw:paperprinter}
+
+\rmpage knows about non-printing margins, and about different paper
+sizes and orientations. Each printer has its own defined
+non-printing margins, which are used to calculate the non-printing
+margins for each paper size.
+
+The non-printing margins for the selected paper size are calculated and
+stored in the commands:
+
+\begin{tabbing}
+\comname{RM@minrightclearance} \= \comname{RM@mintopclearance} \\
+\comname{RM@minleftclearance} \> \comname{RM@minbottomclearance} \\
+\end{tabbing}
+
+Each printer option must define nine commands so that \rmpage can
+calculate the non-printing margins for each paper size. These
+commands to define the non-printing margins for each printer are:
+
+\begin{tabbing}
+Portrait orientation non-printing margins:\\
+\comname{RM@ptrrportclear} \= right-hand side\\
+\comname{RM@ptrlportclear} \> left-hand side\\
+\comname{RM@ptrbportclear} \> bottom edge \\
+\comname{RM@ptrtportclear} \> top edge \\
+Landscape orientation non-printing margins:
+\comname{RM@ptrrlandclear} \> right-hand side\\
+\comname{RM@ptrllandclear} \> left-hand side\\
+\comname{RM@ptrblandclear} \> bottom edge \\
+\comname{RM@ptrtlandclear} \> top edge \\
+Assumed maximum positional error:
+\comname{RM@ptrpostol} \\
+\end{tabbing}
+
+The \comname{RM@ptrpostol} command holds a length which is added to
+the \comname{RM@minclearance} values right at the end of the
+non-printing margin calculations, \emph{after} the
+\comname{RM@PrinterPaperSettings} hook has been executed. Properly
+speaking, there should be four of these: one for left-right error and
+one for up-down error in both portrait and landscape orientation, but
+I think that one is probably adequate. The standard printer types set
+\comname{RM@ptrpostol} to 1\units{mm}.
+
+\rmpage works out which printer clearance parameters to use as the
+non-printing margins like this;
+
+\begin{enumerate}
+
+\item The flag \comname{RM@portrait} is set true if you are printing
+in portrait orientation, false if you are printing landscape.
+
+\item The flag \comname{RM@portlandinvert} is set true if you are
+using a long paper size which reduces the length of the parent paper
+size to less than the width of the parent paper size.
+
+\item
+\begin{tabbing}
+if \= (|\RM@portrait| and not |\RM@portlandinvert|) \\
+\> or (not |\RM@portrait| and |\RM@portlandinvert|)\\
+then use the |portclear| parameters \\
+\end{tabbing}
+
+\item
+\begin{tabbing}
+if \= (|\RM@portrait| and |\RM@portlandinvert|) \\
+\> or (not |\RM@portrait| and not |\RM@portlandinvert|)\\
+then use the |landclear| parameters\\
+\end{tabbing}
+
+\item If you are using a long paper size that is greater than half the
+parent size, set to 0\unit{pt} the non-printing margin at the edge
+where you cut the parent size to create the long size (assumed to be
+either the right-hand or bottom edge).
+
+\item Execute the \comname{RM@PrinterPaperSettings} hook
+
+\item Add the value of the command \comname{RM@ptrpostol} to the
+non-printing margins
+
+\end{enumerate}
+
+
+\section{Headers, footers, and marginal paragraphs}
+\label{htw:headfootmpar}
+
+This section looks at how to control the size of the gap between the
+main body text and: headers, footers, and marginal paragraphs, as well
+as the gap between marginal paragraphs and the edge of the paper, the
+maximum width of marginal paragraphs, and the gap between columns of
+text in a multiple-column layout.
+
+The details of how the size of marginal paragraphs is calculated are
+in section~\ref{htw:mpars} on page~\pageref{htw:mpars}.
+
+Some lengths used as page layout parameters are set to their final
+values by the command:
+\begin{verbatim}
+\RM@scalebyoption{<length to be scaled>}{<option number>}
+\end{verbatim}
+The |<length to be scaled>| is multiplied by a factor controlled the
+the |<option number>|. The option number is set to 12 by
+default (which means multiply by one), and is allowed to range from 1
+to 23. The multipliers are in a geometrical sequence from 0.3263 to
+3.0646. The option |least...| sets the option number to 3, and gives
+a multiplier of 0.4. The option |most...| set the option number to
+21, and gives a multiplier of 2.5. The |touchmore...| and
+|touchless...| options add or subtract one from the option number, as
+do the |t@uchmore...| and |t@uchless...| options (which are reserved
+for use by class files).
+
+These following lengths are scaled by option; the name of the counter
+storing the controlling option number is given in each case.
+
+\begin{enumerate}
+\item \comname{headsep}---the gap between the top of the text and the
+box containing the head. Controlled by \comname{RM@headsepoption}.
+
+\item \comname{footskip}---the gap between the bottom of the text and
+the baseline of the foot. \rmpage scales the length
+($\mbox{\comname{footskip}}-\mbox{\comname{baselineskip}}$), to scale the
+apparent gap between the (assumed one line) footer and the bottom of
+the text body. Controlled by \comname{RM@footskipoption}.
+
+\item \comname{columnsep}---the gap between columns on a multi-column
+page (nothing to do with tables). Controlled by
+\comname{RM@columnsepoption}.
+
+\item \comname{marginparsep}---the gap between the text body and
+marginal paragraphs. Controlled by \comname{RM@mparsepoption}.
+
+\item \comname{RM@mparclearance}---the minimum gap between the edge of
+the paper and marginal paragraphs. Controlled by \comname{RM@mparclearoption}.
+
+\item \comname{RM@maxmparwidth}---the maximum width of marginal paragraphs.
+ Controlled by \comname{RM@maxmparwidthoption}.
+
+\end{enumerate}
+
+The first four are standard \LaTeX\ lengths, and the only change \rmpage
+makes to them is with \comname{RM@scalebyoption}. The fifth and sixth
+lengths are new parameters set by \rmpage.
+
+You can play about with all of these parameters by passing options to
+\rmpage.
+
+If the spread of values given by the standard options isn't enough,
+you can say:
+\begin{verbatim}
+\setlength\columnsep{3\columnsep}
+\end{verbatim}
+or some such in your preamble, \textbf{before} loading \rmpage. This
+only works for the standard \LaTeX\ parameters.
+
+If you want to do something like this for \comname{RM@mparclearance}
+or \comname{RM@maxmparwidth}, you can use the
+\optname{largebasemparclear} or \optname{largebasemaxmparwidth}
+options. These multiply the corresponding parameter by 2 if it has
+not been set by a configuration file.
+
+\chapter{Configuring \rmpage}
+\label{chap:config}
+
+The configuration file exists so you can tailor your installation of
+\rmpage to your preferences. Some obvious things to set are the
+default printer type, the default paper type, the default date style,
+whether you want the inside or the outside margin larger.
+
+\section{Setting up a new installation}
+\label{optcfg:settingup}
+
+\rmpage will work entirely happily without local configuration, but
+you might want to customize its behaviour, for example to speed it up.
+This chapter explains how.
+
+For the sake of compatibility with everyone else and future versions,
+please keep the file \filename{rmpgen.cfg} unchanged in your \TeX{}
+search path, and make changes only to a copy of one of the standard
+configuration files that came with \rmpage. I suggest you make a copy
+called \filename{rmplocal.cfg}, from either \filename{rmpgen.cfg}
+(everything active) or \filename{rmplocal.gfc} (fastest).
+
+When you create your local configuration file, begin by doing two
+things: add a comment on the top line identifying this file as yours;
+and change the \comname{ProvidesFile} command to match the new name
+and identify the file as yours---don't forget to change the date and
+version number:
+\begin{verbatim}
+\ProvidesFile{rmplocal.cfg}
+ [1381/04/01 v0.1 Wat Tylers's
+ local configuration file for the rmpage package.]
+\end{verbatim}
+
+It's okay to comment out and uncomment options, but don't make any
+other changes above the line in the configuration file that says:
+{\ttfamily\scshape local code below here please}. I won't complain
+if you do, but you'll find it harder to upgrade to new versions of
+\rmpage.
+
+\section{Configuration basics}
+
+I assume that you have made a copy called \filename{rmplocal.cfg} of
+either \filename{rmplocal.gfc} or \filename{rmpgen.cfg}, and that
+you've changed the \comname{ProvidesFile} command. If not, read the
+start of this chapter again. I will refer to \filename{rmplocal.cfg}
+as the config file in this chapter; there are other names a local
+configuation file might have.
+
+Please don't change your config file above the line that says:
+{\ttfamily\scshape local code below here please}. I won't complain if
+you do, but you'll find it harder to upgrade to new versions of
+\rmpage.
+
+\subsection{Unknown option error}
+
+If you are using a copy of \filename{rmplocal.gfc} and \LaTeX{}
+complains about an unknown option, edit your config file and
+uncomment the option you need. The more options that are
+uncommented, the slower \rmpage will work.
+
+\subsection{Default options}
+
+Look through your config file for the line \textsc{change the command
+below to match your local preferences}. There's an
+\comname{ExecuteOptions} statement just below it. This statement sets
+your default options---my default settings are below. I have a
+special printer type, because my printer is old, tired, and
+out-of-spec; I usually print on A4 paper with a large inside margin so
+I can put my printouts in a ring binder, and I like my dates like
+this: 5th November 1996. You can change the argument of this
+statement to match your preferences: if you're an American with a
+LaserJet 4, replace the printer option with \optname{lj4printer},
+change the paper type to \optname{letterpaper}, and the date to
+\optname{usdate}. If most of your output goes in ring-binders, keep
+the \optname{notstdmargins} option; otherwise, change it to
+\optname{stdmargins} to give a conventional large outside margin.
+
+\begin{verbatim}
+%% CHANGE THE COMMAND BELOW TO MATCH YOUR LOCAL PREFERENCES
+%% --------------------------------------------------------
+%%
+\ExecuteOptions{R+R-dw520printer,a4paper,notstdmargins,nicedate}
+%%
+%% --------------------------------------------------------
+\end{verbatim}
+
+You can add almost any option you like to this statement: it sets the
+defaults for everything you typeset with \rmpage. Some of the options
+in \filename{rmplocal} have been commented out to speed things up, so
+you might need to uncomment them to allow them to work. You can tell
+whether an option needs uncommenting from the list of all the options
+in chapter~\ref{chap:alltheoptions} on
+page~\pageref{chap:alltheoptions}: options that look like this:
+{\asleepfount obscureoption} are commented out; options that look like
+this: {\awakefount usefuloption} are not commented out. None of the
+options in \rmpage are commented out---you only need to edit the
+configuration file.
+
+You can have additional default options for particular classes.
+Because the options for particular classes are executed after the
+general defaults, they can over-ride the general defaults. So it's
+quite all right to say \optname{a4paper} in the
+\optname{ExecuteOptions} statement above if you normally print out
+slides on B5~paper, because the \optname{b5paper} option executed
+later on will over-ride the original \optname{a4paper} option.
+
+If you want different default options for different classes, or if you
+intend to use the slides class, read the next section which explains
+all.
+
+\section{Configuring \rmpage for particular classes}
+\label{cfg:classes}
+
+Just below the \comname{ExecuteOptions} statement which sets the
+global defaults, there's a section headed \textsc{default options for
+particular classes}. This is the place intended for your
+class-specific default settings. \rmpage provides a command to do
+this:
+\begin{verbatim}
+\RM@OnClassExecuteOptions{<class name>}{<comma separated options>}
+\end{verbatim}
+It's just an \comname{ExecuteOptions} command that is only executed
+for the named class. For example, my configuration file has the
+statement:
+\begin{verbatim}
+\RM@OnClassExecuteOptions{slides}
+ {centre,ukdate,R+R-dw520printer}
+\end{verbatim}
+Which executes the given options only when I'm using the
+\classname{slides} class. You might like to change this statement to
+match your preferences.
+
+You can have as many of these \comname{RM@OnClassExecuteOptions}
+statements as you like, although one statement for each class is
+probably best. If you are creating a class of your own, say a thesis
+class based on \classname{report}, it's probably best to make sure
+that the default options for your thesis class are executed after the
+default options for the \classname{report} class. That way, the
+\classname{report} class's defaults don't over-ride your thesis
+class's defaults.
+
+If you want to create a new class with the help of \rmpage, read
+section~\ref{cfg:newclass} on page~\pageref{cfg:newclass} for more
+details.
+
+\section{Defining a new printer type}
+\label{cfg:printertype}
+
+\section{Dealing with particular combinations of printer
+and paper}
+\label{cfg:printerpaper}
+
+
+
+\section{Telling \rmpage about a new class}
+\label{cfg:newclass}
+
+If you are going to define a new class type, there are two obvious
+ways of doing it: either declare a new option which sets the
+\comname{RM@classtype} command to your new class number (above 100,
+please), or put a line in the \comname{RM@DefineNewClasses} hook:
+%
+\begin{verbatim}
+\DeclareOption{nuthesisclass}{\def\RM@classtype{101}}
+\end{verbatim}
+or
+\begin{verbatim}
+\newcommand*{\RM@DefineNewClasses}{
+\RM@SetClassType{nuthesis}{101}
+}% endRM@DefineNewClasses
+\end{verbatim}
+
+The advantage of not using an option is greater speed. The advantage
+of using an option is that you can pass the option to \rmpage, and be
+sure that your particular settings are acted upon, even if you change
+the name of your class.
+
+
+You can set default options for a particular class in the config file:
+the \textsc{default options for particular classes} section is for you
+to add:
+\begin{verbatim}
+\RM@ClassExecuteOptions{<class name>}{<options list>}
+\end{verbatim}
+statements for each class you want to \comname{ExecuteOptions} for.
+make sure that if you are building one class upon another (e.g.,
+building nuthesis on report), that you execute the options for the
+base class first (e.g., do report before nuthesis).
+
+
+The \comname{RM@AfterProcessOptions} hook is the ideal place to use
+the \comname{RM@OnClassType} command to set up things for particular
+classes. You can set things like minimum margins, maximum textwidth,
+and the like there. See the config file for some examples.
+
+\subsection{Dealing with options}
+
+If you want to build a new class by modifying a standard class with
+the help of \rmpage, you need to think about what's going to happen
+to options.
+
+You can tell your new class, let's call it the \classname{nuthesis} class,
+to pass options on to \rmpage quite happily, by including a
+line:
+\begin{verbatim}
+\DeclareOption*{\PassOptionsToPackage{rmpage}
+ {\CurrentOption}}
+\end{verbatim}
+in the option declaration section of your class file to pass all
+options you don't deal with to \rmpage (not forgetting to say:
+\begin{verbatim}
+\ProcessOptions
+...
+\RequirePackage{rmpage}
+\end{verbatim}
+later on).
+
+The problem with this is that any options you have set up explicitly
+(for example, you might have pass the \optname{wide} option to rmpage
+to get a particular \comname{textwidth}, and the user might have asked
+for \optname{narrow}. Do \emph{you} know which one takes precendent?)
+might be over-ridden by the user.
+
+The safest way to deal with this is to decide which of \rmpage's options
+you will allow the user to use. You might stick with the
+\begin{verbatim}
+\DeclareOption*{\PassOptionsToPackage{rmpage}
+ {\CurrentOption}}
+\end{verbatim}
+statement in your class file and prepare a special \rmpage
+config file for your new class, which has all other options commented
+out. If you call this config file \filename{rmpage-nuthesis.cfg},
+include the line
+\begin{verbatim}
+\newcommand*{\RMconfigfile}{rmpage-nuthesis.cfg}
+\end{verbatim}
+in your class
+file before loading \rmpage. Or you might use:
+\begin{verbatim}
+\DeclareOption{<option name>}
+ {\PassOptionsToPackage{rmpage}{<option name>}}
+\end{verbatim}
+to pass each allowed option on to \rmpage, and ensure that you're not
+passing options to \rmpage with \comname{DeclareOption*}.
+
+If you have used \rmpage to help you get printing dimensions right for
+a fixed format and you don't want the user to change anything, you
+might find it best to set the various parameters directly in your
+class file, and forget about using \rmpage entirely. You can find out
+what they were set to by looking in the \filename{log} file; by the
+time I've released \rmpage, everything that \rmpage changes damned
+well ought to be noted there, and if not you can curse me for a
+careless fool, and specify the \optname{garrulous} option to \rmpage
+which will print everything and then some in your \TeX\ console
+window. Don't try this if you're going to keep using \rmpage to build
+your class---I have no idea what'll happen.
+
+
+
+\subsection{Things you can do with your new class number}
+
+\subsubsection{Changing textheight setting}
+
+You can define the command \comname{RM@textheightgroup} to any number
+you like. It's probably best to do this in the
+\comname{RM@AfterProcessOptions} hook.
+
+Currently, the initial value of textheight is set by one of two blocks
+of code: one is executed if \comname{RM@textheightgroup} is 0
+(default); the other is executed if \comname{RM@textheightgroup} is 1
+(slides only).
+
+If you set \comname{RM@textheightgroup} to anything other than 0 or 1
+for any of your classes, you will need to add some code to set
+textheight! Put your new code in the
+\comname{RM@BeforeTextheightSetting} hook; have a look at \rmpage to
+see how I did it.
+
+\subsubsection{Changing textwidth setting}
+
+ALL THIS IS WRONG NOW!
+
+You can also define the command \comname{RM@widthsetter} to be any
+filename you like, using any of the hooks executed before the width
+setting code is used. If the command is not defined just before the
+\comname{RM@BeforeWidthSetting} hook is executed, it is defined to be
+rmpwnorm.pko (the extension stands for package option). If the class
+type is 5 (\classname{slides}), the command is then defined to be
+rmpwslid.pko. This filename is the file loaded to set the various
+horizontal parameters. By default, \filename{rmpwnorm.pko} is loaded
+for all classes expect slides, which uses \filename{rmpwslid}. An
+example of this sort of thing is this fragment of config file code:
+
+\noindent
+{\footnotesize
+\begin{verbatim}
+\newcommand*{\RM@AfterProcessOptions}{
+ \RM@OnClassType{101}{% class 101 = nightmare university thesis class
+ % Use different textheight setting code to everything else.
+ \def\RM@textheightgroup{2}
+ % Set minimum margins as specified in the regulations.
+ % Everything else is done by the class file. These commands
+ % are defined to be 1742pt at the start of rmpage, so they
+ % can't be set in the class file.
+ \def\RM@minoutsidemargin{15mm}
+ \def\RM@mininsidemargin{40mm}
+ \def\RM@mintopmargin{15mm}
+ \def\RM@minbottommargin{15mm}
+ % set minimum and maximum textwidth, as defined by the regs
+ \def\RM@mintextwidth{130mm}
+ \def\RM@maxtextwidth{160mm}
+ % load custom width setting code in file vulture-widths.jkl
+ \def\RM@widthsetter{vulture-widths.jkl}
+ }{}
+}
+%
+%
+%
+\newcommand*{\RM@DefineNewClasses}{
+ \RM@SetClassType{rmcv}{20}
+ \RM@SetClassType{rmletter}{21}
+ \RM@SetClassType{bithesis}{22}
+ \RM@SetClassType{ljmueepexam}{23}
+ \RM@SetClassType{nuthesis}{101}
+}% endRM@DefineNewClasses
+%
+%
+% nightmare u. thesis uses fixed total text area height of 7in
+\newcommand*{\RM@BeforeTextheightSetting}{
+ \RM@OnTextheightGroup{2}{%
+ \setlength\RM@totalheadfootclearance{\paperheight}
+ \addtolength\RM@totalheadfootclearance{-7in}
+ }
+}% endRM@BeforeTextheightSetting
+%
+\end{verbatim}
+}
+
+The code fragment above defines a new class type,
+\classname{nuthesis}, number 101, which is a class for preparing
+theses for Nightmare University. This class uses textheight setting
+code that asks for a total text body height of as near to 7\units{in}
+as possible no matter what textheight options are specified, and
+horizontal text parameters are set by the file called
+\filename{vulture-widths.jkl}. The other limits on the printing
+region specified by the university's regulations are placed in the
+\comname{RM@AfterProcessOptions} hook. What I have typed above is in
+addition to any code which might be in those hooks anyway; don't
+remove anything unless you've got a good reason---who knows what might
+go wrong?
+
+
+
+
+\end{document}
+
+
+
+
diff --git a/macros/latex/contrib/rmpage/rmpgen.cfg b/macros/latex/contrib/rmpage/rmpgen.cfg
new file mode 100644
index 0000000000..0c1165b147
--- /dev/null
+++ b/macros/latex/contrib/rmpage/rmpgen.cfg
@@ -0,0 +1,1406 @@
+%% File rmpgen.cfg 10/10/97
+%% derived from:
+%% File rmplocal.cfg 11/9/96
+%% File rmpagelocal.cfg 23/8/96
+%%
+%% Copyright 1996 and 1997 R.J.M. McDonnell
+%% email: rebecca@astrid.u-net.com
+%%
+%% Before modifying this file, you might like to make a back-up copy.
+%%
+%% This file is meant to be modified at each installation. So that
+%% you don't end up with a mess that's hideously incompatible with
+%% other installations and versions of the rmpage package, do this:
+%% when you change this file, add a comment on the top line identifying
+%% it as yours, and change the comment after the version number to do
+%% the same thing (e.g., [1923/09/17 v0.carrot Gertrude Stein's config
+%% file for the rmpage package]).
+%%
+%% Please don't make any other changes above the line: `LOCAL CODE BELOW
+%% HERE PLEASE', aside from commenting out or uncommenting whole
+%% options; you're best off not deleting them, honest.
+%%
+%% My current idea is that the contents of this file below the `LOCAL
+%% CODE BELOW HERE PLEASE' line can be cut and pasted wholesale into
+%% a later version of this file; the code that's there is my local
+%% configuration code, and I expect that its only use to you is as
+%% examples. My intention is that future versions of this file won't
+%% have essential code below the line `LOCAL CODE BELOW HERE PLEASE'
+%% either.
+%%
+%% I suggest the first thing you do is hunt down the \ExecuteOptions
+%% statements and change them to whatever you think suits you best.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}[1996/06/01]
+\ProvidesFile{rmpgen.cfg}[1997/10/10 v1.0 general configuration file
+for the rmpage package.]
+%
+% 1997/10/10 v1.0 Made this the first released version of rmpgen.cfg
+% 1996/11/01 v0.36 Changed the typesetting tightness the loadpsfount
+% options change to (now looseish).
+% Goes with rmpage-v0.90.sty
+% 1996/11/01 v0.35 Played about with ltxdoc stuff. Still no joy.
+% Goes with rmpage-v0.89.2.sty
+% 1996/10/31 v0.34 Added the three beton options, just after the
+% loadfount stuff. Belongs here because not everyone uses the
+% concrete founts.
+% Goes with rmpage-v0.89.sty
+% 1996/10/29 v0.33 Put \RM@notinexecuteoptions back in t@uch options;
+% put ljmeepex options into class file. Perhaps change rmpage so
+% t@uch options can be used; tricky.
+% Goes with rmpage-v0.88.sty
+% 1996/10/28 v0.32 Added \RM@AfterInitialTextwidthSetting hook;
+% added book class default options
+% Goes with rmpage-v0.88.sty
+% 1996/10/28 v0.31 Added foils defaults.
+% Goes with rmpage-v0.87.sty
+% 1996/10/25 v0.30 Added stuff about \RM@LocalClassReport hook.
+% Goes with rmpage-v0.85.sty
+% 1996/10/25 v0.29 Changed nastydate option to othernicedate. :-).
+% Goes with rmpage-v0.84.1.sty
+% 1996/10/21 v0.28 Changed slides options a bit; rmpwslid.pko is now
+% used.
+% Goes with rmpage-v0.84.sty
+% 1996/10/21 v0.27 Uncommented another t@uchoption; allowed all t@uch
+% options in \ExecuteOptions; added support for ljmeepex class
+% (options are declared here, and it's given the same number as
+% ljmueepexam. Is Bill Gates the Antichrist?)
+% Goes with rmpage-v0.83.sty
+% 1996/10/19 v0.26 Added ringbinding option which uses new
+% \RM@DefLengthAtLeast command. Changed bithesis settings to use
+% this command to define minmargins.
+% Goes with rmpage-v0.83.sty
+% 1996/10/17 v0.25 Changed loadpsfount stuff to use new command to
+% set looseness, which requests sloppiest \if@twocolum.
+% Goes with rmpage-v0.82.sty
+% 1996/10/14 v0.24 Added errorshow, warningshow, infoshow, and debugshow
+% options (asleep); these are used by tracefnt---someone might
+% like them.
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/09 v0.23 Confirmed lj4printer limits by measuring MS works
+% output. Not great, but it'll do for now.
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/06 v0.22 Fixed loadbookman option
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/04 v0.21 Changed an errant \RM@ocltype to \RM@ocl
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/01 v0.20 Changed loadconcrete option so it uses the beton
+% package; goes with changes in rmpage. Changed generalprinter so
+% it works with HP inkjets.
+% Goes with rmpage-v0.81.sty
+% 1996/09/30 v0.19.1 Changed c76paper option to c7/6paper; binned a
+% redundant asleepoption.
+% Goes with rmpage-v0.80.1.sty
+% 1996/09/29 v0.19 replaced smallbase things with normalbase things.
+% Goes with rmpage-v0.80.sty
+% 1996/09/28 v0.18 added noheaders and notstdmargins to default
+% \ExecuteOptions; to counteract changed default flag settings.
+% 1996/09/27 v0.17 Downcased the RA and SRA paper size names; changed
+% luccasua to lucasual.
+% Goes with rmpage-v0.78.sty
+% 1996/09/26 v0.16 Changed some comments; changed
+% \RM@ClassExecuteOptions to \RM@OnClassExecuteOptions
+% Goes with rmpage-v0.76.sty
+% 1996/09/24 v0.15 Added printer/paper settings from rmpage.sty to
+% the \RM@PrinterPaperSettings hook. Put loadcourier and
+% loadconcrete to bed. Commented out rmcv, rmletter, and bithesis
+% options; they should be redundant by now. Delete them later if
+% there's no problems.
+% Goes with rmpage-v0.74.sty
+% 1996/09/23 v0.14 Changed R+Rdw520printer option so \RM@printertype
+% is set to 11 (new 500 series value), rather than 2 (old DW520
+% value). Foolish child. Added the thisfontwidth option,
+% commented out.
+% Goes with rmpage-v0.73.sty
+% 1996/09/22 v0.13 basemaxmparwidth and basemparclearance options
+% commented out. I mean, really, why not? Added the letter4paper
+% size: an unholy alliance between US letter and ISO A4. Avoid
+% like the plague; but I can almost see a use for it.
+% Goes with rmpage-v0.72.sty
+% 1996/09/18 v0.12.1 Changed some comments.
+% Goes with rmpage-v0.71.2.sty
+% 1996/09/16 v0.12 Added fulllength and stdlength options from
+% rmpage, because they need executing after the touchlength options.
+% Goes with rmpage-v0.71.sty
+% 1996/09/13 v0.11.1 minor doc change
+% 1996/09/13 v0.11 Not much really: added the center and notcenter
+% options to match the documentation.
+% Goes with rmpage-v0.69.sty
+% 1996/09/11 v0.10.1 Made a line a comment line again (oops)
+% Goes with rmpage-v0.67.sty
+% 1996/09/11 v0.10 Added some more options, and changed the name from
+% rmpagelocal.cfg (as it would be in a world free from Bill
+% Gates's malign influence) to the rather silly rmplocal.cfg. It
+% might have been ratlocal, but I decided in favour of utility
+% against character. Apologies to those who use the
+% abreviation RMP in a different context. Added lots and lots of
+% option declarations from rmpage.sty. Changed default option
+% setting and played around with class detection rather a lot;
+% it's relatively elegant now.
+% Goes with rmpage-v0.66.sty
+% 1996/09/10 v0.9 Turned a few %% lines into % lines
+% Goes with rmpage-v0.65.sty
+% 1996/09/10 v0.8 Played about with commented-out options
+% Goes with rmpage-v0.64.sty
+% 1996/09/09 v0.7 Played around with class detection and changed
+% class type numbers
+% Goes with rmpage-v0.63.sty
+% 1996/09/04 v0.6 Erm, some stuff. Changed printer option to
+% dw520-ours.
+% Goes with rmpage-v0.61.sty
+% 1996/09/03 v0.5 Played about a bit; can't remember the details.
+% Goes with rmpage-v0.60.sty
+% 1996/09/02 v0.4 added hook stuff, and included ltxdoc code in one
+% of them.
+% 1996/08/25 v0.3 added rarely used paper size definitions.
+% Goes with rmpagenew v0.56
+% 1996/08/24 v0.2 changed name and stuff; goes with rmpagenew v0.55
+% 1996/08/23 v0.1 Here we go... Goes with rmpagenew v0.54
+%
+%%
+%%
+%% OPTION DECLARATION
+%% ==================
+%%
+%% This section contains the standard options for rmpage. I suggest
+%% you don't add or delete anything from this section: just comment
+%% options out to speed rmpage up or uncomment them if you need to
+%% use them.
+%%
+%% If you want to add options, add them at the end of this section
+%% in between the places marked.
+%%
+%%
+%% PAPER SIZES
+%% -----------
+%%
+\DeclareOption{undefinedpaper}{\def\RM@papertype{0}}
+
+\DeclareOption{letter4paper}{\def\RM@papertype{9}
+ \setlength\paperheight{8.5in}
+ \setlength\paperwidth{210mm}
+ }
+
+\DeclareOption{a0paper}{\def\RM@papertype{10}
+ \setlength\paperheight{1189mm}
+ \setlength\paperwidth{841mm}
+ }
+\DeclareOption{a1paper}{\def\RM@papertype{11}
+ \setlength\paperheight{841mm}
+ \setlength\paperwidth{594mm}
+ }
+\DeclareOption{a2paper}{\def\RM@papertype{12}
+ \setlength\paperheight{594mm}
+ \setlength\paperwidth{420mm}
+ }
+\DeclareOption{a3paper}{\def\RM@papertype{13}%
+ \setlength\paperheight{420mm}%
+ \setlength\paperwidth{297mm}%
+ }
+
+\DeclareOption{a6paper}{\def\RM@papertype{16}%
+ \setlength\paperheight{148mm}%
+ \setlength\paperwidth{105mm}%
+ }
+\DeclareOption{a7paper}{\def\RM@papertype{17}
+ \setlength\paperheight{105mm}
+ \setlength\paperwidth{74mm}
+ }
+\DeclareOption{a8paper}{\def\RM@papertype{18}
+ \setlength\paperheight{74mm}
+ \setlength\paperwidth{52mm}
+ }
+\DeclareOption{a9paper}{\def\RM@papertype{19}
+ \setlength\paperheight{52mm}
+ \setlength\paperwidth{37mm}
+ }
+\DeclareOption{a10paper}{\def\RM@papertype{20}
+ \setlength\paperheight{37mm}
+ \setlength\paperwidth{26mm}
+ }
+
+\DeclareOption{b0paper}{\def\RM@papertype{30}
+ \setlength\paperheight{1414mm}
+ \setlength\paperwidth{1000mm}
+ }
+\DeclareOption{b1paper}{\def\RM@papertype{31}
+ \setlength\paperheight{1000mm}
+ \setlength\paperwidth{707mm}
+ }
+\DeclareOption{b2paper}{\def\RM@papertype{32}
+ \setlength\paperheight{707mm}
+ \setlength\paperwidth{500mm}
+ }
+\DeclareOption{b3paper}{\def\RM@papertype{33}
+ \setlength\paperheight{500mm}
+ \setlength\paperwidth{353mm}
+ }
+\DeclareOption{b4paper}{\def\RM@papertype{34}%
+ \setlength\paperheight{353mm}%
+ \setlength\paperwidth{250mm}%
+ }
+
+\DeclareOption{b6paper}{\def\RM@papertype{36}%
+ \setlength\paperheight{176mm}%
+ \setlength\paperwidth{125mm}%
+ }
+\DeclareOption{b7paper}{\def\RM@papertype{37}%
+ \setlength\paperheight{125mm}%
+ \setlength\paperwidth{88mm}%
+ }
+\DeclareOption{b8paper}{\def\RM@papertype{38}
+ \setlength\paperheight{88mm}
+ \setlength\paperwidth{62mm}
+ }
+\DeclareOption{b9paper}{\def\RM@papertype{39}
+ \setlength\paperheight{62mm}
+ \setlength\paperwidth{44mm}
+ }
+\DeclareOption{b10paper}{\def\RM@papertype{40}
+ \setlength\paperheight{44mm}
+ \setlength\paperwidth{31mm}
+ }
+\DeclareOption{c0paper}{\def\RM@papertype{50}
+ \setlength\paperheight{1297mm}
+ \setlength\paperwidth{917mm}
+ }
+\DeclareOption{c1paper}{\def\RM@papertype{51}
+ \setlength\paperheight{917mm}
+ \setlength\paperwidth{648mm}
+ }
+\DeclareOption{c2paper}{\def\RM@papertype{52}
+ \setlength\paperheight{648mm}
+ \setlength\paperwidth{458mm}
+ }
+\DeclareOption{c3paper}{\def\RM@papertype{53}
+ \setlength\paperheight{458mm}
+ \setlength\paperwidth{324mm}
+ }
+\DeclareOption{c4paper}{\def\RM@papertype{54}
+ \setlength\paperheight{324mm}
+ \setlength\paperwidth{229mm}
+ }
+
+\DeclareOption{c5paper}{\def\RM@papertype{55}%
+ \setlength\paperheight{229mm}%
+ \setlength\paperwidth{162mm}%
+ }
+
+\DeclareOption{c7paper}{\def\RM@papertype{57}
+ \setlength\paperheight{114mm}
+ \setlength\paperwidth{81mm}
+ }
+
+\DeclareOption{c7/6paper}{\def\RM@papertype{59}% c7/6 paper
+ \setlength\paperheight{162mm}
+ \setlength\paperwidth{81mm}
+ }
+% Note that the BS4264 envelope sizes have names I invented
+% BS4264 Post office preferred envelope: seed packets, wage slips, gen pack
+\DeclareOption{bspopseedenvelopepaper}{\def\RM@papertype{60}
+ \setlength\paperheight{152mm}
+ \setlength\paperwidth{102mm}
+ }
+ % BS4264 Post office preferred envelope: gen commercial, non iso sizes
+\DeclareOption{bspopnonisoenvelopepaper}{\def\RM@papertype{61}
+ \setlength\paperheight{229mm}
+ \setlength\paperwidth{102mm}
+ }
+ % BS4264 envelope; bulky A5, catalogues, brochures.
+\DeclareOption{bsbrochureenvelopepaper}{\def\RM@papertype{62}
+ \setlength\paperheight{254mm}
+ \setlength\paperwidth{178mm}
+ }
+ % BS4264 envelope; legal docs, catalogues, photos
+\DeclareOption{bslegalenvelopepaper}{\def\RM@papertype{63}
+ \setlength\paperheight{270mm}
+ \setlength\paperwidth{216mm}
+ }
+% BS4264 envelope; insurance policies, legal docs
+\DeclareOption{bslargelegalenvelopepaper}{\def\RM@papertype{64}
+ \setlength\paperheight{305mm}
+ \setlength\paperwidth{127mm}
+ }
+ % BS4264 envelope; bulky docs, calendars
+\DeclareOption{bscalendarenvelopepaper}{\def\RM@papertype{65}
+ \setlength\paperheight{381mm}
+ \setlength\paperwidth{254mm}
+ }
+
+\DeclareOption{foolscapfoliopaper}{\def\RM@papertype{70}%
+ \setlength\paperheight{13.5in}%
+ \setlength\paperwidth{8.5in}%
+ }
+\DeclareOption{foolscappaper}{\def\RM@papertype{70}% foolscap option gives foolscap
+ \setlength\paperheight{13.5in}% folio paper
+ \setlength\paperwidth{8.5in}
+ }
+
+\DeclareOption{foolscapquartopaper}{\def\RM@papertype{71}
+ \setlength\paperheight{8.5in}
+ \setlength\paperwidth{6.75in}
+ }
+\DeclareOption{foolscapoctavopaper}{\def\RM@papertype{72}
+ \setlength\paperheight{6.75in}
+ \setlength\paperwidth{4.25in}
+ }
+\DeclareOption{crownfoliopaper}{\def\RM@papertype{73}
+ \setlength\paperheight{15in}
+ \setlength\paperwidth{10in}
+ }
+\DeclareOption{crownquartopaper}{\def\RM@papertype{74}
+ \setlength\paperheight{10in}
+ \setlength\paperwidth{7.5in}
+ }
+\DeclareOption{crownoctavopaper}{\def\RM@papertype{75}
+ \setlength\paperheight{7.5in}
+ \setlength\paperwidth{5in}
+ }
+\DeclareOption{royalfoliopaper}{\def\RM@papertype{76}
+ \setlength\paperheight{20in}
+ \setlength\paperwidth{12.5in}
+ }
+\DeclareOption{royalquartopaper}{\def\RM@papertype{77}
+ \setlength\paperheight{12.5in}
+ \setlength\paperwidth{10in}
+ }
+\DeclareOption{royaloctavopaper}{\def\RM@papertype{78}
+ \setlength\paperheight{10in}
+ \setlength\paperwidth{6.25in}
+ }
+\DeclareOption{imperialfoliopaper}{\def\RM@papertype{79}
+ \setlength\paperheight{22in}
+ \setlength\paperwidth{15.5in}
+ }
+\DeclareOption{imperialquartopaper}{\def\RM@papertype{80}
+ \setlength\paperheight{15in}
+ \setlength\paperwidth{11in}
+ }
+\DeclareOption{imperialoctavopaper}{\def\RM@papertype{81}
+ \setlength\paperheight{11in}
+ \setlength\paperwidth{7.5in}
+ }
+\DeclareOption{largecrownoctavopaper}{\def\RM@papertype{82}
+ \setlength\paperheight{8in}
+ \setlength\paperwidth{5.25in}
+ }
+\DeclareOption{demyoquartopaper}{\def\RM@papertype{83}
+ \setlength\paperheight{11.25in}
+ \setlength\paperwidth{8.75in}
+ }
+\DeclareOption{demyoctavopaper}{\def\RM@papertype{84}
+ \setlength\paperheight{8.75in}
+ \setlength\paperwidth{5.625in}
+ }
+\DeclareOption{mediumquartopaper}{\def\RM@papertype{85}
+ \setlength\paperheight{12in}
+ \setlength\paperwidth{9.5in}
+ }
+\DeclareOption{mediumoctavopaper}{\def\RM@papertype{86}
+ \setlength\paperheight{9.5in}
+ \setlength\paperwidth{6in}
+ }
+
+\DeclareOption{ra0paper}{\def\RM@papertype{90}
+ \setlength\paperheight{1270mm}
+ \setlength\paperwidth{960mm}
+ }
+\DeclareOption{ra1paper}{\def\RM@papertype{91}
+ \setlength\paperheight{1270mm}
+ \setlength\paperwidth{960mm}
+ }
+\DeclareOption{ra2paper}{\def\RM@papertype{92}
+ \setlength\paperheight{1270mm}
+ \setlength\paperwidth{960mm}
+ }
+\DeclareOption{sra0paper}{\def\RM@papertype{93}
+ \setlength\paperheight{1280mm}
+ \setlength\paperwidth{900mm}
+ }
+\DeclareOption{sra1paper}{\def\RM@papertype{94}
+ \setlength\paperheight{900mm}
+ \setlength\paperwidth{840mm}
+ }
+\DeclareOption{sra2paper}{\def\RM@papertype{95}
+ \setlength\paperheight{640mm}
+ \setlength\paperwidth{450mm}
+ }
+\DeclareOption{metricdoublecrownpaper}{\def\RM@papertype{96}
+ \setlength\paperheight{770mm}
+ \setlength\paperwidth{505mm}
+ }
+\DeclareOption{metricquadcrownpaper}{\def\RM@papertype{97}
+ \setlength\paperheight{1010mm}
+ \setlength\paperwidth{770mm}
+ }
+\DeclareOption{metriclargequadcrownpaper}{\def\RM@papertype{98}
+ \setlength\paperheight{1060mm}
+ \setlength\paperwidth{820mm}
+ }
+\DeclareOption{metricquaddemypaper}{\def\RM@papertype{99}
+ \setlength\paperheight{1030mm}
+ \setlength\paperwidth{890mm}
+ }
+\DeclareOption{metricsmallquadroyalpaper}{\def\RM@papertype{100}
+ \setlength\paperheight{1270mm}
+ \setlength\paperwidth{960mm}
+ }
+%%
+%%
+%% LONG PAPER TYPES
+%% ----------------
+%%
+%% 0 = not long (or 1)
+%% 1 = 7/8 2 = 3/4 3 = 2/3 4 = 5/8 5 = 1/2
+%% 6 = 3/8 7 = 1/3 8 = 1/4 9 = 1/8
+%%
+\DeclareOption{notlongpaper}{\def\RM@longpapertype{0}}
+\DeclareOption{7/8longpaper}{\def\RM@longpapertype{1}}
+\DeclareOption{3/4longpaper}{\def\RM@longpapertype{2}}
+\DeclareOption{2/3longpaper}{\def\RM@longpapertype{3}}
+\DeclareOption{5/8longpaper}{\def\RM@longpapertype{4}}
+\DeclareOption{1/2longpaper}{\def\RM@longpapertype{5}}
+\DeclareOption{3/8longpaper}{\def\RM@longpapertype{6}}
+\DeclareOption{1/3longpaper}{\def\RM@longpapertype{7}}
+\DeclareOption{1/4longpaper}{\def\RM@longpapertype{8}}
+\DeclareOption{1/8longpaper}{\def\RM@longpapertype{9}}
+%%
+%%
+%% OPTIONS TO CHANGE MARGINPARS
+%% ----------------------------
+%%
+%% marginparsep is scaled by option
+\DeclareOption{leastmparsep}{\RM@mparsepoption=3}
+\DeclareOption{lessmparsep}{\RM@mparsepoption=6}
+\DeclareOption{lessishmparsep}{\RM@mparsepoption=9}
+\DeclareOption{normalmparsep}{\RM@mparsepoption=12}
+\DeclareOption{moreishmparsep}{\RM@mparsepoption=15}
+\DeclareOption{moremparsep}{\RM@mparsepoption=18}
+\DeclareOption{mostmparsep}{\RM@mparsepoption=21}
+%%
+%% The basemparclear options need to be executed after paperwidth has
+%% been set. Easily done with \ProcessOptions rather than
+%% \ProcessOptions*, and the papersize setting options declared above
+%% rather than below. The normalbasemparclear value is set after option
+%% processing if no other value has been set. If \RM@mparclearance is
+%% -666pt, the normalbasemparclear value is set; if it's -667pt, the
+%% largebaselinemparclear value is set (both just after
+%% \RM@PrinterPaperSettings hook is executed, which is well after
+%% \paperwidth is set). This value is scaled by option just before it's
+%% used, so one can use the \RM@BeforeWidthSetting hook to change things.
+\DeclareOption{normalbasemparclear}{\setlength\RM@mparclearance{-666pt}}
+\DeclareOption{largebasemparclear}{\setlength\RM@mparclearance{-667pt}}
+
+\DeclareOption{normalbasemaxmparwidth}{\setlength\RM@maxmparwidth{-666pt}}
+\DeclareOption{largebasemaxmparwidth}{\setlength\RM@maxmparwidth{-667pt}}
+%%
+%% the gap between the edge of the paper and the edge of a marginpar
+%% is 0.4in (10.16mm) with standard article/report class settings.
+%% The mparclearance options change this.
+%%
+%% mparclearance for A4 portrait paper:
+%% least=3.95mm less=5.37mm lessish=7.28mm norm=9.88
+%% moreish=13.41mm more=18.20mm most=24.71mm
+%%
+%% (norm=0.4in with US letter paper). Note that there are no touch
+%% options for mparclearance or maxmparwidth. There's no particular
+%% reason why they shouldn't be added. So I did, but left them
+%% commented out.
+\DeclareOption{leastmparclearance}{\RM@mparclearoption=3}
+\DeclareOption{lessmparclearance}{\RM@mparclearoption=6}
+\DeclareOption{lessishmparclearance}{\RM@mparclearoption=9}
+\DeclareOption{normalmparclearance}{\RM@mparclearoption=12}% norm
+\DeclareOption{moreishmparclearance}{\RM@mparclearoption=15}
+\DeclareOption{moremparclearance}{\RM@mparclearoption=18}
+\DeclareOption{mostmparclearance}{\RM@mparclearoption=21}
+%%
+%% maxmparwidth is now set as a fraction of paperwidth, such that with
+%% portrait US letter paper, you get 2in as standard (or maybe with A4; I
+%% really ought to check this.. It's scale by option just like
+%% everything else. If you want to change the default base value of
+%% maxmparwidth, the \RM@BeforeWidthSetting hook is an ideal place to do
+%% it.
+\DeclareOption{leastmaxmparwidth}{\RM@maxmparwidthoption=3}
+\DeclareOption{lessmaxmparwidth}{\RM@maxmparwidthoption=6}
+\DeclareOption{lessishmaxmparwidth}{\RM@maxmparwidthoption=9}
+\DeclareOption{normalmaxmparwidth}{\RM@maxmparwidthoption=12}% norm
+\DeclareOption{moreishmaxmparwidth}{\RM@maxmparwidthoption=15}
+\DeclareOption{moremaxmparwidth}{\RM@maxmparwidthoption=18}
+\DeclareOption{mostmaxmparwidth}{\RM@maxmparwidthoption=21}
+%%
+%%
+%% TOUCH OPTIONS
+%% -------------
+%%
+%% Note that all the touch options need to be executed after their
+%% corresponding `straight' options. This is inevitable if they are
+%% left here and \ProcessOptions is used rather than the star form,
+%% because rmplocal.cfg is loaded after all of rmpage's \DeclareOptions
+%% statements.
+%%
+\DeclareOption{t@uchlonger} {\RM@notinexecuteoptions\advance\RM@lengthoption by 1}
+\DeclareOption{t@uchshorter}{\RM@notinexecuteoptions\advance\RM@lengthoption by -1}
+\DeclareOption{touchlonger}{\RM@notinexecuteoptions\advance\RM@lengthoption by 1}
+\DeclareOption{touchshorter}{\RM@notinexecuteoptions\advance\RM@lengthoption by -1}
+%%
+\DeclareOption{touchmorecolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by1}
+\DeclareOption{touchlesscolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by-1}
+\DeclareOption{t@uchmorecolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by1}
+\DeclareOption{t@uchlesscolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by-1}
+%%
+\DeclareOption{touchmoremparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by1}
+\DeclareOption{touchlessmparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by-1}
+\DeclareOption{t@uchmoremparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by1}
+\DeclareOption{t@uchlessmparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by-1}
+%%
+\DeclareOption{touchmorefootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by1}
+\DeclareOption{touchlessfootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by-1}
+\DeclareOption{t@uchmorefootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by1}
+\DeclareOption{t@uchlessfootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by-1}
+%%
+\DeclareOption{touchmoreheadsep}{\RM@notinexecuteoptions\advance\RM@headsepoption by1}
+\DeclareOption{touchlessheadsep}{\RM@notinexecuteoptions\advance\RM@headsepoption by-1}
+\DeclareOption{t@uchmoreheadsep}{\advance\RM@headsepoption by1}
+\DeclareOption{t@uchlessheadsep}{\advance\RM@headsepoption by-1}
+%%
+\DeclareOption{t@uchwider}{\RM@notinexecuteoptions\advance\RM@widthoption by1}
+\DeclareOption{t@uchnarrower}{\RM@notinexecuteoptions\advance\RM@widthoption by-1}
+\DeclareOption{touchwider}{\RM@notinexecuteoptions\advance\RM@widthoption by1}
+\DeclareOption{touchnarrower}{\RM@notinexecuteoptions\advance\RM@widthoption by-1}
+%%
+\DeclareOption{t@uchmoreoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by1}
+\DeclareOption{t@uchlessoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by-1}
+\DeclareOption{touchmoreoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by1}
+\DeclareOption{touchlessoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by-1}
+%%
+\DeclareOption{t@uchhigher}{\RM@notinexecuteoptions\advance\RM@headfootbalance by -1}
+\DeclareOption{t@uchlower} {\RM@notinexecuteoptions\advance\RM@headfootbalance by 1}
+\DeclareOption{touchhigher}{\RM@notinexecuteoptions\advance\RM@headfootbalance by -1}
+\DeclareOption{touchlower} {\RM@notinexecuteoptions\advance\RM@headfootbalance by 1}
+%%
+\DeclareOption{t@uchlessmparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by -1}
+\DeclareOption{t@uchmoremparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by 1}
+\DeclareOption{touchlessmparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by -1}
+\DeclareOption{touchmoremparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by 1}
+
+\DeclareOption{t@uchlessmaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by -1}
+\DeclareOption{t@uchmoremaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by 1}
+\DeclareOption{touchlessmaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by -1}
+\DeclareOption{touchmoremaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by 1}
+%%
+%%
+%% RANDOM LENGTH OPTIONS
+%% ---------------------
+%%
+%% These need to be executed after the touchlength options; but for
+%% that, they'd be in rmpage.sty
+%%
+\DeclareOption{fulllength}{\RM@lengthoption=30}
+\DeclareOption{stdlength}{\RM@lengthoption=0}
+%%
+%%
+%% NUMBER OF COLUMNS
+%% -----------------
+%%
+%% onecolumn and twocolumn are both in rmpage. These options only
+%% affect \textwidth; use a package like multicols to set you text in
+%% multiple columns.
+%%
+\DeclareOption{onecolumnwidth}{\def\RM@textcols{1}}
+\DeclareOption{twocolumnwidth}{\def\RM@textcols{2}}
+\DeclareOption{threecolumnwidth}{\def\RM@textcols{3}}
+\DeclareOption{fourcolumnwidth}{\def\RM@textcols{4}}
+\DeclareOption{fivecolumnwidth}{\def\RM@textcols{5}}
+\DeclareOption{sixcolumnwidth}{\def\RM@textcols{6}}
+\DeclareOption{sevencolumnwidth}{\def\RM@textcols{7}}
+\DeclareOption{eightcolumnwidth}{\def\RM@textcols{8}}
+\DeclareOption{ninecolumnwidth}{\def\RM@textcols{9}}
+\DeclareOption{tencolumnwidth}{\def\RM@textcols{10}}
+%%
+%%
+%% LOADING FOUNTS
+%% --------------
+%%
+%% The fount options work like this: a fount family is set, and if the
+%% \RM@loadfount flag is set true, the appropriate fount is loaded,
+%% mainly with one of the standard PSNFSS packages.
+%% Fount families are set like this:
+%% 1=avant garde 2=bookman 3=zapf chancery 4=helvetica
+%% 5=new century schoolbook 6=palatino 7=times 8=utopia
+%% 9=lucida casual 10=courier 11=concrete 12=this fount width
+%% 13=lucida casual dirty trick
+%%
+%% The dirty trick works like this: if you ask for lucida casual
+%% (\RM@fountfamily 13), the fount loading code later on does a
+%% \RequirePackage{lucida-casual}, and then sets \RM@fountfamily
+%% to 9. The option to do this is in Rowland's curious option
+%% section.
+%%
+%% The command below is used to ask for a particular set of
+%% typesetting parameters if you've not explicitly requested any with
+%% the looseness option set. You get loose if you've asked for
+%% onecolumn, or sloppy if you've asked for twocolumn. Ncolumnwidth
+%% is treated as onecolumn; the multicol package makes its own
+%% arrangements. But this shouldn't be done any more because the
+%% metrics have changed (S. Rahtz, psnfss2e.tex, 5/11/95). I wish
+%% there was an up-to-date version of fontinst with docs available.
+%%
+%% This command's defined here so its meaning is clear; it's cleared
+%% at the end of rmpage.sty.
+%%
+%% So, this is the command that used to do the dirty. And still does:
+%% the PSNFSS founts \emph{are} still much tighter than cmr, and you
+%% get more bad line breaks. But looseish seems enough for now; keep
+%% the twocolumn extra super dooper very slack indeed looseness as is
+%% for now. (I wish I had a television so I could find out exactly
+%% what it is that Mutley says when he's annoyed). Maybe the thing
+%% to do is to change the sloppiness command: see rmpage.sty for more
+%% comments (yes, you, you fool, me! bloody well read it [don't
+%% complain: I'm swearing at myself]).
+%%
+%% The thing is, the PSNFSS founts are a little tighter than cmr (it
+%% seems). looseish over-compensates, but it's not all that much
+%% looser than tight. Grumbledon diwn.
+\def\RM@setpsloose{
+ \ifnum\RM@looseoption=205
+ \if@twocolumn
+ \def\RM@looseoption{5}
+ \else
+ \def\RM@looseoption{1}
+ \fi
+ \fi
+}
+% \def\RM@setpsloose{\relax}
+% % Don't change the options below; just change the loosening command
+% % in case I want to use it later.
+%%
+%% %% Computer modern roman; redundant options
+ \DeclareOption{cmrwidth}{\def\RM@fountfamily{0}}
+ \DeclareOption{loadcmr}{\def\RM@fountfamily{0}\RM@loadfounttrue}
+%% Avant Garde
+\DeclareOption{avantwidth}{\def\RM@fountfamily{1}}
+\DeclareOption{loadavant}{\def\RM@fountfamily{1}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Bookman
+\DeclareOption{bookmanwidth}{\def\RM@fountfamily{2}}
+\DeclareOption{loadbookman}{\def\RM@fountfamily{2}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Zapf Chancery
+\DeclareOption{chancerywidth}{\def\RM@fountfamily{3}}
+\DeclareOption{loadchancery}{\def\RM@fountfamily{3}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Helvetica
+\DeclareOption{helvetwidth}{\def\RM@fountfamily{4}}
+\DeclareOption{loadhelvet}{\def\RM@fountfamily{4}
+ \RM@loadfounttrue\RM@setpsloose}
+%% New Century Schoolbook
+\DeclareOption{newcentwidth}{\def\RM@fountfamily{5}}
+\DeclareOption{loadnewcent}{\def\RM@fountfamily{5}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Palatino
+\DeclareOption{palatinowidth}{\def\RM@fountfamily{6}}
+\DeclareOption{loadpalatino}{\def\RM@fountfamily{6}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Times
+\DeclareOption{timeswidth}{\def\RM@fountfamily{7}}
+\DeclareOption{loadtimes}{\def\RM@fountfamily{7}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Utopia
+\DeclareOption{utopiawidth}{\def\RM@fountfamily{8}}
+\DeclareOption{loadutopia}{\def\RM@fountfamily{8}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Lucida casual
+\DeclareOption{lucasualwidth}{\def\RM@fountfamily{9}}
+\DeclareOption{loadlucasual}{\def\RM@fountfamily{9}
+ \RM@loadfounttrue\RM@setpsloose}
+%% lucida-casual option is now in rmplocal.cfg
+%% Courier
+\DeclareOption{courierwidth}{\def\RM@fountfamily{10}}
+\DeclareOption{loadcourier}{\def\RM@fountfamily{10}\RM@loadfounttrue
+ \RM@setpsloose}
+%% Concrete
+%% Concrete doesn't need loose typesetting
+\DeclareOption{concretewidth}{\def\RM@fountfamily{11}}
+\DeclareOption{loadconcrete}{\def\RM@fountfamily{11}\RM@loadfounttrue
+ \ExecuteOptions{beton}}
+%% Bases \textwidth on current fount
+\DeclareOption{thisfountwidth}{\def\RM@fountfamily{12}}
+%%
+%%
+%% Stuff for beton support
+%% -----------------------
+%%
+%% I need to pass the standard-baselineskips option to beton
+%% explicitly so I can detect whether beton's been loaded with this
+%% option later. I might as well prepare to pass the other two
+%% options, just in case I need to know about them someday.
+\DeclareOption{standard-baselineskips}
+ {\PassOptionsToPackage{\CurrentOption}{beton}}
+\DeclareOption{oldstyle-equation-numbers}
+ {\PassOptionsToPackage{\CurrentOption}{beton}}
+\DeclareOption{concrete-math}
+ {\PassOptionsToPackage{\CurrentOption}{beton}}
+%%
+%%
+%%
+%% Synonyms for other options
+%% --------------------------
+%%
+%% Now I like this.
+\DeclareOption{othernicedate}{\RM@nicedatefalse}% usdate
+\DeclareOption{nicedate}{\RM@nicedatetrue}% ukdate
+%%
+%% Other packages use these options to change the amount of
+%% information displayed; I might as well pay attention.
+%%
+\DeclareOption{verbose}{\def\RM@chatlevel{1}}% chatty
+\DeclareOption{silent}{\def\RM@chatlevel{3}}% yorkshire
+\DeclareOption{errorshow}{\def\RM@chatlevel{3}}% yorkshire
+\DeclareOption{warningshow}{\def\RM@chatlevel{2}}% taciturn
+\DeclareOption{infoshow}{\def\RM@chatlevel{1}}% chatty
+\DeclareOption{debugshow}{\def\RM@chatlevel{0}}% garrulous
+%%
+%% And I object to this, I really do. Why can't people learn to
+%% spell properly?
+%%
+\DeclareOption{center}{\RM@centretrue}
+\DeclareOption{notcenter}{\RM@centrefalse}
+%%
+%%
+%% MARGIN OPTIONS
+%% --------------
+%%
+%% What the ringbinding option does is ensure that there's enough space
+%% in the inside margin to punch holes. It does not make a binding
+%% correction after the fashion of the Koma-script packages. This option
+%% assumes that you'll be punching holes in the inside margin, so don't
+%% expect it to work properly with landscape printing---I couldn't work
+%% out a way of predicting which margin will get the holes in landscape
+%% printing, so I decided to make no attempt to support it. If you have
+%% any thoughts on this, please email me.
+%%
+\DeclareOption{ringbinding}
+ {\ifRM@portrait
+ \RM@DefLengthAtLeast{\RM@mininsidemargin}{15mm}
+ \else
+ \RM@Warn{The ringbinding option does nothing in landscape mode}
+ \fi}
+%%
+%% PRINTER OPTIONS
+%% ---------------
+%%
+%% Printer types are:
+%% 0=fullbleed, 1=general, 2=pessimistic, 3=optimistic
+%% 10=dw300 11=dw500 12=dw600 (HP deskwriter inkjet series)
+%% 20=lj2 21=lj3 22=lj4 (HP laserjet laser printer series)
+%% 30=canonbjx bubblejet something (Canon bubblejet inkjet series)
+%% 40+ whatever else comes up
+%%
+%% The idea is that printer types < 10 are not locally configured;
+%% these numbers are reserved for mythical general types that should
+%% be the same on all systems. Feel free to add your own mythical
+%% general types; please keep the printer number > 1000.
+%%
+%% The figures for all these printers are guesses, except for the DW500
+%% and DW600: any data on printing margins for the printers above or
+%% other commonly-used printers would be gratefully received. I need to
+%% know about printing limits at the top, bottom, left, and right for
+%% portrait and landscape modes, and whether the data is what the book
+%% says or what you measured (preferrably both, but anything'll help).
+%% If anyone really uses LaTeX with an A3 printer, do tell: it's
+%% something I've been wondering about.
+%%
+%% \RM@ptrpostol generally set to 1mm (paper sizes are to $\pm2$mm),
+%% except for our dw520 which I keep a careful eye on.
+%%
+\DeclareOption{fullbleedprinter}{
+ \def\RM@printertype{0}
+ \def\RM@ptrrportclear{0mm}
+ \def\RM@ptrlportclear{0mm}
+ \def\RM@ptrtportclear{0mm}
+ \def\RM@ptrbportclear{0mm}
+ \def\RM@ptrrlandclear{0mm}
+ \def\RM@ptrllandclear{0mm}
+ \def\RM@ptrtlandclear{0mm}
+ \def\RM@ptrblandclear{0mm}
+ \def\RM@ptrpostol{0mm}% Seems best
+ }
+%
+%% Quite arbitrary settings,
+\DeclareOption{generalprinter}{% arbitrary
+ \def\RM@printertype{1}
+ \def\RM@ptrrportclear{8mm}
+ \def\RM@ptrlportclear{8mm}
+ \def\RM@ptrtportclear{8mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{8mm}
+ \def\RM@ptrtlandclear{8mm}
+ \def\RM@ptrblandclear{8mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+%% This uses the worst limits I can remember meeting:
+\DeclareOption{pessimisticprinter}{
+ \def\RM@printertype{2}
+ \def\RM@ptrrportclear{10mm}
+ \def\RM@ptrlportclear{10mm}
+ \def\RM@ptrtportclear{10mm}
+ \def\RM@ptrbportclear{19mm}
+ \def\RM@ptrrlandclear{19mm}
+ \def\RM@ptrllandclear{10mm}
+ \def\RM@ptrtlandclear{10mm}
+ \def\RM@ptrblandclear{10mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+% This uses the best limits I'd expect
+\DeclareOption{optimisticprinter}{
+ \def\RM@printertype{3}
+ \def\RM@ptrrportclear{3mm}
+ \def\RM@ptrlportclear{3mm}
+ \def\RM@ptrtportclear{3mm}
+ \def\RM@ptrbportclear{3mm}
+ \def\RM@ptrrlandclear{3mm}
+ \def\RM@ptrllandclear{3mm}
+ \def\RM@ptrtlandclear{3mm}
+ \def\RM@ptrblandclear{3mm}
+ \def\RM@ptrpostol{0.5mm}% Guess
+ }
+
+\DeclareOption{dw300printer}{% Guess
+ \def\RM@printertype{11}
+ \def\RM@ptrrportclear{6mm}
+ \def\RM@ptrlportclear{6mm}
+ \def\RM@ptrtportclear{7mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{7mm}
+ \def\RM@ptrtlandclear{6mm}
+ \def\RM@ptrblandclear{6mm}
+ \def\RM@ptrpostol{1mm}
+ }
+\DeclareOption{dw500printer}{% HP spec
+ \def\RM@printertype{11}
+ \def\RM@ptrrportclear{6mm}
+ \def\RM@ptrlportclear{6mm}
+ \def\RM@ptrtportclear{7mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{7mm}
+ \def\RM@ptrtlandclear{6mm}
+ \def\RM@ptrblandclear{6mm}
+ \def\RM@ptrpostol{1mm}
+ }
+\DeclareOption{dw600printer}{% Measured from Rebecca's at work+1mm.
+ \def\RM@printertype{12}
+ \def\RM@ptrrportclear{5mm}
+ \def\RM@ptrlportclear{5mm}
+ \def\RM@ptrtportclear{2mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{2mm}
+ \def\RM@ptrtlandclear{5mm}
+ \def\RM@ptrblandclear{5mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+\DeclareOption{lj2printer}{% an arbitrary guess
+ \def\RM@printertype{20}
+ \def\RM@ptrrportclear{7mm}
+ \def\RM@ptrlportclear{7mm}
+ \def\RM@ptrtportclear{7mm}
+ \def\RM@ptrbportclear{7mm}
+ \def\RM@ptrrlandclear{7mm}
+ \def\RM@ptrllandclear{7mm}
+ \def\RM@ptrtlandclear{7mm}
+ \def\RM@ptrblandclear{7mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+\DeclareOption{lj3printer}{% an arbitrary guess
+ \def\RM@printertype{21}
+ \def\RM@ptrrportclear{6mm}
+ \def\RM@ptrlportclear{6mm}
+ \def\RM@ptrtportclear{6mm}
+ \def\RM@ptrbportclear{6mm}
+ \def\RM@ptrrlandclear{6mm}
+ \def\RM@ptrllandclear{6mm}
+ \def\RM@ptrtlandclear{6mm}
+ \def\RM@ptrblandclear{6mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+\DeclareOption{lj4printer}{% measured from MS Works output
+ \def\RM@printertype{22}
+ \def\RM@ptrrportclear{5mm}
+ \def\RM@ptrlportclear{5mm}
+ \def\RM@ptrtportclear{5mm}
+ \def\RM@ptrbportclear{5mm}
+ \def\RM@ptrrlandclear{5mm}
+ \def\RM@ptrllandclear{5mm}
+ \def\RM@ptrtlandclear{5mm}
+ \def\RM@ptrblandclear{5mm}
+ \def\RM@ptrpostol{0.5mm}% Guess
+ }
+\DeclareOption{canonbjxprinter}{% an arbitrary guess
+ \def\RM@printertype{22}
+ \def\RM@ptrrportclear{7mm}
+ \def\RM@ptrlportclear{7mm}
+ \def\RM@ptrtportclear{7mm}
+ \def\RM@ptrbportclear{12mm}
+ \def\RM@ptrrlandclear{12mm}
+ \def\RM@ptrllandclear{7mm}
+ \def\RM@ptrtlandclear{7mm}
+ \def\RM@ptrblandclear{7mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+%%
+%% ROWLAND'S CURIOUS OPTIONS
+%% -------------------------
+%%
+%% These are curious options, defined by me (RJMM) to perform dark and
+%% eldritch deeds. These aren't intended for hoi polloi, mainly 'cos
+%% they're a bit iffy in places, but I like them and they might give
+%% you some ideas.
+%%
+%%
+%% Our DW520 isn't quite to spec.
+%%
+\DeclareOption{R+R-dw520printer}{
+ \def\RM@printertype{11}
+ \def\RM@ptrrportclear{7mm}% spec 6mm
+ \def\RM@ptrlportclear{6mm}
+ \def\RM@ptrtportclear{7mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{7mm}
+ \def\RM@ptrtlandclear{7mm}% spec 6mm
+ \def\RM@ptrblandclear{6mm}
+ \def\RM@ptrpostol{0.5mm}% Guess
+ }
+%%
+%% A dirty trick to load my .fd version of lucida casual rather than
+%% the PSNFSS version. If you loadlucidacasual, \RM@fountfamily is set
+%% to 9 after the lucida-casual package has been \RequirePackaged.
+%% That's done by code further on in rmpage, specially written for
+%% this dirty trick.
+%%
+%% Lucida casual
+\DeclareOption{lucidacasualwidth}{\def\RM@fountfamily{9}}
+\DeclareOption{loadlucidacasual}{\def\RM@fountfamily{13}
+ \RM@loadfounttrue\RM@setpsloose}
+%%
+%% These class options ought to be redundant now.
+%%\DeclareOption{rmcv}{\def\RM@classtype{20}}
+%%\DeclareOption{rmletter}{\def\RM@classtype{21}}
+%%\DeclareOption{bithesis}{\def\RM@classtype{22}}
+%% for ltx guide docs; maybe use in ltxguide.cfg?
+%%\DeclareOption{ltxguide}{\def\RM@classtype{7}}% redundant
+%% for typesetting .dtx files only; used by ltxdoc.cfg
+%%\DeclareOption{ltxdoc}{\def\RM@classtype{6}}% redundant
+%% for Liverpool J.Moore's EEP exams
+%%\DeclareOption{ljmueepexam}{\def\RM@classtype{23}}% redundant
+%%
+%% \RM@ptsize is set to the requested point size if an rmsizeN package has
+%% not already been recognised by another package.
+%%
+%% These point size options need another package file which really
+%% isn't ready to be released yet - so don't expect them to work.
+%%
+%% If you really, really, really want to use these extra point sizes,
+%% I'll send you the extra files if you ask nicely.
+%%
+\providecommand{\RM@ptsize}{666}
+\DeclareOption{14pt}{\ifnum\RM@ptsize=666\def\RM@ptsize{14}\def\@ptsize{2}\fi}
+\DeclareOption{24pt}{\ifnum\RM@ptsize=666\def\RM@ptsize{24}\def\@ptsize{2}\fi}
+\DeclareOption{36pt}{\ifnum\RM@ptsize=666\def\RM@ptsize{36}\def\@ptsize{2}\fi}
+%%
+%% Don't do anything to the file above this point except these things:
+%% comment out whole options,
+%% uncomment out whole options,
+%% and change the identifying comments and commands at the start of the file.
+%% Disobeying this order will result in a squadron of highly-trained
+%% killer gerbils attacking your toenails each night; the cost in
+%% pedicurist bills will be crippling.
+%%
+%%
+%% LOCAL CODE BELOW HERE PLEASE
+%% ============================
+%%
+%%
+%% Add your options in the section marked out below.
+%%
+%%
+%% BEGIN LOCAL OPTION DECLARATION
+%% ==============================
+%%
+
+%%
+%%
+%% END LOCAL OPTION DECLARATION
+%% ============================
+%%
+%%
+%% DEFAULT OPTION SETTING
+%% ======================
+%%
+%% Default options for any class---the \ExecuteOptions statement below
+%% should contain the default settings you want for all documents.
+%% Remember these options can always be over-ridden by class-specific
+%% code and options used in a document.
+%%
+%% Check the statement below about default option settings; things
+%% change, y'know.
+%%
+%% rmpage sets things up so that these options are used by default:
+%%
+%% noheaders,footers,notcentre,oneside,portrait,onecolumn,normalaltitude,
+%% normalcolumnsep,normalheadsep,normalfootskip,normalmparsep,
+%% normallength,normalwidth,normaloffset,generalprinter,
+%% noadaptivecolumnsep,nastydate,taciturn
+%%
+%% The (USA) letterpaper option is specified by the standard classes;
+%% rmpage defaults to undefinedpaper (a real papertype in my
+%% book, which I wouldn't recommend unless you like error messages).
+%%
+%% Either the stdmargins or notstdmargins option should be executed, to
+%% avoid (admittedly unlikely) mis-understandings over the placement of
+%% marginal notes. I think I've changed rmpage so there shouldn't be
+%% a problem with this; notstdmargins is the default setting.
+%%
+%% If no config file is found by rmpagenew, the notstdmargins option
+%% is executed using \ExecuteOptions.
+%%
+%%
+%% CHANGE THE COMMAND BELOW TO MATCH YOUR LOCAL PREFERENCES
+%% --------------------------------------------------------
+%%
+% \ExecuteOptions{R+R-dw520printer,a4paper,notstdmargins,nicedate,noheaders}
+\ExecuteOptions{generalprinter,letterpaper,stdmargins,usdate,noheaders}
+%%
+%% --------------------------------------------------------
+%%
+%%
+%% DEFAULT OPTIONS FOR PARTICULAR CLASSES.
+%% ======================================
+%%
+%% Don't set default options in local classes using
+%% \PassOptionsToPackage{rmpage}{...} in your class file unless you have
+%% a good reason to; read the note below.
+%%
+%% If you need to have rmpage \ExecuteOptions for particular classes,
+%% use the \RM@OnClassExecuteOptions statement in the block below.
+%%
+%% \RM@ClassExecuteOption{<class name>}{<option list>} performs
+%% \ExecuteOptions{<option list>} if the class called <class name> has
+%% been loaded.
+%%
+%% Note that if you are building one class upon another (say, nuthesis
+%% based on report), both classes might have been by this stage, so it is
+%% best to have the \RM@OnClassExecuteOptions statement for the base class
+%% *before* the \RM@OnClassExecuteOptions statement for the loading class.
+%% E.g., for nuthesis based on report, have:
+%% \RM@OnClassExecuteOptions{report}{...} *before*
+%% \RM@OnClassExecuteOptions{nuthesis}{...}
+%%
+%% Example default options for book class
+%%
+% \RM@OnClassExecuteOptions{book}
+% {ukdate,R+R-dw520printer,a4paper,headers,footers}
+%%
+%% Example default options for slides class
+%%
+% \RM@OnClassExecuteOptions{slides}
+% {centre,ukdate,R+R-dw520printer,a4paper}
+%%
+%%
+%% Example default options for foils class
+%%
+% \RM@OnClassExecuteOptions{foils}
+% {centre,ukdate,R+R-dw520printer,a4paper}
+%%
+%% Default options for ljmeepex class; ljmueepexam as was and damn
+%% Bill Gates. All these options are executed here so they can all
+%% be over-ridden by options passed by the document. Had they been
+%% passed from the class file by \PassOptionsToPackage, options from
+%% the document that are declared in rmpage after these options would
+%% over-ride these, and those declared before would not. Do it this
+%% way for consistency.
+%%
+% \RM@OnClassExecuteOptions{ljmeepex}
+% {centre,yorkshire,a4paper,noheaders,footers,wide,t@uchnarrower,longish}
+%%
+%%
+%% END DEFAULT OPTION SETTING FOR PARTICULAR CLASSES
+%% =================================================
+%%
+%%
+%% HOOKS
+%% =====
+%%
+%% The commands defined below: \RM@BeforeProcessOptions,
+%% \RM@DefineNewClasses, \RM@AfterProcessOptions,
+%% \RM@PrinterPaperSettings, \RM@BeforeTextheightSetting, and
+%% \RM@AfterWidthSetting are hooks: they are commands which
+%% you can define yourself, which are executed later somewhere in rmpage.
+%% You hang code from them, which is used later; hence hook. LaTeX2e has
+%% hooks like \AtBeginDocument{}, which saves its argument every time
+%% it's executed, so all the code ever passed to it is executed at the
+%% begin document command. The hooks below are just ordinary LaTeX
+%% commands which you define in the usual way. If you re-define them,
+%% the original contents are lost forever. So add stuff to the
+%% definitions here, don't re-define them later unless you have a good
+%% reason to do so. By the way, these hooks don't have to be defined:
+%% rmpage can work without them quite happily.
+%%
+%%
+%% Use this one for playing about if you have to.
+\newcommand{\RM@BeforeProcessOptions}{}% end\RM@BeforeProcessOptions
+%%
+%%
+%% Use this one for setting up things for particular classes; classes
+%% that are based on other classes should appear in this list
+%% \emph{after} the classes they are based on. That is, the class
+%% bithesis (which is based on report), comes after report. This is
+%% easily arranged, because all the standard classes have their class
+%% type number defined before the \RM@DefineNewClasses hook is executed.
+%% You can define your own class types; the current list of class type
+%% numbers is:
+%%
+%% 0=unknown, 1=article, 2=report, 3=letter, 4=book, 5=slides,
+%% 10=ltxdoc, 11=ltxguide,
+%% 20=rmcv, 21=rmletter, 22=bithesis, 23=ljmueepexam
+%% 50=foils
+%%
+%% 0 - 19 standard LaTeX classes
+%% 20 - 49 my classes
+%% 50 - 99 other classes supported by standard rmpage
+%% 100 - maxnum local classes
+%%
+%% If you're going to define a new class type, use class type numbers
+%% above 100. That way you won't find a new version of rmpage usurping
+%% class type numbers you'd defined for your own use. And make sure
+%% that classes that build on other classes have higher a \RM@classtype
+%% than the classes they build upon. I'll probably do something more
+%% sophisticated one day, but this'll do for now.
+%%
+%% The \RM@LocalClassReport hook is executed by the \RM@typeclasstype
+%% command, which is executed by the \RM@OnClassType command if you've
+%% asked for garrulous reporting. It's a debugging aid to help spot
+%% anomalous class type number setting. Why am I doing this?
+%% If you do add a new class, re-define the \RM@LocalClassReport command
+%% here to report it. For example, if you've added the eddie class,
+%% given the number 666, and the orwell class, given the number 101, say:
+%%
+%% \renewcommand{\RM@LocalClassReport}{
+%% \RM@OnClassType{101}{\typeout{orwell class detected}}{}
+%% \RM@OnClassType{666}{\typeout{eddie class detected}}{}
+%% }
+%%
+\renewcommand{\RM@LocalClassReport}{\typeout{Undefined class detected}}
+%%
+%%
+%% Note that the \RM@DefineNewClasses hook is only executed if
+%% \RM@ClassType is less than 20.
+%%
+%% It's okay to test for a class here that will have had its class type
+%% number set by an option. Not fast, but okay. Note that the
+%% \RM@SetClassType command will only set \RM@ClassType to a value larger
+%% than the current one; this is so that subsequent detection (for
+%% example) of the report class on which you have built the nuthesis
+%% class cannot set \RM@classtype to 2.
+%%
+%% The new classes below are some that I've defined; I've left them
+%% in so you don't pinch the numbers and to give a real-life example.
+%% Most of these classes are a bit rough and not generally useful,
+%% so I'm keeping them to myself; although if you want a
+%% Bolton Institute thesis class file, I'll send you mine if you ask me
+%% for it.
+%%
+\newcommand{\RM@DefineNewClasses}{
+ \RM@SetClassType{rmcv} {20}
+ \RM@SetClassType{rmletter} {21}
+ \RM@SetClassType{bithesis} {22}
+ \RM@SetClassType{ljmueepexam}{23}
+ \RM@SetClassType{ljmeepex} {23}
+}%% end\RM@DefineNewClasses
+%%
+%%
+%% AfterProcessOptions is useful for setting up things for particular
+%% classes using the \RM@OnClassType command
+%%
+%% I've left in the code I wrote for my class files as examples; the
+%% code for ltxdoc is required if you insist on using rmpage with it.
+%%
+\newcommand{\RM@AfterProcessOptions}{
+% % \renewcommand{\RM@mintextheight}{730pt}% For testing only
+% % \renewcommand{\RM@maxtextheight}{9000pt}
+ %
+ % class type 10=ltxdoc
+ %
+ \RM@OnClassType{10}{
+ \RM@oclwarninfo{3}
+ {ltxdoc and rmpage don't go well together}
+% \RM@ocl{2}{\typeout{Set \protect\normalmarginpar}}{}
+% % Try to make mpars appear in alternating margins
+% \ifRM@twoside\@mparswitchtrue\fi
+% % Try to make mpars appear in default margin
+% \normalmarginpar
+ % Ensure \textwidth is at least the required width
+ \def\RM@mintextwidth{355pt}
+ }{}
+ %
+ % class type 20=rmcv
+ %
+ \RM@OnClassType{20}{
+ \RM@oclwarninfo{3}
+ {I don't do much for rmcv yet,
+ and if you specified\MessageBreak
+ some options that don't get used, I won't complain}
+ }{}
+ %
+ % class type 22=bithesis
+ %
+ \RM@OnClassType{22}{
+ % Set minimum margins as specified in the regulations.
+ % Everything else is done by the class file. These commands are
+ % defined to be 0pt at the start of rmpage, so they can't be set in
+ % the class file.
+ \RM@DefLengthAtLeast{\RM@minoutsidemargin}{15mm}
+ \RM@DefLengthAtLeast{\RM@mininsidemargin} {40mm}
+ \RM@DefLengthAtLeast{\RM@mintopmargin} {15mm}
+ \RM@DefLengthAtLeast{\RM@minbottommargin} {15mm}
+ }{}
+ %
+ % Add more here
+ %
+}% end\RM@AfterProcessOptions
+%%
+%%
+%% The \RM@On...PaperSize commands take two compulsory arguments, and
+%% one optional arguments. The optional argument is the long paper
+%% size code. The default value is 0, meaning `not long'.
+%% -1 = any long size
+%% 0 = not long only (or 1-long)
+%% 1 = 7/8 2 = 3/4 3 = 2/3 4 = 5/8 5 = 1/2
+%% 6 = 3/8 7 = 1/3 8 = 1/4 9 = 1/8
+%%
+%% The first compulsory argument is the paper size code; you can look
+%% them up elsewhere.
+%%
+%% If the paper size specified in the arguments to a \RM@...papersize
+%% command is the selected paper size, the third argument is executed.
+%%
+%%
+%% Add setting for local printer/paper combinations here; new printers
+%% should be declared using \DeclareOption above. Have a look in
+%% rmpage.sty, at the code above the point where this hook is
+%% executed, to get a better idea of what's going on.
+\newcommand*{\RM@PrinterPaperSettings}{
+%%
+%% Note that you can print out long A3 sizes (1/2 and under) on A4
+%% paper, with the same minimum clearances applying to the long A3 size
+%% as apply to A4. So in the common case of an A4 printer, all you
+%% need to do is make the A3 printing limits the same as A4 printing
+%% limits, and Bob's yer auntie's live-in lover. What the two
+%% commands below do is assume that all printers are A4 printers, and
+%% sets the clearances accordingly. If you use a non-A4 printer, you
+%% might need to add code to over-ride this assumption for that
+%% printer, after these two commands.
+%%
+ \RM@OnPortraitPaperSize[-1]{13}% size 13 = A3
+ {
+ \let\RM@minrightclearance\RM@ptrrportclear
+ \let\RM@minleftclearance \RM@ptrlportclear
+ \let\RM@minfootclearance \RM@ptrbportclear
+ \let\RM@minheadclearance \RM@ptrtportclear
+ }
+ \RM@OnLandscapePaperSize[-1]{13}% size 13 = A3
+ {
+ \let\RM@minrightclearance\RM@ptrrlandclear
+ \let\RM@minleftclearance \RM@ptrllandclear
+ \let\RM@minfootclearance \RM@ptrblandclear
+ \let\RM@minheadclearance \RM@ptrtlandclear
+ }
+%%
+%% The code below sets up rmpage to do things the way I like if
+%% you've selected an HP 500 series inkjet (like my DW520).
+%% I print out A5 pages by using dvidvi to put two of them on an A4
+%% page, so A5 portrait clearances need to be A4 landscape clearances
+%% and vice-versa. Envelopes suffer a very large non-printing margin
+%% at the bottom, so this is dealt with. Note that I have to set
+%% both the ptrclear commands *and* the minclearance commands in this
+%% case, because the ptrclear commands are assumed to be set by now,
+%% and I have to change them.
+%%
+%% Note that I have asked rmpage to jack up any of these paper sizes that
+%% need it when I have specified an HP 500 series inkjet; this means that
+%% you can have an unexpectedly large gap at the bottom of a page without
+%% being warned about it, if the page layout you asked for would
+%% otherwise have tried to print in the asymmetrically large non-printing
+%% margin at the bottom of the paper. I don't mind this; if you do,
+%% remove the \RM@jackuptrue statements.
+%%
+ \RM@OnPrinterType{11}% HP DeskWriter 500 series
+ {
+ \RM@OnPortraitPaperSize{14}% size 14 = A4
+ {\RM@jackuptrue}
+ \RM@OnPortraitPaperSize{15}% size 15 = A5
+ {\let\RM@minrightclearance\RM@ptrrlandclear
+ \let\RM@minleftclearance\RM@ptrrlandclear
+ \let\RM@minfootclearance\RM@ptrblandclear
+ \let\RM@minheadclearance\RM@ptrtlandclear}
+ \RM@OnLandscapePaperSize{15}% size 15 = A5
+ {\let\RM@minrightclearance\RM@ptrrportclear
+ \let\RM@minleftclearance\RM@ptrlportclear
+ \let\RM@minfootclearance\RM@ptrbportclear
+ \let\RM@minheadclearance\RM@ptrtportclear}
+ \RM@OnPortraitPaperSize[-1]{13}% size 13 = A3
+ {\RM@jackuptrue}
+ \RM@OnLandscapePaperSize[-1]{13}% size 13 = A3
+ {\RM@jackupfalse}
+ \RM@OnPaperSize{58}% size 58 = DL envelopes
+ {\def\RM@ptrrlandclear{19mm}
+ \def\RM@ptrrlandclear{7mm}
+ \def\RM@ptrblandclear{4mm}% spec 3mm
+ \def\RM@ptrtlandclear{4mm}% spec 3mm
+ \def\RM@ptrrportclear{4mm}% spec 3mm
+ \def\RM@ptrlportclear{4mm}% spec 3mm
+ \def\RM@ptrbportclear{19mm}
+ \def\RM@ptrtportclear{7mm}}
+ \RM@OnPortraitPaperSize{58}% size 58 = DL envelopes
+ {\let\RM@minrightclearance\RM@ptrrportclear
+ \let\RM@minleftclearance\RM@ptrlportclear
+ \let\RM@minfootclearance\RM@ptrbportclear
+ \let\RM@minheadclearance\RM@ptrtportclear}
+ \RM@OnLandscapePaperSize{58}% size 58 = DL envelopes
+ {\let\RM@minrightclearance\RM@ptrrlandclear
+ \let\RM@minleftclearance\RM@ptrllandclear
+ \let\RM@minfootclearance\RM@ptrblandclear
+ \let\RM@minheadclearance\RM@ptrtlandclear}
+ }% end HP DeskWriter 500 series
+}% end\RM@PrinterPaperSettings
+%%
+%%
+%% Add code to select textheight setting method, and define new
+%% textheight setting code here
+\newcommand*{\RM@BeforeTextheightSetting}{}% end\RM@BeforeTextheightSetting
+%%
+%% You might add code to define \RM@widthsetter to load your own
+%% horizontal parameter setting code for a particular class here
+%% e.g., \RM@OnClassType{69}{\def\RM@widthsetter{rsw-ll.pko}}{}
+\newcommand*{\RM@BeforeWidthSetting}{}% end\RM@BeforeWidthSetting
+%%
+%% If you are using a class that defines \RM@textwidthgroup to 4, put
+%% code in this hook that defines: \RM@ptperchar to the width of one
+%% average character of your main body fount; \@tempdima to the
+%% paper-based initial \textwidth guess; \@tempdimb to the
+%% character-based initial \textwidth guess; and code to modify
+%% \columnsep if you want to.
+%% This hook is executed after the parameters above have been set.
+\newcommand*{\RM@AfterInitialTextwidthSetting}{}% end\RM@AfterInitialTextwidthSetting
+%%
+%% Do what preventest thou from wilting\ldots For symmetry's sake is
+%% this here.
+%%
+\newcommand*{\RM@AfterWidthSetting}{}% end\RM@AfterWidthSetting
+%%
+%%
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/rmpage/rmplocal.gfc b/macros/latex/contrib/rmpage/rmplocal.gfc
new file mode 100644
index 0000000000..9d29c55644
--- /dev/null
+++ b/macros/latex/contrib/rmpage/rmplocal.gfc
@@ -0,0 +1,1407 @@
+%% File rmplocal.cfg 11/9/96
+%% File rmpagelocal.cfg 23/8/96
+%%
+%% Copyright 1996 and 1997 R.J.M. McDonnell
+%% email: rebecca@astrid.u-net.com
+%%
+%%
+%% This file is meant to be modified at each installation. So that
+%% you don't end up with a mess that's hideously incompatible with
+%% other installations and versions of the rmpage package, do this:
+%% when you change this file, add a comment on the top line identifying
+%% it as yours, and change the comment after the version number to do
+%% the same thing (e.g., [1923/09/17 v0.carrot Gertrude Stein's config
+%% file for the rmpage package]).
+%%
+%% Please don't make any other changes above the line: `LOCAL CODE BELOW
+%% HERE PLEASE', aside from commenting out or uncommenting whole
+%% options; you're best off not deleting them, honest.
+%%
+%% My current idea is that the contents of this file below the `LOCAL
+%% CODE BELOW HERE PLEASE' line can be cut and pasted wholesale into
+%% a later version of this file; the code that's there is my local
+%% configuration code, and I expect that its only use to you is as
+%% examples. My intention is that future versions of this file won't
+%% have essential code below the line `LOCAL CODE BELOW HERE PLEASE'
+%% either.
+%%
+%% I suggest the first thing you do is hunt down the \ExecuteOptions
+%% statements and change them to whatever you think suits you best.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}[1996/06/01]
+\ProvidesFile{rmplocal.gfc}[1997/10/10 v1.0 local configuration file
+for the rmpage package.]
+%
+% 1997/10/10 v1.0 Transmogrified it into the first public release
+% version
+% 1996/11/01 v0.36 Changed the typesetting tightness the loadpsfount
+% options change to (now looseish).
+% Goes with rmpage-v0.90.sty
+% 1996/11/01 v0.35 Played about with ltxdoc stuff. Still no joy.
+% Goes with rmpage-v0.89.2.sty
+% 1996/10/31 v0.34 Added the three beton options, just after the
+% loadfount stuff. Belongs here because not everyone uses the
+% concrete founts.
+% Goes with rmpage-v0.89.sty
+% 1996/10/29 v0.33 Put \RM@notinexecuteoptions back in t@uch options;
+% put ljmeepex options into class file. Perhaps change rmpage so
+% t@uch options can be used; tricky.
+% Goes with rmpage-v0.88.sty
+% 1996/10/28 v0.32 Added \RM@AfterInitialTextwidthSetting hook;
+% added book class default options
+% Goes with rmpage-v0.88.sty
+% 1996/10/28 v0.31 Added foils defaults.
+% Goes with rmpage-v0.87.sty
+% 1996/10/25 v0.30 Added stuff about \RM@LocalClassReport hook.
+% Goes with rmpage-v0.85.sty
+% 1996/10/25 v0.29 Changed nastydate option to othernicedate. :-).
+% Goes with rmpage-v0.84.1.sty
+% 1996/10/21 v0.28 Changed slides options a bit; rmpwslid.pko is now
+% used.
+% Goes with rmpage-v0.84.sty
+% 1996/10/21 v0.27 Uncommented another t@uchoption; allowed all t@uch
+% options in \ExecuteOptions; added support for ljmeepex class
+% (options are declared here, and it's given the same number as
+% ljmueepexam. Is Bill Gates the Antichrist?)
+% Goes with rmpage-v0.83.sty
+% 1996/10/19 v0.26 Added ringbinding option which uses new
+% \RM@DefLengthAtLeast command. Changed bithesis settings to use
+% this command to define minmargins.
+% Goes with rmpage-v0.83.sty
+% 1996/10/17 v0.25 Changed loadpsfount stuff to use new command to
+% set looseness, which requests sloppiest \if@twocolum.
+% Goes with rmpage-v0.82.sty
+% 1996/10/14 v0.24 Added errorshow, warningshow, infoshow, and debugshow
+% options (asleep); these are used by tracefnt---someone might
+% like them.
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/09 v0.23 Confirmed lj4printer limits by measuring MS works
+% output. Not great, but it'll do for now.
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/06 v0.22 Fixed loadbookman option
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/04 v0.21 Changed an errant \RM@ocltype to \RM@ocl
+% Goes with rmpage-v0.81.1.sty
+% 1996/10/01 v0.20 Changed loadconcrete option so it uses the beton
+% package; goes with changes in rmpage. Changed generalprinter so
+% it works with HP inkjets.
+% Goes with rmpage-v0.81.sty
+% 1996/09/30 v0.19.1 Changed c76paper option to c7/6paper; binned a
+% redundant asleepoption.
+% Goes with rmpage-v0.80.1.sty
+% 1996/09/29 v0.19 replaced smallbase things with normalbase things.
+% Goes with rmpage-v0.80.sty
+% 1996/09/28 v0.18 added noheaders and notstdmargins to default
+% \ExecuteOptions; to counteract changed default flag settings.
+% 1996/09/27 v0.17 Downcased the RA and SRA paper size names; changed
+% luccasua to lucasual.
+% Goes with rmpage-v0.78.sty
+% 1996/09/26 v0.16 Changed some comments; changed
+% \RM@ClassExecuteOptions to \RM@OnClassExecuteOptions
+% Goes with rmpage-v0.76.sty
+% 1996/09/24 v0.15 Added printer/paper settings from rmpage.sty to
+% the \RM@PrinterPaperSettings hook. Put loadcourier and
+% loadconcrete to bed. Commented out rmcv, rmletter, and bithesis
+% options; they should be redundant by now. Delete them later if
+% there's no problems.
+% Goes with rmpage-v0.74.sty
+% 1996/09/23 v0.14 Changed R+Rdw520printer option so \RM@printertype
+% is set to 11 (new 500 series value), rather than 2 (old DW520
+% value). Foolish child. Added the thisfontwidth option,
+% commented out.
+% Goes with rmpage-v0.73.sty
+% 1996/09/22 v0.13 basemaxmparwidth and basemparclearance options
+% commented out. I mean, really, why not? Added the letter4paper
+% size: an unholy alliance between US letter and ISO A4. Avoid
+% like the plague; but I can almost see a use for it.
+% Goes with rmpage-v0.72.sty
+% 1996/09/18 v0.12.1 Changed some comments.
+% Goes with rmpage-v0.71.2.sty
+% 1996/09/16 v0.12 Added fulllength and stdlength options from
+% rmpage, because they need executing after the touchlength options.
+% Goes with rmpage-v0.71.sty
+% 1996/09/13 v0.11.1 minor doc change
+% 1996/09/13 v0.11 Not much really: added the center and notcenter
+% options to match the documentation.
+% Goes with rmpage-v0.69.sty
+% 1996/09/11 v0.10.1 Made a line a comment line again (oops)
+% Goes with rmpage-v0.67.sty
+% 1996/09/11 v0.10 Added some more options, and changed the name from
+% rmpagelocal.cfg (as it would be in a world free from Bill
+% Gates's malign influence) to the rather silly rmplocal.cfg. It
+% might have been ratlocal, but I decided in favour of utility
+% against character. Apologies to those who use the
+% abreviation RMP in a different context. Added lots and lots of
+% option declarations from rmpage.sty. Changed default option
+% setting and played around with class detection rather a lot;
+% it's relatively elegant now.
+% Goes with rmpage-v0.66.sty
+% 1996/09/10 v0.9 Turned a few %% lines into % lines
+% Goes with rmpage-v0.65.sty
+% 1996/09/10 v0.8 Played about with commented-out options
+% Goes with rmpage-v0.64.sty
+% 1996/09/09 v0.7 Played around with class detection and changed
+% class type numbers
+% Goes with rmpage-v0.63.sty
+% 1996/09/04 v0.6 Erm, some stuff. Changed printer option to
+% dw520-ours.
+% Goes with rmpage-v0.61.sty
+% 1996/09/03 v0.5 Played about a bit; can't remember the details.
+% Goes with rmpage-v0.60.sty
+% 1996/09/02 v0.4 added hook stuff, and included ltxdoc code in one
+% of them.
+% 1996/08/25 v0.3 added rarely used paper size definitions.
+% Goes with rmpagenew v0.56
+% 1996/08/24 v0.2 changed name and stuff; goes with rmpagenew v0.55
+% 1996/08/23 v0.1 Here we go... Goes with rmpagenew v0.54
+%
+%%
+%%
+%% OPTION DECLARATION
+%% ==================
+%%
+%% This section contains the standard options for rmpage. I suggest
+%% you don't add or delete anything from this section: just comment
+%% options out to speed rmpage up or uncomment them if you need to
+%% use them.
+%%
+%% If you want to add options, add them at the end of this section
+%% in between the places marked.
+%%
+%%
+%% PAPER SIZES
+%% -----------
+%%
+%% \DeclareOption{undefinedpaper}{\def\RM@papertype{0}}
+%%
+%% \DeclareOption{letter4paper}{\def\RM@papertype{9}
+%% \setlength\paperheight{8.5in}
+%% \setlength\paperwidth{210mm}
+%% }
+%%
+%% \DeclareOption{a0paper}{\def\RM@papertype{10}
+%% \setlength\paperheight{1189mm}
+%% \setlength\paperwidth{841mm}
+%% }
+%% \DeclareOption{a1paper}{\def\RM@papertype{11}
+%% \setlength\paperheight{841mm}
+%% \setlength\paperwidth{594mm}
+%% }
+%% \DeclareOption{a2paper}{\def\RM@papertype{12}
+%% \setlength\paperheight{594mm}
+%% \setlength\paperwidth{420mm}
+%% }
+ \DeclareOption{a3paper}{\def\RM@papertype{13}%
+ \setlength\paperheight{420mm}%
+ \setlength\paperwidth{297mm}%
+ }
+
+ \DeclareOption{a6paper}{\def\RM@papertype{16}%
+ \setlength\paperheight{148mm}%
+ \setlength\paperwidth{105mm}%
+ }
+%% \DeclareOption{a7paper}{\def\RM@papertype{17}
+%% \setlength\paperheight{105mm}
+%% \setlength\paperwidth{74mm}
+%% }
+%% \DeclareOption{a8paper}{\def\RM@papertype{18}
+%% \setlength\paperheight{74mm}
+%% \setlength\paperwidth{52mm}
+%% }
+%% \DeclareOption{a9paper}{\def\RM@papertype{19}
+%% \setlength\paperheight{52mm}
+%% \setlength\paperwidth{37mm}
+%% }
+%% \DeclareOption{a10paper}{\def\RM@papertype{20}
+%% \setlength\paperheight{37mm}
+%% \setlength\paperwidth{26mm}
+%% }
+%%
+%% \DeclareOption{b0paper}{\def\RM@papertype{30}
+%% \setlength\paperheight{1414mm}
+%% \setlength\paperwidth{1000mm}
+%% }
+%% \DeclareOption{b1paper}{\def\RM@papertype{31}
+%% \setlength\paperheight{1000mm}
+%% \setlength\paperwidth{707mm}
+%% }
+%% \DeclareOption{b2paper}{\def\RM@papertype{32}
+%% \setlength\paperheight{707mm}
+%% \setlength\paperwidth{500mm}
+%% }
+%% \DeclareOption{b3paper}{\def\RM@papertype{33}
+%% \setlength\paperheight{500mm}
+%% \setlength\paperwidth{353mm}
+%% }
+ \DeclareOption{b4paper}{\def\RM@papertype{34}%
+ \setlength\paperheight{353mm}%
+ \setlength\paperwidth{250mm}%
+ }
+
+ \DeclareOption{b6paper}{\def\RM@papertype{36}%
+ \setlength\paperheight{176mm}%
+ \setlength\paperwidth{125mm}%
+ }
+ \DeclareOption{b7paper}{\def\RM@papertype{37}%
+ \setlength\paperheight{125mm}%
+ \setlength\paperwidth{88mm}%
+ }
+%% \DeclareOption{b8paper}{\def\RM@papertype{38}
+%% \setlength\paperheight{88mm}
+%% \setlength\paperwidth{62mm}
+%% }
+%% \DeclareOption{b9paper}{\def\RM@papertype{39}
+%% \setlength\paperheight{62mm}
+%% \setlength\paperwidth{44mm}
+%% }
+%% \DeclareOption{b10paper}{\def\RM@papertype{40}
+%% \setlength\paperheight{44mm}
+%% \setlength\paperwidth{31mm}
+%% }
+%% \DeclareOption{c0paper}{\def\RM@papertype{50}
+%% \setlength\paperheight{1297mm}
+%% \setlength\paperwidth{917mm}
+%% }
+%% \DeclareOption{c1paper}{\def\RM@papertype{51}
+%% \setlength\paperheight{917mm}
+%% \setlength\paperwidth{648mm}
+%% }
+%% \DeclareOption{c2paper}{\def\RM@papertype{52}
+%% \setlength\paperheight{648mm}
+%% \setlength\paperwidth{458mm}
+%% }
+%% \DeclareOption{c3paper}{\def\RM@papertype{53}
+%% \setlength\paperheight{458mm}
+%% \setlength\paperwidth{324mm}
+%% }
+%% \DeclareOption{c4paper}{\def\RM@papertype{54}
+%% \setlength\paperheight{324mm}
+%% \setlength\paperwidth{229mm}
+%% }
+%%
+\DeclareOption{c5paper}{\def\RM@papertype{55}%
+ \setlength\paperheight{229mm}%
+ \setlength\paperwidth{162mm}%
+ }
+
+%% \DeclareOption{c7paper}{\def\RM@papertype{57}
+%% \setlength\paperheight{114mm}
+%% \setlength\paperwidth{81mm}
+%% }
+%%
+%% \DeclareOption{c7/6paper}{\def\RM@papertype{59}% c7/6 paper
+%% \setlength\paperheight{162mm}
+%% \setlength\paperwidth{81mm}
+%% }
+%% % Note that the BS4264 envelope sizes have names I invented
+%% % BS4264 Post office preferred envelope: seed packets, wage slips, gen pack
+%% \DeclareOption{bspopseedenvelopepaper}{\def\RM@papertype{60}
+%% \setlength\paperheight{152mm}
+%% \setlength\paperwidth{102mm}
+%% }
+%% % BS4264 Post office preferred envelope: gen commercial, non iso sizes
+%% \DeclareOption{bspopnonisoenvelopepaper}{\def\RM@papertype{61}
+%% \setlength\paperheight{229mm}
+%% \setlength\paperwidth{102mm}
+%% }
+%% % BS4264 envelope; bulky A5, catalogues, brochures.
+%% \DeclareOption{bsbrochureenvelopepaper}{\def\RM@papertype{62}
+%% \setlength\paperheight{254mm}
+%% \setlength\paperwidth{178mm}
+%% }
+%% % BS4264 envelope; legal docs, catalogues, photos
+%% \DeclareOption{bslegalenvelopepaper}{\def\RM@papertype{63}
+%% \setlength\paperheight{270mm}
+%% \setlength\paperwidth{216mm}
+%% }
+%% % BS4264 envelope; insurance policies, legal docs
+%% \DeclareOption{bslargelegalenvelopepaper}{\def\RM@papertype{64}
+%% \setlength\paperheight{305mm}
+%% \setlength\paperwidth{127mm}
+%% }
+%% % BS4264 envelope; bulky docs, calendars
+%% \DeclareOption{bscalendarenvelopepaper}{\def\RM@papertype{65}
+%% \setlength\paperheight{381mm}
+%% \setlength\paperwidth{254mm}
+%% }
+%%
+ \DeclareOption{foolscapfoliopaper}{\def\RM@papertype{70}%
+ \setlength\paperheight{13.5in}%
+ \setlength\paperwidth{8.5in}%
+ }
+%% \DeclareOption{foolscappaper}{\def\RM@papertype{70}% foolscap option gives foolscap
+%% \setlength\paperheight{13.5in}% folio paper
+%% \setlength\paperwidth{8.5in}
+%% }
+%%
+%% \DeclareOption{foolscapquartopaper}{\def\RM@papertype{71}
+%% \setlength\paperheight{8.5in}
+%% \setlength\paperwidth{6.75in}
+%% }
+%% \DeclareOption{foolscapoctavopaper}{\def\RM@papertype{72}
+%% \setlength\paperheight{6.75in}
+%% \setlength\paperwidth{4.25in}
+%% }
+%% \DeclareOption{crownfoliopaper}{\def\RM@papertype{73}
+%% \setlength\paperheight{15in}
+%% \setlength\paperwidth{10in}
+%% }
+%% \DeclareOption{crownquartopaper}{\def\RM@papertype{74}
+%% \setlength\paperheight{10in}
+%% \setlength\paperwidth{7.5in}
+%% }
+%% \DeclareOption{crownoctavopaper}{\def\RM@papertype{75}
+%% \setlength\paperheight{7.5in}
+%% \setlength\paperwidth{5in}
+%% }
+%% \DeclareOption{royalfoliopaper}{\def\RM@papertype{76}
+%% \setlength\paperheight{20in}
+%% \setlength\paperwidth{12.5in}
+%% }
+%% \DeclareOption{royalquartopaper}{\def\RM@papertype{77}
+%% \setlength\paperheight{12.5in}
+%% \setlength\paperwidth{10in}
+%% }
+%% \DeclareOption{royaloctavopaper}{\def\RM@papertype{78}
+%% \setlength\paperheight{10in}
+%% \setlength\paperwidth{6.25in}
+%% }
+%% \DeclareOption{imperialfoliopaper}{\def\RM@papertype{79}
+%% \setlength\paperheight{22in}
+%% \setlength\paperwidth{15.5in}
+%% }
+%% \DeclareOption{imperialquartopaper}{\def\RM@papertype{80}
+%% \setlength\paperheight{15in}
+%% \setlength\paperwidth{11in}
+%% }
+%% \DeclareOption{imperialoctavopaper}{\def\RM@papertype{81}
+%% \setlength\paperheight{11in}
+%% \setlength\paperwidth{7.5in}
+%% }
+%% \DeclareOption{largecrownoctavopaper}{\def\RM@papertype{82}
+%% \setlength\paperheight{8in}
+%% \setlength\paperwidth{5.25in}
+%% }
+%% \DeclareOption{demyoquartopaper}{\def\RM@papertype{83}
+%% \setlength\paperheight{11.25in}
+%% \setlength\paperwidth{8.75in}
+%% }
+%% \DeclareOption{demyoctavopaper}{\def\RM@papertype{84}
+%% \setlength\paperheight{8.75in}
+%% \setlength\paperwidth{5.625in}
+%% }
+%% \DeclareOption{mediumquartopaper}{\def\RM@papertype{85}
+%% \setlength\paperheight{12in}
+%% \setlength\paperwidth{9.5in}
+%% }
+%% \DeclareOption{mediumoctavopaper}{\def\RM@papertype{86}
+%% \setlength\paperheight{9.5in}
+%% \setlength\paperwidth{6in}
+%% }
+%%
+%% \DeclareOption{ra0paper}{\def\RM@papertype{90}
+%% \setlength\paperheight{1270mm}
+%% \setlength\paperwidth{960mm}
+%% }
+%% \DeclareOption{ra1paper}{\def\RM@papertype{91}
+%% \setlength\paperheight{1270mm}
+%% \setlength\paperwidth{960mm}
+%% }
+%% \DeclareOption{ra2paper}{\def\RM@papertype{92}
+%% \setlength\paperheight{1270mm}
+%% \setlength\paperwidth{960mm}
+%% }
+%% \DeclareOption{sra0paper}{\def\RM@papertype{93}
+%% \setlength\paperheight{1280mm}
+%% \setlength\paperwidth{900mm}
+%% }
+%% \DeclareOption{sra1paper}{\def\RM@papertype{94}
+%% \setlength\paperheight{900mm}
+%% \setlength\paperwidth{840mm}
+%% }
+%% \DeclareOption{sra2paper}{\def\RM@papertype{95}
+%% \setlength\paperheight{640mm}
+%% \setlength\paperwidth{450mm}
+%% }
+%% \DeclareOption{metricdoublecrownpaper}{\def\RM@papertype{96}
+%% \setlength\paperheight{770mm}
+%% \setlength\paperwidth{505mm}
+%% }
+%% \DeclareOption{metricquadcrownpaper}{\def\RM@papertype{97}
+%% \setlength\paperheight{1010mm}
+%% \setlength\paperwidth{770mm}
+%% }
+%% \DeclareOption{metriclargequadcrownpaper}{\def\RM@papertype{98}
+%% \setlength\paperheight{1060mm}
+%% \setlength\paperwidth{820mm}
+%% }
+%% \DeclareOption{metricquaddemypaper}{\def\RM@papertype{99}
+%% \setlength\paperheight{1030mm}
+%% \setlength\paperwidth{890mm}
+%% }
+%% \DeclareOption{metricsmallquadroyalpaper}{\def\RM@papertype{100}
+%% \setlength\paperheight{1270mm}
+%% \setlength\paperwidth{960mm}
+%% }
+%%
+%%
+%% LONG PAPER TYPES
+%% ----------------
+%%
+%% 0 = not long (or 1)
+%% 1 = 7/8 2 = 3/4 3 = 2/3 4 = 5/8 5 = 1/2
+%% 6 = 3/8 7 = 1/3 8 = 1/4 9 = 1/8
+%%
+%\DeclareOption{notlongpaper}{\def\RM@longpapertype{0}}
+%\DeclareOption{7/8longpaper}{\def\RM@longpapertype{1}}
+\DeclareOption{3/4longpaper}{\def\RM@longpapertype{2}}
+\DeclareOption{2/3longpaper}{\def\RM@longpapertype{3}}
+%\DeclareOption{5/8longpaper}{\def\RM@longpapertype{4}}
+%\DeclareOption{1/2longpaper}{\def\RM@longpapertype{5}}
+%\DeclareOption{3/8longpaper}{\def\RM@longpapertype{6}}
+\DeclareOption{1/3longpaper}{\def\RM@longpapertype{7}}
+\DeclareOption{1/4longpaper}{\def\RM@longpapertype{8}}
+%\DeclareOption{1/8longpaper}{\def\RM@longpapertype{9}}
+%%
+%%
+%% OPTIONS TO CHANGE MARGINPARS
+%% ----------------------------
+%%
+%% marginparsep is scaled by option
+\DeclareOption{leastmparsep}{\RM@mparsepoption=3}
+\DeclareOption{lessmparsep}{\RM@mparsepoption=6}
+\DeclareOption{lessishmparsep}{\RM@mparsepoption=9}
+\DeclareOption{normalmparsep}{\RM@mparsepoption=12}
+\DeclareOption{moreishmparsep}{\RM@mparsepoption=15}
+\DeclareOption{moremparsep}{\RM@mparsepoption=18}
+\DeclareOption{mostmparsep}{\RM@mparsepoption=21}
+%%
+%% The basemparclear options need to be executed after paperwidth has
+%% been set. Easily done with \ProcessOptions rather than
+%% \ProcessOptions*, and the papersize setting options declared above
+%% rather than below. The normalbasemparclear value is set after option
+%% processing if no other value has been set. If \RM@mparclearance is
+%% -666pt, the normalbasemparclear value is set; if it's -667pt, the
+%% largebaselinemparclear value is set (both just after
+%% \RM@PrinterPaperSettings hook is executed, which is well after
+%% \paperwidth is set). This value is scaled by option just before it's
+%% used, so one can use the \RM@BeforeWidthSetting hook to change things.
+%% \DeclareOption{normalbasemparclear}{\setlength\RM@mparclearance{-666pt}}
+%% \DeclareOption{largebasemparclear}{\setlength\RM@mparclearance{-667pt}}
+%%
+%% \DeclareOption{normalbasemaxmparwidth}{\setlength\RM@maxmparwidth{-666pt}}
+%% \DeclareOption{largebasemaxmparwidth}{\setlength\RM@maxmparwidth{-667pt}}
+%%
+%% the gap between the edge of the paper and the edge of a marginpar
+%% is 0.4in (10.16mm) with standard article/report class settings.
+%% The mparclearance options change this.
+%%
+%% mparclearance for A4 portrait paper:
+%% least=3.95mm less=5.37mm lessish=7.28mm norm=9.88
+%% moreish=13.41mm more=18.20mm most=24.71mm
+%%
+%% (norm=0.4in with US letter paper). Note that there are no touch
+%% options for mparclearance or maxmparwidth. There's no particular
+%% reason why they shouldn't be added. So I did, but left them
+%% commented out.
+\DeclareOption{leastmparclearance}{\RM@mparclearoption=3}
+\DeclareOption{lessmparclearance}{\RM@mparclearoption=6}
+\DeclareOption{lessishmparclearance}{\RM@mparclearoption=9}
+\DeclareOption{normalmparclearance}{\RM@mparclearoption=12}% norm
+\DeclareOption{moreishmparclearance}{\RM@mparclearoption=15}
+\DeclareOption{moremparclearance}{\RM@mparclearoption=18}
+\DeclareOption{mostmparclearance}{\RM@mparclearoption=21}
+%%
+%% maxmparwidth is now set as a fraction of paperwidth, such that with
+%% portrait US letter paper, you get 2in as standard (or maybe with A4; I
+%% really ought to check this.. It's scale by option just like
+%% everything else. If you want to change the default base value of
+%% maxmparwidth, the \RM@BeforeWidthSetting hook is an ideal place to do
+%% it.
+\DeclareOption{leastmaxmparwidth}{\RM@maxmparwidthoption=3}
+\DeclareOption{lessmaxmparwidth}{\RM@maxmparwidthoption=6}
+\DeclareOption{lessishmaxmparwidth}{\RM@maxmparwidthoption=9}
+\DeclareOption{normalmaxmparwidth}{\RM@maxmparwidthoption=12}% norm
+\DeclareOption{moreishmaxmparwidth}{\RM@maxmparwidthoption=15}
+\DeclareOption{moremaxmparwidth}{\RM@maxmparwidthoption=18}
+\DeclareOption{mostmaxmparwidth}{\RM@maxmparwidthoption=21}
+%%
+%%
+%% TOUCH OPTIONS
+%% -------------
+%%
+%% Note that all the touch options need to be executed after their
+%% corresponding `straight' options. This is inevitable if they are
+%% left here and \ProcessOptions is used rather than the star form,
+%% because rmplocal.cfg is loaded after all of rmpage's \DeclareOptions
+%% statements.
+%%
+%% \DeclareOption{t@uchlonger} {\RM@notinexecuteoptions\advance\RM@lengthoption by 1}
+%% \DeclareOption{t@uchshorter}{\RM@notinexecuteoptions\advance\RM@lengthoption by -1}
+\DeclareOption{touchlonger}{\RM@notinexecuteoptions\advance\RM@lengthoption by 1}
+\DeclareOption{touchshorter}{\RM@notinexecuteoptions\advance\RM@lengthoption by -1}
+%%
+\DeclareOption{touchmorecolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by1}
+\DeclareOption{touchlesscolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by-1}
+%% \DeclareOption{t@uchmorecolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by1}
+%% \DeclareOption{t@uchlesscolsep}{\RM@notinexecuteoptions\advance\RM@columnsepoption by-1}
+%%
+\DeclareOption{touchmoremparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by1}
+\DeclareOption{touchlessmparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by-1}
+%% \DeclareOption{t@uchmoremparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by1}
+%% \DeclareOption{t@uchlessmparsep}{\RM@notinexecuteoptions\advance\RM@mparsepoption by-1}
+%%
+\DeclareOption{touchmorefootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by1}
+\DeclareOption{touchlessfootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by-1}
+%% \DeclareOption{t@uchmorefootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by1}
+%% \DeclareOption{t@uchlessfootskip}{\RM@notinexecuteoptions\advance\RM@footskipoption by-1}
+%%
+\DeclareOption{touchmoreheadsep}{\RM@notinexecuteoptions\advance\RM@headsepoption by1}
+\DeclareOption{touchlessheadsep}{\RM@notinexecuteoptions\advance\RM@headsepoption by-1}
+%% \DeclareOption{t@uchmoreheadsep}{\advance\RM@headsepoption by1}
+%% \DeclareOption{t@uchlessheadsep}{\advance\RM@headsepoption by-1}
+%%
+\DeclareOption{t@uchwider}{\RM@notinexecuteoptions\advance\RM@widthoption by1}
+\DeclareOption{t@uchnarrower}{\RM@notinexecuteoptions\advance\RM@widthoption by-1}
+\DeclareOption{touchwider}{\RM@notinexecuteoptions\advance\RM@widthoption by1}
+\DeclareOption{touchnarrower}{\RM@notinexecuteoptions\advance\RM@widthoption by-1}
+%%
+%% \DeclareOption{t@uchmoreoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by1}
+%% \DeclareOption{t@uchlessoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by-1}
+\DeclareOption{touchmoreoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by1}
+\DeclareOption{touchlessoffset}{\RM@notinexecuteoptions\advance\RM@offsetoption by-1}
+%%
+%% \DeclareOption{t@uchhigher}{\RM@notinexecuteoptions\advance\RM@headfootbalance by -1}
+%% \DeclareOption{t@uchlower} {\RM@notinexecuteoptions\advance\RM@headfootbalance by 1}
+\DeclareOption{touchhigher}{\RM@notinexecuteoptions\advance\RM@headfootbalance by -1}
+\DeclareOption{touchlower} {\RM@notinexecuteoptions\advance\RM@headfootbalance by 1}
+%%
+%% \DeclareOption{t@uchlessmparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by -1}
+%% \DeclareOption{t@uchmoremparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by 1}
+%% \DeclareOption{touchlessmparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by -1}
+%% \DeclareOption{touchmoremparclearance}{\RM@notinexecuteoptions\advance\RM@mparclearoption by 1}
+%%
+%% \DeclareOption{t@uchlessmaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by -1}
+%% \DeclareOption{t@uchmoremaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by 1}
+%% \DeclareOption{touchlessmaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by -1}
+%% \DeclareOption{touchmoremaxmparwidth}{\RM@notinexecuteoptions\advance\RM@maxmparwidthoption by 1}
+%%
+%%
+%% RANDOM LENGTH OPTIONS
+%% ---------------------
+%%
+%% These need to be executed after the touchlength options; but for
+%% that, they'd be in rmpage.sty
+%%
+\DeclareOption{fulllength}{\RM@lengthoption=30}
+\DeclareOption{stdlength}{\RM@lengthoption=0}
+%%
+%%
+%% NUMBER OF COLUMNS
+%% -----------------
+%%
+%% onecolumn and twocolumn are both in rmpage. These options only
+%% affect \textwidth; use a package like multicols to set you text in
+%% multiple columns.
+%%
+\DeclareOption{onecolumnwidth}{\def\RM@textcols{1}}
+\DeclareOption{twocolumnwidth}{\def\RM@textcols{2}}
+\DeclareOption{threecolumnwidth}{\def\RM@textcols{3}}
+%% \DeclareOption{fourcolumnwidth}{\def\RM@textcols{4}}
+%% \DeclareOption{fivecolumnwidth}{\def\RM@textcols{5}}
+%% \DeclareOption{sixcolumnwidth}{\def\RM@textcols{6}}
+%% \DeclareOption{sevencolumnwidth}{\def\RM@textcols{7}}
+%% \DeclareOption{eightcolumnwidth}{\def\RM@textcols{8}}
+%% \DeclareOption{ninecolumnwidth}{\def\RM@textcols{9}}
+%% \DeclareOption{tencolumnwidth}{\def\RM@textcols{10}}
+%%
+%%
+%% LOADING FOUNTS
+%% --------------
+%%
+%% The fount options work like this: a fount family is set, and if the
+%% \RM@loadfount flag is set true, the appropriate fount is loaded,
+%% mainly with one of the standard PSNFSS packages.
+%% Fount families are set like this:
+%% 1=avant garde 2=bookman 3=zapf chancery 4=helvetica
+%% 5=new century schoolbook 6=palatino 7=times 8=utopia
+%% 9=lucida casual 10=courier 11=concrete 12=this fount width
+%% 13=lucida casual dirty trick
+%%
+%% The dirty trick works like this: if you ask for lucida casual
+%% (\RM@fountfamily 13), the fount loading code later on does a
+%% \RequirePackage{lucida-casual}, and then sets \RM@fountfamily
+%% to 9. The option to do this is in Rowland's curious option
+%% section.
+%%
+%% The command below is used to ask for a particular set of
+%% typesetting parameters if you've not explicitly requested any with
+%% the looseness option set. You get loose if you've asked for
+%% onecolumn, or sloppy if you've asked for twocolumn. Ncolumnwidth
+%% is treated as onecolumn; the multicol package makes its own
+%% arrangements. But this shouldn't be done any more because the
+%% metrics have changed (S. Rahtz, psnfss2e.tex, 5/11/95). I wish
+%% there was an up-to-date version of fontinst with docs available.
+%%
+%% This command's defined here so its meaning is clear; it's cleared
+%% at the end of rmpage.sty.
+%%
+%% So, this is the command that used to do the dirty. And still does:
+%% the PSNFSS founts \emph{are} still much tighter than cmr, and you
+%% get more bad line breaks. But looseish seems enough for now; keep
+%% the twocolumn extra super dooper very slack indeed looseness as is
+%% for now. (I wish I had a television so I could find out exactly
+%% what it is that Mutley says when he's annoyed). Maybe the thing
+%% to do is to change the sloppiness command: see rmpage.sty for more
+%% comments (yes, you, you fool, me! bloody well read it [don't
+%% complain: I'm swearing at myself]).
+%%
+%% The thing is, the PSNFSS founts are a little tighter than cmr (it
+%% seems). looseish over-compensates, but it's not all that much
+%% looser than tight. Grumbledon diwn.
+\def\RM@setpsloose{
+ \ifnum\RM@looseoption=205
+ \if@twocolumn
+ \def\RM@looseoption{5}
+ \else
+ \def\RM@looseoption{1}
+ \fi
+ \fi
+}
+% \def\RM@setpsloose{\relax}
+% % Don't change the options below; just change the loosening command
+% % in case I want to use it later.
+%%
+%% %% Computer modern roman; redundant options
+%% \DeclareOption{cmrwidth}{\def\RM@fountfamily{0}}
+%% \DeclareOption{loadcmr}{\def\RM@fountfamily{0}\RM@loadfounttrue}
+%% Avant Garde
+\DeclareOption{avantwidth}{\def\RM@fountfamily{1}}
+\DeclareOption{loadavant}{\def\RM@fountfamily{1}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Bookman
+\DeclareOption{bookmanwidth}{\def\RM@fountfamily{2}}
+\DeclareOption{loadbookman}{\def\RM@fountfamily{2}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Zapf Chancery
+\DeclareOption{chancerywidth}{\def\RM@fountfamily{3}}
+\DeclareOption{loadchancery}{\def\RM@fountfamily{3}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Helvetica
+\DeclareOption{helvetwidth}{\def\RM@fountfamily{4}}
+\DeclareOption{loadhelvet}{\def\RM@fountfamily{4}
+ \RM@loadfounttrue\RM@setpsloose}
+%% New Century Schoolbook
+\DeclareOption{newcentwidth}{\def\RM@fountfamily{5}}
+\DeclareOption{loadnewcent}{\def\RM@fountfamily{5}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Palatino
+\DeclareOption{palatinowidth}{\def\RM@fountfamily{6}}
+\DeclareOption{loadpalatino}{\def\RM@fountfamily{6}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Times
+\DeclareOption{timeswidth}{\def\RM@fountfamily{7}}
+\DeclareOption{loadtimes}{\def\RM@fountfamily{7}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Utopia
+\DeclareOption{utopiawidth}{\def\RM@fountfamily{8}}
+\DeclareOption{loadutopia}{\def\RM@fountfamily{8}
+ \RM@loadfounttrue\RM@setpsloose}
+%% Lucida casual
+\DeclareOption{lucasualwidth}{\def\RM@fountfamily{9}}
+\DeclareOption{loadlucasual}{\def\RM@fountfamily{9}
+ \RM@loadfounttrue\RM@setpsloose}
+%% lucida-casual option is now in rmplocal.cfg
+%% Courier
+\DeclareOption{courierwidth}{\def\RM@fountfamily{10}}
+%% \DeclareOption{loadcourier}{\def\RM@fountfamily{10}\RM@loadfounttrue
+%% \RM@setpsloose}
+%% Concrete
+%% Concrete doesn't need loose typesetting
+\DeclareOption{concretewidth}{\def\RM@fountfamily{11}}
+\DeclareOption{loadconcrete}{\def\RM@fountfamily{11}\RM@loadfounttrue
+ \ExecuteOptions{beton}}
+%% Bases \textwidth on current fount
+\DeclareOption{thisfountwidth}{\def\RM@fountfamily{12}}
+%%
+%%
+%% Stuff for beton support
+%% -----------------------
+%%
+%% I need to pass the standard-baselineskips option to beton
+%% explicitly so I can detect whether beton's been loaded with this
+%% option later. I might as well prepare to pass the other two
+%% options, just in case I need to know about them someday.
+\DeclareOption{standard-baselineskips}
+ {\PassOptionsToPackage{\CurrentOption}{beton}}
+%% \DeclareOption{oldstyle-equation-numbers}
+%% {\PassOptionsToPackage{\CurrentOption}{beton}}
+%% \DeclareOption{concrete-math}
+%% {\PassOptionsToPackage{\CurrentOption}{beton}}
+%%
+%%
+%%
+%% Synonyms for other options
+%% --------------------------
+%%
+%% Now I like this.
+\DeclareOption{othernicedate}{\RM@nicedatefalse}% usdate
+\DeclareOption{nicedate}{\RM@nicedatetrue}% ukdate
+%%
+%% Other packages use these options to change the amount of
+%% information displayed; I might as well pay attention.
+%%
+%% \DeclareOption{verbose}{\def\RM@chatlevel{1}}% chatty
+%% \DeclareOption{silent}{\def\RM@chatlevel{3}}% yorkshire
+%% \DeclareOption{errorshow}{\def\RM@chatlevel{3}}% yorkshire
+%% \DeclareOption{warningshow}{\def\RM@chatlevel{2}}% taciturn
+%% \DeclareOption{infoshow}{\def\RM@chatlevel{1}}% chatty
+%% \DeclareOption{debugshow}{\def\RM@chatlevel{0}}% garrulous
+%%
+%% And I object to this, I really do. Why can't people learn to
+%% spell properly?
+%%
+%% \DeclareOption{center}{\RM@centretrue}
+%% \DeclareOption{notcenter}{\RM@centrefalse}
+%%
+%%
+%% MARGIN OPTIONS
+%% --------------
+%%
+%% What the ringbinding option does is ensure that there's enough space
+%% in the inside margin to punch holes. It does not make a binding
+%% correction after the fashion of the Koma-script packages. This option
+%% assumes that you'll be punching holes in the inside margin, so don't
+%% expect it to work properly with landscape printing---I couldn't work
+%% out a way of predicting which margin will get the holes in landscape
+%% printing, so I decided to make no attempt to support it. If you have
+%% any thoughts on this, please email me.
+%%
+\DeclareOption{ringbinding}
+ {\ifRM@portrait
+ \RM@DefLengthAtLeast{\RM@mininsidemargin}{15mm}
+ \else
+ \RM@Warn{The ringbinding option does nothing in landscape mode}
+ \fi}
+%%
+%% PRINTER OPTIONS
+%% ---------------
+%%
+%% Printer types are:
+%% 0=fullbleed, 1=general, 2=pessimistic, 3=optimistic
+%% 10=dw300 11=dw500 12=dw600 (HP deskwriter inkjet series)
+%% 20=lj2 21=lj3 22=lj4 (HP laserjet laser printer series)
+%% 30=canonbjx bubblejet something (Canon bubblejet inkjet series)
+%% 40+ whatever else comes up
+%%
+%% The idea is that printer types < 10 are not locally configured;
+%% these numbers are reserved for mythical general types that should
+%% be the same on all systems. Feel free to add your own mythical
+%% general types; please keep the printer number > 1000.
+%%
+%% The figures for all these printers are guesses, except for the DW500
+%% and DW600: any data on printing margins for the printers above or
+%% other commonly-used printers would be gratefully received. I need to
+%% know about printing limits at the top, bottom, left, and right for
+%% portrait and landscape modes, and whether the data is what the book
+%% says or what you measured (preferrably both, but anything'll help).
+%% If anyone really uses LaTeX with an A3 printer, do tell: it's
+%% something I've been wondering about.
+%%
+%% \RM@ptrpostol generally set to 1mm (paper sizes are to $\pm2$mm),
+%% except for our dw520 which I keep a careful eye on.
+%%
+\DeclareOption{fullbleedprinter}{
+ \def\RM@printertype{0}
+ \def\RM@ptrrportclear{0mm}
+ \def\RM@ptrlportclear{0mm}
+ \def\RM@ptrtportclear{0mm}
+ \def\RM@ptrbportclear{0mm}
+ \def\RM@ptrrlandclear{0mm}
+ \def\RM@ptrllandclear{0mm}
+ \def\RM@ptrtlandclear{0mm}
+ \def\RM@ptrblandclear{0mm}
+ \def\RM@ptrpostol{0mm}% Seems best
+ }
+%
+%% Quite arbitrary settings,
+\DeclareOption{generalprinter}{% arbitrary
+ \def\RM@printertype{1}
+ \def\RM@ptrrportclear{8mm}
+ \def\RM@ptrlportclear{8mm}
+ \def\RM@ptrtportclear{8mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{8mm}
+ \def\RM@ptrtlandclear{8mm}
+ \def\RM@ptrblandclear{8mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+%% This uses the worst limits I can remember meeting:
+%% \DeclareOption{pessimisticprinter}{
+%% \def\RM@printertype{2}
+%% \def\RM@ptrrportclear{10mm}
+%% \def\RM@ptrlportclear{10mm}
+%% \def\RM@ptrtportclear{10mm}
+%% \def\RM@ptrbportclear{19mm}
+%% \def\RM@ptrrlandclear{19mm}
+%% \def\RM@ptrllandclear{10mm}
+%% \def\RM@ptrtlandclear{10mm}
+%% \def\RM@ptrblandclear{10mm}
+%% \def\RM@ptrpostol{1mm}% Guess
+%% }
+%% This uses the best limits I'd expect
+%% \DeclareOption{optimisticprinter}{
+%% \def\RM@printertype{3}
+%% \def\RM@ptrrportclear{3mm}
+%% \def\RM@ptrlportclear{3mm}
+%% \def\RM@ptrtportclear{3mm}
+%% \def\RM@ptrbportclear{3mm}
+%% \def\RM@ptrrlandclear{3mm}
+%% \def\RM@ptrllandclear{3mm}
+%% \def\RM@ptrtlandclear{3mm}
+%% \def\RM@ptrblandclear{3mm}
+%% \def\RM@ptrpostol{0.5mm}% Guess
+%% }
+%%
+%% \DeclareOption{dw300printer}{% Guess
+%% \def\RM@printertype{11}
+%% \def\RM@ptrrportclear{6mm}
+%% \def\RM@ptrlportclear{6mm}
+%% \def\RM@ptrtportclear{7mm}
+%% \def\RM@ptrbportclear{15mm}
+%% \def\RM@ptrrlandclear{15mm}
+%% \def\RM@ptrllandclear{7mm}
+%% \def\RM@ptrtlandclear{6mm}
+%% \def\RM@ptrblandclear{6mm}
+%% \def\RM@ptrpostol{1mm}
+%% }
+\DeclareOption{dw500printer}{% HP spec
+ \def\RM@printertype{11}
+ \def\RM@ptrrportclear{6mm}
+ \def\RM@ptrlportclear{6mm}
+ \def\RM@ptrtportclear{7mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{7mm}
+ \def\RM@ptrtlandclear{6mm}
+ \def\RM@ptrblandclear{6mm}
+ \def\RM@ptrpostol{1mm}
+ }
+\DeclareOption{dw600printer}{% Measured from Rebecca's at work+1mm.
+ \def\RM@printertype{12}
+ \def\RM@ptrrportclear{5mm}
+ \def\RM@ptrlportclear{5mm}
+ \def\RM@ptrtportclear{2mm}
+ \def\RM@ptrbportclear{15mm}
+ \def\RM@ptrrlandclear{15mm}
+ \def\RM@ptrllandclear{2mm}
+ \def\RM@ptrtlandclear{5mm}
+ \def\RM@ptrblandclear{5mm}
+ \def\RM@ptrpostol{1mm}% Guess
+ }
+%% \DeclareOption{lj2printer}{% an arbitrary guess
+%% \def\RM@printertype{20}
+%% \def\RM@ptrrportclear{7mm}
+%% \def\RM@ptrlportclear{7mm}
+%% \def\RM@ptrtportclear{7mm}
+%% \def\RM@ptrbportclear{7mm}
+%% \def\RM@ptrrlandclear{7mm}
+%% \def\RM@ptrllandclear{7mm}
+%% \def\RM@ptrtlandclear{7mm}
+%% \def\RM@ptrblandclear{7mm}
+%% \def\RM@ptrpostol{1mm}% Guess
+%% }
+%% \DeclareOption{lj3printer}{% an arbitrary guess
+%% \def\RM@printertype{21}
+%% \def\RM@ptrrportclear{6mm}
+%% \def\RM@ptrlportclear{6mm}
+%% \def\RM@ptrtportclear{6mm}
+%% \def\RM@ptrbportclear{6mm}
+%% \def\RM@ptrrlandclear{6mm}
+%% \def\RM@ptrllandclear{6mm}
+%% \def\RM@ptrtlandclear{6mm}
+%% \def\RM@ptrblandclear{6mm}
+%% \def\RM@ptrpostol{1mm}% Guess
+%% }
+\DeclareOption{lj4printer}{% measured from MS Works output
+ \def\RM@printertype{22}
+ \def\RM@ptrrportclear{5mm}
+ \def\RM@ptrlportclear{5mm}
+ \def\RM@ptrtportclear{5mm}
+ \def\RM@ptrbportclear{5mm}
+ \def\RM@ptrrlandclear{5mm}
+ \def\RM@ptrllandclear{5mm}
+ \def\RM@ptrtlandclear{5mm}
+ \def\RM@ptrblandclear{5mm}
+ \def\RM@ptrpostol{0.5mm}% Guess
+ }
+%% \DeclareOption{canonbjxprinter}{% an arbitrary guess
+%% \def\RM@printertype{22}
+%% \def\RM@ptrrportclear{7mm}
+%% \def\RM@ptrlportclear{7mm}
+%% \def\RM@ptrtportclear{7mm}
+%% \def\RM@ptrbportclear{12mm}
+%% \def\RM@ptrrlandclear{12mm}
+%% \def\RM@ptrllandclear{7mm}
+%% \def\RM@ptrtlandclear{7mm}
+%% \def\RM@ptrblandclear{7mm}
+%% \def\RM@ptrpostol{1mm}% Guess
+%% }
+%%
+%% ROWLAND'S CURIOUS OPTIONS
+%% -------------------------
+%%
+%% These are curious options, defined by me (RJMM) to perform dark and
+%% eldritch deeds. These aren't intended for hoi polloi, mainly 'cos
+%% they're a bit iffy in places, but I like them and they might give
+%% you some ideas.
+%%
+%%
+%% Our DW520 isn't quite to spec.
+%%
+% \DeclareOption{R+R-dw520printer}{
+% \def\RM@printertype{11}
+% \def\RM@ptrrportclear{7mm}% spec 6mm
+% \def\RM@ptrlportclear{6mm}
+% \def\RM@ptrtportclear{7mm}
+% \def\RM@ptrbportclear{15mm}
+% \def\RM@ptrrlandclear{15mm}
+% \def\RM@ptrllandclear{7mm}
+% \def\RM@ptrtlandclear{7mm}% spec 6mm
+% \def\RM@ptrblandclear{6mm}
+% \def\RM@ptrpostol{0.5mm}% Guess
+% }
+%%
+%% A dirty trick to load my .fd version of lucida casual rather than
+%% the PSNFSS version. If you loadlucidacasual, \RM@fountfamily is set
+%% to 9 after the lucida-casual package has been \RequirePackaged.
+%% That's done by code further on in rmpage, specially written for
+%% this dirty trick.
+%%
+%% Lucida casual
+\DeclareOption{lucidacasualwidth}{\def\RM@fountfamily{9}}
+\DeclareOption{loadlucidacasual}{\def\RM@fountfamily{13}
+ \RM@loadfounttrue\RM@setpsloose}
+%%
+%% These class options ought to be redundant now.
+%%\DeclareOption{rmcv}{\def\RM@classtype{20}}
+%%\DeclareOption{rmletter}{\def\RM@classtype{21}}
+%%\DeclareOption{bithesis}{\def\RM@classtype{22}}
+%% for ltx guide docs; maybe use in ltxguide.cfg?
+%%\DeclareOption{ltxguide}{\def\RM@classtype{7}}% redundant
+%% for typesetting .dtx files only; used by ltxdoc.cfg
+%%\DeclareOption{ltxdoc}{\def\RM@classtype{6}}% redundant
+%% for Liverpool J.Moore's EEP exams
+%%\DeclareOption{ljmueepexam}{\def\RM@classtype{23}}% redundant
+%%
+%% \RM@ptsize is set to the requested point size if an rmsizeN package has
+%% not already been recognised by another package.
+%%
+%%
+%% These point size options need another package file which really
+%% isn't ready to be released yet - so don't expect them to work.
+%%
+%% If you really, really, really want to use these extra point sizes,
+%% I'll send you the extra files if you ask nicely.
+%%
+\providecommand{\RM@ptsize}{666}
+\DeclareOption{14pt}{\ifnum\RM@ptsize=666\def\RM@ptsize{14}\def\@ptsize{2}\fi}
+\DeclareOption{24pt}{\ifnum\RM@ptsize=666\def\RM@ptsize{24}\def\@ptsize{2}\fi}
+\DeclareOption{36pt}{\ifnum\RM@ptsize=666\def\RM@ptsize{36}\def\@ptsize{2}\fi}
+%%
+%% Don't do anything to the file above this point except these things:
+%% comment out whole options,
+%% uncomment out whole options,
+%% and change the identifying comments and commands at the start of the file.
+%% Disobeying this order will result in a squadron of highly-trained
+%% killer gerbils attacking your toenails each night; the cost in
+%% pedicurist bills will be crippling.
+%%
+%%
+%% LOCAL CODE BELOW HERE PLEASE
+%% ============================
+%%
+%%
+%% Add your options in the section marked out below.
+%%
+%%
+%% BEGIN LOCAL OPTION DECLARATION
+%% ==============================
+%%
+
+%%
+%%
+%% END LOCAL OPTION DECLARATION
+%% ============================
+%%
+%%
+%% DEFAULT OPTION SETTING
+%% ======================
+%%
+%% Default options for any class---the \ExecuteOptions statement below
+%% should contain the default settings you want for all documents.
+%% Remember these options can always be over-ridden by class-specific
+%% code and options used in a document.
+%%
+%% Check the statement below about default option settings; things
+%% change, y'know.
+%%
+%% rmpage sets things up so that these options are used by default:
+%%
+%% noheaders,footers,notcentre,oneside,portrait,onecolumn,normalaltitude,
+%% normalcolumnsep,normalheadsep,normalfootskip,normalmparsep,
+%% normallength,normalwidth,normaloffset,generalprinter,
+%% noadaptivecolumnsep,nastydate,taciturn
+%%
+%% The (USA) letterpaper option is specified by the standard classes;
+%% rmpage defaults to undefinedpaper (a real papertype in my
+%% book, which I wouldn't recommend unless you like error messages).
+%%
+%% Either the stdmargins or notstdmargins option should be executed, to
+%% avoid (admittedly unlikely) mis-understandings over the placement of
+%% marginal notes. I think I've changed rmpage so there shouldn't be
+%% a problem with this; notstdmargins is the default setting.
+%%
+%% If no config file is found by rmpagenew, the notstdmargins option
+%% is executed using \ExecuteOptions.
+%%
+%%
+%% CHANGE THE COMMAND BELOW TO MATCH YOUR LOCAL PREFERENCES
+%% --------------------------------------------------------
+%%
+% \ExecuteOptions{R+R-dw520printer,a4paper,notstdmargins,nicedate,noheaders}
+\ExecuteOptions{generalprinter,letterpaper,stdmargins,usdate,noheaders}
+%%
+%% --------------------------------------------------------
+%%
+%%
+%% DEFAULT OPTIONS FOR PARTICULAR CLASSES.
+%% ======================================
+%%
+%% Don't set default options in local classes using
+%% \PassOptionsToPackage{rmpage}{...} in your class file unless you have
+%% a good reason to; read the note below.
+%%
+%% If you need to have rmpage \ExecuteOptions for particular classes,
+%% use the \RM@OnClassExecuteOptions statement in the block below.
+%%
+%% \RM@ClassExecuteOption{<class name>}{<option list>} performs
+%% \ExecuteOptions{<option list>} if the class called <class name> has
+%% been loaded.
+%%
+%% Note that if you are building one class upon another (say, nuthesis
+%% based on report), both classes might have been by this stage, so it is
+%% best to have the \RM@OnClassExecuteOptions statement for the base class
+%% *before* the \RM@OnClassExecuteOptions statement for the loading class.
+%% E.g., for nuthesis based on report, have:
+%% \RM@OnClassExecuteOptions{report}{...} *before*
+%% \RM@OnClassExecuteOptions{nuthesis}{...}
+%%
+%% Example default options for book class
+%%
+% \RM@OnClassExecuteOptions{book}
+% {ukdate,R+R-dw520printer,a4paper,headers,footers}
+%%
+%% Example default options for slides class
+%%
+% \RM@OnClassExecuteOptions{slides}
+% {centre,ukdate,R+R-dw520printer,a4paper}
+%%
+%%
+%% Example default options for foils class
+%%
+% \RM@OnClassExecuteOptions{foils}
+% {centre,ukdate,R+R-dw520printer,a4paper}
+%%
+%% Default options for ljmeepex class; ljmueepexam as was and damn
+%% Bill Gates. All these options are executed here so they can all
+%% be over-ridden by options passed by the document. Had they been
+%% passed from the class file by \PassOptionsToPackage, options from
+%% the document that are declared in rmpage after these options would
+%% over-ride these, and those declared before would not. Do it this
+%% way for consistency.
+%%
+% \RM@OnClassExecuteOptions{ljmeepex}
+% {centre,yorkshire,a4paper,noheaders,footers,wide,t@uchnarrower,longish}
+%%
+%%
+%% END DEFAULT OPTION SETTING FOR PARTICULAR CLASSES
+%% =================================================
+%%
+%%
+%% HOOKS
+%% =====
+%%
+%% The commands defined below: \RM@BeforeProcessOptions,
+%% \RM@DefineNewClasses, \RM@AfterProcessOptions,
+%% \RM@PrinterPaperSettings, \RM@BeforeTextheightSetting, and
+%% \RM@AfterWidthSetting are hooks: they are commands which
+%% you can define yourself, which are executed later somewhere in rmpage.
+%% You hang code from them, which is used later; hence hook. LaTeX2e has
+%% hooks like \AtBeginDocument{}, which saves its argument every time
+%% it's executed, so all the code ever passed to it is executed at the
+%% begin document command. The hooks below are just ordinary LaTeX
+%% commands which you define in the usual way. If you re-define them,
+%% the original contents are lost forever. So add stuff to the
+%% definitions here, don't re-define them later unless you have a good
+%% reason to do so. By the way, these hooks don't have to be defined:
+%% rmpage can work without them quite happily.
+%%
+%%
+%% Use this one for playing about if you have to.
+\newcommand{\RM@BeforeProcessOptions}{}% end\RM@BeforeProcessOptions
+%%
+%%
+%% Use this one for setting up things for particular classes; classes
+%% that are based on other classes should appear in this list
+%% \emph{after} the classes they are based on. That is, the class
+%% bithesis (which is based on report), comes after report. This is
+%% easily arranged, because all the standard classes have their class
+%% type number defined before the \RM@DefineNewClasses hook is executed.
+%% You can define your own class types; the current list of class type
+%% numbers is:
+%%
+%% 0=unknown, 1=article, 2=report, 3=letter, 4=book, 5=slides,
+%% 10=ltxdoc, 11=ltxguide,
+%% 20=rmcv, 21=rmletter, 22=bithesis, 23=ljmueepexam
+%% 50=foils
+%%
+%% 0 - 19 standard LaTeX classes
+%% 20 - 49 my classes
+%% 50 - 99 other classes supported by standard rmpage
+%% 100 - maxnum local classes
+%%
+%% If you're going to define a new class type, use class type numbers
+%% above 100. That way you won't find a new version of rmpage usurping
+%% class type numbers you'd defined for your own use. And make sure
+%% that classes that build on other classes have higher a \RM@classtype
+%% than the classes they build upon. I'll probably do something more
+%% sophisticated one day, but this'll do for now.
+%%
+%% The \RM@LocalClassReport hook is executed by the \RM@typeclasstype
+%% command, which is executed by the \RM@OnClassType command if you've
+%% asked for garrulous reporting. It's a debugging aid to help spot
+%% anomalous class type number setting. Why am I doing this?
+%% If you do add a new class, re-define the \RM@LocalClassReport command
+%% here to report it. For example, if you've added the eddie class,
+%% given the number 666, and the orwell class, given the number 101, say:
+%%
+%% \renewcommand{\RM@LocalClassReport}{
+%% \RM@OnClassType{101}{\typeout{orwell class detected}}{}
+%% \RM@OnClassType{666}{\typeout{eddie class detected}}{}
+%% }
+%%
+\renewcommand{\RM@LocalClassReport}{\typeout{Undefined class detected}}
+%%
+%%
+%% Note that the \RM@DefineNewClasses hook is only executed if
+%% \RM@ClassType is less than 20.
+%%
+%% It's okay to test for a class here that will have had its class type
+%% number set by an option. Not fast, but okay. Note that the
+%% \RM@SetClassType command will only set \RM@ClassType to a value larger
+%% than the current one; this is so that subsequent detection (for
+%% example) of the report class on which you have built the nuthesis
+%% class cannot set \RM@classtype to 2.
+%%
+%%
+%% The new classes below are some that I've defined; I've left them
+%% in so you don't pinch the numbers and to give a real-life example.
+%% Most of these classes are a bit rough and not generally useful,
+%% so I'm keeping them to myself; although if you want a
+%% Bolton Institute thesis class file, I'll send you mine if you ask me
+%% for it.
+%%
+\newcommand{\RM@DefineNewClasses}{
+ \RM@SetClassType{rmcv} {20}
+ \RM@SetClassType{rmletter} {21}
+ \RM@SetClassType{bithesis} {22}
+ \RM@SetClassType{ljmueepexam}{23}
+ \RM@SetClassType{ljmeepex} {23}
+}%% end\RM@DefineNewClasses
+%%
+%%
+%% AfterProcessOptions is useful for setting up things for particular
+%% classes using the \RM@OnClassType command
+%%
+%%
+%% I've left in the code I wrote for my class files as examples; the
+%% code for ltxdoc is required if you insist on using rmpage with it.
+%%
+\newcommand{\RM@AfterProcessOptions}{
+% % \renewcommand{\RM@mintextheight}{730pt}% For testing only
+% % \renewcommand{\RM@maxtextheight}{9000pt}
+ %
+ % class type 10=ltxdoc
+ %
+ \RM@OnClassType{10}{
+ \RM@oclwarninfo{3}
+ {ltxdoc and rmpage don't go well together}
+% \RM@ocl{2}{\typeout{Set \protect\normalmarginpar}}{}
+% % Try to make mpars appear in alternating margins
+% \ifRM@twoside\@mparswitchtrue\fi
+% % Try to make mpars appear in default margin
+% \normalmarginpar
+ % Ensure \textwidth is at least the required width
+ \def\RM@mintextwidth{355pt}
+ }{}
+ %
+ % class type 20=rmcv
+ %
+ \RM@OnClassType{20}{
+ \RM@oclwarninfo{3}
+ {I don't do much for rmcv yet,
+ and if you specified\MessageBreak
+ some options that don't get used, I won't complain}
+ }{}
+ %
+ % class type 22=bithesis
+ %
+ \RM@OnClassType{22}{
+ % Set minimum margins as specified in the regulations.
+ % Everything else is done by the class file. These commands are
+ % defined to be 0pt at the start of rmpage, so they can't be set in
+ % the class file.
+ \RM@DefLengthAtLeast{\RM@minoutsidemargin}{15mm}
+ \RM@DefLengthAtLeast{\RM@mininsidemargin} {40mm}
+ \RM@DefLengthAtLeast{\RM@mintopmargin} {15mm}
+ \RM@DefLengthAtLeast{\RM@minbottommargin} {15mm}
+ }{}
+ %
+ % Add more here
+ %
+}% end\RM@AfterProcessOptions
+%%
+%%
+%% The \RM@On...PaperSize commands take two compulsory arguments, and
+%% one optional arguments. The optional argument is the long paper
+%% size code. The default value is 0, meaning `not long'.
+%% -1 = any long size
+%% 0 = not long only (or 1-long)
+%% 1 = 7/8 2 = 3/4 3 = 2/3 4 = 5/8 5 = 1/2
+%% 6 = 3/8 7 = 1/3 8 = 1/4 9 = 1/8
+%%
+%% The first compulsory argument is the paper size code; you can look
+%% them up elsewhere.
+%%
+%% If the paper size specified in the arguments to a \RM@...papersize
+%% command is the selected paper size, the third argument is executed.
+%%
+%%
+%% Add setting for local printer/paper combinations here; new printers
+%% should be declared using \DeclareOption above. Have a look in
+%% rmpage.dtx, at the code above the point where this hook is
+%% executed, to get a better idea of what's going on.
+\newcommand*{\RM@PrinterPaperSettings}{
+%%
+%% Note that you can print out long A3 sizes (1/2 and under) on A4
+%% paper, with the same minimum clearances applying to the long A3 size
+%% as apply to A4. So in the common case of an A4 printer, all you
+%% need to do is make the A3 printing limits the same as A4 printing
+%% limits, and Bob's yer auntie's live-in lover. What the two
+%% commands below do is assume that all printers are A4 printers, and
+%% sets the clearances accordingly. If you use a non-A4 printer, you
+%% might need to add code to over-ride this assumption for that
+%% printer, after these two commands.
+%%
+ \RM@OnPortraitPaperSize[-1]{13}% size 13 = A3
+ {
+ \let\RM@minrightclearance\RM@ptrrportclear
+ \let\RM@minleftclearance \RM@ptrlportclear
+ \let\RM@minfootclearance \RM@ptrbportclear
+ \let\RM@minheadclearance \RM@ptrtportclear
+ }
+ \RM@OnLandscapePaperSize[-1]{13}% size 13 = A3
+ {
+ \let\RM@minrightclearance\RM@ptrrlandclear
+ \let\RM@minleftclearance \RM@ptrllandclear
+ \let\RM@minfootclearance \RM@ptrblandclear
+ \let\RM@minheadclearance \RM@ptrtlandclear
+ }
+%%
+%% The code below sets up rmpage to do things the way I like if
+%% you've selected an HP 500 series inkjet (like my DW520).
+%% I print out A5 pages by using dvidvi to put two of them on an A4
+%% page, so A5 portrait clearances need to be A4 landscape clearances
+%% and vice-versa. Envelopes suffer a very large non-printing margin
+%% at the bottom, so this is dealt with. Note that I have to set
+%% both the ptrclear commands *and* the minclearance commands in this
+%% case, because the ptrclear commands are assumed to be set by now,
+%% and I have to change them.
+%%
+%% Note that I have asked rmpage to jack up any of these paper sizes that
+%% need it when I have specified an HP 500 series inkjet; this means that
+%% you can have an unexpectedly large gap at the bottom of a page without
+%% being warned about it, if the page layout you asked for would
+%% otherwise have tried to print in the asymmetrically large non-printing
+%% margin at the bottom of the paper. I don't mind this; if you do,
+%% remove the \RM@jackuptrue statements.
+%%
+ \RM@OnPrinterType{11}% HP DeskWriter 500 series
+ {
+ \RM@OnPortraitPaperSize{14}% size 14 = A4
+ {\RM@jackuptrue}
+ \RM@OnPortraitPaperSize{15}% size 15 = A5
+ {\let\RM@minrightclearance\RM@ptrrlandclear
+ \let\RM@minleftclearance\RM@ptrrlandclear
+ \let\RM@minfootclearance\RM@ptrblandclear
+ \let\RM@minheadclearance\RM@ptrtlandclear}
+ \RM@OnLandscapePaperSize{15}% size 15 = A5
+ {\let\RM@minrightclearance\RM@ptrrportclear
+ \let\RM@minleftclearance\RM@ptrlportclear
+ \let\RM@minfootclearance\RM@ptrbportclear
+ \let\RM@minheadclearance\RM@ptrtportclear}
+ \RM@OnPortraitPaperSize[-1]{13}% size 13 = A3
+ {\RM@jackuptrue}
+ \RM@OnLandscapePaperSize[-1]{13}% size 13 = A3
+ {\RM@jackupfalse}
+ \RM@OnPaperSize{58}% size 58 = DL envelopes
+ {\def\RM@ptrrlandclear{19mm}
+ \def\RM@ptrrlandclear{7mm}
+ \def\RM@ptrblandclear{4mm}% spec 3mm
+ \def\RM@ptrtlandclear{4mm}% spec 3mm
+ \def\RM@ptrrportclear{4mm}% spec 3mm
+ \def\RM@ptrlportclear{4mm}% spec 3mm
+ \def\RM@ptrbportclear{19mm}
+ \def\RM@ptrtportclear{7mm}}
+ \RM@OnPortraitPaperSize{58}% size 58 = DL envelopes
+ {\let\RM@minrightclearance\RM@ptrrportclear
+ \let\RM@minleftclearance\RM@ptrlportclear
+ \let\RM@minfootclearance\RM@ptrbportclear
+ \let\RM@minheadclearance\RM@ptrtportclear}
+ \RM@OnLandscapePaperSize{58}% size 58 = DL envelopes
+ {\let\RM@minrightclearance\RM@ptrrlandclear
+ \let\RM@minleftclearance\RM@ptrllandclear
+ \let\RM@minfootclearance\RM@ptrblandclear
+ \let\RM@minheadclearance\RM@ptrtlandclear}
+ }% end HP DeskWriter 500 series
+}% end\RM@PrinterPaperSettings
+%%
+%%
+%% Add code to select textheight setting method, and define new
+%% textheight setting code here
+\newcommand*{\RM@BeforeTextheightSetting}{}% end\RM@BeforeTextheightSetting
+%%
+%% You might add code to define \RM@widthsetter to load your own
+%% horizontal parameter setting code for a particular class here
+%% e.g., \RM@OnClassType{69}{\def\RM@widthsetter{rsw-ll.pko}}{}
+\newcommand*{\RM@BeforeWidthSetting}{}% end\RM@BeforeWidthSetting
+%%
+%% If you are using a class that defines \RM@textwidthgroup to 4, put
+%% code in this hook that defines: \RM@ptperchar to the width of one
+%% average character of your main body fount; \@tempdima to the
+%% paper-based initial \textwidth guess; \@tempdimb to the
+%% character-based initial \textwidth guess; and code to modify
+%% \columnsep if you want to.
+%% This hook is executed after the parameters above have been set.
+\newcommand*{\RM@AfterInitialTextwidthSetting}{}% end\RM@AfterInitialTextwidthSetting
+%%
+%% Do what preventest thou from wilting\ldots For symmetry's sake is
+%% this here.
+%%
+\newcommand*{\RM@AfterWidthSetting}{}% end\RM@AfterWidthSetting
+%%
+%%
+\endinput \ No newline at end of file