1 % \iffalse meta-comment
5 % The LaTeX3 Project and any individual authors listed elsewhere
8 % This file is part of the Standard LaTeX `Tools Bundle'.
9 % -------------------------------------------------------
11 % It may be distributed and/or modified under the
12 % conditions of the LaTeX Project Public License, either version 1.3c
13 % of this license or (at your option) any later version.
14 % The latest version of this license is in
15 % http://www.latex-project.org/lppl.txt
16 % and version 1.3c or later is part of all distributions of LaTeX
17 % version 2005/12/01 or later.
19 % The list of all files belonging to the LaTeX `Tools Bundle' is
20 % given in the file `manifest.txt'.
25 % This file is built for \LaTeXe, so we make sure an error is
26 % generated when it is used with another format
28 \ProvidesFile{layout.dtx}
30 %<+package>\NeedsTeXFormat{LaTeX2e}
31 %<+package>\ProvidesPackage{layout}
32 %<+driver>\ProvidesFile{layout.drv}
33 %\ProvidesFile{layout.dtx}
34 [2014/10/28 v1.2c Show layout parameters]
36 % A short driver is provided that can be extracted if necessary by
37 % the \textsf{DocStrip} program provided with \LaTeXe.
40 \documentclass{ltxdoc}
44 \newcommand\Lopt[1]{\textsf{#1}}
45 \pagestyle{myheadings}
53 % \changes{v1.1c}{1994/07/13}{Moved Identification code to the front
54 % and removed the permanent use of \cs{filedate} and friends}
55 % \changes{v1.1d}{1994/09/08}{Stored texts in control sequences to
56 % allow other languages}
58 % \GetFileInfo{layout.dtx}
59 % \title{Displaying page layout variables}
60 % \author{Kent McPherson a.o.\thanks{Converted for \LaTeXe\ by
61 % Johannes Braams and modified by Hideo Umeki}}
64 % \markboth{layout package version \fileversion\space as of \filedate}
65 % {layout package version \fileversion\space as of \filedate}
67 % \MaintainedByLaTeXTeam{tools}
70 % \section{Introduction}
72 % This \LaTeXe\ package is a reimplementation of
73 % \texttt{layout.sty} by Kent McPherson. It defines the command
74 % |\layout| which produces an overview of the layout of the current
75 % document. The command |\layout*| recomputes the values it uses to
76 % produce the overview.
78 % The figure on the next page shows the output of the |\layout|
79 % command for this document.
87 % \section{The implementation}
89 % \changes{v1.1b}{1994/03/23}{removed the \cs{wlog} as
90 % \cs{ProvidesPackage} does that now}
91 % \changes{v1.1d}{1994/09/08}{Added language options dutch and
94 % This package prints a figure to illustrate the layout that is
95 % implemented by the document class. In the figure several words
96 % appear. They are stored in control sequences to be able to select
97 % a different language.
98 % \changes{v1.1e}{1994/10/29}{The dutch texts should be one word.}
99 % \changes{v1.1f}{1995/03/14}{Added \cs{notshown}}
100 % \changes{v1.1f}{1995/03/14}{Added option french}
101 % \changes{v1.1j}{1995/10/29}{Added the options spanish, brazilian and
103 % \changes{v1.1k}{1995/11/23}{Documentation fixes}
104 % \changes{v1.2}{1998/04/13}{Redesign of the output by Hideo Umeki}
105 % \changes{v1.2c}{2000/09/21}{Added option german}
106 % \changes{v1.2c}{2000/09/25}{Added option for italian by Claudio Beccari}
109 \DeclareOption{dutch}{%
110 \def\Headertext{Kopregel}
111 \def\Bodytext{Broodtekst}
112 \def\Footertext{Voetregel}
113 \def\MarginNotestext{Marge\\Notities}
114 \def\oneinchtext{een inch}
115 \def\notshown{niet getoond}
117 \DeclareOption{german}{%
118 \def\Headertext{Kopfzeile}
119 \def\Bodytext{Haupttext}
120 \def\Footertext{Fu{\ss}zeile}
121 \def\MarginNotestext{Rand-\\ notizen}
122 \def\oneinchtext{ein Zoll}
123 \def\notshown{ohne Abbildung}
125 \DeclareOption{ngerman}{\ExecuteOptions{german}}
126 \DeclareOption{english}{%
127 \def\Headertext{Header}
129 \def\Footertext{Footer}
130 \def\MarginNotestext{Margin\\Notes}
131 \def\oneinchtext{one inch}
132 \def\notshown{not shown}
134 \DeclareOption{french}{%
135 \def\Headertext{Ent\^{e}te}
137 \def\Footertext{Pied de page}
138 \def\MarginNotestext{Marge\\Notes}
139 \def\oneinchtext{un pouce}
140 \def\notshown{non affich\'{e}}
142 \DeclareOption{francais}{\ExecuteOptions{french}}
143 \DeclareOption{spanish}{%
144 \def\Headertext{Encabezamiento}
145 \def\Bodytext{Cuerpo}
146 \def\Footertext{Pie de p\'agina}
147 \def\MarginNotestext{Notas\\ Marginales}
148 \def\oneinchtext{una pulgada}
149 \def\notshown{no mostradas}
151 \DeclareOption{portuguese}{%
152 \def\Headertext{Cabe\c{c}alho}
154 \def\Footertext{Rodap\'e}
155 \def\MarginNotestext{Notas\\ Marginais}
156 \def\oneinchtext{uma polegada}
157 \def\notshown{n\~ao mostradas}
159 \DeclareOption{brazilian}{%
160 \def\Headertext{Cabe\c{c}alho}
162 \def\Footertext{Rodap\'e}
163 \def\MarginNotestext{Notas\\ Marginais}
164 \def\oneinchtext{uma polegada}
165 \def\notshown{n\~ao mostradas}
167 \DeclareOption{italian}{%
168 \def\Headertext{Testatina}
170 \def\Footertext{Piedino}
171 \def\MarginNotestext{Note\\ Marginali}
172 \def\oneinchtext{un pollice}
173 \def\notshown{non mostrato}
177 % This package has an option \Lopt{verbose}. Using it will make the
178 % command |\layout| type some of the parameters on the terminal.
180 \DeclareOption{verbose}{\let\LayOuttype\typeout}
181 \DeclareOption{silent}{\let\LayOuttype\@gobble}
184 % \changes{v1.1h}{1995/04/07}{Added the options \Lopt{integers}
185 % (default) and \Lopt{reals}}
187 % The normal behaviour of this package when showing the values of
188 % the parameters is to truncate them. However, if you want to see
189 % the real parameter values you can use the option \Lopt{reals} to
191 % \changes{v1.1i}{1995/06/25}{\LaTeX\ release 1995/06/01 no longer
192 % needs double hashmarks in the argument of \cs{DeclareOption}}
195 \DeclareOption{integers}{%
196 \renewcommand*{\lay@value}[2]{%
197 \expandafter\number\csname #1@#2\endcsname pt}}
198 \DeclareOption{reals}{%
199 \renewcommand*{\lay@value}[2]{\the\csname #2\endcsname}}
202 % The default language is English, the default mode is
203 % \Lopt{silent} and the default way of showing parameter values is
206 \ExecuteOptions{english,silent,integers}
210 % \begin{macro}{\LayOutbs}
211 % Define |\LayOutbs| to produce a backslash. We use a definition
212 % which also works with OT1 fonts.
213 % \changes{v1.2b}{1998/06/21}{Renamed \cs{bs} to avoid possible conflicts
214 % with other packages}
216 \newcommand\LayOutbs{}
221 % \begin{macro}{\ConvertToCount}
222 % This macro stores the value of a \emph{length} register in a
223 % \emph{count} register.
225 \def\ConvertToCount#1#2{%
227 % First copy the value
231 % Then divide it by 65536.
235 % The result of this is that the \emph{count} register holds the
236 % value of the \emph{length} register in points.
239 % \begin{macro}{\SetToHalf}
240 % \begin{macro}{\SetToQuart}
241 % Small macros used in computing positions.
243 \def\SetToHalf#1#2{#1=#2\relax\divide#1by\tw@}
244 \def\SetToQuart#1#2{#1=#2\relax\divide#1by4}
248 % \begin{macro}{\Identify}
249 % A small macro used in identifying dimensions.
252 \put(\PositionX,\PositionY){\circle{20}}
253 \put(\PositionX,\PositionY){\makebox(0,0){\tiny #1}}
259 % \begin{macro}{\InsideHArrow}
260 % This macro is used to produce two horizontal arrows inside a box.
261 % The argument gives the width of the box.
262 % \changes{v1.1c}{1994/07/14}{Added check for a negative arrow length}
264 \def\InsideHArrow#1{{%
266 \divide\ArrowLength by \tw@
267 \advance\ArrowLength by -10
268 \advance\PositionX by -10
269 \ifnum\ArrowLength<\z@
270 \put(\PositionX,\PositionY){\vector(1,0){-\ArrowLength}}
271 \advance\PositionX by 20
272 \put(\PositionX,\PositionY){\vector(-1,0){-\ArrowLength}}
274 \put(\PositionX,\PositionY){\vector(-1,0){\ArrowLength}}
275 \advance\PositionX by 20
276 \put(\PositionX,\PositionY){\vector(+1,0){\ArrowLength}}
282 % \begin{macro}{\InsideVArrow}
283 % This macro is used to produce two vertical arrows inside a box.
284 % The argument gives the height of the box.
286 \def\InsideVArrow#1{{%
288 \divide\ArrowLength by \tw@
289 \advance\ArrowLength by -10
290 \advance\PositionY by -10
291 \put(\PositionX,\PositionY){\vector(0,-1){\ArrowLength}}
292 \advance\PositionY by 20
293 \put(\PositionX,\PositionY){\vector(0,+1){\ArrowLength}}
298 % \begin{macro}{\OutsideHArrow}
299 % This macro is used to produce two horizontal arrows to delimit a
300 % length. The first argument is the position for the right arrow,
301 % the second argument gives the length and the third specifies the
302 % length of the arrows.
304 \def\OutsideHArrow#1#2#3{{%
306 \advance\PositionX by #3
307 \put(\PositionX,\PositionY){\vector(-1,0){#3}}
308 \PositionX = #1 \advance\PositionX-#2
309 \advance\PositionX by -#3
310 \put(\PositionX,\PositionY){\vector(+1,0){#3}}
315 % \begin{macro}{\OutsideVArrow}
316 % This macro is used to produce two vertical arrows to delimit a
317 % length. The first argument is the position for the lower arrow,
318 % the second argument gives the length and the third and fourth
319 % specify the lenghts of the lower and upper arrow.
321 \def\OutsideVArrow#1#2#3#4{{%
323 \advance\PositionY by -#3
324 \put(\PositionX,\PositionY){\vector(0,+1){#3}}
328 \put(\PositionX,\PositionY){\vector(0,-1){#4}}
333 % \begin{macro}{\Show}
334 % \changes{v1.1g}{1995/04/03}{Simplified the definition, now show
336 % \changes{v1.1h}{1995/04/07}{Use \cs{lay@value} to show the value
337 % because of the option which decides which of two ways of doing it
340 % Macro used in the table that shows the setting of the parameters.
342 \def\Show#1#2{\LayOutbs #2 = \lay@value{#1}{#2}}
346 % \begin{macro}{\Type}
347 % \changes{v1.1g}{1995/04/03}{Simplified the definition, now show
349 % \changes{v1.1h}{1995/04/07}{Use \cs{lay@value} to show the value
350 % because of the option which decides which of two ways of doing it
352 % \changes{v1.2b}{1998/06/21}{Renamed \cs{type} to \cs{LayOuttype}
353 % to avoid possible conflicts with other packages}
355 % Macro used to show a setting of a parameter on the terminal.
358 \LayOuttype{#2 = \lay@value{#1}{#2}}}
362 % \begin{macro}{\oneinch}
363 % A constant, giving the length of an inch in points (approximately)
370 % Because the overview of the layout is produced in a figure
371 % environment we need to allocate a number of counters that are
372 % used to store the values of various dimensions.
374 % \begin{macro}{\cnt@paperwidth}
375 % \begin{macro}{\cnt@paperheight}
376 % The dimensions of the paper
378 \newcount\cnt@paperwidth
379 \newcount\cnt@paperheight
380 \ConvertToCount\cnt@paperwidth\paperwidth
381 \ConvertToCount\cnt@paperheight\paperheight
386 % \begin{macro}{\cnt@hoffset}
387 % \begin{macro}{\cnt@voffset}
390 \newcount\cnt@hoffset
391 \newcount\cnt@voffset
392 \ConvertToCount\cnt@hoffset\hoffset
393 \ConvertToCount\cnt@voffset\voffset
398 % \begin{macro}{\cnt@textheight}
399 % \begin{macro}{\cnt@textwidth}
400 % dimensions of the text area,
402 \newcount\cnt@textheight
403 \newcount\cnt@textwidth
408 % \begin{macro}{\cnt@topmargin}
409 % \begin{macro}{\cnt@oddsidemargin}
410 % \begin{macro}{\cnt@evensidemargin}
413 \newcount\cnt@topmargin
414 \newcount\cnt@oddsidemargin
415 \newcount\cnt@evensidemargin
421 % \begin{macro}{\cnt@headheight}
422 % \begin{macro}{\cnt@headsep}
423 % dimensions of the running heads,
425 \newcount\cnt@headheight
426 \newcount\cnt@headsep
431 % \begin{macro}{\cnt@marginparsep}
432 % \begin{macro}{\cnt@marginparwidth}
433 % \begin{macro}{\cnt@marginparpush}
434 % marginal paragraphs,
436 \newcount\cnt@marginparsep
437 \newcount\cnt@marginparwidth
438 \newcount\cnt@marginparpush
444 % \begin{macro}{\cnt@footskip}
445 % the distance between the running footers and the text,
447 \newcount\cnt@footskip
450 % and the height of the footers, which is needed here to display a
451 % box, but which isn't used by \LaTeX.
452 % \begin{macro}{\fheight}
459 % Apart from integer representations of the page layout parameters
460 % we also need registers to store reference values in.
462 % \begin{macro}{\ref@top}
463 % The position of the top of the `printable area' is
464 % one inch below the top of the paper by default. The value of
465 % |\ref@top| is relative to the lower left corner of the picture
466 % environment that will be used.
470 \ref@top=\cnt@paperheight \advance\ref@top by -\oneinch
474 % \begin{macro}{\ref@hoffset}
475 % \begin{macro}{\ref@voffset}
478 \newcount\ref@hoffset
479 \newcount\ref@voffset
481 % The |\hoffset| and |\voffset| values are added to the default
482 % offset of one inch.
484 \ref@hoffset=\cnt@hoffset \advance\cnt@hoffset by \oneinch
485 \ref@voffset=\cnt@voffset
488 % |\cnt@voffset| is converted to be relative to the origin of the
491 \cnt@voffset=\ref@top
492 \advance\cnt@voffset by -\ref@voffset
497 % \begin{macro}{\ref@head}
498 % and the text areas, running heads,
504 % \begin{macro}{\ref@body}
511 % \begin{macro}{\ref@foot}
512 % and running footers.
518 % \begin{macro}{\ref@margin}
519 % \begin{macro}{\ref@marginwidth}
520 % \begin{macro}{\ref@marginpar}
521 % These are different for even and odd pages, so they are computed
525 \newcount\ref@marginwidth
526 \newcount\ref@marginpar
532 % The following are a number of scratch registers, used in the
533 % positioning of the various pices of the picture.
539 \newcount\ArrowLength
542 % \begin{macro}{\lay@getvalues}
543 % \changes{v1.1j}{1995/10/30}{Added macro to compute values at later
545 % All values that might change during the document are computed by
546 % calling the macro |\lay@getvalues|. By default this macro is
547 % executed at |\begin{document}|.
550 \ConvertToCount\cnt@textheight\textheight
551 \ConvertToCount\cnt@textwidth\textwidth
552 \ConvertToCount\cnt@topmargin\topmargin
553 \ConvertToCount\cnt@oddsidemargin\oddsidemargin
554 \ConvertToCount\cnt@evensidemargin\evensidemargin
555 \ConvertToCount\cnt@headheight\headheight
556 \ConvertToCount\cnt@headsep\headsep
557 \ConvertToCount\cnt@marginparsep\marginparsep
558 \ConvertToCount\cnt@marginparwidth\marginparwidth
559 \ConvertToCount\cnt@marginparpush\marginparpush
560 \ConvertToCount\cnt@footskip\footskip
562 \advance\ref@head by -\ref@voffset
563 \advance\ref@head by -\cnt@topmargin
564 \advance\ref@head by -\cnt@headheight
566 \advance\ref@body by -\cnt@headsep
567 \advance\ref@body by -\cnt@textheight
569 \advance\ref@foot by -\cnt@footskip
571 \AtBeginDocument{\lay@getvalues}
574 % \begin{macro}{\computevalues}
576 % \begin{macro}{\layout}
577 % \begin{macro}{\layout*}
578 % The command |\layout| makes the picture and table that display
579 % the current settings of the layout parameters.
581 % \changes{v1.1b}{1994/03/23}{Produce two pages in twoside mode}
582 % \changes{v1.1j}{1995/10/30}{Added \cs{layout*}}
585 \@ifstar{\lay@getvalues\lay@xlayout}{\lay@xlayout}}
593 % \begin{macro}{\lay@layout}
594 % The internal macro |\lay@layout| does all the dirty work.
596 \newcommand\lay@layout{%
597 \thispagestyle{empty}
600 % The actions of |\layout| depend on the pagestyle.
606 % Here we deal with an odd page in the twosided case.
609 \typeout{Two-sided document style, odd page.}
612 % So we compute |\ref@marginwidth|, |\ref@marginpar| and
614 % \changes{v1.1}{1994/02/23}{Added check for reversemargin}
616 \ref@marginwidth=\cnt@oddsidemargin
617 \ref@marginpar=\oneinch
618 \advance\ref@marginpar by \ref@hoffset
619 \advance\ref@marginpar by \cnt@oddsidemargin
620 \ref@margin\ref@marginpar
622 \advance\ref@marginpar by -\cnt@marginparsep
623 \advance\ref@marginpar by -\cnt@marginparwidth
625 \advance\ref@marginpar by \cnt@textwidth
626 \advance\ref@marginpar by \cnt@marginparsep
634 % Here we deal with an even page in the twosided case.
637 \typeout{Two-sided document style, even page.}
640 % So we compute |\ref@marginwidth|, |\ref@marginpar| and
642 % \changes{v1.1}{1994/02/23}{Added check for reversemargin}
644 \ref@marginwidth=\cnt@evensidemargin
645 \ref@marginpar=\oneinch
646 \advance\ref@marginpar by \ref@hoffset
647 \advance\ref@marginpar by \cnt@evensidemargin
648 \ref@margin\ref@marginpar
650 \advance\ref@marginpar by \cnt@textwidth
651 \advance\ref@marginpar by \cnt@marginparsep
653 \advance\ref@marginpar by -\cnt@marginparsep
654 \advance\ref@marginpar by -\cnt@marginparwidth
663 % Finally we the case for single sided printing.
665 % \changes{v1.1}{1994/02/23}{Added check for reversemargin}
667 \typeout{One-sided document style.}
668 \ref@marginwidth=\cnt@oddsidemargin
669 \ref@marginpar=\oneinch
670 \advance\ref@marginpar by \ref@hoffset
671 \advance\ref@marginpar by \cnt@oddsidemargin
672 \ref@margin\ref@marginpar
674 \advance\ref@marginpar by -\cnt@marginparsep
675 \advance\ref@marginpar by -\cnt@marginparwidth
677 \advance\ref@marginpar by \cnt@textwidth
678 \advance\ref@marginpar by \cnt@marginparsep
684 % Now we begin the picture environment; dividing all the lengths by
685 % two is done by setting |\unitlength| to \texttt{0.5pt}
687 \setlength{\unitlength}{.5pt}
688 \begin{picture}(\cnt@paperwidth,\cnt@paperheight)
693 % First we have the pagebox and reference lines,
696 \put(0,0){\framebox(\cnt@paperwidth,\cnt@paperheight){\mbox{}}}
697 \put(0,\cnt@voffset){\dashbox{10}(\cnt@paperwidth,0){\mbox{}}}
698 \put(\cnt@hoffset,0){\dashbox{10}(0,\cnt@paperheight){\mbox{}}}
704 \put(\ref@margin,\ref@head){%
705 \framebox(\cnt@textwidth,\cnt@headheight)%
706 {\footnotesize\Headertext}}
709 % the body of the text area,
712 \put(\ref@margin,\ref@body){%
713 \framebox(\cnt@textwidth,\cnt@textheight){\Bodytext}}
719 \put(\ref@margin,\ref@foot){%
720 \framebox(\cnt@textwidth,\fheight){\footnotesize\Footertext}}
723 % and the space for marginal notes.
726 \put(\ref@marginpar,\ref@body){%
727 \framebox(\cnt@marginparwidth,\cnt@textheight)%
728 {\footnotesize\shortstack{\MarginNotestext}}}
731 % Then we start putting in `arrows' to mark the various parameters.
732 % From here we use |\thinlines|.
737 % |\PositionX| and |\PositionY| will be the coordinates of the center of
738 % the arrow displaying |\textwidth|.
740 \SetToHalf\PositionX\cnt@textwidth
741 \advance\PositionX by \ref@margin
743 % The arrow should be a bit above the bottom of the `body box'.
745 \PositionY = \ref@body
746 \advance\PositionY by 50
748 % An identifying number is put here, in a circle.
752 % Then the arrow is drawn.
754 \InsideHArrow\cnt@textwidth
757 % Now the |\textheight|
759 \SetToHalf\PositionY\cnt@textheight
760 \advance\PositionY by \ref@body
763 % The x-position of the arrow is at $4/5$ of the width of the `body
766 \PositionX = \cnt@textwidth
767 \divide\PositionX by 5
768 \multiply \PositionX by 4
769 \advance\PositionX by \ref@margin
772 % An identifying number is put here, in a circle.
775 \InsideVArrow\cnt@textheight
780 % \changes{v1.2}{1998/04/13}{\cs{PositionY} for label 1 is
784 \SetToHalf\PositionX\cnt@hoffset
786 \InsideHArrow\cnt@hoffset
790 % The width of the margin.
791 % \changes{v1.2}{1998/04/13}{The direction of the arrows should be
792 % switched by the sign of \cs{oddsidemargin}}
794 \SetToQuart\PositionY\cnt@textheight
795 \advance\PositionY by \ref@body
796 \ifnum\ref@marginwidth > 0
797 \OutsideHArrow\ref@margin\ref@marginwidth{20}
798 \PositionX = \cnt@hoffset
800 \OutsideHArrow\cnt@hoffset{-\ref@marginwidth}{20}
801 \PositionX = \ref@margin
803 \advance\PositionX by -30
807 % the |\marginparwidth|,
809 \SetToQuart\PositionY\cnt@textheight
810 \advance\PositionY by \ref@body
812 % This arrow has to be bit below the one for the |\oddsidemargin|
813 % or\\ |\evensidemargin|.
815 \advance\PositionY by 30
816 \SetToHalf\PositionX\cnt@marginparwidth
817 \advance\PositionX by \ref@marginpar
819 \InsideHArrow\cnt@marginparwidth
823 % The |\marginparsep|, this depends on single or double sided
826 \advance\PositionY by 30
830 % Twosided mode, reversemargin;
831 % \changes{v1.1b}{1994/03/23}{\cs{OutSideHArrow} should be
832 % \cs{OutsideHArrow}}
833 % \changes{v1.2}{1998/04/13}{Added check for reversemargin}
837 \OutsideHArrow\ref@margin\cnt@marginparsep{20}
838 \PositionX = \ref@margin
840 \OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
841 \PositionX = \ref@marginpar
848 \OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
849 \PositionX = \ref@marginpar
851 \OutsideHArrow\ref@margin\cnt@marginparsep{20}
852 \PositionX = \ref@margin
859 % \changes{v1.2}{1998/04/13}{Added check for reversemargin}
862 \OutsideHArrow\ref@margin\cnt@marginparsep{20}
863 \PositionX = \ref@margin
865 \OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
866 \PositionX = \ref@marginpar
870 % \changes{v1.2}{1998/04/13}{The \cs{PositionX} of the label 9 is
871 % changed to the left side of the arrows}
873 \advance\PositionX by -\cnt@marginparsep
874 \advance\PositionX by -30
878 % Identify the |\footskip|. The arrow will be located on $1/8$th of
880 % \changes{v1.2}{1998/04/13}{The \cs{PositionY} of the label 11 is
881 % changed to the upper side of the arrows}
883 \PositionX = \cnt@textwidth
884 \divide\PositionX by 8
885 \advance\PositionX by \ref@margin
886 \OutsideVArrow\ref@foot\cnt@footskip{20}{20}
887 \PositionY = \ref@foot
888 \advance\PositionY by \cnt@footskip
889 \advance\PositionY by 30
893 % Identify the |\voffset|. The arrow will be located a bit to the
894 % left of the edge of the paper.
896 \PositionX = \cnt@paperwidth
897 \advance\PositionX by -50
898 \PositionY = \cnt@paperheight
899 \ExtraYPos = \PositionY
900 \advance\ExtraYPos by -\cnt@voffset
901 \advance\PositionY by \cnt@voffset
902 \divide\PositionY by \tw@
904 \InsideVArrow\ExtraYPos
907 % Identify |\topmargin|, |\headheight| and |\headsep|.
909 % The arrows will be located on $1/8$th of the |\textwidth|, with
910 % intervals of the same size, stored in |\Interval|.
912 \Interval = \cnt@textwidth
913 \divide\Interval by 8
914 \PositionX = \ref@margin
915 \advance\PositionX by \Interval
917 % First the |\topmargin|. If |\topmargin| has a positive value, the
918 % arrow is upward. Otherwise, it is downward. The number label is
919 % always placed at the base of the arrow.
920 % \changes{v1.2}{1998/04/13}{The direction of the arrows should be
921 % switched by the sign of \cs{topmargin}}
923 \ifnum\cnt@topmargin > \z@
924 \ExtraYPos = \ref@head
925 \advance\ExtraYPos\cnt@headheight
926 \OutsideVArrow\ExtraYPos\cnt@topmargin{20}{20}
927 \PositionY = \ExtraYPos
928 \advance\PositionY by \cnt@topmargin
930 \ExtraYPos = \cnt@voffset
931 \OutsideVArrow\ExtraYPos{-\cnt@topmargin}{20}{20}
932 \PositionY = \ExtraYPos
933 \advance\PositionY by -\cnt@topmargin
935 \advance\PositionY by 30
937 \advance\PositionX by \Interval
939 % Then the |\headheight|
940 % \changes{v1.2}{1998/04/13}{The \cs{PositionY} of the label 5 is
943 \OutsideVArrow\ref@head\cnt@headheight{20}{20}
944 \PositionY = \ref@head
945 \advance\PositionY by \cnt@headheight
946 \advance\PositionY by 30
948 \advance\PositionX by \Interval
950 % and finally the |\headsep|
951 % \changes{v1.2}{1998/04/13}{The \cs{PositionY} of the label 6 is
955 \advance\ExtraYPos\cnt@textheight
956 \OutsideVArrow\ExtraYPos\cnt@headsep{20}{20}
957 \PositionY = \ref@body
958 \advance\PositionY by \cnt@textheight
959 \advance\PositionY by -30
963 % Here we can end the picture environment and insert a little
971 % Below the picture we put a table to show the actual values of the
972 % parameters. Note that fractional points are truncated, i.e.,
973 % \texttt{72.27pt} is displayed as \texttt{72pt}
975 % The table is typeset inside a box with a depth of 0 to always
976 % keep it on the same page as the picture.
977 % \changes{v1.1b}{1994/03/23}{Showing oddside and evenside margins was
979 % \changes{v1.1c}{1994/07/14}{in compatibility mode \cs{footnotesize}
980 % calls \cs{normalfont}; therefore we need to switch to a tt font
982 % \changes{v1.1f}{1995/03/14}{introduced \cs{notshown}}
985 \@minipagerestore\footnotesize\ttfamily
986 \begin{tabular}{@{}rl@{\hspace{20pt}}rl}
987 1 & \oneinchtext\ + \LayOutbs\texttt{hoffset}
988 & 2 & \oneinchtext\ + \LayOutbs\texttt{voffset} \\
990 \ifodd\count\z@ \Show{cnt}{oddsidemargin}
991 \else \Show{cnt}{evensidemargin}
994 \Show{cnt}{oddsidemargin}
995 \fi & 4 & \Show{cnt}{topmargin} \\
996 5 & \Show{cnt}{headheight} & 6 & \Show{cnt}{headsep} \\
997 7 & \Show{cnt}{textheight} & 8 & \Show{cnt}{textwidth} \\
998 9 & \Show{cnt}{marginparsep}&10& \Show{cnt}{marginparwidth} \\
999 11& \Show{cnt}{footskip} & & \Show{cnt}{marginparpush}
1000 \rlap{(\notshown)}\\
1001 & \Show{ref}{hoffset} & & \Show{ref}{voffset} \\
1002 & \Show{cnt}{paperwidth} & & \Show{cnt}{paperheight} \\
1006 % When the option \Lopt{verbose} was used the following lines will
1007 % show dimensions on the terminal.
1011 \Type{cnt}{textheight}
1012 \Type{cnt}{textwidth}
1014 % Finally we start a new page.