diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:55:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:55:30 +0000 |
commit | bbfa391f2755c955e1349e544b31f65616dcb285 (patch) | |
tree | 9ab13158cd186549f9946c9f1a6eb3231003b185 /Master/texmf-dist/tex/latex/extsizes/autopagewidth.sty | |
parent | add048e43ff3b102377c17b6f18d71a5a5cde9a6 (diff) |
extsizes
git-svn-id: svn://tug.org/texlive/trunk@901 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/extsizes/autopagewidth.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/extsizes/autopagewidth.sty | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/extsizes/autopagewidth.sty b/Master/texmf-dist/tex/latex/extsizes/autopagewidth.sty new file mode 100644 index 00000000000..cd90eb78187 --- /dev/null +++ b/Master/texmf-dist/tex/latex/extsizes/autopagewidth.sty @@ -0,0 +1,57 @@ +\ProvidesPackage{autopagewidth} +%This is a package which attempts to set the text width according to the +%font size. I'm not sure this is a good idea, and I'm not sure if this +%a good implementation of this idea. But you are free to play with this +%package as you like. Comments are welcomed. +\PackageWarningNoLine{AutoPageWidth}{This is an experimental style^^J + It is provided for evaluation only.} +\def\APW@text{\normalfont A rule of thumb is that no line should contain + more than 70 characters} %this is a text containing 70 char's +%In cmr10 it is 311pt long. Which compares to a default textwith of 345pt +%Thus the effect of this package is to widen the margins still further +%(to the chagrin of the MSword crowd no doubt) + \setlength\@tempdima{\paperwidth} + \addtolength\@tempdima{-2in} + \settowidth\@tempdimb{\APW@text} + \if@twocolumn + \ifdim\@tempdima>2\@tempdimb\relax + \setlength\textwidth{2\@tempdimb} + \else + \setlength\textwidth{\@tempdima} + \fi + \else + \ifdim\@tempdima>\@tempdimb\relax + \setlength\textwidth{\@tempdimb} + \else + \setlength\textwidth{\@tempdima} + \fi + \fi + \@settopoint\textwidth + \if@twoside + \setlength\@tempdima {\paperwidth} + \addtolength\@tempdima {-\textwidth} + \setlength\oddsidemargin {.4\@tempdima} + \addtolength\oddsidemargin {-1in} + \setlength\marginparwidth {.6\@tempdima} + \addtolength\marginparwidth {-\marginparsep} + \addtolength\marginparwidth {-0.4in} + \else + \setlength\@tempdima {\paperwidth} + \addtolength\@tempdima {-\textwidth} + \setlength\oddsidemargin {.5\@tempdima} + \addtolength\oddsidemargin {-1in} + \setlength\marginparwidth {.5\@tempdima} + \addtolength\marginparwidth {-\marginparsep} + \addtolength\marginparwidth {-0.4in} + \addtolength\marginparwidth {-.4in} + \fi + \ifdim \marginparwidth >2in + \setlength\marginparwidth{2in} + \fi + \@settopoint\oddsidemargin + \@settopoint\marginparwidth + \setlength\evensidemargin {\paperwidth} + \addtolength\evensidemargin{-2in} + \addtolength\evensidemargin{-\textwidth} + \addtolength\evensidemargin{-\oddsidemargin} + \@settopoint\evensidemargin |