From db68f50f053222f61d531cb5abd644c9afb8a37e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 13 Jan 2006 00:05:31 +0000 Subject: rmpage git-svn-id: svn://tug.org/texlive/trunk@1280 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/rmpage/rmpage.sty | 5581 +++++++++++++++++++++++++ Master/texmf-dist/tex/latex/rmpage/rmpgen.cfg | 1406 +++++++ 2 files changed, 6987 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/rmpage/rmpage.sty create mode 100644 Master/texmf-dist/tex/latex/rmpage/rmpgen.cfg (limited to 'Master') diff --git a/Master/texmf-dist/tex/latex/rmpage/rmpage.sty b/Master/texmf-dist/tex/latex/rmpage/rmpage.sty new file mode 100644 index 00000000000..559735f71b3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/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[]{}{} Executes if paper size is as specified and in +% portrait orientation. The default (the [optional +% argument]) is 0, which is `not long'. Passing -1 as the [optional argument] means `all sizes based on this '; 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{}{}{} +% Executes if \RM@classtype=; +% otherwise executes . 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{}{}{} 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{}{} If class has been loaded, and current \RM@classtype is less than , sets \RM@classtype to be . +% +\def\RM@SetClassType#1#2{ + \@ifclassloaded{#1} + {\ifnum\RM@classtype<#2 + \def\RM@classtype{#2} + \fi} + {} +} +% +% \RM@OnClassExecuteOptions{}{