home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
text
/
pastex-1.3-3of8.lha
/
PasTeX
/
macros
/
nice.tex
(
.txt
)
< prev
next >
Wrap
LaTeX Document
|
1991-01-15
|
19KB
|
457 lines
% NICE Version 2 macro package for plain TeX
% written by
% Christian Rank
% Br\"augasse 13/225
% D-8390 Passau
% E-Mail: rank@unipas.fmi.uni-passau.de
% (please don't e-mail from outside Germany!)
% THIS MACRO PACKAGE MAY BE COPIED AND USED FREELY ONLY IN THIS ORIGINAL STATE
% WITHOUT ANY CHANGES.
% TO PRESERVE COMPATIBILITY, PLEASE DO NOT MODIFY THIS FILE UNDER ANY
% CIRCUMSTANCES. YOU CAN CUSTOMIZE THE NICE PACKAGE FOR YOUR NEEDS VIA AN
% AUXILIARY FILE WHICH READS IN NICE.TEX AND THEN CHANGES PARAMETERS
% AND/OR DEFINES ADDITIONAL COMMANDS.
% we check first if NICE has already been read, in which case we do not need
% to define the NICE macros again.
\expandafter\ifx\csname niceversion\endcsname \relax \else \endinput \fi
% NICE hasn't already been read, so we continue
\def\niceversion{2.0}
\def\versionof {17/09/90}
\immediate\write16 {NICE version \niceversion, (c) 1990 by C. Rank}
\everyjob {\immediate\write16 {NICE version \niceversion \space of \versionof}}
\catcode`\@=11 % for definition of private macros
% adjustment of general parameters
\vsize 9.2truein \hsize 6.5truein % page layout
\baselineskip=12pt \lineskiplimit=0pt \lineskip=0pt
\smallskipamount=6pt plus 1pt minus 1pt
\medskipamount=12pt plus 2pt minus 2pt
\bigskipamount=18pt plus 3pt minus 3pt
\parskip=6pt plus 1pt minus 1pt
\parindent=0pt
\tolerance=10000
\hbadness=5000
% the fonts used
\font\documenttitlefont=cmr10 scaled \magstep4
\font\sectiontitlefont=cmbx10 scaled \magstep2
\font\subsectiontitlefont=cmbx10 scaled \magstep1
\font\subsubsectiontitlefont=cmbx10 scaled \magstephalf
% fonts used for variable size styles
\font\ninerm=cmr9 \font\eightrm=cmr8 \font\sixrm=cmr6
\font\ninei=cmmi9 \font\eighti=cmmi8 \font\sixi=cmmi6
\font\ninesy=cmsy9 \font\eightsy=cmsy8 \font\sixsy=cmsy6
\font\ninebf=cmbx9 \font\eightbf=cmbx8 \font\sixbf=cmbx6
\font\ninesl=cmsl9 \font\eightsl=cmsl8
\font\ninett=cmtt9 \font\eighttt=cmtt8
\font\nineit=cmti9 \font\eightit=cmti8 \font\sevenit=cmti7
% the variable size styles
\def\ninept{\textfont0=\ninerm \scriptfont0=\sevenrm
\scriptscriptfont0=\fiverm
\def\rm{\fam0 \ninerm}
\textfont1=\ninei \scriptfont1=\seveni \scriptscriptfont1=\fivei
\def\oldstyle{\fam1 \ninei}
\textfont2=\ninesy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
\textfont\itfam=\nineit \def\it{\fam\itfam \nineit}
\textfont\slfam=\ninesl \def\sl{\fam\slfam \ninesl}
\textfont\bffam=\ninebf \scriptfont\bffam=\sevenbf
\scriptscriptfont\bffam=\fivebf \def\bf{\fam\bffam \ninebf}
\textfont\ttfam=\ninett \def\tt{\fam\ttfam \ninett}
\baselineskip=11pt
\rm
\def\eightpt{\textfont0=\eightrm \scriptfont0=\sixrm
\scriptscriptfont0=\fiverm
\def\rm{\fam0 \eightrm}
\textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei
\def\oldstyle{\fam1 \eighti}
\textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
\textfont\itfam=\eightit \def\it{\fam\itfam \eightit}
\textfont\slfam=\eightsl \def\sl{\fam\slfam \eightsl}
\textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
\scriptscriptfont\bffam=\fivebf \def\bf{\fam\bffam \eightbf}
\textfont\ttfam=\eighttt \def\tt{\fam\ttfam \eighttt}
\baselineskip=10pt
\rm
\def\sevenpt{\textfont0=\sevenrm \scriptfont0=\sixrm
\scriptscriptfont0=\fiverm
\def\rm{\fam0 \sevenrm}
\textfont1=\seveni \scriptfont1=\sixi \scriptscriptfont1=\fivei
\def\oldstyle{\fam1 \seveni}
\textfont2=\sevensy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
\textfont\itfam=\sevenit \def\it{\fam\itfam \sevenit}
\textfont\slfam=\eightsl \def\sl{\fam\slfam \eightsl}
\textfont\bffam=\sevenbf \scriptfont\bffam=\sixbf
\scriptscriptfont\bffam=\fivebf \def\bf{\fam\bffam \sevenbf}
\textfont\ttfam=\eighttt \def\tt{\fam\ttfam \eighttt}
\baselineskip=9pt
\rm
\def\sixpt{\textfont0=\sixrm \scriptfont0=\fiverm
\scriptscriptfont0=\fiverm
\def\rm{\fam0 \sixrm}
\textfont1=\sixi \scriptfont1=\fivei \scriptscriptfont1=\fivei
\def\oldstyle{\fam1 \sixi}
\textfont2=\sixsy \scriptfont2=\fivesy \scriptscriptfont2=\fivesy
\textfont\itfam=\sevenit \def\it{\fam\itfam \sevenit}
\textfont\slfam=\eightsl \def\sl{\fam\slfam \eightsl}
\textfont\bffam=\sixbf \scriptfont\bffam=\fivebf
\scriptscriptfont\bffam=\fivebf \def\bf{\fam\bffam \sixbf}
\textfont\ttfam=\eighttt \def\tt{\fam\ttfam \eighttt}
\baselineskip=8pt
\rm
\def\fivept{\textfont0=\fiverm \scriptfont0=\fiverm
\scriptscriptfont0=\fiverm
\def\rm{\fam0 \fiverm}
\textfont1=\fivei \scriptfont1=\fivei \scriptscriptfont1=\fivei
\def\oldstyle{\fam1 \fivei}
\textfont2=\fivesy \scriptfont2=\fivesy \scriptscriptfont2=\fivesy
\textfont\itfam=\sevenit \def\it{\fam\itfam \sevenit}
\textfont\slfam=\eightsl \def\sl{\fam\slfam \eightsl}
\textfont\bffam=\fivebf \scriptfont\bffam=\fivebf
\scriptscriptfont\bffam=\fivebf \def\bf{\fam\bffam \fivebf}
\textfont\ttfam=\eighttt \def\tt{\fam\ttfam \eighttt}
\baselineskip=7pt
\rm
% this stuff defines a macro `include', which has the same effect as plain
% TeX's `input', except that it is no error if the file does not exist.
\newread\testinclude
\def\include#1{\immediate\openin\testinclude #1
\ifeof\testinclude \immediate\write16 {No file #1.}
\else \immediate\closein\testinclude \input #1
\fi}
% general utilities
\def\newpage{\vfill\eject}
\def\\{$\backslash$}
\def\raggedcenter{\leftskip=0pt plus 4em \rightskip=\leftskip
\parfillskip=0pt \spaceskip=.3333em \xspaceskip=.5em
\pretolerance=9999 \tolerance=9999 \hbadness=10000
\hyphenpenalty=9999 \exhyphenpenalty=9999}
\def\parwithoutskip{{\parskip=0pt plus 0.5pt\par\noindent}\ignorespaces}
\newdimen\narrowskip \narrowskip=20pt
\def\lnarrower{\advance\leftskip by \narrowskip}
\let\onarrower=\narrower
\def\narrower{\advance\leftskip by \narrowskip
\advance\rightskip by \narrowskip}
\def\tw@num#1{\ifnum#1>9 #1\else 0#1\fi}
\def\date{\tw@num{\the\day}/\tw@num{\the\month}/\the\year}
\def\ifndef#1{\expandafter\ifx\csname#1\endcsname\relax}
% title and section layout
\long\def\title#1{{\raggedcenter \documenttitlefont #1 \par}}
\def\titlepage{\begingroup
\def\title##1{{\raggedcenter \documenttitlefont ##1 \par}\medskip}
\long\def\author##1{{\parskip=0pt \raggedcenter \rm ##1 \par}}
\def\release##1{\centerline{\bf ##1}}
\def\abstract{\centerline{\bf Abstract}\narrowskip=3truecm \narrower}
\def\endtitlepage{\vfil\egroup \newpage \endgroup}
\vbox to \vsize \bgroup \vfil}
\newcount\sectionno \sectionno=0
\newcount\subsectionno
\newcount\subsubsectionno
\newtoks\sectionnscheme
\sectionnscheme={\gensect. }
\newtoks\subsectionnscheme
\subsectionnscheme={\gensect.\number\subsectionno. }
\newtoks\subsubsectionnscheme
\subsubsectionnscheme={\gensect.\number\subsectionno
.\number\subsubsectionno. }
\def\genheading#1#2#3{\vskip\parskip \vbox{
\setbox0 \hbox{#1#2} \hangindent=\the\wd0 \hangafter=1
\noindent \raggedright \pretolerance=10000 \box0 #1#3\par}}
\def\gensect{\ifnum \sectionno<0 \char\number-\sectionno
\else \number\sectionno\fi}
\def\plainsection#1{\removelastskip
\bigskip
\genheading{\sectiontitlefont}{}{#1}
\ifnum\contentslevel>0
{\let\the=0 \edef\next{\write\fcontents
{\vskip\contskip \hbox to \hsize
{\scstyle \hskip\the\scindent #1 \the\contfill\
\the\pageno}}}\next}
\immediate\write16 {#1}
\fi
\ifnum\marklevel>0 \mark {#1} \fi
\nobreak}
\def\section#1{\removelastskip
\bigskip
\ifnum \sectionno<-1 \global\advance\sectionno by -1
\else \global\advance\sectionno by 1
\fi
\global\subsectionno=0
\genheading{\sectiontitlefont}{\the\sectionnscheme}{#1}
{\edef\nscheme{\the\sectionnscheme}
\ifnum\contents