; TeX output 1997.03.05:1632soDtGGcmr17Displaqying7tpagelayoutvariables6XQ cmr12KenrtMcPhersona.o.2K cmsy837 1995/11/23:ōINff cmbx121aLIntros3ductionIK`y cmr10This *L5ffٓRcmr7A͉TU>'ExX2 b> cmmi10"+packqage *isareimplementationofGHowever,ifyouwanttoseetherealparametervqaluesIyouUUcanusetheoptionrealstogetthate ect.I53S\def\lay@value{} I54S\DeclareOption{integers}{%I55]\renewcommand*{\lay@value}[2]{%I56f\expandafter\number\csname#1@#2\endcsnamept}}I57S\DeclareOption{reals}{%I58]\renewcommand*{\lay@value}[2]{\the\csname#2\endcsname}}XThedefaultlanguageisEnglish, thedefaultmoGdeissilentandthedefaultway IofUUshowingparametervqaluesistouseintegers.I59S\ExecuteOptions{english,silent,integers}I60S\ProcessOptions1\bsIDe neUU\bsifitisunde ned,rede neitifitisalreadyde ned.I61S\@ifundefined{bs}{\newcommand\bs{\char'134}}%I62]{\renewcommand\bs{\char'134}}f\ConvertToCountIThisUUmacrostoresthevqalueofa#': cmti10lengthregisterinac}'ountH-register.I63S\def\ConvertToCount#1#2{%IFirstUUcopythevqalueI64]#1=#2 sIlayoutUUpackqageversionv1.1kasof1995/11/2313oIThenUUdivideitby65536.I65]\divide#1by65536}IThe&resultofthisisthatthec}'ount~registerholdsthevqalueofthelengthPregister IinUUpGoints.\SetToHalf L\SetToQuartISmallUUmacrosusedincomputingpGositions.I66S\def\SetToHalf#1#2{#1=#2\relax\divide#1by\tw@} I67S\def\SetToQuart#1#2{#1=#2\relax\divide#1by4}$\IdentifyIAUUsmallmacrousedinidentifyingdimensions.I68S\def\Identify#1{%I69]\put(\PositionX,\PositionY){\circle{20}}I70]\put(\PositionX,\PositionY){\makebox(0,0){\tiny#1}}I71S}\InsideHArrowIThisFTmacroisusedtoproGducetwoFThorizontalarrowsinsideabGox.lTheargument IgivesUUthewidthofthebGox.I72S\def\InsideHArrow#1{{%I73]\ArrowLength=#1I74]\divide\ArrowLengthby\tw@I75]\advance\ArrowLengthby-10I76]\advance\PositionXby-10I77]\ifnum\ArrowLength<\z@I78f\put(\PositionX,\PositionY){\vector(1,0){-\ArrowLength}}I79f\advance\PositionXby20I80f\put(\PositionX,\PositionY){\vector(-1,0){-\ArrowLength}}I81]\elseI82f\put(\PositionX,\PositionY){\vector(-1,0){\ArrowLength}}I83f\advance\PositionXby20I84f\put(\PositionX,\PositionY){\vector(+1,0){\ArrowLength}}I85]\fiI86S}}\InsideVArrowIThis ^macroisusedtoproGducetwo ^verticalarrowsinsideabGox.Theargument IgivesUUtheheightofthebGox.I87S\def\InsideVArrow#1{{%I88]\ArrowLength=#1I89]\divide\ArrowLengthby\tw@I90]\advance\ArrowLengthby-10I91]\advance\PositionYby-10I92]\put(\PositionX,\PositionY){\vector(0,-1){\ArrowLength}}I93]\advance\PositionYby20I94]\put(\PositionX,\PositionY){\vector(0,+1){\ArrowLength}}I95S}} 6\OutsideHArrowIThistmacroisusedtoproGducetwothorizontalarrowstodelimitalength.M'The rst IargumentnisthepGositionfortherightarrow,6thesecondargumentgivesthelengthIandUUthethirdspGeci esthelengthofthearrows.I96S\def\OutsideHArrow#1#2#3{{% I97]\PositionX=#1I98]\advance\PositionXby#3I99]\put(\PositionX,\PositionY){\vector(-1,0){#3}} sIlayoutUUpackqageversionv1.1kasof1995/11/2314oE100]\PositionX=#1\advance\PositionX-#2 E101]\advance\PositionXby-#3E102]\put(\PositionX,\PositionY){\vector(+1,0){#3}}E103S}}I 6\OutsideVArrowIThismacroisusedtoproGducetwoverticalarrowstodelimitalength.The rst IargumentisthepGositionforthelowerarrow,thesecondargumentgivesthelengthIandUUthethirdandfourthspGecifythelenghtsoftheloweranduppGerarrow. nE104S\def\OutsideVArrow#1#2#3#4{{% E105]\PositionY=#1E106]\advance\PositionYby-#3E107]\put(\PositionX,\PositionY){\vector(0,+1){#3}}E108]\PositionY=#1E109]\advance\PositionY#2E110]\advance\PositionY#4E111]\put(\PositionX,\PositionY){\vector(0,-1){#4}}E112S}}'|\ShowIMacroUUusedinthetablethatshowsthesettingoftheparameters. nE113S\def\Show#1#2{\bs#2=\lay@value{#1}{#2}}'|\TypeIMacroUUusedtoshowasettingofaparameterontheterminal.E114S\def\Type#1#2{% E115]\type{#2=\lay@value{#1}{#2}}}y\oneinchIAUUconstant,givingthelengthofaninchinpGoints(approximately)E116S\newcount\oneinch E117S\oneinch=72XBecausetheoverviewofthelayoutisproGducedina gureenvironmentwe IneedIxtoalloGcateanumberIxofcountersthatareusedtostorethevqaluesofvariousIdimensions.f\cnt@paperwidth \cnt@paperheightITheUUdimensionsofthepapGer nE118S\newcount\cnt@paperwidth E119S\newcount\cnt@paperheightE120S\ConvertToCount\cnt@paperwidth\paperwidthE121S\ConvertToCount\cnt@paperheight\paperheightb\cnt@hoffset b\cnt@voffsetItheUUo sets, nE122S\newcount\cnt@hoffsetE123S\newcount\cnt@voffsetE124S\ConvertToCount\cnt@hoffset\hoffsetE125S\ConvertToCount\cnt@voffset\voffsetf\cnt@textheight 6\cnt@textwidthIdimensionsUUofthetextarea, nE126S\newcount\cnt@textheightE127S\newcount\cnt@textwidth 6\cnt@topmargin 9\cnt@oddsidemargin H\cnt@evensidemarginImargins, nE128S\newcount\cnt@topmarginE129S\newcount\cnt@oddsidemarginE130S\newcount\cnt@evensidemargin !sIlayoutUUpackqageversionv1.1kasof1995/11/2315of\cnt@headheight b\cnt@headsepIdimensionsUUoftherunningheads,E131S\newcount\cnt@headheight E132S\newcount\cnt@headsept\cnt@marginparsep H\cnt@marginparwidth 9\cnt@marginparpushImarginalUUparagraphs,E133S\newcount\cnt@marginparsepE134S\newcount\cnt@marginparwidthE135S\newcount\cnt@marginparpush\cnt@footskipItheUUdistancebGetweenUUtherunningfootersandthetext,E136S\newcount\cnt@footskipIandgtheheightofthefoGoters,$whichisneededheretodisplayabGox,$butwhich Iisn'tUUusedbyL5ffA͉TU>'ExX.y\fheightE137S\newcount\fheight E138S\fheight=12XApartfromintegerrepresentationsofthepagelayoutparameterswealsoneed IregistersUUtostorereferencevqaluesin.y\ref@topIThe'pGositionofthetopofthe`printablearea'isoneinchbGelowthetopoftheIpapGer.#bydefault.dThevqalueof\ref@topisrelativetothelowerleftcorneroftheIpictureUUenvironmentthatwillbGeused.E139S\newcount\ref@top E140S\ref@top=\cnt@paperheight\advance\ref@topby-\oneinchb\ref@hoffsetb\ref@voffsetIF*orUUtheo sets,E141S\newcount\ref@hoffset E142S\newcount\ref@voffsetITheUU\hoffsetand\voffsetvqaluesareaddedtothedefaulto setofoneinch.E143S\ref@hoffset=\cnt@hoffset s,\advance\cnt@hoffsetby\oneinchE144S\ref@voffset=\cnt@voffsetX\cnt@voffsetUUisconvertedUUtobGerelativetotheoriginofthepicture.E145S\cnt@voffset=\ref@topE146S\advance\cnt@voffsetby-\ref@voffset$\ref@headIandUUthetextareas,runningheads,E147S\newcount\ref@head$\ref@bodyIbGodyUUofthetextE148S\newcount\ref@body$\ref@footIandUUrunningfoGoters.E149S\newcount\ref@foot L\ref@margin \ref@marginwidth 6\ref@marginparITheseUUaredi erentforevenandoGddpages,sotheyarecomputedby\layout.E150S\newcount\ref@margin E151S\newcount\ref@marginwidthE152S\newcount\ref@marginpar+sIlayoutUUpackqageversionv1.1kasof1995/11/2316oXTheGofollowingareanumbGerofscratchregisters,J6usedinthepGositioningofthe IvqariousUUpicesofthepicture.. הE153S\newcount\Interval E154S\newcount\ExtraYPosE155S\newcount\PositionXE156S\newcount\PositionYE157S\newcount\ArrowLength 6\lay@getvaluesIAllvqaluesthatmightchangeduringthedoGcumentarecomputedbycallingtheImacro\lay@getvalues.>NBydefaultthismacroisexecutedat\begin{document}. הE158S\def\lay@getvalues{%E159]\ConvertToCount\cnt@textheight\textheightE160]\ConvertToCount\cnt@textwidth\textwidthE161]\ConvertToCount\cnt@topmargin\topmarginE162]\ConvertToCount\cnt@oddsidemargin\oddsidemarginE163]\ConvertToCount\cnt@evensidemargin\evensidemarginE164]\ConvertToCount\cnt@headheight\headheightE165]\ConvertToCount\cnt@headsep\headsepE166]\ConvertToCount\cnt@marginparsep\marginparsepE167]\ConvertToCount\cnt@marginparwidth\marginparwidthE168]\ConvertToCount\cnt@marginparpush\marginparpushE169]\ConvertToCount\cnt@footskip\footskipE170]\ref@head=\ref@topE171f\advance\ref@headby-\ref@voffsetE172f\advance\ref@headby-\cnt@topmarginE173f\advance\ref@headby-\cnt@headheightE174]\ref@body=\ref@headE175f\advance\ref@bodyby-\cnt@headsepE176f\advance\ref@bodyby-\cnt@textheightE177]\ref@foot=\ref@bodyE178f\advance\ref@footby-\cnt@footskipE179]}E180S\AtBeginDocument{\lay@getvalues} 6\computevalues3P\layouty\layout*ITheT$command\layoutmakesthepictureandtablethatdisplaythecurrentset-ItingsUUofthelayoutUUparameters.(E181S\newcommand\layout{%E182]\@ifstar{\lay@getvalues\lay@xlayout}{\lay@xlayout}}E183S\def\lay@xlayout{%E184]\lay@layoutE185]\if@twosideE186f\lay@layoutE187]\fi} L\lay@layoutITheUUinternalmacro\lay@layoutdoGesallthedirtywork. הE188S\newcommand\lay@layout{%E189]\thispagestyle{empty}הXTheUUactionsof\layoutdepGendonthepagestyle.E190]\if@twosideE191f\ifodd\count\z@הXHereUUwedealwithanoGddpageinthetwosidedcase.(E192p2\typeout{Two-sideddocumentstyle,oddpage.}5sIlayoutUUpackqageversionv1.1kasof1995/11/2317oXSoUUwecompute\ref@marginwidth,\ref@marginparand\ref@margin.E193p2\ref@marginwidth=\cnt@oddsidemargin E194p2\ref@marginpar=\oneinchE195p2\advance\ref@marginparby\ref@hoffsetE196p2\advance\ref@marginparby\cnt@oddsidemarginE197p2\ref@margin\ref@marginparE198p2\if@reversemarginE199yw^\advance\ref@marginparby-\cnt@marginparsepE200yw^\advance\ref@marginparby-\cnt@marginparwidthE201p2\elseE202yw^\advance\ref@marginparby\cnt@textwidthE203yw^\advance\ref@marginparby\cnt@marginparsepE204p2\fiE205f\elseXHereUUwedealwithanevenpageinthetwosidedcase.E206]\typeout{Two-sideddocumentstyle,evenpage.}XSoUUwecompute\ref@marginwidth,\ref@marginparand\ref@margin.E207p2\ref@marginwidth=\cnt@evensidemargin E208p2\ref@marginpar=\oneinchE209p2\advance\ref@marginparby\ref@hoffsetE210p2\advance\ref@marginparby\cnt@evensidemarginE211p2\ref@margin\ref@marginparE212p2\if@reversemarginE213yw^\advance\ref@marginparby\cnt@textwidthE214yw^\advance\ref@marginparby\cnt@marginparsepE215p2\elseE216yw^\advance\ref@marginparby-\cnt@marginparsepE217yw^\advance\ref@marginparby-\cnt@marginparwidthE218p2\fiE219f\fiE220]\elseXFinallyUUwethecaseforsinglesidedprinting.E221f\typeout{One-sideddocumentstyle.}E222f\ref@marginwidth=\cnt@oddsidemarginE223f\ref@marginpar=\oneinchE224f\advance\ref@marginparby\ref@hoffsetE225f\advance\ref@marginparby\cnt@oddsidemarginE226f\ref@margin\ref@marginparE227f\if@reversemarginE228p2\advance\ref@marginparby-\cnt@marginparsepE229p2\advance\ref@marginparby-\cnt@marginparwidthE230f\elseE231p2\advance\ref@marginparby\cnt@textwidthE232p2\advance\ref@marginparby\cnt@marginparsepE233f\fiE234]\fiXNowwebGeginthepictureenvironment;&+dividingallthelengthsbytwoisdone IbyUUsetting\unitlengthto0.5ptE235]\setlength{\unitlength}{.5pt}@sIlayoutUUpackqageversionv1.1kasof1995/11/2318oE236]\begin{picture}(\cnt@paperwidth,\cnt@paperheight) E237f\centeringE238f\thicklinesXFirstUUwehavethepagebGoxandreferencelines,E239f\put(0,0){\framebox(\cnt@paperwidth,\cnt@paperheight){\mbox{}}}E240f\put(0,\cnt@voffset){\dashbox{10}(\cnt@paperwidth,0){\mbox{}}}E241f\put(\cnt@hoffset,0){\dashbox{10}(0,\cnt@paperheight){\mbox{}}}XthenUUtheheader,E242f\put(\ref@margin,\ref@head){%E243p2\framebox(\cnt@textwidth,\cnt@headheight)%E244yw^{\footnotesize\Headertext}}XtheUUbGodyofthetextarea,E245f\put(\ref@margin,\ref@body){%E246p2\framebox(\cnt@textwidth,\cnt@textheight){\Bodytext}}XtheUUfoGoterE247f\put(\ref@margin,\ref@foot){%E248p2\framebox(\cnt@textwidth,\fheight){\footnotesize\Footertext}}XandUUthespaceformarginalnotes.E249f\put(\ref@marginpar,\ref@body){%E250p2\framebox(\cnt@marginparwidth,\cnt@textheight)%E251x{\footnotesize\shortstack{\MarginNotestext}}}XThen^wwestartputtingin`arrows'tomarkthevqariousparameters.-F*romhere IweUUuse\thinlines.E252f\thinlinesX\PositionX+andJ\PositionYwillbGethecoordinatesofthecenterofthearrowIdisplayingUU\textwidth.E253f\SetToHalf\PositionX\cnt@textwidth E254f\advance\PositionXby\ref@marginITheUUarrowshouldbGeabitaboveUUthebottomofthe`bodybox'.E255f\PositionY=\ref@bodyE256f\advance\PositionYby50IAnUUidentifyingnumbGerisputhere,inacircle.E257f\Identify{8}IThenUUthearrowisdrawn.E258f\InsideHArrow\cnt@textwidthXNowUUthe\textheightE259f\SetToHalf\PositionY\cnt@textheight E260f\advance\PositionYby\ref@bodyXTheUUx-psitionofthearrowisat4=5ofthewidthofthe`bGodyUUbox'.E261f\PositionX=\cnt@textwidth E262f\divide\PositionXby5E263f\multiply\PositionXby4E264f\advance\PositionXby\ref@margin KRsIlayoutUUpackqageversionv1.1kasof1995/11/2319oXAnUUidentifyingnumbGerisputhere,inacircle. E265f\Identify{7} E266f\InsideVArrow\cnt@textheightXTheUU\hoffset,E267f\PositionY=\ref@footE268f\SetToHalf\PositionX\cnt@hoffsetE269f\Identify{1}E270f\InsideHArrow\cnt@hoffsetXTheUUwidthofthemargin.E271f\SetToQuart\PositionY\cnt@textheightE272f\advance\PositionYby\ref@bodyE273f\OutsideHArrow\ref@margin\ref@marginwidth{20}E274f\PositionX=\cnt@hoffsetE275f\advance\PositionXby-30E276f\Identify{3}XtheUU\marginparwidth,E277f\SetToQuart\PositionY\cnt@textheightE278f\advance\PositionYby\ref@bodyIThisUUarrowhastobGebitbelowtheoneforthe\oddsidemarginor I\evensidemargin.E279f\advance\PositionYby30E280f\SetToHalf\PositionX\cnt@marginparwidthE281f\advance\PositionXby\ref@marginparE282f\Identify{10}E283f\InsideHArrow\cnt@marginparwidthXTheUU\marginparsep,thisdepGendsonsingleordoublesidedprinting. E284f\advance\PositionYby30E285f\if@twosideE286p2\ifodd\count\z@ XTwosidedUUmoGde,oddpage;E287yw^\OutsideHArrow\ref@marginpar\cnt@marginparsep{20}E288yw^\PositionX=\ref@marginparE289p2\else XandUUevenpage.E290yw^\OutsideHArrow\ref@margin\cnt@marginparsep{20}E291yw^\PositionX=\ref@marginE292p2\fiE293f\else XSingleUUsidedmoGde.E294p2\OutsideHArrow\ref@marginpar\cnt@marginparsep{20}E295p2\PositionX=\ref@marginparE296f\fiE297f\advance\PositionXby30E298f\Identify{9} XIdentifykMthe\footskip.#ThearrowwillbGelocatedon1=8thofthe\textwidth. E299f\PositionX=\cnt@textwidthE300f\divide\PositionXby8 U.sIlayoutUUpackqageversionv1.1kasof1995/11/23110oE301f\advance\PositionXby\ref@margin E302f\OutsideVArrow\ref@foot\cnt@footskip{20}{20}E303f\PositionY=\ref@footE304f\advance\PositionYby-30E305f\Identify{11}XIdentifylthe\voffset. ThearrowwillbGelocatedabittotheleftoftheedge IofUUthepapGer.E306f\PositionX=\cnt@paperwidthE307f\advance\PositionXby-50E308f\PositionY=\cnt@paperheightE309f\ExtraYPos=\PositionYE310f\advance\ExtraYPosby-\cnt@voffsetE311f\advance\PositionYby\cnt@voffsetE312f\divide\PositionYby\tw@E313f\Identify{2}E314f\InsideVArrow\ExtraYPosXIdentifyUU\topmargin,\headheightand\headsep. XThearrowswillbGelocatedon1=8thofthe\textwidth,#withintervqalsoftheIsameUUsize,storedin\Interval.E315f\Interval=\cnt@textwidth E316f\divide\Intervalby8E317f\PositionX=\ref@marginE318f\advance\PositionXby\IntervalIFirst^the\topmargin.ThelengthofuppGerarrowsforthesethreeparametersdi- Imensionsaredi erent.2InthecomputationoftheselengthswehavetocompGensateIforUUthediameterofthecirle.E319f\Identify{4} E320f\ExtraYPos=\ref@headE321f\advance\ExtraYPos\cnt@headheightE322f\ArrowLength=\PositionYE323f\advance\ArrowLength-\ExtraYPosE324f\advance\ArrowLength-\cnt@topmarginE325f\advance\ArrowLength-10%E326f\OutsideVArrow\ExtraYPos\cnt@topmargin{20}{\ArrowLength}E327f\advance\PositionXby\IntervalIThenUUthe\headheightE328f\Identify{5}E329f\advance\ArrowLength\cnt@topmarginE330f\OutsideVArrow\ref@head\cnt@headheight{20}{\ArrowLength}E331f\advance\PositionXby\IntervalIandUU nallythe\headsepE332f\Identify{6}E333f\advance\ArrowLength\cnt@headheightE334f\ExtraYPos=\ref@bodyE335f\advance\ExtraYPos\cnt@textheightE336f\OutsideVArrow\ExtraYPos\cnt@headsep{20}{\ArrowLength}XHereUUwecanendthepictureenvironmentandinsertalittlespace.E337]\end{picture}E338E339]\medskip ^FsIlayoutUUpackqageversionv1.1kasof1995/11/23111oXBelowD thepictureweputatabletoshowtheactualvqaluesoftheparameters. INoteUUthatfractionalpGointsaretruncated,i.e.,72.27ptisdisplayedas72ptXThetableistypGesetinsideaboxwithadepthof0toalwayskeepitontheIsameUUpageasthepicture.E340]\vtopto0pt{% E341f\@minipagerestore\footnotesize\ttfamilyE342f\begin{tabular}{@{}rl@{\hspace{20pt}}rl}E343p21&\oneinchtext\+\bs\texttt{hoffset}E344yw^&2&\oneinchtext\+\bs\texttt{voffset}\\E345p23&\if@twosideE346]\ifodd\count\z@\Show{cnt}{oddsidemargin}E347]\else\Show{cnt}{evensidemargin}E348]\fiE349\elseE350]\Show{cnt}{oddsidemargin}E351\fi^&4&\Show{cnt}{topmargin}\\E352p25&\Show{cnt}{headheight}&6&\Show{cnt}{headsep}\\E353p27&\Show{cnt}{textheight}&8&\Show{cnt}{textwidth}\\E354p29&\Show{cnt}{marginparsep}&10&\Show{cnt}{marginparwidth}\\E355p211&\Show{cnt}{footskip},&&\Show{cnt}{marginparpush}E356t\rlap{(\notshown)}\\E357yw^&\Show{ref}{hoffset}X&,&\Show{ref}{voffset}\\E358yw^&\Show{cnt}{paperwidth}&,&\Show{cnt}{paperheight}\\E359E360]\end{tabular}\vss}IWhentheoptionverbGosewasusedthefollowinglineswillshowdimensionsonthe Iterminal.E361]\Type{ref}{hoffset}E362]\Type{ref}{voffset}E363]\Type{cnt}{textheight}E364]\Type{cnt}{textwidth}IFinallyUUwestartanewpage.E365]\newpageE366S}E367Sh5" cmmi9=pack9age#g ih; $p0J cmsl10#': cmti10"m#R cmss10ow cmss9 cmsy95" cmmi9ߤN cmtt9 cmmi10K`y cmr10ٓRcmr7p