%%
%% This is file `layouts.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% layouts.dtx  (with options: `lays')
%% 
%%  Copyright 1998, 1999 Peter R. Wilson
%% 
%%  This program is provided under the terms of the
%%  LaTeX Project Public License distributed from CTAN
%%  archives in directory macros/latex/base/lppl.txt.
%% 
%% Author: Peter Wilson (CUA and NIST)
%%         now at peter.r.wilson@boeing.com
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{layouts}[1999/03/06 v2.3b graphical depiction of document elements]
\@ifundefined{bs}{\newcommand{\bs}{\textbackslash}}%
  {\renewcommand{\bs}{\textbackslash}}
\newcommand{\oneinch}{72}
\newcommand{\eighthalfinch}{615}
\newcommand{\teninch}{723}
\newcommand{\eleveninch}{795}
\newcommand{\onepoint}{65536}
\newcommand{\l@youtscale}{0.5}
\newlength{\l@ylen}
\newsavebox{\layoutsbox}
\newlength{\l@youtunitlength}
\newlength{\l@youtlinethick}
\newlength{\l@youtlinethickii}
\newlength{\l@ysetupparskip}
\newlength{\l@ysetupbaselineskip}
\newlength{\l@yonem}
\newlength{\l@yonex}
\newlength{\l@ylmarg}
\newlength{\l@yrmarg}
\newlength{\l@yitmindent}
\newlength{\l@ylblwidth}
\newlength{\l@ylblsep}
\newlength{\l@ylparindent}
\newlength{\l@ytsep}
\newlength{\l@ypskip}
\newlength{\l@yptsep}
\newlength{\l@ypsep}
\newlength{\l@yitmsep}
\newtoks\l@ytok
\newcount\l@youtpw
\newcount\l@youtph
\newcount\l@youthpi
\newcount\l@youthpii
\newcount\l@youthpiii
\newcount\l@youthpiv
\newcount\l@youthpv
\newcount\l@youthpvi
\newcount\l@youthpvii
\newcount\l@youtparskip
\newcount\l@youtvpi
\newcount\l@youtvpii
\newcount\l@youtvpiii
\newcount\l@youtvpiv
\newcount\l@youtvpv
\newcount\l@youtvpvi
\newcount\l@youtvpvii
\newcount\l@youthdo
\newcount\l@youthdi
\newcount\l@youthdii
\newcount\l@youthdiii
\newcount\l@youthdiv
\newcount\l@youthdv
\newcount\l@youthdvi
\newcount\l@youthdvii
\newcount\l@youtvdo
\newcount\l@youtvdi
\newcount\l@youtvdii
\newcount\l@youtvdiii
\newcount\l@youtvdiv
\newcount\l@youtvdv
\newcount\l@youtvdvi
\newcount\l@youtvdvii
\newcount\l@youtxci
\newcount\l@youtxcii
\newcount\l@youtxciii
\newcount\l@youtxciv
\newcount\l@youtxcv
\newcount\l@youtyci
\newcount\l@youtycii
\newcount\l@youtyciii
\newcount\l@youtyciv
\newcount\l@youtycv
\newcount\l@youtycvi
\newif\ifoddpagelayout
\oddpagelayouttrue
\newif\iftwocolumnlayout
\twocolumnlayoutfalse
\newif\ifdrawparameters
\drawparameterstrue
\newif\iflistaspara
\listasparatrue
\newif\ifruninhead
\runinheadfalse
\newcommand{\setlayoutscale}[1]{\setlength{\l@youtunitlength}{1pt}
  \l@youtunitlength = #1\l@youtunitlength
  \renewcommand{\l@youtscale}{#1}}
\setlayoutscale{0.5}
\newcommand{\setuplayouts}{%
  \setlength{\l@ysetupparskip}{\parskip}
  \setlength{\l@ysetupbaselineskip}{\baselineskip}
  \setlength{\l@yonem}{1em}
  \setlength{\l@yonex}{1ex}
  \setlayoutscale{0.5}
  \PackageWarning{layouts}{Layout scale set to 0.5}
}
\AtBeginDocument{\setuplayouts}
\newcommand{\l@yltoc}[2]{\setlength{\l@ylen}{#1}
                         \ifdim\l@ylen > \z@ \advance\l@ylen by 0.5\p@ \else
                           \ifdim\l@ylen < \z@ \advance\l@ylen by -0.5\p@
                           \fi
                         \fi
                         #2=\l@ylen
                         \divide #2 by \onepoint\relax}
\newcommand{\l@yvuda}[3]{\put(#1,#2){\vector(0,1){#3}}
                         \put(#1,#2){\vector(0,-1){0}}}
\newcommand{\l@yhrda}[3]{\put(#1,#2){\vector(1,0){#3}}
                         \put(#1,#2){\vector(-1,0){0}}}
\newcommand{\l@yvudia}[3]{\begingroup
                          \l@youthpvii=#1\relax
                          \l@youtvpvii=#2\relax
                          \l@youthdvii=#3\relax
                          \put(\l@youthpvii,\l@youtvpvii){\vector(0,1){0}}
                          \advance\l@youtvpvii by \l@youthdvii
                          \put(\l@youthpvii,\l@youtvpvii){\vector(0,-1){0}}
                          \endgroup}
\newcommand{\l@yhrdia}[3]{\begingroup
                          \l@youthpvii=#1\relax
                          \l@youtvpvii=#2\relax
                          \l@youthdvii=#3\relax
                          \put(\l@youthpvii,\l@youtvpvii){\vector(1,0){0}}
                          \advance\l@youthpvii by \l@youthdvii
                          \put(\l@youthpvii,\l@youtvpvii){\vector(-1,0){0}}
                          \endgroup}
\newcommand{\l@ypcmd}[1]{{\footnotesize\texttt{\bs #1}}}
\newcommand{\l@yval}[1]{\the#1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    PAGE LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\trypaperwidth}[1]{\l@yltoc{#1}{\l@youtpw}}
\newcommand{\trypaperheight}[1]{\l@yltoc{#1}{\l@youtph}}
\newcommand{\tryhoffset}[1]{\l@yltoc{#1}{\l@youthpi}}
\newcommand{\tryvoffset}[1]{\l@yltoc{#1}{\l@youtvpi}}
\newcommand{\trytopmargin}[1]{\l@yltoc{#1}{\l@youtvpii}}
\newcommand{\tryheadheight}[1]{\l@yltoc{#1}{\l@youtvpiii}}
\newcommand{\tryheadsep}[1]{\l@yltoc{#1}{\l@youtvpiv}}
\newcommand{\trytextheight}[1]{\l@yltoc{#1}{\l@youtvpv}}
\newcommand{\tryfootskip}[1]{\l@yltoc{#1}{\l@youtvpvi}}
\newcommand{\tryoddsidemargin}[1]{\l@yltoc{#1}{\l@youthpv}}
\newcommand{\tryevensidemargin}[1]{\l@yltoc{#1}{\l@youthpiv}}
\newcommand{\trytextwidth}[1]{\l@yltoc{#1}{\l@youthpii}}
\newcommand{\trymarginparsep}[1]{\l@yltoc{#1}{\l@youthpvi}}
\newcommand{\trymarginparwidth}[1]{\l@yltoc{#1}{\l@youthpvii}}
\newcommand{\trymarginparpush}[1]{\l@yltoc{#1}{\l@youtvpvii}}
\newcommand{\trycolumnsep}[1]{\l@yltoc{#1}{\l@youthpiii}}
\newcommand{\trycolumnseprule}[1]{\setlength{\l@youtlinethick}{#1}}
\newcommand{\currentpage}{%
  \@ifundefined{paperwidth}{\trypaperwidth{8.5in}}%
    {\trypaperwidth{\paperwidth}}
  \@ifundefined{paperheight}{\trypaperheight{11in}}%
    {\trypaperheight{\paperheight}}
  \tryhoffset{\hoffset}               % typically 0pt
  \tryvoffset{\voffset}               % typically 0pt
  \tryoddsidemargin{\oddsidemargin}   % typically 21-63pt
  \tryevensidemargin{\evensidemargin} % typically 39-82pt
  \trymarginparwidth{\marginparwidth} % typically 68-107pt
  \trymarginparsep{\marginparsep}     % typically 10-11pt
  \trymarginparpush{\marginparpush}   % typically 5-7pt
  \trytopmargin{\topmargin}           % typically 27pt
  \tryheadheight{\headheight}         % typically 12pt
  \tryheadsep{\headsep}               % typically 25pt
  \tryfootskip{\footskip}             % typically 30pt
  \trytextheight{\textheight}         % typically 36-43 times baselineskip
  \trytextwidth{\textwidth}           % typically 345-390pt
  \trycolumnsep{\columnsep}           % typically 10pt
  \trycolumnseprule{\columnseprule}   % typically 0pt
}
\newcommand{\drawpage}{%
  \l@youtvdiii=\teninch\relax
    \divide\l@youtvdiii by 24\relax
  \l@youthdii=\l@youtvdiii
  \ifdrawparameters
    \l@youtph=\eleveninch\relax     % page height
    \l@youtpw=\eighthalfinch\relax  % page width
    \l@youtvpi=\z@                  % voffset
    \l@youtvpii=\l@youtvdiii        % topmargin
    \l@youtvpiii=\l@youtvdiii       % headheight
    \l@youtvpiv=\l@youtvdiii        % headsep
    \l@youtvpv=\oneinch\relax       % textheight
      \multiply\l@youtvpv by 6\relax
    \l@youtvpvi=\l@youtvdiii        % footskip
      \multiply\l@youtvpvi by \tw@
    \l@youtvpvii=\l@youtvdiii       % marginparpush
    \l@youthpi=\z@            % hoffset
    \l@youthpii=\l@youthdii   % textwidth
      \multiply\l@youthpii by 13\relax
    \l@youthpiii=\l@youthdii  % columnsep
    \l@youthpiv=\l@youthdii   % evensidemargin
    \l@youthpv=\l@youthdii    % oddsidemargin
    \l@youthpvi=\l@youthdii   % marginparsep
    \l@youthpvii=\l@youthdii  % marginparwidth
      \multiply\l@youthpvii by \tw@
  \fi
  \l@youtycvi=\l@youtph                  % one inch below top of page
    \advance\l@youtycvi by -\oneinch\relax
  \l@youtxci=\l@youthpi                  % hofref
    \advance\l@youtxci by \oneinch\relax
  \l@youtycv=\l@youtycvi                 % vofref
    \advance\l@youtycv by -\l@youtvpi
  \l@youtyciv=\l@youtycv                 % headref
    \advance\l@youtyciv by -\l@youtvpii
    \advance\l@youtyciv by -\l@youtvpiii
  \l@youtycii=\l@youtyciv                % bodyref
    \advance\l@youtycii by -\l@youtvpiv
    \advance\l@youtycii by -\l@youtvpv
  \l@youtvdi=\l@youtvpvi                 % footheight
    \divide\l@youtvdi by \tw@
  \l@youtyci=\l@youtycii                 % footref
    \advance\l@youtyci by -\l@youtvpvi
  \l@youtvdii=\l@youtvpv                 % noteheight
    \divide\l@youtvdii by 4\relax
  \l@youtyciii=\l@youtycii               % noteref
    \advance\l@youtyciii by \l@youtvdii
    \advance\l@youtyciii by \l@youtvpvii
  \ifoddpagelayout
    \l@youtxcii=\l@youtxci               % marginref
      \advance\l@youtxcii by \l@youthpv
    \l@youtxciv=\l@youtxcii              % margnoteref
      \advance\l@youtxciv by \l@youthpii
      \advance\l@youtxciv by \l@youthpvi
  \else
    \l@youtxcii=\l@youtxci               % marginref
      \advance\l@youtxcii by \l@youthpiv
    \l@youtxciv=\l@youtxcii              % margnoteref
      \advance\l@youtxciv by -\l@youthpvi
      \advance\l@youtxciv by -\l@youthpvii
  \fi
  \l@youthdi=\l@youthpii                 % columnwidth
  \l@youtxciii=\l@youtxcii               % colref
  \iftwocolumnlayout
    \advance\l@youthdi by -\l@youthpiii
    \divide\l@youthdi by \tw@
    \advance\l@youtxciii by \l@youthdi
    \advance\l@youtxciii by \l@youthpiii
    \l@youtxcv=\l@youthpiii              % centre of gutter
      \divide\l@youtxcv by \tw@
      \advance\l@youtxcv by \l@youtxcii
      \advance\l@youtxcv by \l@youthdi
  \fi
  \begin{center}
  \begin{small} Dashed lines represent (\texttt{\bs hoffset + 1 inch}) and
    (\texttt{\bs voffset + 1 inch}) from the top left hand corner of the
    page. \end{small} \\
  \medskip
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\l@youtpw,\l@youtph)
    \thicklines
    \ifdrawparameters
      \put(0,0){\line(0,1){\l@youtph}}
      \put(0,\l@youtph){\line(1,0){\l@youtpw}}
    \else
      \put(0,0){\framebox(\l@youtpw,\l@youtph){}}
    \fi
    \put(\oneinch,\l@youtycvi){\circle{12}}
    \put(0,\l@youtycv){\dashbox{10}(\l@youtpw,0){}}
    \put(\l@youtxci,0){\dashbox{10}(0,\l@youtph){}}
    \put(\l@youtxcii,\l@youtyciv){\framebox(\l@youthpii,\l@youtvpiii)%
      {\footnotesize Header}}
    \iftwocolumnlayout
      \put(\l@youtxcii,\l@youtycii){\framebox(\l@youthdi,\l@youtvpv)%
        {Col. 1}}
      \put(\l@youtxciii,\l@youtycii){\framebox(\l@youthdi,\l@youtvpv)%
        {Col. 2}}
      \linethickness{\l@youtlinethick}
      \put(\l@youtxcv,\l@youtycii){\line(0,1){\l@youtvpv}}
      \thicklines
    \else
      \put(\l@youtxcii,\l@youtycii){\framebox(\l@youthpii,\l@youtvpv)%
        {Body}}
    \fi
    \put(\l@youtxcii,\l@youtyci){\framebox(\l@youthpii,\l@youtvdi)%
        {\footnotesize Footer}}
    \ifdrawparameters
      \put(\l@youtxciv,\l@youtycii){\framebox(\l@youthpvii,\l@youtvdii){}}
      \put(\l@youtxciv,\l@youtyciii){\framebox(\l@youthpvii,\l@youtvdii)%
        {\footnotesize\shortstack{Margin\\Note}}}
    \else
      \put(\l@youtxciv,\l@youtycii){\framebox(\l@youthpvii,\l@youtvdii)%
        {\footnotesize Note}}
      \put(\l@youtxciv,\l@youtyciii){\framebox(\l@youthpvii,\l@youtvdii)%
        {\footnotesize Margin}}
    \fi
    \ifdrawparameters
      \l@youtxcv=\l@youtxcii                % X coord for vertical dimensions
        \advance\l@youtxcv by \l@youthdii
      \l@youtvpii=\l@youthpvii              % X coord for marginparpush
        \divide\l@youtvpii by \tw@
        \advance\l@youtvpii by \l@youtxciv
      \l@youtvpvii=\l@youtvdiii             % half l@youtvdiii
        \divide\l@youtvpvii by \tw@
      \l@youtvpiii=\l@youtycii              % Y coord for low dimensions
        \advance\l@youtvpiii by \l@youtvdiii
      \l@youtvpiv=\l@youtvpiii              % Y coord for mid dimensions
        \advance\l@youtvpiv by \l@youtvdiii
      \l@youtvdi=\l@youtyciii               % Y coord for top dimensions
        \advance\l@youtvdi by \l@youtvdii
        \advance\l@youtvdi by -\l@youtvdiii
      \put(\l@youtxcv,\l@youtycv){\vector(0,-1){\l@youtvdiii}}
      \put(\l@youtxcv,\l@youtycv){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,-\l@youtvpvii){\l@ypcmd{topmargin}}
        \end{picture}}
      \put(\l@youtxcv,\l@youtyciv){\line(0,1){\l@youtvdiii}}
      \put(\l@youtxcv,\l@youtyciv){\vector(0,-1){0}}
      \put(\l@youtxcv,\l@youtyciv){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,\l@youtvpvii){\l@ypcmd{headheight}}
        \end{picture}}
      \put(\l@youtxcv,\l@youtyciv){\vector(0,-1){\l@youtvdiii}}
      \put(\l@youtxcv,\l@youtyciv){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,-\l@youtvpvii){\l@ypcmd{headsep}}
        \end{picture}}
      \put(\l@youtxcv,\l@youtycii){\line(0,1){\l@youtvpv}}
      \put(\l@youtxcv,\l@youtycii){\vector(0,-1){0}}
      \put(\l@youtxcv,\l@youtycii){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,\l@youtvpvii){\l@ypcmd{textheight}}
        \end{picture}}
      \put(\l@youtxcv,\l@youtycii){\vector(0,-1){\l@youtvpvi}}
      \put(\l@youtxcv,\l@youtycii){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,-\l@youtvpvii){\l@ypcmd{footskip}}
        \end{picture}}
      \put(\l@youtvpii,\l@youtyciii){\vector(0,-1){\l@youtvdiii}}
      \put(\l@youtvpii,\l@youtyciii){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,-\l@youtvpvii){\l@ypcmd{marginparpush}}
        \end{picture}}
      \put(\l@youtxciv,\l@youtvpiii){\vector(1,0){\l@youthpvii}}
      \put(\l@youtxciv,\l@youtvpiii){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,\l@youtvpvii){\l@ypcmd{marginparwidth}}
        \end{picture}}
      \ifoddpagelayout
        \put(\l@youtxci,\l@youtvpiv){\vector(1,0){\l@youthdii}}
        \put(\l@youtxci,\l@youtvpiv){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
          \put(\l@youtvpvii,\l@youtvpvii){\l@ypcmd{oddsidemargin}}
          \end{picture}}
        \put(\l@youtxciv,\l@youtvpiv){\line(-1,0){\l@youthdii}}
        \put(\l@youtxciv,\l@youtvpiv){\vector(1,0){0}}
        \put(\l@youtxciv,\l@youtvpiv){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
          \put(-\l@youtvpvii,\l@youtvpvii){\l@ypcmd{marginparsep}}
          \end{picture}}
      \else
        \put(\l@youtxci,\l@youtvpiv){\vector(1,0){\l@youthdii}}
        \put(\l@youtxci,\l@youtvpiv){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
          \put(\l@youtvpvii,\l@youtvpvii){\l@ypcmd{evensidemargin}}
          \end{picture}}
        \put(\l@youtxcii,\l@youtvdi){\vector(-1,0){\l@youthdii}}
        \put(\l@youtxcii,\l@youtvdi){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
          \put(-\l@youtvpvii,\l@youtvpvii){\l@ypcmd{marginparsep}}
          \end{picture}}
      \fi
      \put(\l@youtxcii,\l@youtyciii){\vector(1,0){\l@youthpii}}
      \put(\l@youtxcv,\l@youtyciii){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
        \put(\l@youtvpvii,\l@youtvpvii){\l@ypcmd{textwidth}}
        \end{picture}}
      \iftwocolumnlayout
        \put(\l@youtxciii,\l@youtvpiv){\line(-1,0){\l@youthpiii}}
        \put(\l@youtxciii,\l@youtvpiv){\vector(1,0){0}}
        \put(\l@youtxciii,\l@youtvpiv){\begin{picture}(\l@youtvpvii,\l@youtvpvii)
          \put(-\l@youtvpvii,\l@youtvpvii){\l@ypcmd{columnsep}}
          \end{picture}}
      \fi
    \fi
    \end{picture}
    \end{center}
    \setlength{\unitlength}{1pt}
    \ifdrawparameters\else
      \begin{center}
      \begin{footnotesize}
         Lengths are to the nearest pt. \\
      \begin{tt}
      \begin{tabular}{l@{\hspace{20pt}}l}
      \textrm{page height} = \number\l@youtph pt &
      \textrm{page width} = \number\l@youtpw pt  \\
      \bs hoffset = \number\l@youthpi pt         &
      \bs voffset = \number\l@youtvpi pt         \\
      \ifoddpagelayout
        \bs oddsidemargin = \number\l@youthpv pt
      \else
        \bs evensidemargin = \number\l@youthpiv pt
      \fi
      & \bs topmargin = \number\l@youtvpii pt    \\
      \bs headheight = \number\l@youtvpiii pt    &
      \bs headsep = \number\l@youtvpiv pt        \\
      \bs textheight = \number\l@youtvpv pt      &
      \bs textwidth = \number\l@youthpii pt      \\
      \bs footskip = \number\l@youtvpvi pt       &
      \bs marginparsep = \number\l@youthpvi pt   \\
      \bs marginparpush = \number\l@youtvpvii pt &
      \bs columnsep = \number\l@youthpiii pt     \\
      \bs columnseprule = \the\l@youtlinethick & \\
      \end{tabular}
      \end{tt}\end{footnotesize}
      \end{center}
    \fi
}
\newcommand{\pagevalues}{%
  \begin{center}
  Actual page layout values.\\[\baselineskip]
  \begin{footnotesize}
  \begin{tabular}{l@{\hspace{20pt}}l}
  \l@ypcmd{paperheight} = \@ifundefined{paperheight}{11in ??}{\the\paperheight}  &
  \l@ypcmd{paperwidth}  = \@ifundefined{paperwidth}{8.5in ??}{\the\paperwidth}   \\
  \l@ypcmd{hoffset}        = \l@yval{\hoffset}        &
  \l@ypcmd{voffset}        = \l@yval{\voffset}        \\
  \l@ypcmd{evensidemargin} = \l@yval{\evensidemargin} &
  \l@ypcmd{oddsidemargin}  = \l@yval{\oddsidemargin}  \\
  \l@ypcmd{topmargin}      = \l@yval{\topmargin}      &
  \l@ypcmd{headheight}     = \l@yval{\headheight}     \\
  \l@ypcmd{headsep}        = \l@yval{\headsep}        &
  \l@ypcmd{textheight}     = \l@yval{\textheight}     \\
  \l@ypcmd{textwidth}      = \l@yval{\textwidth}      &
  \l@ypcmd{footskip}       = \l@yval{\footskip}       \\
  \l@ypcmd{marginparsep}   = \l@yval{\marginparsep}   &
  \l@ypcmd{marginparpush}  = \l@yval{\marginparpush}  \\
  \l@ypcmd{columnsep}      = \l@yval{\columnsep}      &
  \l@ypcmd{columnseprule}  = \l@yval{\columnseprule}  \\
  1em = \l@yval{\l@yonem}  & 1ex = \l@yval{\l@yonex} \\
  \end{tabular}
  \end{footnotesize}
  \end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    LIST LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\tryitemindent}[1]{\l@yltoc{#1}{\l@youthpi}}
\newcommand{\trylabelwidth}[1]{\l@yltoc{#1}{\l@youthpii}}
\newcommand{\trylabelsep}[1]{\l@yltoc{#1}{\l@youthpiii}}
\newcommand{\tryleftmargin}[1]{\l@yltoc{#1}{\l@youthpiv}
                     \ifnum\l@youthpiv < \z@
                       \l@youthpiv = \z@
                     \fi}
\newcommand{\tryrightmargin}[1]{\l@yltoc{#1}{\l@youthpv}}
\newcommand{\trylistparindent}[1]{\l@yltoc{#1}{\l@youthpvi}}
\newcommand{\trytopsep}[1]{\l@yltoc{#1}{\l@youtvpi}}
\newcommand{\tryparskip}[1]{\l@yltoc{#1}{\l@youtparskip}}
\newcommand{\trypartopsep}[1]{\l@yltoc{#1}{\l@youtvpiii}}
\newcommand{\tryparsep}[1]{\l@yltoc{#1}{\l@youtvpiv}}
\newcommand{\tryitemsep}[1]{\l@yltoc{#1}{\l@youtvpv}}
\newcommand{\currentlist}{%
  \tryitemindent{\itemindent}       % typically 0pt
  \trylabelwidth{\labelwidth}       % typically  pt
  \trylabelsep{\labelsep}           % typically 0.5em
  \tryleftmargin{\leftmargin}       % typically  pt
  \tryrightmargin{\rightmargin}     % typically  pt
  \trylistparindent{\listparindent} % typically 0pt
  \trytopsep{\topsep}               % typically  pt
  \tryparskip{\l@ysetupparskip}     % typically  pt
  \trypartopsep{\partopsep}         % typically  pt
  \tryparsep{\parsep}               % typically  pt
  \tryitemsep{\itemsep}             % typically  pt
}
\newcommand{\drawlist}{%
  \l@youthdo=\oneinch\relax
  \l@youtvdo=\oneinch\relax
    \multiply\l@youtvdo by 12\relax
    \divide\l@youtvdo by 10\relax
  \l@youthdi=\eighthalfinch\relax  % major textwidth
  \ifdrawparameters
    \l@youthpi=60\relax                      % itemindent
    \l@youthpii=80\relax                     % labelwidth
    \l@youthpiii=\l@youthpi                  % labelsep
      \divide\l@youthpiii by \tw@
    \l@youthpiv=\l@youthpi                   % leftmargin
      \advance\l@youthpiv by \l@youthpii
      \advance\l@youthpiv by \l@youthpiii
    \l@youthpv=\l@youthpiv                   % rightmargin
      \multiply\l@youthpv by \tw@
      \divide\l@youthpv by \thr@@
    \l@youthpvi=\l@youthpi                   % listparindent
      \multiply\l@youthpvi by 4\relax
      \divide\l@youthpvi by \thr@@
    \l@youtvpi=40\relax                      % topsep
    \l@youtparskip=\l@youtvpi                % parskip
    \l@youtvpiii=\l@youtvpi                  % partopsep
    \l@youtvpiv=\l@youtvpi                   % parsep
    \l@youtvpv=\l@youtvpi                    % itemsep
  \fi
  \l@youtvdvii=\l@youtvpi                  % topsep + parskip (+ partopsep)
    \advance\l@youtvdvii by \l@youtparskip
    \iflistaspara
      \advance\l@youtvdvii by \l@youtvpiii
    \fi
  \l@youtvdvi=\l@youtvpv                   % itemsep + parsep
    \advance\l@youtvdvi by \l@youtvpiv
  \l@youtyci=\oneinch\relax                % Y coord of base of item 2
    \advance\l@youtyci by \l@youtvdvii
  \l@youtxci=\z@                           % X coord of LH list text
    \advance\l@youtxci by \l@youthpiv
  \l@youthdii=\l@youthdi                   % major width of item text
    \advance\l@youthdii by -\l@youthpiv
    \advance\l@youthdii by -\l@youthpv
  \l@youthdiii=\l@youthpi                  % inset of labelled list line
  \l@youtvdii=\l@youtvdo                   % vertical dim of short inset line
    \divide\l@youtvdii by 4\relax
  \l@youthdiv=\l@youthdii                  % X dim of item 2 box top
    \advance\l@youthdiv by -\l@youthdiii
  \l@youtvdi=\l@youtvdo                    % Y dim of RH item box
    \advance\l@youtvdi by \l@youtvdii
  \l@youtvdiii=\l@youtvdii                 % height of label box
    \multiply\l@youtvdiii by \thr@@
    \divide\l@youtvdiii by 4\relax
  \l@youtxcii=\l@youthdiii                 % X coord of BL of label box
    \advance\l@youtxcii by -\l@youthpiii
    \advance\l@youtxcii by -\l@youthpii
  \l@youtycii=\l@youtvdi                   % Y coord of BL of label box
    \advance\l@youtycii by -\l@youtvdiii
  \l@youtyciii=\l@youtyci                  % Y coord of base of para
    \advance\l@youtyciii by \l@youtvdi
    \advance\l@youtyciii by \l@youtvdvi
  \l@youthdv=\l@youthdii                   % Hor. dim of top of para box
    \advance\l@youthdv by -\l@youthpvi
  \l@youtyciv=\l@youtyciii                 % Y coord of base of item 1
    \advance\l@youtyciv by \l@youtvdi
    \advance\l@youtyciv by \l@youtvpiv
  \l@youtycv=\l@youtyciv                   % Y coord of base of preceeding text
    \advance\l@youtycv by \l@youtvdi
    \advance\l@youtycv by \l@youtvdvii
  \l@youtvdiv=\l@youtycv                   % Height of picture
    \advance\l@youtvdiv by \oneinch\relax
  \l@youtxciii=\l@youtxci                  % X coord of vertical lines
    \advance\l@youtxciii by \l@youtxci
    \advance\l@youtxciii by \l@youthdii
    \divide\l@youtxciii by \tw@
  \l@youtycvi=\l@youtvdi                   % Y coord for margin lines
    \divide\l@youtycvi by \tw@
  \l@youtvdv=\l@youtvpiv                   % small dimension (1/2 parsep)
    \divide\l@youtvdv by \tw@
  \l@youtxciv=\l@youtycii                 % Y coord for labelwidth (note XCIV)
    \advance\l@youtxciv by \l@youtvdiii
    \advance\l@youtxciv by \l@youtvdv
  \begin{center}
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\eighthalfinch,\l@youtvdiv)
    \thinlines
    \put(0,0){\dashbox{10}(\l@youthdi,\l@youtvdiv){}}
    \thicklines
    \put(0,0){\framebox(\l@youthdi,\oneinch){Following Text}}
    \put(\l@youtxci,\l@youtyci){\begin{picture}(\l@youthdii,\l@youtvdi)
      \put(0,0){\line(1,0){\l@youthdii}}
      \put(0,0){\line(0,1){\l@youtvdo}}
      \ifnum\l@youthdiii > \z@
        \put(\l@youthdiii,\l@youtvdo){\line(-1,0){\l@youthdiii}}
      \else
        \put(\l@youthdiii,\l@youtvdo){\line(1,0){-\l@youthdiii}}
      \fi
      \put(\l@youthdiii,\l@youtvdo){\line(0,1){\l@youtvdii}}
      \put(\l@youthdii,\l@youtvdi){\line(0,-1){\l@youtvdi}}
      \put(\l@youthdii,\l@youtvdi){\line(-1,0){\l@youthdiv}}
      \put(0,0){\makebox(\l@youthdii,\l@youtvdi){Item 2}}
      \put(\l@youtxcii,\l@youtycii){\framebox(\l@youthpii,\l@youtvdiii){}}
      \put(\l@youtxcii,\l@youtycii){\makebox(\l@youthpii,\l@youtvdiii)[r]%
          {\footnotesize Label}}
      \end{picture}}
    \put(\l@youtxci,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youtvdi)
      \put(0,0){\line(1,0){\l@youthdii}}
      \put(0,0){\line(0,1){\l@youtvdo}}
      \put(\l@youthpvi,\l@youtvdo){\line(-1,0){\l@youthpvi}}
      \put(\l@youthpvi,\l@youtvdo){\line(0,1){\l@youtvdii}}
      \put(\l@youthdii,\l@youtvdi){\line(0,-1){\l@youtvdi}}
      \put(\l@youthdii,\l@youtvdi){\line(-1,0){\l@youthdv}}
      \put(0,0){\makebox(\l@youthdii,\l@youtvdi){Item 1, Paragraph 2}}
      \ifdrawparameters
        \put(0,\l@youtvdi){\vector(1,0){\l@youthpvi}}
        \put(0,\l@youtvdi){\begin{picture}(\l@youtvdv,\l@youtvdv)
          \put(0,\l@youtvdv){\l@ypcmd{listparindent}}
          \end{picture}}
        \put(-\l@youthpiv,\l@youtycvi){\vector(1,0){\l@youthpiv}}
        \put(-\l@youthpiv,\l@youtycvi){\begin{picture}(\l@youtvdv,\l@youtvdv)
          \put(\l@youtvdv,\l@youtvdv){\l@ypcmd{leftmargin}}
          \end{picture}}
        \put(\l@youthdii,\l@youtycvi){\line(1,0){\l@youthpv}}
        \put(\l@youthdii,\l@youtycvi){\vector(-1,0){0}}
        \put(\l@youthdii,\l@youtycvi){\begin{picture}(\l@youtvdv,\l@youtvdv)
          \put(\l@youtvdv,\l@youtvdv){\l@ypcmd{rightmargin}}
          \end{picture}}
      \fi
      \end{picture}}
    \put(\l@youtxci,\l@youtyciv){\begin{picture}(\l@youthdii,\l@youtvdi)
      \put(0,0){\line(1,0){\l@youthdii}}
      \put(0,0){\line(0,1){\l@youtvdo}}
      \ifnum\l@youthdiii > \z@
        \put(\l@youthdiii,\l@youtvdo){\line(-1,0){\l@youthdiii}}
      \else
        \put(\l@youthdiii,\l@youtvdo){\line(1,0){-\l@youthdiii}}
      \fi
      \put(\l@youthdiii,\l@youtvdo){\line(0,1){\l@youtvdii}}
      \put(\l@youthdii,\l@youtvdi){\line(0,-1){\l@youtvdi}}
      \put(\l@youthdii,\l@youtvdi){\line(-1,0){\l@youthdiv}}
      \put(0,0){\makebox(\l@youthdii,\l@youtvdi){Item 1}}
      \put(\l@youtxcii,\l@youtycii){\framebox(\l@youthpii,\l@youtvdiii){}}
      \put(\l@youtxcii,\l@youtycii){\makebox(\l@youthpii,\l@youtvdiii)[r]%
          {\footnotesize Label}}
      \ifdrawparameters
        \put(0,\l@youtycvi){\vector(1,0){\l@youthpi}}
        \put(0,\l@youtycvi){\begin{picture}(\l@youtvdv,\l@youtvdv)
          \put(0,-\l@youtvdv){\l@ypcmd{itemindent}}
          \end{picture}}
        \put(\l@youthdiii,\l@youtvdi){\vector(-1,0){\l@youthpiii}}
        \put(\l@youthdiii,\l@youtvdi){\begin{picture}(\l@youtvdv,\l@youtvdv)
          \put(0,\l@youtvdv){\l@ypcmd{labelsep}}
          \end{picture}}
        \put(\l@youtxcii,\l@youtxciv){\line(1,0){\l@youthpii}}
        \put(\l@youtxcii,\l@youtxciv){\vector(-1,0){0}}
        \put(\l@youtxcii,\l@youtxciv){\begin{picture}(\l@youtvdv,\l@youtvdv)
          \put(0,\l@youtvdv){\l@ypcmd{labelwidth}}
          \end{picture}}
      \fi
      \end{picture}}
    \put(0,\l@youtycv){\framebox(\l@youthdi,\oneinch){Preceeding Text}}
    \ifdrawparameters
      \put(\l@youtxciii,\l@youtyci){\vector(0,-1){\l@youtvdvii}}
      \put(\l@youtxciii,\l@youtyci){\begin{picture}(\l@youtvdv,\l@youtvdv)
        \put(\l@youtvdv,-\l@youtvdv){%
          \footnotesize\texttt{\bs topsep + \bs parskip [+ \bs partopsep]}}
        \end{picture}}
      \put(\l@youtxciii,\l@youtyciii){\vector(0,-1){\l@youtvdvi}}
      \put(\l@youtxciii,\l@youtyciii){\begin{picture}(\l@youtvdv,\l@youtvdv)
        \put(\l@youtvdv,-\l@youtvdv){%
          \footnotesize\texttt{\bs itemsep + \bs parsep}}
        \end{picture}}
      \put(\l@youtxciii,\l@youtyciv){\vector(0,-1){\l@youtvpiv}}
      \put(\l@youtxciii,\l@youtyciv){\begin{picture}(\l@youtvdv,\l@youtvdv)
        \put(\l@youtvdv,-\l@youtvdv){\l@ypcmd{parsep}}
        \end{picture}}
      \put(\l@youtxciii,\l@youtycv){\vector(0,-1){\l@youtvdvii}}
      \put(\l@youtxciii,\l@youtycv){\begin{picture}(\l@youtvdv,\l@youtvdv)
        \put(\l@youtvdv,-\l@youtvdv){%
          \footnotesize\texttt{\bs topsep + \bs parskip [+ \bs partopsep]}}
        \end{picture}}
    \fi
    \end{picture}
    \end{center}
    \setlength{\unitlength}{1pt}
  \ifdrawparameters\else
    \begin{center}
    \begin{footnotesize}
      Lengths are to the nearest pt. \\
    \begin{tt}
    \begin{tabular}{l@{\hspace{20pt}}l}
    \bs leftmargin = \number\l@youthpiv pt    &
    \bs rightmargin = \number\l@youthpv pt    \\
    \bs itemindent = \number\l@youthpi pt     &
    \bs labelwidth = \number\l@youthpii pt    \\
    \bs labelsep = \number\l@youthpiii pt     &
    \bs listparindent = \number\l@youthpvi pt \\
    \bs topsep = \number\l@youtvpi pt         &
    \bs parskip = \number\l@youtparskip pt    \\
    \bs partopsep = \number\l@youtvpiii pt    &
    \bs parsep = \number\l@youtvpiv pt        \\
    \bs itemsep = \number\l@youtvpv pt  &     \\
    \end{tabular}
    \end{tt}\end{footnotesize}
    \end{center}
  \fi
}
\newcommand{\listvalues}{%
  \setlength{\l@ylmarg}{\leftmargin}
  \setlength{\l@yrmarg}{\rightmargin}
  \setlength{\l@yitmindent}{\itemindent}
  \setlength{\l@ylblwidth}{\labelwidth}
  \setlength{\l@ylblsep}{\labelsep}
  \setlength{\l@ylparindent}{\listparindent}
  \setlength{\l@ytsep}{\topsep}
  \setlength{\l@ypskip}{\parskip}
  \setlength{\l@yptsep}{\partopsep}
  \setlength{\l@ypsep}{\parsep}
  \setlength{\l@yitmsep}{\itemsep}
  \begin{center}
  Actual list layout values.\\[\baselineskip]
  \begin{footnotesize}
  \begin{tabular}{l@{\hspace{20pt}}l}
  \l@ypcmd{leftmargin}    = \l@yval{\l@ylmarg}      &
  \l@ypcmd{rightmargin}   = \l@yval{\l@yrmarg}      \\
  \l@ypcmd{itemindent}    = \l@yval{\l@yitmindent}  &
  \l@ypcmd{labelwidth}    = \l@yval{\l@ylblwidth}   \\
  \l@ypcmd{labelsep}      = \l@yval{\l@ylblsep}     &
  \l@ypcmd{listparindent} = \l@yval{\l@ylparindent} \\
  \l@ypcmd{topsep}        = \l@yval{\l@ytsep}       &
  \l@ypcmd{parskip}       = \l@yval{\l@ypskip}      \\
  \l@ypcmd{partopsep}     = \l@yval{\l@yptsep}      &
  \l@ypcmd{parsep}        = \l@yval{\l@ypsep}       \\
  \l@ypcmd{itemsep}       = \l@yval{\l@yitmsep}     &  \\
  1em = \l@yval{\l@yonem}  & 1ex = \l@yval{\l@yonex} \\
  \end{tabular}
  \end{footnotesize}
  \end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    FOOTNOTE LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\tryfootins}[1]{\l@yltoc{#1}{\l@youtvpi}}
\newcommand{\tryfootnotesep}[1]{\l@yltoc{#1}{\l@youtvpii}}
\newcommand{\tryfootnotebaseline}[1]{\l@yltoc{#1}{\l@youtvpiii}}
\newcommand{\tryfootruleheight}[1]{\setlength{\l@youtlinethick}{#1}}
\newcommand{\tryfootrulefrac}[1]{\setlength{\l@ylen}{8.5in}
            \l@ytok={#1}
            \l@ylen = #1\l@ylen
            \l@youthdvii=\l@ylen
     \divide\l@youthdvii by \onepoint}
\newcommand{\currentfootnote}{%
  \tryfootins{\skip\footins}
  \tryfootnotesep{\footnotesep}
  \tryfootnotebaseline{10pt}
  \tryfootruleheight{0.4pt}
  \tryfootrulefrac{0.25}
}
\newcommand{\drawfootnote}{%
  \l@youtvdo=4\relax                % vertical scale factor
  \l@youthdi=\eighthalfinch\relax   % textwidth
  \l@youtvdi=\oneinch\relax         % small height of note box
  \ifdrawparameters
    \l@youtvpi=20\relax                     %  \skip\footins
    \l@youtvpii=30\relax                    %  footenotesep
    \l@youtvpiii=10\relax                   %  footnote baseline
    \setlength{\l@youtlinethick}{0.4pt}     % rule thickness
    \l@youthdvii=\eighthalfinch\relax       % rule length
      \multiply\l@youthdvii by 4\relax
      \divide\l@youthdvii by 10\relax
    \l@youtvdii=\l@youtvpiii                 % vertical box inset
      \multiply\l@youtvdii by \l@youtvdo
  \else
    \l@youtvdii=\l@youtvpii                 % vertical box inset
      \multiply\l@youtvdii by \l@youtvdo
      \multiply\l@youtvdii by 8\relax
      \divide\l@youtvdii by 10\relax
  \fi
  \l@youtvdv=\l@youtvpi                   % Y dim of footins
    \multiply\l@youtvdv by \l@youtvdo
  \l@youthdii=\l@youtvdii                 % horizontal box inset
  \l@youtvdiii=\l@youtvdi                 % box height
    \advance\l@youtvdiii by \l@youthdii
  \l@youthdiii=\l@youthdi                 % box top length
    \advance\l@youthdiii by -\l@youthdii
  \l@youtvdiv=\l@youtvpii                 % vertical note spacing
    \ifnum\l@youtvdiv < \l@youtvpiii
      \l@youtvdiv=\l@youtvpiii
    \fi
    \multiply\l@youtvdiv by \l@youtvdo
  \l@youtyci=\l@youtvdi                  % Y coord of 1st box base
    \advance\l@youtyci by \l@youtvdiv
  \l@youtycii=\l@youtyci                 % Y coord of rule
    \advance\l@youtycii by \l@youtyci
  \l@youtyciii=\l@youtycii               %  Y coord of text base
    \advance\l@youtyciii by \l@youtvdv
  \l@youtyciv=\l@youtyciii               % top of main text box
    \advance\l@youtyciv by \oneinch\relax
  \l@youthdiv=\l@youthdvii               % length of rule
  \l@youtvdvi=\l@youtvpiv                % height of rule
    \multiply\l@youtvdvi by \l@youtvdo
  \l@youthdv=\l@youthdii                 % small value (1/2 box inset)
    \divide\l@youthdv by \tw@
  \l@youthdvi=\l@youthdv                 % 1/2 l@youthdv
    \divide\l@youthdvi by \tw@
  \begin{center}
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\l@youthdi,\l@youtyciv)
    \thicklines
    \put(0,0){\begin{picture}(\l@youthdi,\l@youtvdiii)
      \put(0,0){\line(1,0){\l@youthdi}}
      \put(0,0){\line(0,1){\l@youtvdi}}
      \put(\l@youthdii,\l@youtvdi){\line(-1,0){\l@youthdii}}
      \put(\l@youthdii,\l@youtvdi){\line(0,1){\l@youtvdii}}
      \put(\l@youthdi,\l@youtvdiii){\line(-1,0){\l@youthdiii}}
      \put(\l@youthdi,\l@youtvdiii){\line(0,-1){\l@youtvdiii}}
      \put(\l@youthdv,\l@youtvdiii){\makebox(0,0)[t]{2}}
      \end{picture}}
    \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtvdiii)
      \put(0,0){\line(1,0){\l@youthdi}}
      \put(0,0){\line(0,1){\l@youtvdi}}
      \put(\l@youthdii,\l@youtvdi){\line(-1,0){\l@youthdii}}
      \put(\l@youthdii,\l@youtvdi){\line(0,1){\l@youtvdii}}
      \put(\l@youthdi,\l@youtvdiii){\line(-1,0){\l@youthdiii}}
      \put(\l@youthdi,\l@youtvdiii){\line(0,-1){\l@youtvdiii}}
      \put(\l@youthdv,\l@youtvdiii){\makebox(0,0)[t]{1}}
      \end{picture}}
    \multiply\l@youtlinethick by \l@youtvdo
    \linethickness{\l@youtlinethick}
    \put(0,\l@youtycii){\line(1,0){\l@youthdvii}}
    \thicklines
    \put(0,\l@youtyciii){\framebox(\l@youthdi,\oneinch){MAIN TEXT}}
    \ifdrawparameters
      \thinlines
    \put(\l@youthdvi,\l@youtyci){\vector(0,-1){\l@youtvdiv}}
    \put(\l@youthdvi,\l@youtyci){\begin{picture}(\l@youthdv,\l@youthdv)
      \put(\l@youthdvi,-\l@youthdv){\l@ypcmd{footnotesep}}
      \end{picture}}
    \put(\l@youthdvi,\l@youtycii){\vector(0,-1){\l@youtvdiv}}
    \put(\l@youthdvi,\l@youtycii){\begin{picture}(\l@youthdv,\l@youthdv)
      \put(\l@youthdvi,-\l@youthdv){\l@ypcmd{footnotesep}}
      \end{picture}}
    \put(\l@youthdii,\l@youtyciii){\vector(0,-1){\l@youtvdv}}
    \put(\l@youthdii,\l@youtyciii){\begin{picture}(\l@youthdv,\l@youthdv)
      \put(\l@youthdvi,-\l@youthdv){\l@ypcmd{skip}\l@ypcmd{footins}}
      \end{picture}}
    \put(\l@youthdiv,\l@youtycii){\begin{picture}(\l@youthdv,\l@youthdv)
      \put(\l@youthdv,0){\l@ypcmd{footnoterule}}
      \end{picture}}
    \fi
    \end{picture}
  \end{center}
  \setlength{\unitlength}{1pt}
  \ifdrawparameters\else
    \begin{center}
    \begin{footnotesize}
      Lengths are to the nearest pt. \\
    \begin{tt}
    \begin{tabular}{l@{\hspace{20pt}}l}
    \bs footins = \number\l@youtvpi pt &
    \bs footnotesep = \number\l@youtvpii pt \\
    \bs baselineskip = \number\l@youtvpiii pt &
    \textrm{note seperation} = \number\l@youtvdiv pt \\
    \textrm{rule thickness} = \the\l@youtlinethick & \\
    \multicolumn{2}{c}{\textrm{rule length} = \the\l@ytok{} times the \bs textwidth} \\
    \end{tabular}
    \end{tt}\end{footnotesize}
    \end{center}
  \fi
}
\newcommand{\footnotevalues}{%
  \setlength{\l@ylen}{\columnwidth}
    \l@ylen = .4\l@ylen
  \begin{center}
  Actual footnote layout values.\\[\baselineskip]
  \begin{footnotesize}
  \begin{tabular}{l@{\hspace{20pt}}l}
  \l@ypcmd{footins}     = \l@yval{\skip\footins} &
  \l@ypcmd{footnotesep} = \l@yval{\footnotesep}  \\
  rule thickness      = 0.4pt ??               &
  rule length         = \l@yval{\l@ylen} ??    \\
  1em = \l@yval{\l@yonem}  & 1ex = \l@yval{\l@yonex} \\
  \end{tabular}
  \end{footnotesize}
  \end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    PARAGRAPH LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\tryparindent}[1]{\l@yltoc{#1}{\l@youthdii}}
\newcommand{\tryparlinewidth}[1]{\l@yltoc{#1}{\l@youthdi}}
\newcommand{\tryparbaselineskip}[1]{\l@yltoc{#1}{\l@youtvdii}}
\newcommand{\currentparagraph}{%
  \tryparindent{\parindent}
  \tryparskip{\parskip}
  \tryparlinewidth{\linewidth}
  \tryparbaselineskip{\baselineskip}
}
\newcommand{\drawparagraph}{%
  \l@youtvdi=\oneinch\relax            % height of bottom of inset box
  \ifdrawparameters
    \l@youtvdii=15\relax                %  \baselineskip
    \l@youthdii=40\relax                 %  \parindent
    \l@youtparskip=30\relax              %  \parskip
    \l@youthdi=\eighthalfinch\relax      % linewidth
  \fi
    \l@youtvdiii=\l@youtvdi              % total height of para box
      \advance\l@youtvdiii by \l@youtvdii
    \l@youtvdiv=\l@youtvdiii             % bottom of Preceeding box
      \advance\l@youtvdiv by \l@youtparskip
    \l@youtvdv=\l@youtvdiv               % total picture height
      \advance\l@youtvdv by \oneinch\relax
    \l@youthdiii=\l@youthdi               % length of top of para box
      \advance\l@youthdiii by -\l@youthdii
    \l@youtxci=\l@youthdi                % x coord of middle of picture
      \divide\l@youtxci by \tw@
  \l@youthdv=10\relax                    % small value
  \l@youthdvi=5\relax                    % 1/2 l@youthdv
  \begin{center}
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\l@youthdi,\l@youtvdv)
    \thicklines
    \put(0,0){\begin{picture}(\l@youthdi,\l@youtvdiii)
      \put(0,0){\line(1,0){\l@youthdi}}
      \put(0,0){\line(0,1){\l@youtvdi}}
      \ifnum\l@youthdii < \z@
        \l@youthdv=-\l@youthdii
        \put(\l@youthdii,\l@youtvdi){\line(1,0){\l@youthdv}}
      \else
        \put(\l@youthdii,\l@youtvdi){\line(-1,0){\l@youthdii}}
      \fi
      \put(\l@youthdii,\l@youtvdi){\line(0,1){\l@youtvdii}}
      \put(\l@youthdi,\l@youtvdiii){\line(-1,0){\l@youthdiii}}
      \put(\l@youthdi,\l@youtvdiii){\line(0,-1){\l@youtvdiii}}
      \end{picture}}
      \put(0,\l@youtvdiv){\framebox(\l@youthdi,\oneinch){Preceeding Text}}
    \ifdrawparameters
      \thinlines
    \put(\l@youtxci,\l@youtvdiv){\begin{picture}(\l@youthdv,\l@youthdv)
      \put(0,0){\vector(0,-1){\l@youtparskip}}
      \put(\l@youthdvi,-\l@youthdv){\l@ypcmd{parskip}}
      \end{picture}}
    \put(0,\l@youtvdiii){\begin{picture}(\l@youthdv,\l@youthdv)
      \put(0,0){\vector(1,0){\l@youthdii}}
      \put(0,\l@youthdv){\l@ypcmd{parindent}}
      \end{picture}}
    \fi
    \end{picture}
  \end{center}
  \setlength{\unitlength}{1pt}
  \ifdrawparameters\else
    \begin{center}
    \begin{footnotesize}
      Lengths are to the nearest pt. \\
    \begin{tt}
    \begin{tabular}{l@{\hspace{20pt}}l}
    \bs parindent = \number\l@youthdii pt &
    \bs parskip = \number\l@youtparskip pt \\
    \bs baselineskip = \number\l@youtvdii pt &
    \bs linewidth = \number\l@youthdi pt \\
    \end{tabular}
    \end{tt}\end{footnotesize}
    \end{center}
  \fi
}
\newcommand{\paragraphvalues}{%
  \setlength{\l@ylen}{\parindent}
  \begin{center}
  Actual paragraph layout values.\\[\baselineskip]
  \begin{footnotesize}
  \begin{tabular}{l@{\hspace{20pt}}l}
  \l@ypcmd{parindent}    = \l@yval{\l@ylen}               &
  \l@ypcmd{parskip}      = \l@yval{\l@ysetupparskip}      \\
  \l@ypcmd{baselineskip} = \l@yval{\l@ysetupbaselineskip} &
  \l@ypcmd{linewidth}    = \l@yval{\linewidth}            \\
  1em = \l@yval{\l@yonem}  & 1ex = \l@yval{\l@yonex} \\
  \end{tabular}
  \end{footnotesize}
  \end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    SECTION HEADING LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\trybeforeskip}[1]{\l@yltoc{#1}{\l@youtvpi}}
\newcommand{\tryafterskip}[1]{\l@yltoc{#1}{\l@youtvpii}}
\newcommand{\tryindent}[1]{\l@yltoc{#1}{\l@youthpi}}
\newcommand{\currentheading}{%
  \trybeforeskip{2\l@ysetupbaselineskip}
  \tryafterskip{\l@ysetupbaselineskip}
  \tryindent{2\l@ysetupbaselineskip}
  \tryparskip{\l@ysetupparskip}
}
\newcommand{\drawheading}[1]{%
  \l@yltoc{\textwidth}{\l@youthdi}               % textwidth
  \l@yltoc{\baselineskip}{\l@youtvdi}            % baselineskip
  \ifdrawparameters
    \Huge \l@youtvdii=\baselineskip \normalsize  % Heading baselineskip
      \divide\l@youtvdii by \onepoint
    \l@yltoc{40pt}{\l@youtvpi}                   % beforeskip
    \ifruninhead
      \l@yltoc{-72pt}{\l@youtvpii}                % afterskip
      \l@yltoc{50pt}{\l@youthpi}                  % indent
    \else
      \l@yltoc{45pt}{\l@youtvpii}                 % afterskip
      \l@yltoc{72pt}{\l@youthpi}                  % indent
    \fi
    \setbox0 = \hbox{{\Huge 3.5 Heading Title }}
    \l@yltoc{\wd0}{\l@youthdv}  % width of heading text
  \else
    {#1 \l@youtvdii=\baselineskip\normalfont\normalsize} % heading baselineskip
      \divide\l@youtvdii by \onepoint
    \setbox0 = \hbox{{#1 3.5 Heading Title }}
    \l@yltoc{\wd0}{\l@youthdv}  % width of heading text
  \fi
  \l@youtvdiii=\l@youtvpii            % afterskip + parskip + textbaselineskip
    \advance\l@youtvdiii by \l@youtparskip
    \advance\l@youtvdiii by \l@youtvdi
  \l@youtvdiv=\l@youtvpi              % beforeskip + parskip + headbaselineskip
    \ifnum\l@youtvdiv < \z@
      \l@youtvdiv = -\l@youtvdiv
    \fi
    \advance\l@youtvdiv by \l@youtparskip
    \advance\l@youtvdiv by \l@youtvdii
  \l@youtyci=\l@youtvdi                  % Y coord of base of after text
  \l@youtycii=\l@youtyci                 % Y coord of base of heading text
    \advance\l@youtycii by \l@youtvdiii
  \l@youthdiv=\z@                        % 0 or abs(-afterskip)
  \ifnum\l@youtvpii < \z@
    \l@youthdiv = -\l@youtvpii
    \l@youtvdiii=\l@youtvdi              %  textbaselineskip
    \l@youtxci=\l@youthpi                % X coord of end of heading text
      \advance\l@youtxci by \l@youthdv
    \l@youtxcii=\l@youtxci               % X coord of start of after text
      \advance\l@youtxcii by \l@youthdiv
    \l@youtycii=\l@youtvdi               % Y coord of base of heading text
  \fi
  \l@youtyciii=\l@youtycii               % Y coord of base of prior text
    \advance\l@youtyciii by \l@youtvdiv
  \l@youtyciv=\l@youtyciii               % Y coord of top of prior text
    \advance\l@youtyciv by \l@youtvdi
  \l@youtycv=\l@youtyciv                 % 2*l@youtvdi + l@youtyciv
    \advance\l@youtycv by \l@youtvdi
    \advance\l@youtycv by \l@youtvdi
  \l@youthdii=\l@youtvdi                 % a small amount
  \l@youthdiii=\l@youthdii               % half a small amount
    \divide\l@youthdiii by \tw@
  \begin{center}
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\l@youthdi,\l@youtycv)
    \ifnum\l@youtvpii < \z@
      \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv)
        \put(0,0){second line of text following the heading \ldots}
        \ifdrawparameters
          \put(\l@youthpi,\l@youtycii){{\Huge 3.5 Heading Title}}
        \else
          \put(\l@youthpi,\l@youtycii){{#1 3.5 Heading Title}}
        \fi
        \put(\l@youtxcii,\l@youtycii){Start of text \ldots}
        \put(0,\l@youtyciii){\ldots end of last line of preceeding text.}
        \ifdrawparameters
          \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
          \put(0,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
            \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
              {\footnotesize \textit{$\|$beforeskip$\|$} +
               \texttt{\bs parskip} (of text font) + \texttt{\bs baselineskip}
                (of heading font)}}
            \end{picture}}
          \put(0,\l@youtycii){\vector(1,0){\l@youthpi}}
          \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
            \put(\l@youthdii,\l@youthdiii){\footnotesize \textit{indent}}
            \end{picture}}
          \put(\l@youtxci,\l@youtycii){\vector(1,0){\l@youthdiv}}
          \put(\l@youtxci,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
            \put(\l@youthdiii,\l@youthdii){\footnotesize \textit{afterskip} ($< 0$)}
            \end{picture}}
        \fi
        \end{picture}}
    \else
      \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv)
        \put(0,0){second line of text following the heading \ldots}
        \put(0,\l@youtyci){This is the start of the after-heading text
                           which continues on \ldots}
        \ifdrawparameters
          \put(\l@youthpi,\l@youtycii){{\Huge 3.5 Heading Title}}
        \else
          \put(\l@youthpi,\l@youtycii){{#1 3.5 Heading Title}}
        \fi
        \put(0,\l@youtyciii){\ldots end of last line of preceeding text.}
        \ifdrawparameters
          \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
          \put(0,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
            \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
              {\footnotesize \textit{$\|$beforeskip$\|$} +
               \texttt{\bs parskip} (of text font) + \texttt{\bs baselineskip}
                (of heading font)}}
            \end{picture}}
          \put(0,\l@youtycii){\vector(1,0){\l@youthpi}}
          \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
            \put(\l@youthdii,\l@youthdiii){\footnotesize \textit{indent}}
            \end{picture}}
          \put(0,\l@youtycii){\vector(0,-1){\l@youtvdiii}}
          \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
            \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
              {\footnotesize \textit{afterskip} +
               \texttt{\bs parskip} (of heading font) + \texttt{\bs baselineskip}
                (of text font)}}
            \end{picture}}
        \fi
        \end{picture}}
      \fi
      \put(0,0){\line(1,0){\l@youthdi}}
      \put(0,\l@youtycv){\line(1,0){\l@youthdi}}
      \end{picture}
    \end{center}
    \setlength{\unitlength}{1pt}
    \ifdrawparameters\else
      \begin{center}
      \begin{footnotesize}
        Lengths are to the nearest pt. \\
      \begin{tt}
      \begin{tabular}{l@{\hspace{20pt}}l}
      \textit{beforeskip} = \number\l@youtvpi pt &
      \textit{afterskip} = \number\l@youtvpii pt \\
      \textit{indent} = \number\l@youthpi pt &
      \textrm{(heading font)} \bs baselineskip = \number\l@youtvdii pt \\
      \bs parskip = \number\l@youtparskip pt &
      \textrm{heading font} = \string#1 \\
      \end{tabular}
      \end{tt}\end{footnotesize}
      \end{center}
    \fi
}
\newcommand{\headingvalues}{%
  \PackageWarning{layouts}{The \protect\headingvalues\space command does nothing}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    INDIVIDUAL FLOAT LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\trytextfloatsep}[1]{\l@yltoc{#1}{\l@youtvpi}}
\newcommand{\tryfloatsep}[1]{\l@yltoc{#1}{\l@youtvpii}}
\newcommand{\tryintextsep}[1]{\l@yltoc{#1}{\l@youtvpiii}}
\newcommand{\trytopfigrule}[1]{\setlength{\l@youtlinethick}{#1}}
\newcommand{\trybotfigrule}[1]{\setlength{\l@youtlinethickii}{#1}}
\newcommand{\currentfloat}{%
  \trytextfloatsep{\textfloatsep}
  \tryfloatsep{\floatsep}
  \tryintextsep{\intextsep}
  \trytopfigrule{0pt}        % guesstimate
  \trybotfigrule{0pt}        % guesstimate
}
\newcommand{\drawfloat}{%
  \ifdrawparameters
    \l@yltoc{40pt}{\l@youtvpi}             % textfloatsep
    \l@yltoc{40pt}{\l@youtvpii}            % floatsep
    \l@yltoc{40pt}{\l@youtvpiii}           % intextsep
    \setlength{\l@youtlinethick}{1pt}     % toprule height
    \setlength{\l@youtlinethickii}{2pt}   % botrule height
  \fi
  \l@yltoc{\textwidth}{\l@youthdo}
    \multiply\l@youthdo by 8\relax
    \divide\l@youthdo by 10\relax
  \l@yltoc{\baselineskip}{\l@youtvdvii}  % baselineskip
  \l@youthdi=\l@youthdo                  % width of floats
    \divide\l@youthdi by \tw@
  \l@youtvdi=\l@youthdi                  % float box height
    \divide\l@youtvdi by 4\relax
  \l@youtvdii=\l@youtvdvii               % text box height
    \multiply\l@youtvdii by \thr@@
  \l@youtvdvi=\l@youtvdvii               % height of top text line
    \multiply\l@youtvdvi by \tw@
  \l@youtxci=\l@youthdo                  % X coord of LH of float
    \advance\l@youtxci by -\l@youthdi
    \divide\l@youtxci by \tw@
  \l@youtxcii=\l@youthdo                 % X coord of vertical dims.
    \divide\l@youtxcii by \tw@
  \l@youtyci=\l@youtvdi                  % Y coord of top of BFl-n
  \l@youtycii=\l@youtyci                 % Y coord of bottom of text
    \advance\l@youtycii by \l@youtvpi
  \l@youtyciii=\l@youtycii               % Y coord of bottom of HF box
    \advance\l@youtyciii by \l@youtvdii
    \advance\l@youtyciii by \l@youtvpiii
  \l@youtyciv=\l@youtyciii               % Y coord of bottom top text box
    \advance\l@youtyciv by \l@youtvdi
    \advance\l@youtyciv by \l@youtvpiii
  \l@youtycv=\l@youtyciv                 % Y coord of bottom of TFl-2 box
    \advance\l@youtycv by \l@youtvdii
    \advance\l@youtycv by \l@youtvpi
  \l@youtycvi=\l@youtycv                 % Y coord of bottom of TFl-1 box
    \advance\l@youtycvi by \l@youtvdi
    \advance\l@youtycvi by \l@youtvpii
  \l@youtvdo=\l@youtycvi                 % Y dim of text on page
    \advance\l@youtvdo by \l@youtvdi
  \l@youthdii=\l@youtvpi                 % a small amount
    \divide\l@youthdii by \tw@
  \l@youthdiii=\l@youthdii               % half a small amount
    \divide\l@youthdiii by \tw@
  \begin{center}
%%%  \setlayoutscale{1}
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\l@youthdo,\l@youtvdo)
    \thicklines
    \put(\l@youtxci,0){\framebox(\l@youthdi,\l@youtvdi){A BOTTOM FLOAT}}
    \put(0,\l@youtycii){\begin{picture}(\l@youthdo,\l@youtvdii)
      \put(0,0){\makebox(\l@youthdo,0)[br]{\ldots last text line before bottom float.}}
      \put(0,\l@youtvdvi){First text line after `here' float \ldots}
      \end{picture}}
    \put(\l@youtxci,\l@youtyciii){\framebox(\l@youthdi,\l@youtvdi){A `HERE' FLOAT}}
    \put(0,\l@youtyciv){\begin{picture}(\l@youthdo,\l@youtvdii)
      \put(0,0){\makebox(\l@youthdo,0)[br]{\ldots last text line before `here' float.}}
      \put(0,\l@youtvdvi){First text line after top float \ldots}
      \end{picture}}
    \put(\l@youtxci,\l@youtycv){\framebox(\l@youthdi,\l@youtvdi){A TOP FLOAT}}
    \put(\l@youtxci,\l@youtycvi){\framebox(\l@youthdi,\l@youtvdi){A TOP FLOAT}}
    \thinlines
    \put(0,0){\dashbox{10}(\l@youthdo,\l@youtvdo){}}
    \linethickness{\l@youtlinethick}
    \put(0,\l@youtycv){\line(1,0){\l@youthdo}}
    \linethickness{\l@youtlinethickii}
    \put(0,\l@youtyci){\line(1,0){\l@youthdo}}
    \thinlines
    \ifdrawparameters
      \put(\l@youtxcii,\l@youtycii){\vector(0,-1){\l@youtvpi}}
      \put(\l@youtxcii,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(\l@youthdiii,-\l@youthdii){\l@ypcmd{textfloatsep}}
        \end{picture}}
      \put(\l@youtxcii,\l@youtyciii){\vector(0,-1){\l@youtvpiii}}
      \put(\l@youtxcii,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(\l@youthdiii,-\l@youthdii){\l@ypcmd{intextsep}}
        \end{picture}}
      \put(\l@youtxcii,\l@youtyciv){\vector(0,-1){\l@youtvpiii}}
      \put(\l@youtxcii,\l@youtyciv){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(\l@youthdiii,-\l@youthdii){\l@ypcmd{intextsep}}
        \end{picture}}
      \put(\l@youtxcii,\l@youtycv){\vector(0,-1){\l@youtvpi}}
      \put(\l@youtxcii,\l@youtycv){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(\l@youthdiii,-\l@youthdii){\l@ypcmd{textfloatsep}}
        \end{picture}}
      \put(\l@youtxcii,\l@youtycvi){\vector(0,-1){\l@youtvpii}}
      \put(\l@youtxcii,\l@youtycvi){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(\l@youthdiii,-\l@youthdii){\l@ypcmd{floatsep}}
        \end{picture}}
      \put(\l@youthdo,\l@youtycv){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(-\l@youthdiii,\l@youthdii){\vector(0,-1){\l@youthdii}}
        \put(-\l@youthdii,\l@youthdii){\makebox(0,0)[tr]{\l@ypcmd{topfigrule}}}
        \end{picture}}
      \put(\l@youthdo,\l@youtyci){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(-\l@youthdiii,-\l@youthdii){\vector(0,1){\l@youthdii}}
        \put(-\l@youthdii,-\l@youthdii){\makebox(0,0)[br]{\l@ypcmd{botfigrule}}}
        \end{picture}}
    \fi
    \end{picture}
  \end{center}
  \setlength{\unitlength}{1pt}
  \ifdrawparameters\else
    \begin{center}
    \begin{footnotesize}
      Lengths are to the nearest pt. \\
    \begin{tt}
    \begin{tabular}{l@{\hspace{20pt}}l}
    \bs floatsep = \number\l@youtvpii pt    &
    \bs textfloatsep = \number\l@youtvpi pt \\
    \bs intextsep = \number\l@youtvpiii pt  &
    \textrm{topfigrule thickness} = \the\l@youtlinethick \\
    \textrm{botfigrule thickness} = \the\l@youtlinethickii &  \\
    \end{tabular}
    \end{tt}\end{footnotesize}
    \end{center}
  \fi
}
\newcommand{\floatvalues}{%
  \begin{center}
  Actual float layout values.\\[\baselineskip]
  \begin{footnotesize}
  \begin{tabular}{l@{\hspace{20pt}}l}
  \l@ypcmd{floatsep}             = \l@yval{\floatsep}       &
  \l@ypcmd{textfloatsep}         = \l@yval{\textfloatsep}   \\
  \l@ypcmd{intextsep}            = \l@yval{\intextsep}      &  \\
  topfig rule thickness        = 0pt ??                   &
  botfig rule thickness        = 0pt ??                   \\
  \l@ypcmd{topnumber}            = \l@yval{\c@topnumber}    &
  \l@ypcmd{topfraction}          = \topfraction             \\
  \l@ypcmd{bottomnumber}         = \l@yval{\c@bottomnumber} &
  \l@ypcmd{bottomfraction}       = \bottomfraction          \\
  \l@ypcmd{totalnumber}          = \l@yval{\c@totalnumber}  &
  \l@ypcmd{textfraction}         = \textfraction            \\
  \l@ypcmd{dblfloatsep}          = \l@yval{\dblfloatsep}    &
  \l@ypcmd{dbltextfloatsep}      = \l@yval{\dbltextfloatsep} \\
  \l@ypcmd{dbltopnumber}         = \l@yval{\c@dbltopnumber} &
  \l@ypcmd{dbltopfraction}       = \dbltopfraction          \\
  \l@ypcmd{dblfloatpagefraction} = \dblfloatpagefraction    &
  \l@ypcmd{floatpagefraction}    = \floatpagefraction       \\
  1em = \l@yval{\l@yonem}  & 1ex = \l@yval{\l@yonex} \\
  \end{tabular}
  \end{footnotesize}
  \end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    FLOAT PAGE LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\trytotalnumber}[1]{\l@youtvpvi = #1}
\newcommand{\trytopnumber}[1]{\l@youtvpv = #1}
\newcommand{\trybottomnumber}[1]{\l@youtvpi = #1}
\newcommand{\trytopfraction}[1]{\setlength{\l@ylen}{10in}
          \l@ylen = #1\l@ylen
          \l@youtvpiv=\l@ylen
          \divide\l@youtvpiv by \onepoint
          \setlength{\l@ylen}{1000sp}
          \l@ylen=#1\l@ylen
          \l@youthdiv=\l@ylen}
\newcommand{\trytextfraction}[1]{\setlength{\l@ylen}{10in}
          \l@ylen = #1\l@ylen
          \l@youtvpiii=\l@ylen
          \divide\l@youtvpiii by \onepoint
          \setlength{\l@ylen}{1000sp}
          \l@ylen=#1\l@ylen
          \l@youthdv=\l@ylen}
\newcommand{\trybottomfraction}[1]{\setlength{\l@ylen}{10in}
          \l@ylen = #1\l@ylen
          \l@youtvpii=\l@ylen
          \divide\l@youtvpii by \onepoint
          \setlength{\l@ylen}{1000sp}
          \l@ylen=#1\l@ylen
          \l@youthdvi=\l@ylen}
\newcommand{\currentfloatpage}{%
  \trytotalnumber{\value{totalnumber}}   % typically 3
  \trytopnumber{\value{topnumber}}       % typically 2
  \trytopfraction{0.7}                   % typically 0.7
  \trytextfraction{0.2}                  % typically 0.2
  \trybottomfraction{0.3}                % typically 0.3
  \trybottomnumber{\value{bottomnumber}} % typically 1
}
\newcommand{\drawfloatpage}{%
  \ifdrawparameters
    \l@youtvpvi=\thr@@          % total number
    \l@youtvpv=\tw@             % topnumber
    \l@youthdiv=300\relax       % 1000 times topfraction
    \setlength{\l@ylen}{10in}
    \l@ylen=0.3\l@ylen
    \l@yltoc{\l@ylen}{\l@youtvpiv}  % topfraction
    \l@youthdv=200\relax        % 1000 times textfraction
    \setlength{\l@ylen}{10in}
    \l@ylen=0.2\l@ylen
    \l@yltoc{\l@ylen}{\l@youtvpiii}  % textfraction
    \l@youthdvi=300\relax       % 1000 times botfraction
    \setlength{\l@ylen}{10in}
    \l@ylen=0.3\l@ylen
    \l@yltoc{\l@ylen}{\l@youtvpii}  % bottomfraction
    \l@youtvpi=\@ne             % bottomnumber
  \fi
  \l@youtvdo=\teninch\relax                    % textheight
  \l@youthdo=\eighthalfinch\relax              % textwidth
  \l@youthdi=\l@youthdo                  % width of text box
    \multiply\l@youthdi by 8\relax
    \divide\l@youthdi by 10\relax
  \l@youtyci=\l@youtvdo                  % Y coord of base of textfraction
    \advance\l@youtyci by -\l@youtvpiii
    \divide\l@youtyci by \tw@
  \l@youtycii=\l@youtvpii                % Y coord of top of bottomfraction
  \l@youtyciii=\l@youtvdo                % Y coord of base of topfraction
    \advance\l@youtyciii by -\l@youtvpiv
  \l@youtyciv=\l@youtyci                 % Y coord of top of textfraction
    \advance\l@youtyciv by \l@youtvpiii
  \l@youtycv=\l@youtyci                  % Y coord of centre of text box
    \advance\l@youtycv by \l@youtyciv
    \divide\l@youtycv by \tw@
  \l@youtxcii=\l@youthdo                 % X coord of centre dims
    \divide\l@youtxcii by \tw@
  \l@youtxci=\l@youtxcii                 % X coord of LH dims
    \divide\l@youtxci by \tw@
  \l@youtxciii=\l@youtxcii               % X coord of RH dims
    \advance\l@youtxciii by \l@youtxci
  \l@youtxciv=\l@youthdo                 % X coord of LH of text box
    \advance\l@youtxciv by -\l@youthdi
    \divide\l@youtxciv by \tw@
  \l@youthdii=\l@youtxciv                % a small dimension
  \l@youthdiii=\l@youthdii               % half a small dimension
    \divide\l@youthdiii by \tw@
  \begin{center}
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\l@youthdo,\l@youtvdo)
    \thicklines
    \put(0,0){\framebox(\l@youthdo,\l@youtvdo){}}
    \put(0,\l@youtycii){\dashbox{10}(\l@youthdo,0){}}
%%%    \ifdrawparameters
      \put(0,0){\makebox(\l@youthdo,\l@youtvpii){\l@ypcmd{bottomnumber}}}
      \thinlines
      \put(\l@youtxciii,0){\vector(0,1){\l@youtvpii}}
      \thicklines
%%%    \fi
    \put(\l@youtxciv,\l@youtyci){\framebox(\l@youthdi,\l@youtvpiii){}}
    \put(0,\l@youtyciii){\dashbox{10}(\l@youthdo,0){}}
%%%    \ifdrawparameters
      \put(0,\l@youtyciii){\makebox(\l@youthdo,\l@youtvpiv){\l@ypcmd{topnumber}}}
      \thinlines
      \put(\l@youtxci,\l@youtvdo){\vector(0,-1){\l@youtvpiv}}
      \thicklines
%%%    \fi
    \thinlines
    \ifdrawparameters
      \put(\l@youtxciii,0){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(-\l@youthdiii,\l@youthdiii){%
          \makebox(0,0)[br]{\footnotesize\texttt{\bs bottomfraction}}}
        \end{picture}}
      \put(\l@youtxcii,\l@youtyci){\vector(0,1){\l@youtvpiii}}
      \put(\l@youtxcii,\l@youtyci){\vector(0,-1){0}}
      \put(\l@youtxcii,\l@youtycv){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(\l@youthdiii,0){%
          \makebox(0,0)[l]{\l@ypcmd{textfraction}}}
        \end{picture}}
      \put(\l@youtxci,\l@youtvdo){\begin{picture}(\l@youthdii,\l@youthdii)
        \put(\l@youthdiii,-\l@youthdiii){%
          \makebox(0,0)[tl]{\l@ypcmd{topfraction}}}
        \end{picture}}
    \fi
    \end{picture}
  \end{center}
  \setlength{\unitlength}{1pt}
  \ifdrawparameters\else
    \begin{center}
    \begin{footnotesize}\begin{tt}
    \begin{tabular}{l@{\hspace{20pt}}l}
    \bs topnumber = \number\l@youtvpv &
    \bs topfraction = 0.\number\l@youthdiv \\
    \bs bottomnumber = \number\l@youtvpi &
    \bs bottomfraction = 0.\number\l@youthdvi \\
    \bs totalnumber = \number\l@youtvpvi &
    \bs textfraction = 0.\number\l@youthdv \\
    \end{tabular}
    \end{tt}\end{footnotesize}
    \end{center}
  \fi
}
\newcommand{\floatpagevalues}{\floatvalues}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    TOC LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\trytocindent}[1]{\l@yltoc{#1}{\l@youthpi}}
\newcommand{\trytocnumwidth}[1]{\l@yltoc{#1}{\l@youthpii}}
\newcommand{\trytoclinewidth}[1]{\l@yltoc{#1}{\l@youthdo}}
\newcommand{\trytocrmarg}[1]{\l@yltoc{#1}{\l@youthpiii}}
\newcommand{\trytocpnumwidth}[1]{\l@yltoc{#1}{\l@youthpiv}}
\newcommand{\l@ydotsep}{\@dotsep}
\newcommand{\trytocdotsep}[1]{\renewcommand{\l@ydotsep}{#1}
            \setlength{\l@ylen}{1em}
            \l@ylen = #1\l@ylen
            \divide\l@ylen by 18\relax    % 18mu = 1em
            \addtolength{\l@ylen}{0.4pt}  % small addition for the dot width
            \l@yltoc{\l@ylen}{\l@youthpv}}
\newcommand{\currenttoc}{%
  \trytocindent{1.5em}                  % guesstimate
  \trytocnumwidth{2.3em}                % guesstimate
  \trytoclinewidth{\textwidth}
  \trytocrmarg{\@tocrmarg}
  \trytocpnumwidth{\@pnumwidth}
  \trytocdotsep{\@dotsep}
}
\newcommand{\drawtoc}{%
  \ifdrawparameters
    \l@yltoc{100pt}{\l@youthpi}           % indent
    \l@yltoc{50pt}{\l@youthpii}           % numwidth
    \l@yltoc{100pt}{\l@youthpiii}         % tocrmarg
    \l@yltoc{60pt}{\l@youthpiv}           % pnumwidth
    \l@yltoc{20pt}{\l@youthpv}            % dotsep
    \l@yltoc{6.5in}{\l@youthdo}           % linewidth
  \fi
  \l@yltoc{20pt}{\l@youtvdi}          % baselineskip
  \l@youtvdii=\l@youtvdi                    % twice baselineskip
    \multiply\l@youtvdii by \tw@
  \l@youtvdiii=\l@youtvdi                    % three times baselineskip
    \multiply\l@youtvdiii by \thr@@
  \l@youtvdiv=\l@youtvdi                    % four times baselineskip
    \multiply\l@youtvdiv by 4\relax
  \l@youtxci=\l@youthpi                    % X coord of start of numwidth
  \l@youtxcii=\l@youtxci                    % X coord of start of text
    \advance\l@youtxcii by \l@youthpii
  \l@youtxciii=\l@youthdo                    % X coord of start of pnumwidth
    \advance\l@youtxciii by -\l@youthpiv
  \l@youtxciv=\l@youthdo                    % X coord of start of tocrmarg
    \advance\l@youtxciv by -\l@youthpiii
  \l@youtxcv=\l@youtxciv                    % X coord of penultimate dot
    \advance\l@youtxcv by -\l@youthpv
  \l@youtyci=\z@                    % Y coord of base of dotsep text
  \l@youtycii=\l@youtyci                    % dotsep vector
    \advance\l@youtycii by \l@youtvdii
  \l@youtyciii=\l@youtycii                    % Y coord of base of bottom text
    \advance\l@youtyciii by \l@youtvdii
  \l@youtyciv=\l@youtyciii                    % Y coord of base of middle text
    \advance\l@youtyciv by \l@youtvdi
  \l@youtycv=\l@youtyciv                    % Y coord of base of top text
    \advance\l@youtycv by \l@youtvdi
  \l@youtycvi=\l@youtycv                    % Y coord of top vectors
    \advance\l@youtycvi by \l@youtvdi
    \advance\l@youtycvi by \l@youtvdi
  \l@youtvdo=\l@youtycvi                    % picture height
    \advance\l@youtvdo by \l@youtvdii
  \l@youthdii=\l@youtxciv                    % width of title text
    \advance\l@youthdii by -\l@youtxcii
  \l@youthdiii=\l@youtvdi                    % a small amount
  \l@youthdiv=\l@youthdiii                    % half a small amount
    \divide\l@youthdiv by \tw@
  \begin{center}
  \setlength{\unitlength}{\l@youtunitlength}
  \begin{picture}(\l@youthdo,\l@youtvdo)
    \thinlines
    \put(0,0){\framebox(\l@youthdo,\l@youtvdo){}}
    \put(\l@youtxci,\l@youtycv){\textbf{3.5}}
    \put(\l@youtxcii,\l@youtycv){Heading \ldots}
    \put(\l@youtxciv,\l@youtycv){\makebox(0,0)[br]{\ldots title}}
    \put(\l@youtxcii,\l@youtyciv){continue \ldots}
    \put(\l@youtxciv,\l@youtyciv){\makebox(0,0)[br]{\ldots title}}
    \put(\l@youtxcii,\l@youtyciii){title end}     % end of title heading
    \put(\l@youthdo,\l@youtyciii){\makebox(0,0)[br]{487}} % page number
    \settowidth{\l@ylen}{title end\space}
    \l@yltoc{\l@ylen}{\l@youthdv}              % width of `title end' text
      \l@youthpvi=\l@youtunitlength
      \multiply\l@youthdv by \onepoint\relax
      \divide\l@youthdv by \l@youthpvi\relax
    \l@youthdvi=\l@youtxciv                    % space for dots
      \advance\l@youthdvi by -\l@youtxcii
      \advance\l@youthdvi by -\l@youthdv
    \l@youthdvii=\l@youthdvi                   % number of dots
      \divide\l@youthdvii by \l@youthpv
    \ifdrawparameters
      \multiput(\l@youtxciv,\l@youtyciii)(-\l@youthpv,0){\l@youthdvii}%
          {\makebox(0,0)[r]{.}}                  % draw the dots
    \else
      \multiply\l@youthpv by 4\relax
      \l@youthdvii=\l@youthdvi
        \divide\l@youthdvii by \l@youthpv
        \advance\l@youthdvii by \@ne
      \ifnum\l@youthdvii >\@ne
        \multiput(\l@youtxciv,\l@youtyciii)(-\l@youthpv,0){\l@youthdvii}%
            {\makebox(0,0)[r]{.}}                  % draw the dots
      \fi
    \fi
    \ifdrawparameters
      \put(0,\l@youtycvi){\begin{picture}(\l@youthdo,\oneinch)
        \put(0,0){\vector(1,0){\l@youthpi}}
        \put(\l@youtxci,0){\line(0,-1){\l@youthdiii}}
        \put(0,0){\begin{picture}(\l@youthdiii,\l@youthdiii)
          \put(\l@youthdiv,\l@youthdiv){\footnotesize\textit{indent}}
          \end{picture}}
        \put(\l@youtxci,0){\vector(1,0){\l@youthpii}}
        \put(\l@youtxcii,0){\line(0,-1){\l@youthdiii}}
        \put(\l@youtxci,0){\begin{picture}(\l@youthdiii,\l@youthdiii)
          \put(\l@youthdiv,\l@youthdiv){\footnotesize\textit{numwidth}}
          \end{picture}}
        \put(\l@youthdo,0){\vector(-1,0){\l@youthpiv}}
        \put(\l@youtxciii,0){\line(0,-1){\l@youthdiii}}
        \put(\l@youthdo,0){\begin{picture}(\l@youthdiii,\l@youthdiii)
          \put(-\l@youthdiv,\l@youthdiv){\makebox(0,0)[br]%
            {\l@ypcmd{@pnumwidth}}}
          \end{picture}}
        \end{picture}}
      \thicklines
      \put(0,\l@youtvdo){\vector(1,0){\l@youthdo}}
      \thinlines
      \put(0,\l@youtvdo){\begin{picture}(\l@youthdiii,\l@youthdiii)
        \put(\l@youtxcii,-\l@youthdiv){\makebox(0,0)[tl]%
          { \quad  \l@ypcmd{linewidth}}}
        \end{picture}}
      \put(0,\l@youtycii){\begin{picture}(\l@youthdo,\oneinch)
        \put(\l@youthdo,0){\vector(-1,0){\l@youthpiii}}
        \put(\l@youtxciv,0){\line(0,1){\l@youthdiii}}
        \put(\l@youthdo,0){\begin{picture}(\l@youthdiii,\l@youthdiii)
          \put(-\l@youthdiv,-\l@youthdiv){\makebox(0,0)[tr]%
            {\l@ypcmd{@tocrmarg}}}
          \end{picture}}
        \put(\l@youtxciv,0){\vector(-1,0){\l@youthpv}}
        \put(\l@youtxciv,0){\vector(1,0){0}}
        \put(\l@youtxcv,0){\line(0,1){\l@youthdiii}}
        \put(\l@youtxciv,0){\begin{picture}(\l@youthdiii,\l@youthdiii)
          \put(0,-\l@youthdiv){\makebox(0,0)[tr]%
            {\l@ypcmd{@dotsep}}}
          \end{picture}}
        \end{picture}}
    \fi
    \end{picture}
  \end{center}
  \setlength{\unitlength}{1pt}
  \ifdrawparameters\else
    \begin{center}
    \begin{footnotesize}
      Lengths are to the nearest pt. \\
    \begin{tt}
    \begin{tabular}{l@{\hspace{20pt}}l}
    \textit{indent} = \number\l@youthpi pt &
    \textit{numwidth} = \number\l@youthpii pt \\
    \bs @tocrmarg = \number\l@youthpiii pt &
    \bs @pnumwidth = \number\l@youthpiv pt \\
    \bs @dotsep = \l@ydotsep &   \\
    \end{tabular}
    \end{tt}\end{footnotesize}
    \end{center}
  \fi
}
\newcommand{\tocvalues}{%
  \begin{center}
  Actual ToC layout values.\\[\baselineskip]
  \begin{footnotesize}
  \begin{tabular}{l@{\hspace{20pt}}l}
  \l@ypcmd{@tocrmarg}  = \@tocrmarg  &
  \l@ypcmd{@pnumwidth} = \@pnumwidth \\
  \l@ypcmd{@dotsep}    = \@dotsep    &
  \textit{indent}    = 1.5em ??    \\
  \textit{numwidth}  = 2.3em ??    &  \\
  1em = \l@yval{\l@yonem}  & 1ex = \l@yval{\l@yonex} \\
  \end{tabular}
  \end{footnotesize}
  \end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%    SPREAD PAGE LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\drawaspread}[8][0]{%
  \begingroup
  \setlength{\unitlength}{1pt}
  \setlength{\l@youtunitlength}{#2}
  \l@yltoc{\l@youtunitlength}{\l@youthdo}  % page width
  \l@youthdiv=\l@youthdo                   % total width of double spread
    \advance\l@youthdiv by \l@youthdo
  \setlength{\l@ylen}{#3\l@youtunitlength}
  \l@yltoc{\l@ylen}{\l@youtvdo}           % page height
  \setlength{\l@ylen}{#5\l@youtunitlength}
  \l@yltoc{\l@ylen}{\l@youthdiii}           % spine width
  \setlength{\l@youtunitlength}{\l@ylen}
  \setlength{\l@ylen}{#7\l@youtunitlength}
  \l@yltoc{\l@ylen}{\l@youthdi}             % fore edge width
  \l@youthdii=\l@youthdo                  % text width
    \advance\l@youthdii by -\l@youthdi
    \advance\l@youthdii by -\l@youthdiii
  \l@youtxci=\l@youthdo
    \advance\l@youtxci by \l@youthdiii
  \setlength{\l@ylen}{#6\l@youtunitlength}
  \l@yltoc{\l@ylen}{\l@youtvdiii}         % top margin
  \setlength{\l@ylen}{#1\l@youtunitlength}
  \l@yltoc{\l@ylen}{\l@youtvdi}           % bottom margin
  \setlength{\l@ylen}{\l@youthdii pt}
  \setlength{\l@ylen}{#4\l@ylen}
  \l@yltoc{\l@ylen}{\l@youtvdii}          % text height
  \ifnum\l@youtvdi=\z@
    \l@youtvdi=\l@youtvdo
    \advance\l@youtvdi by -\l@youtvdiii
    \advance\l@youtvdi by -\l@youtvdii
  \fi
  \setlength{\l@ylen}{#8\l@youtunitlength}
  \l@yltoc{\l@ylen}{\l@youthdv}           % gutter width
  \ifnum\l@youthdv=\z@
    \begin{picture}(\l@youthdiv,\l@youtvdo)
      \thicklines
      \put(0,0){\framebox(\l@youthdiv,\l@youtvdo){}} % spread pages
      \put(\l@youthdo,0){\line(0,1){\l@youtvdo}}     % the spine
      \thinlines
      \put(\l@youthdi,\l@youtvdi){\framebox(\l@youthdii,\l@youtvdii){}} % LH text
      \put(\l@youtxci,\l@youtvdi){\framebox(\l@youthdii,\l@youtvdii){}} % RH text
      \end{picture}
  \else
    \l@youthdvi=\l@youthdii      % column width
      \advance\l@youthdvi by -\l@youthdv
      \divide\l@youthdvi by \tw@
    \l@youtxcii=\l@youthdi          % X coord of LH inner column
      \advance\l@youtxcii by \l@youthdvi
      \advance\l@youtxcii by \l@youthdv
    \l@youtxciii=\l@youtxci          % X coord of RH outer column
      \advance\l@youtxciii by \l@youthdvi
      \advance\l@youtxciii by \l@youthdv
    \begin{picture}(\l@youthdiv,\l@youtvdo)
      \thicklines
      \put(0,0){\framebox(\l@youthdiv,\l@youtvdo){}} % spread pages
      \put(\l@youthdo,0){\line(0,1){\l@youtvdo}}     % the spine
      \thinlines
      \put(\l@youthdi,\l@youtvdi){\framebox(\l@youthdvi,\l@youtvdii){}} % LH LH col
      \put(\l@youtxcii,\l@youtvdi){\framebox(\l@youthdvi,\l@youtvdii){}} % LH RH col
      \put(\l@youtxci,\l@youtvdi){\framebox(\l@youthdvi,\l@youtvdii){}} % RH LH col
      \put(\l@youtxciii,\l@youtvdi){\framebox(\l@youthdvi,\l@youtvdii){}} % RH RH col
      \end{picture}
  \fi
\endgroup
}
\newcommand{\drawfontframe}[1]{%
  \savebox{\layoutsbox}{#1}%
  \l@yltoc{\wd\layoutsbox}{\l@youthdo}
  \l@yltoc{\ht\layoutsbox}{\l@youtvdii}
  \l@yltoc{\dp\layoutsbox}{\l@youtvdi}
  \l@youtvdo=\l@youtvdi
  \advance\l@youtvdo by \l@youtvdii
  \l@youtxci=\l@youthdo
  \divide\l@youtxci by \tw@
  \begin{picture}(\l@youthdo,\l@youtvdii)
    \thinlines
    \put(0,0){\usebox{\layoutsbox}}
    \put(0,0){\circle*{2}}
    \qbezier[\l@youtxci](0,0)(\l@youtxci,0)(\l@youthdo,0)
    \put(0,-\l@youtvdi){\framebox(\l@youthdo,\l@youtvdo){}}
  \end{picture}
}
\newcommand{\drawfontframelabel}[1]{%
  \savebox{\layoutsbox}{#1}%
  \l@yltoc{\wd\layoutsbox}{\l@youthdo}%
  \l@yltoc{\ht\layoutsbox}{\l@youtvdii}%
  \l@yltoc{\dp\layoutsbox}{\l@youtvdi}%
  \l@youtvdo=\l@youtvdi
  \advance\l@youtvdo by \l@youtvdii
  \l@youtxci=\l@youthdo
  \divide\l@youtxci by \tw@
  \l@youthdvi=5\relax
  \l@youtycv=\l@youtvdii
  \advance\l@youtycv by 17\relax
  \l@youtxcii=\l@youthdo
  \advance\l@youtxcii by 35\relax
  \begin{picture}(\l@youtxcii,\l@youtycv)
    \thinlines
    \put(0,0){\usebox{\layoutsbox}}
    \put(0,0){\circle*{2}}
    \qbezier[\l@youtxci](0,0)(\l@youtxci,0)(\l@youthdo,0)
    \put(0,-\l@youtvdi){\framebox(\l@youthdo,\l@youtvdo){}}
    \begin{tiny}
    \put(-\l@youthdvi,0){\makebox(0,0)[r]{reference}}
    \l@youtycv=\l@youtvdii
    \advance\l@youtycv by \l@youthdvi
    \ifnum\l@youthdo > 6\relax
      \l@yhrda{0}{\l@youtycv}{\l@youthdo}
    \else
      \l@yhrdia{0}{\l@youtycv}{\l@youthdo}
    \fi
    \advance\l@youtycv by \l@youthdvi
    \put(\l@youtxci,\l@youtycv){\makebox(0,0)[b]{width}}
    \l@youtxcii=\l@youthdo
    \advance\l@youtxcii by \l@youthdvi
    \l@youtxciii=\l@youtxcii
    \advance\l@youtxciii by \l@youthdvi
    \ifnum\l@youtvdii > \z@
      \ifnum\l@youtvdii > 6\relax
        \l@yvuda{\l@youtxcii}{0}{\l@youtvdii}
      \else
        \l@yvudia{\l@youtxcii}{0}{\l@youtvdii}
      \fi
      \divide\l@youtvdii by \tw@
      \put(\l@youtxciii,\l@youtvdii){\makebox(0,0)[l]{height}}
    \fi
    \ifnum\l@youtvdi > \z@
      \ifnum\l@youtvdi > 6\relax
        \l@yvuda{\l@youtxcii}{-\l@youtvdi}{\l@youtvdi}
      \else
        \l@yvudia{\l@youtxcii}{-\l@youtvdi}{\l@youtvdi}
      \fi
      \divide\l@youtvdi by \tw@
      \put(\l@youtxciii,-\l@youtvdi){\makebox(0,0)[l]{depth}}
    \fi
    \end{tiny}
  \end{picture}
  \ifdrawparameters
    \begin{center}\begin{footnotesize}\begin{tt}
      \begin{tabular}{lll}
        \textrm{width} = \the\wd\layoutsbox &
        \textrm{height} = \the\ht\layoutsbox &
        \textrm{depth} = \the\dp\layoutsbox \\
      \end{tabular}
    \end{tt}\end{footnotesize}\end{center}
  \fi
}
\endinput
%%
%% End of file `layouts.sty'.
