summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/shipunov/add2-shipunov.sty
blob: 171efdf1671a979dcfa16612d66d4f2f4247176a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% 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