summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:11:05 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:11:05 +0000
commit799f98e6621cc3c0b6b90bfafa709a11da49b1be (patch)
tree2d87f6a31ee05402b5db0f745f0feb65e6f79c3a
parent86a9cac027ca280e64d05d1392ac4457eb1a1508 (diff)
vmargin
git-svn-id: svn://tug.org/texlive/trunk@1442 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/latex/vmargin/vmargin.sty210
1 files changed, 210 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/vmargin/vmargin.sty b/Master/texmf-dist/tex/latex/vmargin/vmargin.sty
new file mode 100644
index 00000000000..c721bf3c50e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/vmargin/vmargin.sty
@@ -0,0 +1,210 @@
+%%
+%% This is file `vmargin.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% vmargin.dtx (with options: `package')
+%%
+%% File: vmargin.dtx Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000, 2002,
+%% 2004
+%% by Volker Kuhlmann <VolkerKuhlmann@GMX.de>
+%% All rights are reserved.
+%%
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+\def\filename{vmargin}
+\def\fileversion{V2.5}
+\def\filedate{2004/07/15}
+\@ifundefined{Vmargin}{}{\endinput}
+\@ifundefined{documentclass}{
+ \edef\Vmargin{Style `\filename', \fileversion, \filedate}
+ \expandafter\everyjob\expandafter{\the\everyjob\typeout{\Vmargin}}
+ \typeout{\Vmargin}
+}{
+ \NeedsTeXFormat{LaTeX2e}[1994/06/01]
+ \edef\Vmargin{\filedate\space\fileversion\space set document margins (VK)}
+ \ProvidesPackage{\filename}[\Vmargin]
+ \edef\Vmargin{Package: \filename\space\Vmargin}
+ \expandafter\everyjob\expandafter{\the\everyjob\typeout{\Vmargin}}
+ \typeout{\Vmargin}
+}
+\newdimen\PaperWidth
+\newdimen\PaperHeight
+\newif\ifLandscape
+\def\setpapersize{\@ifnextchar[{\@@setps}{\@@setps[portrait]}}
+\def\@@setps[#1]{%
+ \@ifundefined{po@#1}{\@name@err{#1}}{\@nameuse{po@#1}}%
+ \@@@setps}
+\def\@@@setps#1{%
+ \@ifundefined{paper@#1}{\@name@err{#1}}{}%
+ \csname paper@#1\endcsname}
+ % \usename{paper@#1} inside arg to \@ifundefined does not work
+ % with papersize "custom".
+\def\po@portrait{\Landscapefalse}
+\def\po@landscape{\Landscapetrue}
+\def\@po@{\ifLandscape
+ \dimen0\PaperWidth\PaperWidth\PaperHeight\PaperHeight\dimen0
+ \fi
+ \@ifundefined{paperwidth}{}{\paperwidth\PaperWidth}%
+ \@ifundefined{paperheight}{}{\paperheight\PaperHeight}%
+ \@ifundefined{pdfpagewidth}{}{\pdfpagewidth\PaperWidth}%
+ \@ifundefined{pdfpageheight}{}{\pdfpageheight\PaperHeight}%
+ }
+\@ifundefined{PackageError}{
+ \def\@name@err#1{%
+ \typeout{*****> \string\setpapersize: illegal parameter: #1}}
+}{
+ \def\@name@err#1{\PackageError{\filename}%
+ {Paper size or orientation unknown: #1}{}}
+}
+\def\@defmetricpaper#1#2#3{%
+ \begingroup
+ \count0=0
+ \def\w{\dimen1 }\def\h{\dimen2 }\def\s{\dimen3 }%
+ \w#2\h#3
+ \def\l{11}
+ \loop
+ \begingroup
+ \def\t{\the\count0}
+ \catcode`\t=11 % letter
+ \expandafter\xdef\csname paper@#1\the\count0\endcsname{%
+ \PaperWidth\the\w\PaperHeight\the\h\noexpand\@po@}
+ \endgroup
+ \s\w\w.5\h\h\s
+ \ifnum\the\count0<9
+ \advance\count0 by 1
+ \repeat
+ \endgroup
+}
+\@defmetricpaper{A}{840.9mm}{1189.2mm}
+\@defmetricpaper{B}{1000mm}{1414mm}
+\@defmetricpaper{C}{917mm}{1297mm}
+\let\@defmetricpaper=\relax
+\def\paper@USletter{\PaperWidth 8.5in \PaperHeight 11in \@po@}
+\def\paper@USlegal{\PaperWidth 8.5in \PaperHeight 14in \@po@}
+\def\paper@USexecutive{\PaperWidth 7.25in\PaperHeight 10.5in \@po@}
+\def\paper@custom#1#2{\PaperWidth#1\PaperHeight#2\@po@}
+\@ifundefined{margin@offset}{%
+\def\margin@offset{%
+ \if@shiftmargins
+ \oddsidemargin -1truein\evensidemargin\oddsidemargin\topmargin\oddsidemargin
+ \hoffset\z@\voffset\z@
+ \else
+ \oddsidemargin\z@\evensidemargin\z@\topmargin\z@
+ \hoffset -1truein\voffset\hoffset
+ \fi
+}}{}
+\newif\if@shiftmargins
+\@shiftmarginsfalse % this MUST be default (pageframe.sty)
+\def\shiftmargins{\@shiftmarginstrue}
+\newcommand\setmargins[8]{%
+\margin@offset
+\advance\oddsidemargin #1
+\advance\evensidemargin \PaperWidth % = paperwidth - left - width
+\advance\evensidemargin -#1
+\advance\evensidemargin -#3
+\advance\topmargin #2
+\textwidth #3
+\textheight #4
+\headheight #5
+\headsep #6
+\@ifundefined{footheight}{}{\footheight=#7}%
+\footskip #8
+\chk@dimen{#1}{#2}{#3}{#4}%
+}
+\newcommand\setmarginsrb[8]{%
+\margin@offset
+\textwidth \PaperWidth % = paperwidth
+\advance\textwidth -#1 % - left - right
+\advance\textwidth -#3
+\textheight \PaperHeight % = paperheight - top
+\advance\textheight -#2 % - headheight
+\advance\textheight -#5 % - headsep
+\advance\textheight -#6 % - footskip - bottom
+\advance\textheight -#8
+\advance\textheight -#4
+\advance\oddsidemargin #1
+\advance\evensidemargin \PaperWidth % = paperwidth - left - width
+\advance\evensidemargin -#1
+\advance\evensidemargin -\textwidth
+\advance\topmargin #2
+\headheight #5
+\headsep #6
+\@ifundefined{footheight}{}{\footheight=#7}%
+\footskip #8
+\chk@dimen{#1}{#2}{#3}{#4}%
+}
+\newcommand\setmargnohf[4]{%
+\setmargins{#1}{#2}{#3}{#4}\z@\z@\z@\z@
+\pagestyle{empty}}
+\newcommand\setmargnohfrb[4]{%
+\setmarginsrb{#1}{#2}{#3}{#4}\z@\z@\z@\z@
+\pagestyle{empty}}
+\newcommand\setmarg[4]{%
+\setmargins{#1}{#2}{#3}{#4}%
+ \headheight\headsep\footheight\footskip}
+\newcommand\setmargrb[4]{%
+\setmarginsrb{#1}{#2}{#3}{#4}%
+ \headheight\headsep\footheight\footskip}
+\def\chk@dimen#1#2#3#4{%
+\dimen0= #1
+\advance\dimen0 by#3
+\advance\dimen0 -\PaperWidth
+\dimen1= #2
+\advance\dimen1 by#4
+\advance\dimen1 \headheight
+\advance\dimen1 \headsep
+\advance\dimen1 \footskip
+\advance\dimen1 -\PaperHeight
+\chk@dimen@err
+}
+\@ifundefined{PackageError}{
+ \def\chk@dimen@err{%
+ \ifnum\dimen0>\z@\typeout{vmargin Warning: Horizontal dimensions
+ exceed paper width by \the\dimen0}\fi
+ \ifnum\dimen1>\z@\typeout{vmargin Warning: Vertical dimensions
+ exceed paper height by \the\dimen1}\fi
+ }
+}{
+ \def\chk@dimen@err{%
+ \ifnum\dimen0>\z@\PackageError{\filename}{%
+ Horizontal dimensions exceed paper width by \the\dimen0}{}\fi
+ \ifnum\dimen1>\z@\PackageError{\filename}{%
+ Vertical dimensions exceed paper height by \the\dimen1}{}\fi
+ }
+}
+\setpapersize{A4}
+\def\@hf@dflt{}
+\@ifundefined{DeclareOption}{
+}{
+ \DeclareOption{shiftmargins}{\shiftmargins}
+ \DeclareOption{portrait}{\Landscapefalse}
+ \DeclareOption{landscape}{\Landscapetrue}
+ \DeclareOption{nohf}{\def\@hf@dflt{y}}
+ \DeclareOption*{\@@@setps{\CurrentOption}}
+ \ProcessOptions\relax % process options in order of declaration!
+}
+\if y\@hf@dflt
+ \setmargnohfrb{35mm}{20mm}{25mm}{15mm}%
+\else
+ \setmarginsrb{35mm}{20mm}{25mm}{15mm}{12pt}{11mm}{0pt}{11mm}%
+\fi
+\endinput
+%%
+%% End of file `vmargin.sty'.