summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/akktex/akkwidepage.sty
blob: e7f96e11b44a4109a363db9f6287805ae2597adc (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
%=====================================================================================================================================
% Package akkwidepage by Igor Akkerman (c) 2004, 2005
% Package providing wide pages.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License (latest version).
%
% The latest version of this license can be found at
%     http://www.latex-project.org/lppl.txt
%
% This file may only be distributed together with the full 'AkkTeX' bundle.
%=====================================================================================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{akkwidepage}[2005/05/05 by Igor Akkerman (c) 2004, 2005 v1.1.1 Package providing wide pages.]
%=====================================================================================================================================

\makeatletter

% Initialisierungsteil
\RequirePackage{akkconditional}

\newboolean {akk@twoside}

% Deklaration von Optionen
\DeclareOption {twoside}  {\setboolean {akk@twoside} {true}}

% Ausfuehrung von Optionen
\ProcessOptions

% Laden von Paketen

%=====================================================================================================================================

\newlength   \akk@orig@oddsidemargin
\newlength   \akk@orig@evensidemargin
\newlength   \akk@orig@textwidth

\newlength   \akk@default@oddsidemargin
\newlength   \akk@default@evensidemargin
\newlength   \akk@default@textwidth

\setlength   \akk@orig@oddsidemargin     \oddsidemargin
\setlength   \akk@orig@evensidemargin    \evensidemargin
\setlength   \akk@orig@textwidth         \textwidth

\setlength   \akk@default@oddsidemargin  \oddsidemargin
\setlength   \akk@default@evensidemargin \evensidemargin
\setlength   \akk@default@textwidth      \textwidth

\ifbool{akk@twoside} {
    \addtolength \akk@default@oddsidemargin  {-3.00em}
    \addtolength \akk@default@evensidemargin {-5.50em}
}{
    \addtolength \akk@default@oddsidemargin  {-4.25em}
    \addtolength \akk@default@evensidemargin {-4.25em}
}
\addtolength \akk@default@textwidth      { 8.50em}  % = 3cm at 10 pt

\newcommand \akk@widepage@setorigvalues {%
    \setlength   \oddsidemargin              \akk@orig@oddsidemargin%
    \setlength   \evensidemargin             \akk@orig@evensidemargin%
}

\newcommand \akk@widepage@setdefaultvalues {%
    \setlength   \oddsidemargin              \akk@default@oddsidemargin%
    \setlength   \evensidemargin             \akk@default@evensidemargin%
}

\akk@widepage@setdefaultvalues
\setlength   \textwidth                      \akk@default@textwidth %textwidth can only be set in preamble

\makeatother