Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/latex/misc/anysize.sty

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% anysize.sty --- version 1.0 --- Aug 13, 1994
% set the paper&margin sizes in  \LaTeX2e
% This style is LaTeX2e-conformant 
%   and will not run under ANY older version of LaTeX!
% idea and first implementation: Michael Salzenberg
% further programming, documentation and maintainance:
%         Thomas Esser ([email protected])
%         Dirk Hillbrecht ([email protected])
% documentation: anysize.tex/dvi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
\NeedsTeXFormat{LaTeX2e}
\def\filename{anysize.sty}
\def\filedate{1994/08/13}
\def\fileversion{1.0}
\ProvidesPackage{anysize}[\filedate\space\fileversion\space
                         Contributed LaTeX2e package]
\typeout{Package: `anysize' \fileversion\space <\filedate>}
%
\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}}
\DeclareOption{a5paper}
   {\setlength\paperheight {210mm}%
    \setlength\paperwidth  {148mm}}
\DeclareOption{b5paper}
   {\setlength\paperheight {250mm}%
    \setlength\paperwidth  {176mm}}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{legalpaper}
   {\setlength\paperheight {14in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{executivepaper}
   {\setlength\paperheight {10.5in}%
    \setlength\paperwidth  {7.25in}}
\DeclareOption{landscape}
   {\setlength\@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {\@tempdima}}
%
% change paragraphe indenting (as in  lkurz.dvi)
\DeclareOption{germanpar}
   {\setlength{\parindent}{0pt}%
    \setlength{\parskip}{5pt plus 2pt minus 1pt}}
% A4 is default paper size, if there is nothing set in the documentclass-statement
\ExecuteOptions{a4paper}
\ProcessOptions
% standard settings (DIN A4)
\newdimen\@Leftmargin   \@Leftmargin=3.0cm
\newdimen\@Rightmargin  \@Rightmargin=2.0cm
\newdimen\@Topmargin    \@Topmargin=2.0cm
\newdimen\@Bottommargin \@Bottommargin=2.0cm
%
\def\InitLayout{
  \setlength{\textwidth}{\paperwidth}
  \addtolength{\textwidth}{-\@Leftmargin}
  \addtolength{\textwidth}{-\@Rightmargin}
  \setlength{\textheight}{\paperheight}
  \addtolength{\textheight}{-\@Topmargin}
  \addtolength{\textheight}{-\@Bottommargin}
  \addtolength{\textheight}{-\headheight}
  \addtolength{\textheight}{-\headsep}
  \addtolength{\textheight}{-\footskip}
  \setlength{\oddsidemargin}{\@Leftmargin}
  \addtolength{\oddsidemargin}{-1in}
  \setlength{\evensidemargin}{\@Rightmargin}
  \addtolength{\evensidemargin}{-1in}
  \setlength{\topmargin}{\@Topmargin}
  \addtolength{\topmargin}{-1in}
}
%
\InitLayout
%
\def\papersize#1#2{
  \paperwidth=#2
  \paperheight=#1
  \InitLayout
}
%
\def\marginsize#1#2#3#4{
  \@Leftmargin=#1
  \@Rightmargin=#2
  \@Topmargin=#3
  \@Bottommargin=#4
  \InitLayout
}
%
\endinput 

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].