view 2__Other/cv/simplemargins.sty @ 9:ab6d1911a65f

report final (I hope)
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Wed, 19 Jun 2013 16:16:04 +0200
parents
children
line source
1 % simplemargins.sty
2 %
3 % by Jonathan Kamens (jik@GZA.COM)
4 % March 15, 1993
5 %
6 % This is something that non-hacker-type \LaTeX users have needed for
7 % a long time. It's just really stupid to have to explain how all of
8 % the page dimensions work, and how to use \setlength and \addtolength
9 % to change them, evey time someone who doesn't really care about it
10 % wants to change their margins. This file gives them the ability to
11 % do that easily.
12 %
13 % \setleftmargin{dimen} sets the left margin to that width
14 % \setrightmargin{dimen} sets the right margin to that width
15 % \settopmargin{dimen} sets the top margin to that width
16 % \setbottommargin{dimen} sets the bottommargin to that width
17 % \setallmargins{dimen} sets all four margins to that width
18 %
19 % \setpagewidth{dimen} sets the page width to that width
20 % \setpageheight{dimen} sets the page height to that width
21 %
22 % The page is assumed to be 8.5 x 11 when this file is initially
23 % loaded. If this is not the case, then use
24 %
25 % \setlength{\smpagewidth}{dimen}
26 % \setlength{\smpageheight}{dimen}
27 %
28 % after loading simplemargins to set the actual page width and height,
29 % before using any of the other simplemargins command (*including*
30 % \setpagewidth or \setpageheight, which depend on the previous values
31 % for \smpagewidth and \smpageheight).
33 \typeout{Simplemargins margin control commands <15 Mar 93>.}
35 \newlength{\smpagewidth}
36 \newlength{\smpageheight}
38 \setlength{\smpagewidth}{8.5in}
39 \setlength{\smpageheight}{11in}
41 \newcommand{\setpagewidth}[1]{
42 \addtolength{\smpagewidth}{-#1}
43 \addtolength{\textwidth}{-\smpagewidth}
44 \setlength{\smpagewidth}{#1}
45 }
46 \newcommand{\setpageheight}[1]{
47 \addtolength{\smpageheight}{-#1}
48 \addtolength{\textheight}{-\smpageheight}
49 \setlength{\smpageheight}{#1}
50 }
51 \newcommand{\setleftmargin}[1]{
52 \addtolength{\textwidth}{\oddsidemargin}
53 \addtolength{\textwidth}{1in}
54 \addtolength{\textwidth}{-#1}
55 \setlength{\oddsidemargin}{-1in}
56 \addtolength{\oddsidemargin}{#1}
57 \setlength{\evensidemargin}{\oddsidemargin}
58 }
59 \newcommand{\setrightmargin}[1]{
60 \setlength{\textwidth}{\smpagewidth}
61 \addtolength{\textwidth}{-\oddsidemargin}
62 \addtolength{\textwidth}{-1in}
63 \addtolength{\textwidth}{-#1}
64 }
65 \newcommand{\settopmargin}[1]{
66 \addtolength{\textheight}{\topmargin}
67 \addtolength{\textheight}{1in}
68 \addtolength{\textheight}{\headheight}
69 \addtolength{\textheight}{\headsep}
70 \addtolength{\textheight}{-#1}
71 \setlength{\topmargin}{-1in}
72 \addtolength{\topmargin}{-\headheight}
73 \addtolength{\topmargin}{-\headsep}
74 \addtolength{\topmargin}{#1}
75 }
76 \newcommand{\setbottommargin}[1]{
77 \setlength{\textheight}{\smpageheight}
78 \addtolength{\textheight}{-\topmargin}
79 \addtolength{\textheight}{-1in}
80 \addtolength{\textheight}{-\footskip}
81 \addtolength{\textheight}{-#1}
82 }
83 \newcommand{\setallmargins}[1]{
84 \settopmargin{#1}
85 \setbottommargin{#1}
86 \setleftmargin{#1}
87 \setrightmargin{#1}
88 }