Mercurial > cgi-bin > hgwebdir.cgi > VMS > 0__Writings > nengel
diff 2__Other/cv/simplemargins.sty @ 7:1d37e9d849e8
jsps
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 15 Apr 2013 12:38:12 +0200 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/2__Other/cv/simplemargins.sty Mon Apr 15 12:38:12 2013 +0200 1.3 @@ -0,0 +1,88 @@ 1.4 +% simplemargins.sty 1.5 +% 1.6 +% by Jonathan Kamens (jik@GZA.COM) 1.7 +% March 15, 1993 1.8 +% 1.9 +% This is something that non-hacker-type \LaTeX users have needed for 1.10 +% a long time. It's just really stupid to have to explain how all of 1.11 +% the page dimensions work, and how to use \setlength and \addtolength 1.12 +% to change them, evey time someone who doesn't really care about it 1.13 +% wants to change their margins. This file gives them the ability to 1.14 +% do that easily. 1.15 +% 1.16 +% \setleftmargin{dimen} sets the left margin to that width 1.17 +% \setrightmargin{dimen} sets the right margin to that width 1.18 +% \settopmargin{dimen} sets the top margin to that width 1.19 +% \setbottommargin{dimen} sets the bottommargin to that width 1.20 +% \setallmargins{dimen} sets all four margins to that width 1.21 +% 1.22 +% \setpagewidth{dimen} sets the page width to that width 1.23 +% \setpageheight{dimen} sets the page height to that width 1.24 +% 1.25 +% The page is assumed to be 8.5 x 11 when this file is initially 1.26 +% loaded. If this is not the case, then use 1.27 +% 1.28 +% \setlength{\smpagewidth}{dimen} 1.29 +% \setlength{\smpageheight}{dimen} 1.30 +% 1.31 +% after loading simplemargins to set the actual page width and height, 1.32 +% before using any of the other simplemargins command (*including* 1.33 +% \setpagewidth or \setpageheight, which depend on the previous values 1.34 +% for \smpagewidth and \smpageheight). 1.35 + 1.36 +\typeout{Simplemargins margin control commands <15 Mar 93>.} 1.37 + 1.38 +\newlength{\smpagewidth} 1.39 +\newlength{\smpageheight} 1.40 + 1.41 +\setlength{\smpagewidth}{8.5in} 1.42 +\setlength{\smpageheight}{11in} 1.43 + 1.44 +\newcommand{\setpagewidth}[1]{ 1.45 + \addtolength{\smpagewidth}{-#1} 1.46 + \addtolength{\textwidth}{-\smpagewidth} 1.47 + \setlength{\smpagewidth}{#1} 1.48 +} 1.49 +\newcommand{\setpageheight}[1]{ 1.50 + \addtolength{\smpageheight}{-#1} 1.51 + \addtolength{\textheight}{-\smpageheight} 1.52 + \setlength{\smpageheight}{#1} 1.53 +} 1.54 +\newcommand{\setleftmargin}[1]{ 1.55 + \addtolength{\textwidth}{\oddsidemargin} 1.56 + \addtolength{\textwidth}{1in} 1.57 + \addtolength{\textwidth}{-#1} 1.58 + \setlength{\oddsidemargin}{-1in} 1.59 + \addtolength{\oddsidemargin}{#1} 1.60 + \setlength{\evensidemargin}{\oddsidemargin} 1.61 +} 1.62 +\newcommand{\setrightmargin}[1]{ 1.63 + \setlength{\textwidth}{\smpagewidth} 1.64 + \addtolength{\textwidth}{-\oddsidemargin} 1.65 + \addtolength{\textwidth}{-1in} 1.66 + \addtolength{\textwidth}{-#1} 1.67 +} 1.68 +\newcommand{\settopmargin}[1]{ 1.69 + \addtolength{\textheight}{\topmargin} 1.70 + \addtolength{\textheight}{1in} 1.71 + \addtolength{\textheight}{\headheight} 1.72 + \addtolength{\textheight}{\headsep} 1.73 + \addtolength{\textheight}{-#1} 1.74 + \setlength{\topmargin}{-1in} 1.75 + \addtolength{\topmargin}{-\headheight} 1.76 + \addtolength{\topmargin}{-\headsep} 1.77 + \addtolength{\topmargin}{#1} 1.78 +} 1.79 +\newcommand{\setbottommargin}[1]{ 1.80 + \setlength{\textheight}{\smpageheight} 1.81 + \addtolength{\textheight}{-\topmargin} 1.82 + \addtolength{\textheight}{-1in} 1.83 + \addtolength{\textheight}{-\footskip} 1.84 + \addtolength{\textheight}{-#1} 1.85 +} 1.86 +\newcommand{\setallmargins}[1]{ 1.87 + \settopmargin{#1} 1.88 + \setbottommargin{#1} 1.89 + \setleftmargin{#1} 1.90 + \setrightmargin{#1} 1.91 +}
