% Author: Alexey Shipunov, dactylorhiza@gmail.com

\ProvidesPackage{add2}%
        [2019/10/03 v1.01 Save trees: fit as many as possible into the page]

\newif\if@LND % landscape
\DeclareOption{land}{\@LNDtrue}
\DeclareOption{port}{\@LNDfalse}
\newif\if@CLUB % to get rid of widow and orphan lines
\DeclareOption{club}{\@CLUBtrue}
\DeclareOption{noclub}{\@CLUBfalse}

\ExecuteOptions{port,club}
\ProcessOptions

\if@CLUB\else

\clubpenalty=10000
\widowpenalty=10000
\brokenpenalty=10000

\fi

\topmargin=-2cm
\headheight=0cm
\headsep=.5cm

\renewcommand{\baselinestretch}{.95}

\if@LND

        \message{WARNING: Landscape mode!}
        \textwidth=26cm
        \footskip=1cm
        \textheight=18.5cm
        \oddsidemargin=-2.5cm
        \evensidemargin=-2.5cm

\else

        \textheight=25.5cm
        \footskip=.5cm
        \textwidth=19cm
        \oddsidemargin=-1.25cm
        \evensidemargin=-1.75cm

\fi

\endinput