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'.
24 % This file is built for \LaTeXe, so we make sure an error is
25 % generated when it is used with another format
27 \ProvidesFile{layout.dtx}
29 %<+package>\NeedsTeXFormat{LaTeX2e}
30 %<+package>\ProvidesPackage{layout}
31 %<+driver>\ProvidesFile{layout.drv}
32 %\ProvidesFile{layout.dtx}
33 [2014/10/28 v1.2c Show layout parameters]
35 % A short driver is provided that can be extracted if necessary by
36 % the \textsf{DocStrip} program provided with \LaTeXe.
39 \documentclass{ltxdoc}
43 \newcommand\Lopt[1]{\textsf{#1}}
44 \pagestyle{myheadings}
52 % \changes{v1.1c}{1994/07/13}{Moved Identification code to the front
53 % and removed the permanent use of \cs{filedate} and friends}
54 % \changes{v1.1d}{1994/09/08}{Stored texts in control sequences to
55 % allow other languages}
57 % \GetFileInfo{layout.dtx}
58 % \title{Displaying page layout variables}
59 % \author{Kent McPherson a.o.\thanks{Converted for \LaTeXe\ by
60 % Johannes Braams and modified by Hideo Umeki}}
63 % \markboth{layout package version \fileversion\space as of \filedate}
64 % {layout package version \fileversion\space as of \filedate}
66 % \MaintainedByLaTeXTeam{tools}
69 % \section{Introduction}
71 % This \LaTeXe\ package is a reimplementation of
72 % \texttt{layout.sty} by Kent McPherson. It defines the command
73 % |\layout| which produces an overview of the layout of the current
74 % document. The command |\layout*| recomputes the values it uses to
75 % produce the overview.
77 % The figure on the next page shows the output of the |\layout|
78 % command for this document.
86 % \section{The implementation}
88 % \changes{v1.1b}{1994/03/23}{removed the \cs{wlog} as
89 % \cs{ProvidesPackage} does that now}
90 % \changes{v1.1d}{1994/09/08}{Added language options dutch and
93 % This package prints a figure to illustrate the layout that is
94 % implemented by the document class. In the figure several words
95 % appear. They are stored in control sequences to be able to select
96 % a different language.
97 % \changes{v1.1e}{1994/10/29}{The dutch texts should be one word.}
98 % \changes{v1.1f}{1995/03/14}{Added \cs{notshown}}
99 % \changes{v1.1f}{1995/03/14}{Added option french}
100 % \changes{v1.1j}{1995/10/29}{Added the options spanish, brazilian and
102 % \changes{v1.1k}{1995/11/23}{Documentation fixes}
103 % \changes{v1.2}{1998/04/13}{Redesign of the output by Hideo Umeki}
104 % \changes{v1.2c}{2000/09/21}{Added option german}
105 % \changes{v1.2c}{2000/09/25}{Added option for italian by Claudio Beccari}
108 \DeclareOption{dutch}{%
109 \def\Headertext{Kopregel}
110 \def\Bodytext{Broodtekst}
111 \def\Footertext{Voetregel}
112 \def\MarginNotestext{Marge\\Notities}
113 \def\oneinchtext{een inch}
114 \def\notshown{niet getoond}
116 \DeclareOption{german}{%
117 \def\Headertext{Kopfzeile}
118 \def\Bodytext{Haupttext}
119 \def\Footertext{Fu{\ss}zeile}
120 \def\MarginNotestext{Rand-\\ notizen}
121 \def\oneinchtext{ein Zoll}
122 \def\notshown{ohne Abbildung}
124 \DeclareOption{ngerman}{\ExecuteOptions{german}}
125 \DeclareOption{english}{%
126 \def\Headertext{Header}
128 \def\Footertext{Footer}
129 \def\MarginNotestext{Margin\\Notes}
130 \def\oneinchtext{one inch}
131 \def\notshown{not shown}
133 \DeclareOption{french}{%
134 \def\Headertext{Ent\^{e}te}
136 \def\Footertext{Pied de page}
137 \def\MarginNotestext{Marge\\Notes}
138 \def\oneinchtext{un pouce}
139 \def\notshown{non affich\'{e}}
141 \DeclareOption{francais}{\ExecuteOptions{french}}
142 \DeclareOption{spanish}{%
143 \def\Headertext{Encabezamiento}
144 \def\Bodytext{Cuerpo}
145 \def\Footertext{Pie de p\'agina}
146 \def\MarginNotestext{Notas\\ Marginales}
147 \def\oneinchtext{una pulgada}
148 \def\notshown{no mostradas}
150 \DeclareOption{portuguese}{%
151 \def\Headertext{Cabe\c{c}alho}
153 \def\Footertext{Rodap\'e}
154 \def\MarginNotestext{Notas\\ Marginais}
155 \def\oneinchtext{uma polegada}
156 \def\notshown{n\~ao mostradas}
158 \DeclareOption{brazilian}{%
159 \def\Headertext{Cabe\c{c}alho}
161 \def\Footertext{Rodap\'e}
162 \def\MarginNotestext{Notas\\ Marginais}
163 \def\oneinchtext{uma polegada}
164 \def\notshown{n\~ao mostradas}
166 \DeclareOption{italian}{%
167 \def\Headertext{Testatina}
169 \def\Footertext{Piedino}
170 \def\MarginNotestext{Note\\ Marginali}
171 \def\oneinchtext{un pollice}
172 \def\notshown{non mostrato}
176 % This package has an option \Lopt{verbose}. Using it will make the
177 % command |\layout| type some of the parameters on the terminal.
179 \DeclareOption{verbose}{\let\LayOuttype\typeout}
180 \DeclareOption{silent}{\let\LayOuttype\@gobble}
183 % \changes{v1.1h}{1995/04/07}{Added the options \Lopt{integers}
184 % (default) and \Lopt{reals}}
186 % The normal behaviour of this package when showing the values of
187 % the parameters is to truncate them. However, if you want to see
188 % the real parameter values you can use the option \Lopt{reals} to
190 % \changes{v1.1i}{1995/06/25}{\LaTeX\ release 1995/06/01 no longer
191 % needs double hashmarks in the argument of \cs{DeclareOption}}
194 \DeclareOption{integers}{%
195 \renewcommand*{\lay@value}[2]{%
196 \expandafter\number\csname #1@#2\endcsname pt}}
197 \DeclareOption{reals}{%
198 \renewcommand*{\lay@value}[2]{\the\csname #2\endcsname}}
201 % The default language is English, the default mode is
202 % \Lopt{silent} and the default way of showing parameter values is
205 \ExecuteOptions{english,silent,integers}
209 % \begin{macro}{\LayOutbs}
210 % Define |\LayOutbs| to produce a backslash. We use a definition
211 % which also works with OT1 fonts.
212 % \changes{v1.2b}{1998/06/21}{Renamed \cs{bs} to avoid possible conflicts
213 % with other packages}
215 \newcommand\LayOutbs{}
220 % \begin{macro}{\ConvertToCount}
221 % This macro stores the value of a \emph{length} register in a
222 % \emph{count} register.
224 \def\ConvertToCount#1#2{%
226 % First copy the value
230 % Then divide it by 65536.
234 % The result of this is that the \emph{count} register holds the
235 % value of the \emph{length} register in points.
238 % \begin{macro}{\SetToHalf}
239 % \begin{macro}{\SetToQuart}
240 % Small macros used in computing positions.
242 \def\SetToHalf#1#2{#1=#2\relax\divide#1by\tw@}
243 \def\SetToQuart#1#2{#1=#2\relax\divide#1by4}
247 % \begin{macro}{\Identify}
248 % A small macro used in identifying dimensions.
251 \put(\PositionX,\PositionY){\circle{20}}
252 \put(\PositionX,\PositionY){\makebox(0,0){\tiny #1}}
258 % \begin{macro}{\InsideHArrow}
259 % This macro is used to produce two horizontal arrows inside a box.
260 % The argument gives the width of the box.
261 % \changes{v1.1c}{1994/07/14}{Added check for a negative arrow length}
263 \def\InsideHArrow#1{{%
265 \divide\ArrowLength by \tw@
266 \advance\ArrowLength by -10
267 \advance\PositionX by -10
268 \ifnum\ArrowLength<\z@
269 \put(\PositionX,\PositionY){\vector(1,0){-\ArrowLength}}
270 \advance\PositionX by 20
271 \put(\PositionX,\PositionY){\vector(-1,0){-\ArrowLength}}
273 \put(\PositionX,\PositionY){\vector(-1,0){\ArrowLength}}
274 \advance\PositionX by 20
275 \put(\PositionX,\PositionY){\vector(+1,0){\ArrowLength}}
281 % \begin{macro}{\InsideVArrow}
282 % This macro is used to produce two vertical arrows inside a box.
283 % The argument gives the height of the box.
285 \def\InsideVArrow#1{{%
287 \divide\ArrowLength by \tw@
288 \advance\ArrowLength by -10
289 \advance\PositionY by -10
290 \put(\PositionX,\PositionY){\vector(0,-1){\ArrowLength}}
291 \advance\PositionY by 20
292 \put(\PositionX,\PositionY){\vector(0,+1){\ArrowLength}}
297 % \begin{macro}{\OutsideHArrow}
298 % This macro is used to produce two horizontal arrows to delimit a
299 % length. The first argument is the position for the right arrow,
300 % the second argument gives the length and the third specifies the
301 % length of the arrows.
303 \def\OutsideHArrow#1#2#3{{%
305 \advance\PositionX by #3
306 \put(\PositionX,\PositionY){\vector(-1,0){#3}}
307 \PositionX = #1 \advance\PositionX-#2
308 \advance\PositionX by -#3
309 \put(\PositionX,\PositionY){\vector(+1,0){#3}}
314 % \begin{macro}{\OutsideVArrow}
315 % This macro is used to produce two vertical arrows to delimit a
316 % length. The first argument is the position for the lower arrow,
317 % the second argument gives the length and the third and fourth
318 % specify the lenghts of the lower and upper arrow.
320 \def\OutsideVArrow#1#2#3#4{{%
322 \advance\PositionY by -#3
323 \put(\PositionX,\PositionY){\vector(0,+1){#3}}
327 \put(\PositionX,\PositionY){\vector(0,-1){#4}}
332 % \begin{macro}{\Show}
333 % \changes{v1.1g}{1995/04/03}{Simplified the definition, now show
335 % \changes{v1.1h}{1995/04/07}{Use \cs{lay@value} to show the value
336 % because of the option which decides which of two ways of doing it
339 % Macro used in the table that shows the setting of the parameters.
341 \def\Show#1#2{\LayOutbs #2 = \lay@value{#1}{#2}}
345 % \begin{macro}{\Type}
346 % \changes{v1.1g}{1995/04/03}{Simplified the definition, now show
348 % \changes{v1.1h}{1995/04/07}{Use \cs{lay@value} to show the value
349 % because of the option which decides which of two ways of doing it
351 % \changes{v1.2b}{1998/06/21}{Renamed \cs{type} to \cs{LayOuttype}
352 % to avoid possible conflicts with other packages}
354 % Macro used to show a setting of a parameter on the terminal.
357 \LayOuttype{#2 = \lay@value{#1}{#2}}}
361 % \begin{macro}{\oneinch}
362 % A constant, giving the length of an inch in points (approximately)
369 % Because the overview of the layout is produced in a figure
370 % environment we need to allocate a number of counters that are
371 % used to store the values of various dimensions.
373 % \begin{macro}{\cnt@paperwidth}
374 % \begin{macro}{\cnt@paperheight}
375 % The dimensions of the paper
377 \newcount\cnt@paperwidth
378 \newcount\cnt@paperheight
379 \ConvertToCount\cnt@paperwidth\paperwidth
380 \ConvertToCount\cnt@paperheight\paperheight
385 % \begin{macro}{\cnt@hoffset}
386 % \begin{macro}{\cnt@voffset}
389 \newcount\cnt@hoffset
390 \newcount\cnt@voffset
391 \ConvertToCount\cnt@hoffset\hoffset
392 \ConvertToCount\cnt@voffset\voffset
397 % \begin{macro}{\cnt@textheight}
398 % \begin{macro}{\cnt@textwidth}
399 % dimensions of the text area,
401 \newcount\cnt@textheight
402 \newcount\cnt@textwidth
407 % \begin{macro}{\cnt@topmargin}
408 % \begin{macro}{\cnt@oddsidemargin}
409 % \begin{macro}{\cnt@evensidemargin}
412 \newcount\cnt@topmargin
413 \newcount\cnt@oddsidemargin
414 \newcount\cnt@evensidemargin
420 % \begin{macro}{\cnt@headheight}
421 % \begin{macro}{\cnt@headsep}
422 % dimensions of the running heads,
424 \newcount\cnt@headheight
425 \newcount\cnt@headsep
430 % \begin{macro}{\cnt@marginparsep}
431 % \begin{macro}{\cnt@marginparwidth}
432 % \begin{macro}{\cnt@marginparpush}
433 % marginal paragraphs,
435 \newcount\cnt@marginparsep
436 \newcount\cnt@marginparwidth
437 \newcount\cnt@marginparpush
443 % \begin{macro}{\cnt@footskip}
444 % the distance between the running footers and the text,
446 \newcount\cnt@footskip
449 % and the height of the footers, which is needed here to display a
450 % box, but which isn't used by \LaTeX.
451 % \begin{macro}{\fheight}
458 % Apart from integer representations of the page layout parameters
459 % we also need registers to store reference values in.
461 % \begin{macro}{\ref@top}
462 % The position of the top of the `printable area' is
463 % one inch below the top of the paper by default. The value of
464 % |\ref@top| is relative to the lower left corner of the picture
465 % environment that will be used.
469 \ref@top=\cnt@paperheight \advance\ref@top by -\oneinch
473 % \begin{macro}{\ref@hoffset}
474 % \begin{macro}{\ref@voffset}
477 \newcount\ref@hoffset
478 \newcount\ref@voffset
480 % The |\hoffset| and |\voffset| values are added to the default
481 % offset of one inch.
483 \ref@hoffset=\cnt@hoffset \advance\cnt@hoffset by \oneinch
484 \ref@voffset=\cnt@voffset
487 % |\cnt@voffset| is converted to be relative to the origin of the
490 \cnt@voffset=\ref@top
491 \advance\cnt@voffset by -\ref@voffset
496 % \begin{macro}{\ref@head}
497 % and the text areas, running heads,
503 % \begin{macro}{\ref@body}
510 % \begin{macro}{\ref@foot}
511 % and running footers.
517 % \begin{macro}{\ref@margin}
518 % \begin{macro}{\ref@marginwidth}
519 % \begin{macro}{\ref@marginpar}
520 % These are different for even and odd pages, so they are computed
524 \newcount\ref@marginwidth
525 \newcount\ref@marginpar
531 % The following are a number of scratch registers, used in the
532 % positioning of the various pices of the picture.
538 \newcount\ArrowLength
541 % \begin{macro}{\lay@getvalues}
542 % \changes{v1.1j}{1995/10/30}{Added macro to compute values at later
544 % All values that might change during the document are computed by
545 % calling the macro |\lay@getvalues|. By default this macro is
546 % executed at |\begin{document}|.
549 \ConvertToCount\cnt@textheight\textheight
550 \ConvertToCount\cnt@textwidth\textwidth
551 \ConvertToCount\cnt@topmargin\topmargin
552 \ConvertToCount\cnt@oddsidemargin\oddsidemargin
553 \ConvertToCount\cnt@evensidemargin\evensidemargin
554 \ConvertToCount\cnt@headheight\headheight
555 \ConvertToCount\cnt@headsep\headsep
556 \ConvertToCount\cnt@marginparsep\marginparsep
557 \ConvertToCount\cnt@marginparwidth\marginparwidth
558 \ConvertToCount\cnt@marginparpush\marginparpush
559 \ConvertToCount\cnt@footskip\footskip
561 \advance\ref@head by -\ref@voffset
562 \advance\ref@head by -\cnt@topmargin
563 \advance\ref@head by -\cnt@headheight
565 \advance\ref@body by -\cnt@headsep
566 \advance\ref@body by -\cnt@textheight
568 \advance\ref@foot by -\cnt@footskip
570 \AtBeginDocument{\lay@getvalues}
573 % \begin{macro}{\computevalues}
575 % \begin{macro}{\layout}
576 % \begin{macro}{\layout*}
577 % The command |\layout| makes the picture and table that display
578 % the current settings of the layout parameters.
580 % \changes{v1.1b}{1994/03/23}{Produce two pages in twoside mode}
581 % \changes{v1.1j}{1995/10/30}{Added \cs{layout*}}
584 \@ifstar{\lay@getvalues\lay@xlayout}{\lay@xlayout}}
592 % \begin{macro}{\lay@layout}
593 % The internal macro |\lay@layout| does all the dirty work.
595 \newcommand\lay@layout{%
596 \thispagestyle{empty}
599 % The actions of |\layout| depend on the pagestyle.
605 % Here we deal with an odd page in the twosided case.
608 \typeout{Two-sided document style, odd page.}
611 % So we compute |\ref@marginwidth|, |\ref@marginpar| and
613 % \changes{v1.1}{1994/02/23}{Added check for reversemargin}
615 \ref@marginwidth=\cnt@oddsidemargin
616 \ref@marginpar=\oneinch
617 \advance\ref@marginpar by \ref@hoffset
618 \advance\ref@marginpar by \cnt@oddsidemargin
619 \ref@margin\ref@marginpar
621 \advance\ref@marginpar by -\cnt@marginparsep
622 \advance\ref@marginpar by -\cnt@marginparwidth
624 \advance\ref@marginpar by \cnt@textwidth
625 \advance\ref@marginpar by \cnt@marginparsep
633 % Here we deal with an even page in the twosided case.
636 \typeout{Two-sided document style, even page.}
639 % So we compute |\ref@marginwidth|, |\ref@marginpar| and
641 % \changes{v1.1}{1994/02/23}{Added check for reversemargin}
643 \ref@marginwidth=\cnt@evensidemargin
644 \ref@marginpar=\oneinch
645 \advance\ref@marginpar by \ref@hoffset
646 \advance\ref@marginpar by \cnt@evensidemargin
647 \ref@margin\ref@marginpar
649 \advance\ref@marginpar by \cnt@textwidth
650 \advance\ref@marginpar by \cnt@marginparsep
652 \advance\ref@marginpar by -\cnt@marginparsep
653 \advance\ref@marginpar by -\cnt@marginparwidth
662 % Finally we the case for single sided printing.
664 % \changes{v1.1}{1994/02/23}{Added check for reversemargin}
666 \typeout{One-sided document style.}
667 \ref@marginwidth=\cnt@oddsidemargin
668 \ref@marginpar=\oneinch
669 \advance\ref@marginpar by \ref@hoffset
670 \advance\ref@marginpar by \cnt@oddsidemargin
671 \ref@margin\ref@marginpar
673 \advance\ref@marginpar by -\cnt@marginparsep
674 \advance\ref@marginpar by -\cnt@marginparwidth
676 \advance\ref@marginpar by \cnt@textwidth
677 \advance\ref@marginpar by \cnt@marginparsep
683 % Now we begin the picture environment; dividing all the lengths by
684 % two is done by setting |\unitlength| to \texttt{0.5pt}
686 \setlength{\unitlength}{.5pt}
687 \begin{picture}(\cnt@paperwidth,\cnt@paperheight)
692 % First we have the pagebox and reference lines,
695 \put(0,0){\framebox(\cnt@paperwidth,\cnt@paperheight){\mbox{}}}
696 \put(0,\cnt@voffset){\dashbox{10}(\cnt@paperwidth,0){\mbox{}}}
697 \put(\cnt@hoffset,0){\dashbox{10}(0,\cnt@paperheight){\mbox{}}}
703 \put(\ref@margin,\ref@head){%
704 \framebox(\cnt@textwidth,\cnt@headheight)%
705 {\footnotesize\Headertext}}
708 % the body of the text area,
711 \put(\ref@margin,\ref@body){%
712 \framebox(\cnt@textwidth,\cnt@textheight){\Bodytext}}
718 \put(\ref@margin,\ref@foot){%
719 \framebox(\cnt@textwidth,\fheight){\footnotesize\Footertext}}
722 % and the space for marginal notes.
725 \put(\ref@marginpar,\ref@body){%
726 \framebox(\cnt@marginparwidth,\cnt@textheight)%
727 {\footnotesize\shortstack{\MarginNotestext}}}
730 % Then we start putting in `arrows' to mark the various parameters.
731 % From here we use |\thinlines|.
736 % |\PositionX| and |\PositionY| will be the coordinates of the center of
737 % the arrow displaying |\textwidth|.
739 \SetToHalf\PositionX\cnt@textwidth
740 \advance\PositionX by \ref@margin
742 % The arrow should be a bit above the bottom of the `body box'.
744 \PositionY = \ref@body
745 \advance\PositionY by 50
747 % An identifying number is put here, in a circle.
751 % Then the arrow is drawn.
753 \InsideHArrow\cnt@textwidth
756 % Now the |\textheight|
758 \SetToHalf\PositionY\cnt@textheight
759 \advance\PositionY by \ref@body
762 % The x-position of the arrow is at $4/5$ of the width of the `body
765 \PositionX = \cnt@textwidth
766 \divide\PositionX by 5
767 \multiply \PositionX by 4
768 \advance\PositionX by \ref@margin
771 % An identifying number is put here, in a circle.
774 \InsideVArrow\cnt@textheight
779 % \changes{v1.2}{1998/04/13}{\cs{PositionY} for label 1 is
783 \SetToHalf\PositionX\cnt@hoffset
785 \InsideHArrow\cnt@hoffset
789 % The width of the margin.
790 % \changes{v1.2}{1998/04/13}{The direction of the arrows should be
791 % switched by the sign of \cs{oddsidemargin}}
793 \SetToQuart\PositionY\cnt@textheight
794 \advance\PositionY by \ref@body
795 \ifnum\ref@marginwidth > 0
796 \OutsideHArrow\ref@margin\ref@marginwidth{20}
797 \PositionX = \cnt@hoffset
799 \OutsideHArrow\cnt@hoffset{-\ref@marginwidth}{20}
800 \PositionX = \ref@margin
802 \advance\PositionX by -30
806 % the |\marginparwidth|,
808 \SetToQuart\PositionY\cnt@textheight
809 \advance\PositionY by \ref@body
811 % This arrow has to be bit below the one for the |\oddsidemargin|
812 % or\\ |\evensidemargin|.
814 \advance\PositionY by 30
815 \SetToHalf\PositionX\cnt@marginparwidth
816 \advance\PositionX by \ref@marginpar
818 \InsideHArrow\cnt@marginparwidth
822 % The |\marginparsep|, this depends on single or double sided
825 \advance\PositionY by 30
829 % Twosided mode, reversemargin;
830 % \changes{v1.1b}{1994/03/23}{\cs{OutSideHArrow} should be
831 % \cs{OutsideHArrow}}
832 % \changes{v1.2}{1998/04/13}{Added check for reversemargin}
836 \OutsideHArrow\ref@margin\cnt@marginparsep{20}
837 \PositionX = \ref@margin
839 \OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
840 \PositionX = \ref@marginpar
847 \OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
848 \PositionX = \ref@marginpar
850 \OutsideHArrow\ref@margin\cnt@marginparsep{20}
851 \PositionX = \ref@margin
858 % \changes{v1.2}{1998/04/13}{Added check for reversemargin}
861 \OutsideHArrow\ref@margin\cnt@marginparsep{20}
862 \PositionX = \ref@margin
864 \OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
865 \PositionX = \ref@marginpar
869 % \changes{v1.2}{1998/04/13}{The \cs{PositionX} of the label 9 is
870 % changed to the left side of the arrows}
872 \advance\PositionX by -\cnt@marginparsep
873 \advance\PositionX by -30
877 % Identify the |\footskip|. The arrow will be located on $1/8$th of
879 % \changes{v1.2}{1998/04/13}{The \cs{PositionY} of the label 11 is
880 % changed to the upper side of the arrows}
882 \PositionX = \cnt@textwidth
883 \divide\PositionX by 8
884 \advance\PositionX by \ref@margin
885 \OutsideVArrow\ref@foot\cnt@footskip{20}{20}
886 \PositionY = \ref@foot
887 \advance\PositionY by \cnt@footskip
888 \advance\PositionY by 30
892 % Identify the |\voffset|. The arrow will be located a bit to the
893 % left of the edge of the paper.
895 \PositionX = \cnt@paperwidth
896 \advance\PositionX by -50
897 \PositionY = \cnt@paperheight
898 \ExtraYPos = \PositionY
899 \advance\ExtraYPos by -\cnt@voffset
900 \advance\PositionY by \cnt@voffset
901 \divide\PositionY by \tw@
903 \InsideVArrow\ExtraYPos
906 % Identify |\topmargin|, |\headheight| and |\headsep|.
908 % The arrows will be located on $1/8$th of the |\textwidth|, with
909 % intervals of the same size, stored in |\Interval|.
911 \Interval = \cnt@textwidth
912 \divide\Interval by 8
913 \PositionX = \ref@margin
914 \advance\PositionX by \Interval
916 % First the |\topmargin|. If |\topmargin| has a positive value, the
917 % arrow is upward. Otherwise, it is downward. The number label is
918 % always placed at the base of the arrow.
919 % \changes{v1.2}{1998/04/13}{The direction of the arrows should be
920 % switched by the sign of \cs{topmargin}}
922 \ifnum\cnt@topmargin > \z@
923 \ExtraYPos = \ref@head
924 \advance\ExtraYPos\cnt@headheight
925 \OutsideVArrow\ExtraYPos\cnt@topmargin{20}{20}
926 \PositionY = \ExtraYPos
927 \advance\PositionY by \cnt@topmargin
929 \ExtraYPos = \cnt@voffset
930 \OutsideVArrow\ExtraYPos{-\cnt@topmargin}{20}{20}
931 \PositionY = \ExtraYPos
932 \advance\PositionY by -\cnt@topmargin
934 \advance\PositionY by 30
936 \advance\PositionX by \Interval
938 % Then the |\headheight|
939 % \changes{v1.2}{1998/04/13}{The \cs{PositionY} of the label 5 is
942 \OutsideVArrow\ref@head\cnt@headheight{20}{20}
943 \PositionY = \ref@head
944 \advance\PositionY by \cnt@headheight
945 \advance\PositionY by 30
947 \advance\PositionX by \Interval
949 % and finally the |\headsep|
950 % \changes{v1.2}{1998/04/13}{The \cs{PositionY} of the label 6 is
954 \advance\ExtraYPos\cnt@textheight
955 \OutsideVArrow\ExtraYPos\cnt@headsep{20}{20}
956 \PositionY = \ref@body
957 \advance\PositionY by \cnt@textheight
958 \advance\PositionY by -30
962 % Here we can end the picture environment and insert a little
970 % Below the picture we put a table to show the actual values of the
971 % parameters. Note that fractional points are truncated, i.e.,
972 % \texttt{72.27pt} is displayed as \texttt{72pt}
974 % The table is typeset inside a box with a depth of 0 to always
975 % keep it on the same page as the picture.
976 % \changes{v1.1b}{1994/03/23}{Showing oddside and evenside margins was
978 % \changes{v1.1c}{1994/07/14}{in compatibility mode \cs{footnotesize}
979 % calls \cs{normalfont}; therefore we need to switch to a tt font
981 % \changes{v1.1f}{1995/03/14}{introduced \cs{notshown}}
984 \@minipagerestore\footnotesize\ttfamily
985 \begin{tabular}{@{}rl@{\hspace{20pt}}rl}
986 1 & \oneinchtext\ + \LayOutbs\texttt{hoffset}
987 & 2 & \oneinchtext\ + \LayOutbs\texttt{voffset} \\
989 \ifodd\count\z@ \Show{cnt}{oddsidemargin}
990 \else \Show{cnt}{evensidemargin}
993 \Show{cnt}{oddsidemargin}
994 \fi & 4 & \Show{cnt}{topmargin} \\
995 5 & \Show{cnt}{headheight} & 6 & \Show{cnt}{headsep} \\
996 7 & \Show{cnt}{textheight} & 8 & \Show{cnt}{textwidth} \\
997 9 & \Show{cnt}{marginparsep}&10& \Show{cnt}{marginparwidth} \\
998 11& \Show{cnt}{footskip} & & \Show{cnt}{marginparpush}
1000 & \Show{ref}{hoffset} & & \Show{ref}{voffset} \\
1001 & \Show{cnt}{paperwidth} & & \Show{cnt}{paperheight} \\
1005 % When the option \Lopt{verbose} was used the following lines will
1006 % show dimensions on the terminal.
1010 \Type{cnt}{textheight}
1011 \Type{cnt}{textwidth}
1013 % Finally we start a new page.