\RequirePackage{bazki}
\RequirePackage{cards}
\RequirePackage{ifthen}
\RequirePackage{graphicx}
\RequirePackage{color}
\RequirePackage{geometry}
\RequirePackage{fancyhdr}
\RequirePackage{rotating}

% Secrecy

\newenvironment{secret}{%
  \cleardoublepage%
  \chead{SECRET}%
}{%
  \cleardoublepage%
  \chead{}%
}

% Sheets

\newenvironment{sheet}{%
  \cleardoublepage%
  \newgeometry{hmargin=.7in,vmargin=1in,headsep=.25in}%
  % Update fancyhdr header width for new geometry.
  \headwidth=\textwidth%
  \resetnumbering%
  \begingroup%
  \setcounter{secnumdepth}{0}%
  \lhead{}\rhead{}\lfoot{}\rfoot{}%
}{%
  \cleardoublepage%
  \restoregeometry%
  \headwidth=\textwidth%
  \endgroup%
  \resetnumbering%
  \lhead{\bazlhead}\rhead{\bazrhead}\lfoot{\bazlfoot}\rfoot{\bazrfoot}%
}

% Cards

\AtEndDocument{\flushpage}
\let\orig@cleardoublepage=\cleardoublepage
\def\cleardoublepage{\flushpage\orig@cleardoublepage}

\DoubleCards
\BuildRows
\MarginsXY{10pt}{3pt}
\NoFill

\newdimen\@gap
\@gap=10pt
\newdimen\card@width
\card@width=3.25in
\newdimen\card@height
\card@height=2in
\newdimen\largecard@width
\largecard@width=3.6in
\newdimen\largecard@height
\largecard@height=3.1in

\let\origcard=\card

\newcommand\my@front{}
\newcommand\my@back{}
\renewenvironment{card}[1][]{%
  \sffamily%
  \def\lhead##1{\gdef\card@lhead{##1}}%
  \def\rhead##1{\gdef\card@rhead{##1}}%
  \def\lfoot##1{\gdef\card@lfoot{##1}}%
  \def\rfoot##1{\gdef\card@rfoot{##1}}%
  \def\section##1{{\centering\Large\textbf{##1}\par}\vfill}%
  \def\my@height{\csname #1card@height\endcsname}%
  \def\my@width{\csname #1card@width\endcsname}%
  \newcommand\front[1]{\renewcommand\my@front{##1}}%
  \newcommand\back[1]{\renewcommand\my@back{##1}}%
}{\kicard{\my@width}{\my@height}{\my@front}{\my@back}}
%\newcommand\lcard[1]{%
%  \card[\card@lheight]{#1}}

% This is based on gametex.sty
\newbox\temp@box
\newbox\back@box
\newdimen\temp@dimen
\newdimen\c@height
\newdimen\c@width
\newcommand\kicard[4]{%
  \begingroup%
    \fboxsep=\@gap%
    \advance\fboxsep-2\fboxrule%
    \c@width=#1%
    \advance\c@width-2\@gap%
    \c@height=#2%
    \advance\c@height-2\@gap%
    \baselineskip=0pt%
    \lineskip=0pt%
    \parindent=0pt%
    \def\baselinstretch{0}%
    \gdef\card@lhead{}\gdef\card@rhead{}\gdef\card@lfoot{}\gdef\card@rfoot{}%
    \setbox\temp@box=\hbox{%
      \hsize=\c@width%
      \temp@dimen=\hsize%
      \advance\temp@dimen-2\@gap%
      \hskip\@gap\parbox{\temp@dimen}{#3}%
    }%
    \setbox\temp@box=\vbox{%
      \hsize=\c@width%
      {\small\card@lhead\hfill\card@rhead}%
      \vskip\@gap%
      \vfill%
      \unhbox\temp@box%
      \vfill%
      \vskip\@gap%
      {\small\card@lfoot\hfill\card@rfoot}}%
    \gdef\card@lhead{}\gdef\card@rhead{}\gdef\card@lfoot{}\gdef\card@rfoot{}%
    \setbox\back@box=\hbox{%
      \hsize=\c@width%
      \temp@dimen=\hsize%
      \advance\temp@dimen-2\@gap%
      \hskip\@gap\parbox{\temp@dimen}{#4}%
    }%
    \setbox\back@box=\vbox{%
      \hsize=\c@width%
      {\small\card@lhead\hfill\card@rhead}%
      \vskip\@gap%
      \vfill%
      \unhbox\back@box%
      \vfill%
      \vskip\@gap
      {\small\card@lfoot\hfill\card@rfoot}}%
    \temp@dimen=\ht\temp@box%
    \advance\temp@dimen by \dp\temp@box%
    \ifdim\temp@dimen>\c@height%
      \c@height=\temp@dimen%
    \fi%
    \temp@dimen=\ht\back@box%
    \advance\temp@dimen by \dp\back@box%
    \ifdim\temp@dimen>\c@height%
      \c@height=\temp@dimen%
    \fi%
    \doublecard{\fbox{\vbox to \c@height{\unvbox\temp@box}}}
      {\mbox{\vbox to \c@height{\unvbox\back@box}}}%
  \endgroup%
}

\newdimen\packetspace    \packetspace = 15pt
\newdimen\packetwidth    \packetwidth = 3.5in
\newdimen\par@wd
\def\vdotfill{\vbox to\vsize{\leaders\vbox to2pt{\tiny\smash.\vfil}\vfil}}
\def\hdotfill{\hbox to\hsize{\leaders\hbox to2pt{\tiny\smash.\hfil}\hfil}}

%% Originally from GameTeX
%%%%%
%% \EnvelopePacket{topleft}{topright}{bottomleft}{bottomright}{front}{text}
\long\def\EnvelopePacket#1#2#3#4#5#6{%
  \begingroup%
    \sffamily%
    \setcounter{secnumdepth}{0}%
    \packetspace.5\packetspace%
    \fboxsep=-\fboxrule%
    \baselineskip=0pt%
    \lineskip=0pt%
    \parindent=0pt%
    \def\baselinstretch{0}%
    \card{\vbox{\hsize=\packetwidth%
      \centering
      \fbox{\vbox{\advance\hsize-.5in%
        \leftskip=\packetspace%
        \rightskip=\packetspace%
        \par@wd=\hsize%
        \advance\par@wd-2\packetspace%
        \vskip\packetspace%
        \parbox{\par@wd}{{\scriptsize\mbox{#1}\hfill\mbox{#2}}\hfill}
        \vskip\packetspace%
        \parbox{\par@wd}{\raggedright\small#5\hfil}
        \vskip\packetspace%
        \parbox{\par@wd}{{\scriptsize\mbox{#3}\hfill\mbox{#4}}\hfill}
        \vskip\packetspace%
      }}%
      \vskip.5\packetspace
      \hdotfill
      \vskip.5\packetspace
      \fbox{\vbox{%
        \leftskip=\packetspace%
        \rightskip=\packetspace%
        \par@wd=\hsize%
        \advance\par@wd-2\packetspace%
        \vskip\packetspace%
        \parbox{\par@wd}{{\em\tiny\mbox{#1}\hfill\mbox{#2}}\hfill}
        \vskip\packetspace%
        \parbox{\par@wd}{#6\hfil}
        \vskip\packetspace%
        \parbox{\par@wd}{{\em\tiny\mbox{#3}\hfill\mbox{#4}}\hfill}
        \vskip\packetspace%
      }%
    }%
  }}%
\endgroup}

\newbox\text@box
\newbox\trig@box
\newdimen\text@ht
\newdimen\trig@ht
\newdimen\tot@ht

\def\fold@one{%
  \makebox[0pt][r]{\hbox{%
    \leftskip=0pt plus1fil%
    \rightskip=0pt%
    \lineskip=1pt%
    \def\baselinstretch{0}%
    \vsize=\tot@ht%
    \vbox to\tot@ht{%
      \vfill%
      \tiny\textbf{1.}\break fold\break back\break here\break%
      \vfill}%
    \vdotfill}}%
  }

\def\fold@two{%
  \vbox to0pt{%
    \leftskip=0pt plus1fil%
    \rightskip=0pt plus1fil%
    \lineskip=1pt%
    \def\baselinstretch{0}%
    \hsize=.5\packetwidth%
    \tiny\hdotfill\break\textbf{2.} fold back here\break%
    \vskip0pt minus1fil}%
  }

\def\@staple{%
  \smash{\hbox to\hsize{\hfil\tiny\textbf{3.} staple here\hfil}}%
  }

%% \FoldingPacket{upperleft}{upperright}{lowerleft}{lowerright}{front}{text}
\long\def\FoldingPacket#1#2#3#4#5#6{%
  \begingroup%
    \sffamily%
    \fboxsep=0pt%
    \baselineskip=0pt%
    \lineskip=0pt%
    \parindent=0pt%
    \def\baselinstretch{0}%
    \setbox\trig@box=\vbox{%
        \leftskip=\packetspace%
        \rightskip=\packetspace%
        \hsize=.5\packetwidth%
        \par@wd=\hsize%
        \advance\par@wd-2\packetspace%
        \vskip\packetspace
        \@staple
        \vskip\packetspace
        \parbox{\par@wd}{\tiny#1\\#2\hfil}
        \vskip\packetspace \vfill
        \parbox{\par@wd}{#5\hfil}
        \vskip\packetspace \vfill
        \parbox{\par@wd}{\tiny#3\\#4\hfil}
        \vskip\packetspace \vfill}%
    \setbox\text@box=\vbox{%
        \leftskip=\packetspace%
        \rightskip=\packetspace%
        \hsize=\packetwidth%
        \par@wd=\hsize%
        \advance\par@wd-2\packetspace%
        \vskip2\packetspace%
        \parbox{\par@wd}{\scriptsize#1\hfill#2\hfill}
        \vskip\packetspace \vfill
        \parbox{\par@wd}{#6\hfil}
        \vskip\packetspace \vfill
        \parbox{\par@wd}{\scriptsize#3\hfill#4\hfill}
        \vskip2\packetspace\vfill}%
    \text@ht=\ht\text@box%
    \advance\text@ht by\dp\text@box%
    \trig@ht=\ht\trig@box%
    \advance\trig@ht by\dp\trig@box%
    \tot@ht=\text@ht%
    \ifdim\tot@ht<2\trig@ht%
      \tot@ht=2\trig@ht%
    \fi%
    \doublecard%
      {\framebox[\packetwidth]{%
        \hfill\fold@one%
        \vbox to\tot@ht{\unvbox\trig@box\fold@two\vskip.5\tot@ht}}}%
      {\makebox[\packetwidth]{%
        \vbox to\tot@ht{\unvbox\text@box}}}%
  \endgroup}


% Notebooks

%% Originally from GameTeX
%%%%%

\newdimen\whitespace     \whitespace = 15pt
\newdimen\bookwidth      \bookwidth  = \textwidth
\newdimen\bookheight     \bookheight = 3in

\def\fold@back{%
  \makebox[0pt][r]{\hbox{%
    \leftskip=0pt plus1fil%
    \rightskip=0pt%
    \lineskip=1pt%
    \def\baselinstretch{0}%
    \vbox to\vsize{%
      \vfill%
      \tiny\break fold\break back\break here\break%
      \vfill}%
    \vdotfill}}}


%%%%%
%% \begin{nbpage}{<string>}  <contents>  \end{nbpage}
\newcommand\nbpage[2][]{\begingroup%
  \edef\identifier{#2}%
  \fboxsep=-\fboxrule%
  \baselineskip=0pt%
  \parindent=0pt%
  \def\baselinstretch{0}%
  \setbox\temp@box=\vbox\bgroup%
      \hsize\bookwidth%
      \advance\hsize-2\whitespace%
      \leftskip\whitespace plus1fil%
      \rightskip\whitespace plus1fil%
      \vskip2\whitespace%
      {\@nbul\hfill\@nbur}
      \vskip\whitespace\vfill%
      \temp@dimen\hsize%
      \advance\temp@dimen-\leftskip%
      \advance\temp@dimen-\rightskip%
      \begin{minipage}{\temp@dimen}%
        \parindent0pt%
        \parskip.5\baselineskip%
        \relax\small%
  }

\def\endnbpage{%
        \relax%
      \end{minipage}%
      \vskip\whitespace\vfill%
      {\@nbll\hfill\@nblr}
      \vskip2\whitespace%
      \egroup%
  \temp@dimen\ht\temp@box%
  \advance\temp@dimen\dp\temp@box%
  \ifdim\temp@dimen>\bookheight%
    \bookheight\temp@dimen%
    \typeout{! notebook page oversized}
  \fi%
  \doublecard%
    {\fbox{\hbox to\bookwidth{\vsize\bookheight\relax%
      \hfill
      \raisebox{.5\vsize}{%
        \rotatebox[origin=c]{90}{\tiny staple binding along here}}%
      \hfill
      \vbox to\vsize{\unvbox\temp@box}%
      }}}%
    {\mbox{\hbox to\bookwidth{\vsize\bookheight\relax%
      \vbox to\vsize{
        \hsize\bookwidth%
        \advance\hsize-2\whitespace%
        \divide\hsize2%
        \leftskip\whitespace plus1fil%
        \rightskip\whitespace plus1fil%
        \vskip.5\whitespace
        {\tiny staple along here}\break
        \vfill
        \parbox{.3\hsize}{\centering%
          {\bfseries\Large\identifier}\\[.5\whitespace]%
          \tiny Do not open this page until you are directed to do so.%
          }\break
        \vfill
        }%
      \fold@back
      \hfill
      }}}%
  \endgroup}

%% \startnotebook{upperleft}{upperright}{lowerleft}{lowerright}{<front>}
%%  <pages>  
%% \endnotebook
\long\def\startnotebook#1#2#3#4#5#6\endnotebook{%
  \flushpage%
  \begingroup%
    \fboxsep=-\fboxrule%
    \baselineskip=0pt%
    \parindent=0pt%
    \def\baselinstretch{0}%
    \advance\bookwidth-2\whitespace%
    \divide\bookwidth2%
    \setbox\temp@box=\vbox{%
        \hsize\bookwidth%
        \leftskip\whitespace plus1fil%
        \rightskip\whitespace plus1fil%
        \vskip2\whitespace%
        {\footnotesize#1\hfill#2}
        \vskip\whitespace\vfill%
        \temp@dimen\hsize%
        \advance\temp@dimen-\leftskip%
        \advance\temp@dimen-\rightskip%
        \begin{minipage}{\temp@dimen}%
          \parindent0pt%
          \parskip.5\baselineskip%
          {\small#5}%
        \end{minipage}%
        \vskip\whitespace\vfill%
        {\footnotesize#3\hfill#4}
        \vskip2\whitespace%
      }%
    \temp@dimen\ht\temp@box%
    \advance\temp@dimen\dp\temp@box%
    \ifdim\temp@dimen>\bookheight%
      \bookheight\temp@dimen%
      \typeout{! notebook cover oversized}
    \fi%
    \advance\bookwidth2\whitespace%
    \card%
      {\fbox{\hbox to\bookwidth{\vsize\bookheight\relax%
        \hfill
        \raisebox{.5\vsize}{%
          \rotatebox[origin=c]{90}{\tiny staple binding along here}}%
        \hfill
        \vbox to\vsize{\unvbox\temp@box}%
        }}}%
  \endgroup%
  \def\@nbul{#1}%
  \def\@nbur{#2}%
  \def\@nbll{#3}%
  \def\@nblr{#4}%
  #6
  \cleardoublepage}

%%%%%
%% \badgeheight and \badgewidth are the total height and width of
%% the _folded_ namebadge, i.e. has to be at least smaller than
%% a badgeholder.  Actual printed image (to be folded) is twice
%% as wide.
%% \whitespace is the spacing around the inside of the frame.
\newdimen\badgewidth   \badgewidth  = 3.1in
\newdimen\badgeheight  \badgeheight = 2in
\newdimen\whitespace   \whitespace  = 3pt
\definecolor{badgeback}{gray}{.25}

%%%%%
%% \NameBadge[dark]{ul}{ur}{ll}{lr}{front}
\newcommand{\NameBadge}[6][light]{%
  \begingroup%
  \sffamily%
  \def\lefttop{#2}%
  \def\righttop{#3}%
  \def\leftbottom{#4}%
  \def\rightbottom{#5}%
  %
  \gdef\badge@multiplier{1}%
  \gdef\badgehead@font{}%
  \gdef\badge@maybe##1{##1}%
  \def\chapter##1{{\LARGE\textbf{##1}}\vfill}%
  \def\section##1{{\Large\textbf{##1}}\vfill}%
  \def\subsection##1{{\large##1}\vfill}%
  % 
  \def\backtext{I'M NOT HERE}
    \doublecard%
      {\csname #1@badge\endcsname{%
        #6}}%
      {\badge@maybe{\badge@note}}%
  \endgroup}

%%%%%
%% Internal macros, increasingly more internal
\long\def\light@badge#1{%
  \hbox{\light@side{#1}\hskip\whitespace\badge@back}%
  \double@badge
  }

\long\def\simple@badge#1{%
  \hbox{\light@side{#1}}%
  \single@badge
  }

\long\def\mini@badge#1{%
  \gdef\badge@multiplier{.7}%
  \gdef\badgehead@font{\scriptsize}%
  \gdef\badge@maybe##1{}%
  \def\chapter##1{{\large\textbf{##1}}\vfill}%
  \def\section##1{{\normalsize\textbf{##1}}\vfill}%
  \def\subsection##1{{\small##1}\vfill}%
  \hbox{\light@side{#1}}%
  \single@badge
  }

\long\def\dark@badge#1{%
  \hbox{\dark@side{#1}}%\hskip\whitespace\badge@back}%
  \single@badge
  }

\def\badge@back{%
  \dark@side{\bfseries\Huge\backtext\vfil}}

\def\double@badge{\gdef\badgeback@start{%
    \hsize=2\badgewidth%
    \leftskip=\badgewidth plus1fil%
}}
\def\single@badge{\gdef\badgeback@start{%
    \hsize=\badge@multiplier\badgewidth%
    \leftskip=0pt plus1fil%
}}

\def\badge@note{%
  \vbox to\badgeheight{\badgeback@start
    \rightskip=0pt plus1fil%
    \vfill
    \fboxsep=5pt%
    \fbox{\fbox{\parbox{.6\badgewidth}{%
      \centering%
      \Large\bfseries\leftbottom\par\rightbottom\par
      Name Badge\par\vskip5pt
      \normalsize(turn to other side)
      }}}%
    \vfill}%
  }

\newbox\@badgebox
\newdimen\@badgedimen

\long\def\light@side#1{%
  \begingroup%
    \fboxsep=0pt%
    \fboxrule=.3pt%
    \baselineskip=0pt%
    \lineskip=2pt%
    \parindent=0pt%
    \def\baselinestretch{0}%
    \setbox\@badgebox=\vbox{%
        \centering%
        \leftskip=\whitespace plus1fil%
        \rightskip=\whitespace plus1fil%
        \hsize=\badge@multiplier\badgewidth%
        \vskip\whitespace
        {\badgehead@font\lefttop \hfill \righttop} \vfill
        {#1}
        \vfill
        {\badgehead@font\leftbottom \hfill \rightbottom}
        \vskip\whitespace}%
    \@badgedimen\ht\@badgebox%
    \advance\@badgedimen\dp\@badgebox%
    \badgeheight\badge@multiplier\badgeheight%
    \ifdim\@badgedimen>\badgeheight%
      \badgeheight\@badgedimen%
      \typeout{! badge oversized}%
    \fi%
    \fbox{\vbox to\badgeheight{\unvbox\@badgebox}}%
  \endgroup}

\long\def\dark@side#1{%
  \begingroup%
    \fboxsep=0pt%
    \fboxrule=.3pt%
    \baselineskip=0pt%
    \lineskip=1pt%
    \parindent=0pt%
    \def\baselinestretch{0}%
    \setbox\@badgebox=\vbox{%
        \centering%
        \leftskip=\whitespace plus1fil%
        \rightskip=\whitespace plus1fil%
        \hsize=\badgewidth%
        \vskip\whitespace
        \lefttop \hfill \righttop \vfill
        {#1}
        \vfill
        \leftbottom \hfill \rightbottom
        \vskip\whitespace}%
    \@badgedimen\ht\@badgebox%
    \advance\@badgedimen\dp\@badgebox%
    \badgeheight\badge@multiplier\badgeheight%
    \ifdim\@badgedimen>\badgeheight%
      \badgeheight\@badgedimen%
      \typeout{! badge oversized}%
    \fi%
    \fbox{\colorbox{badgeback}{\color{white}%
      \vbox to\badgeheight{\unvbox\@badgebox}}}%
  \endgroup}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\headfoot#1#2#3#4{%
  \def\lefttop{#1}%
  \def\righttop{#2}%
  \def\leftbottom{#3}%
  \def\rightbottom{#4}%
}

%%%%%
%% \headfoot{ul}{ur}{ll}{lr}
%% \Sign[\Big|\Medium|\Small]
%%      {<name>}{<location>}{<text>}
%%      {<backname>|\standard}{<back>|\standard}{blurb}
%%
%% These are for things that are taped to walls, or taped to
%% packets that are taped to walls.
\newcommand{\Sign}[7][\Big]{%
  \begingroup%
    \def\signsize{}%
    \def\namesize{}%
    \def\locsize{}%
    \def\textsize{}%
    %
    \def\Big{%
      \signwidth\textwidth%
      \signheight\textheight%
      \def\signsize{\Large}%
      \def\namesize{\Huge}%
      \def\locsize{\Large}%
      \def\textsize{\large}%
      \def\backsize{\huge}%
    }%
    \def\Medium{%
      \signwidth\mediumwidth%
      \signheight\mediumheight%
      \def\signsize{\normalsize}%
      \def\backsize{\normalsize}%
    }%
    \def\Small{%
      \signwidth\smallwidth%
      \signheight\smallheight%
      \whitespace5pt%
      \def\signsize{\small}%
      \def\textsize{\baselineskip=0pt\relax}%
      \def\backsize{\whitespace5pt\scriptsize}%
    }
    #1%
    %
    \def\name{#2}%
    \def\location{\locsize#3}%
    \def\text{#4}%
    \def\backname{#5}%
    \def\backtext{#6}%
    \def\blurb{#7}%
    %
    \doublecard%
      {\signsize\@signfront{\namesize\name}{\textsize\text}}%
      {\ifx\backname\empty\backsize\@signback\else\@signfront{\namesize\backname}{\textsize\backtext}\fi}%
  \endgroup}


%%%%%
%%
\newdimen\whitespace    \whitespace = 10pt
\newdimen\signwidth     \signwidth  = 3.6in
\newdimen\signheight    \signheight = 3.6in
\def\mediumwidth{3.8in}
\def\mediumheight{4.5in}
\def\smallwidth{3in}
\def\smallheight{1.8in}
\def\stripwidth{3.8in}
\def\dotwidth{.75in}

\long\def\@signfront#1#2{%
  \begingroup%
    \fboxsep=-\fboxrule%
    \baselineskip=0pt%
    \parindent=0pt%
    \def\baselinstretch{0}%
    \fbox{\vbox to\signheight{\hsize\signwidth%
      \leftskip\whitespace plus1fil%
      \rightskip\whitespace plus1fil%
      \vskip\whitespace%
      {\mbox{\lefttop}\hfill\mbox{\righttop}}\break\vfill
      {\bfseries\location}\break\vfill
      {\fboxsep\whitespace\fbox{\parbox{.7\signwidth}{%
        \centering\bfseries#1}}}\break\vfill
      {\parbox{.7\signwidth}{\parskip.5\baselineskip\raggedright#2}}%
      \break\vfill\vfill\vfill
      {\lineskip=3pt\centering\blurb}\break
      \vfill
      {\mbox{\leftbottom}\hfill\mbox{\rightbottom}}\break
      \vskip\whitespace}}%
  \endgroup}

\def\@signback{%
  \begingroup%
    \parindent=0pt%
    \def\baselinstretch{0}%
    \fboxsep=\whitespace%
    \fbox{\fbox{\vbox to.4\signheight{\hsize.6\signwidth%
      \leftskip.1\whitespace plus1fil%
      \rightskip.1\whitespace plus1fil%
      \vskip.1\whitespace%
      \mbox{\lefttop}\hfill\mbox{\righttop}\break\vfill
      \centering
      This is a sign being used by the MIT Assassins' Guild.\break\vfill
      Please do not throw this away.\break
      \vskip.1\whitespace}}}%
  \endgroup}

% \imageheader{\includegraphics}{width}{height}{title}
\def\line@across{\mbox{}\leaders\hrule height.6ex depth-.55ex\hfill\null}
\long\def\imageheader#1#2#3#4{{%
  \def\icon@width{#2}
  \noindent%
  \valign{\centering \vfil##\vfil\cr%
    \hsize=\icon@width#1\cr%
    \advance\hsize-\icon@width%
    \parindent5pt%
    {\line@across}%
    \break\vfil%
    {\Large#4}%
    \break\vfil%
    {\line@across}%
    \cr}%
  \vskip5pt%
  \vskip\parskip%
  }}

\long\def\upsidedown#1{%
  \begin{turn}{180}
    \begin{minipage}{7.5in}
      #1
    \end{minipage}
  \end{turn}}

% \begin{pagefold}
%   \pfpart{height}{content}
% \end{pagefold}
\newenvironment{pagefold}{%
  \cleardoublepage
  \long\def\pfpart##1##2{%
    \noindent
    \hskip.25in%
    \parbox{7.5in}{%
      \vbox to ##1{\vfill##2\vfill}}%
  }
}{%
  \cleardoublepage
}