summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ncclatex/nccfit.clo
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/ncclatex/nccfit.clo')
-rw-r--r--macros/latex/contrib/ncclatex/nccfit.clo43
1 files changed, 43 insertions, 0 deletions
diff --git a/macros/latex/contrib/ncclatex/nccfit.clo b/macros/latex/contrib/ncclatex/nccfit.clo
new file mode 100644
index 0000000000..4bf31fc1d3
--- /dev/null
+++ b/macros/latex/contrib/ncclatex/nccfit.clo
@@ -0,0 +1,43 @@
+\ProvidesFile{nccfit.clo}
+ [2002/01/25 v1.00 Fit to page option (NCC)]
+%
+% Fits \textwidth, \textheight, and \marginparwidth to paper size.
+% Got from standard size options.
+%
+\ifcase\@ptsize \setlength\textwidth{345\p@}
+\or \setlength\textwidth{360\p@}
+\or \setlength\textwidth{390\p@}
+\or\or \setlength\textwidth{470\p@}
+\fi
+\if@twocolumn
+ \setlength\textwidth{2\textwidth}
+ \addtolength\textwidth{\columnsep}
+\fi
+\setlength\@tempdima{\paperwidth}
+\addtolength\@tempdima{-2in}
+\ifdim\@tempdima<\textwidth \setlength\textwidth{\@tempdima} \fi
+\@settopoint\textwidth
+%
+\setlength\@tempdima{\paperheight}
+\addtolength\@tempdima{-3.5in}
+\divide\@tempdima\baselineskip
+\@tempcnta=\@tempdima
+\setlength\textheight{\@tempcnta\baselineskip}
+\addtolength\textheight{\topskip}
+%
+\if@twoside
+ \setlength\@tempdima {\paperwidth}
+ \addtolength\@tempdima {-\textwidth}
+ \setlength\marginparwidth {.6\@tempdima}
+ \addtolength\marginparwidth {-\marginparsep}
+ \addtolength\marginparwidth {-.4in}
+\else
+ \setlength\@tempdima {\paperwidth}
+ \addtolength\@tempdima {-\textwidth}
+ \setlength\marginparwidth {.5\@tempdima}
+ \addtolength\marginparwidth {-\marginparsep}
+ \addtolength\marginparwidth {-.8in}
+\fi
+\ifdim \marginparwidth >2in \setlength\marginparwidth{2in}\fi
+\@settopoint\marginparwidth
+\endinput