]> matita.cs.unibo.it Git - helm.git/commitdiff
ported to kluwer style
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 17 Nov 2005 14:44:47 +0000 (14:44 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 17 Nov 2005 14:44:47 +0000 (14:44 +0000)
26 files changed:
helm/papers/matita/ed.sty [new file with mode: 0644]
helm/papers/matita/klu10.clo [new file with mode: 0644]
helm/papers/matita/klu105.clo [new file with mode: 0644]
helm/papers/matita/klu11.clo [new file with mode: 0644]
helm/papers/matita/klu12.clo [new file with mode: 0644]
helm/papers/matita/klu9.clo [new file with mode: 0644]
helm/papers/matita/kluedit.sty [new file with mode: 0644]
helm/papers/matita/klufloa.sty [new file with mode: 0644]
helm/papers/matita/klulist.sty [new file with mode: 0644]
helm/papers/matita/klumac.sty [new file with mode: 0644]
helm/papers/matita/klumath.sty [new file with mode: 0644]
helm/papers/matita/klunamed.bst [new file with mode: 0644]
helm/papers/matita/klunote.sty [new file with mode: 0644]
helm/papers/matita/klunum.bst [new file with mode: 0644]
helm/papers/matita/kluopen.sty [new file with mode: 0644]
helm/papers/matita/klups.sty [new file with mode: 0644]
helm/papers/matita/kluref.sty [new file with mode: 0644]
helm/papers/matita/klusec.sty [new file with mode: 0644]
helm/papers/matita/klut10.clo [new file with mode: 0644]
helm/papers/matita/klut11.clo [new file with mode: 0644]
helm/papers/matita/klut12.clo [new file with mode: 0644]
helm/papers/matita/klut9.clo [new file with mode: 0644]
helm/papers/matita/klutab.sty [new file with mode: 0644]
helm/papers/matita/kluwer.cls [new file with mode: 0644]
helm/papers/matita/llncs.cls [deleted file]
helm/papers/matita/matita.tex

diff --git a/helm/papers/matita/ed.sty b/helm/papers/matita/ed.sty
new file mode 100644 (file)
index 0000000..794d39d
--- /dev/null
@@ -0,0 +1,66 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Editorials
+% 
+% the font shape of ednotes is governed by the parameter \ednoteshape
+% the default is sans serif, specialize it to say italic by 
+% \def\ednoteshape{\it}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{verbatim}
+\def\ednoteshape{\sf}
+\newif\ifshowednotes\showednotesfalse
+\def\edshownotes{\showednotestrue}
+\DeclareOption{show}{\showednotestrue}
+\DeclareOption{hide}{\showednotesfalse}
+\ProcessOptions
+
+\newcounter{ednote}
+\def\ed@foot#1#2#3% text, type, label
+{\def\test{#3}\def\empty{}\footnotetext[\value{ednote}]%
+{{\sc{#2}\if\test\empty\else\label{ed:#3}[{#3}]\fi:} \ednoteshape #1}}
+\def\ed@note#1#2#3% text, type, label
+{\addtocounter{ednote}{1}\message{#2!}%
+\ifshowednotes%
+\footnotemark[\arabic{ednote}]\ed@foot{#1}{#2}{#3}%
+\marginpar{#2(\arabic{ednote})}%
+\fi}
+\newcommand{\ednote}[2][]{\ed@note{#2}{}{#1}}
+\newcommand{\issue}[2][]{\ed@note{#2}{}{#1}}
+\newenvironment{newpart}[1]% text
+{\addtocounter{ednote}{1}\edef\new@number{\theednote}\message{New Part!\new@number}
+\ifshowednotes\ed@foot{#1}{New Part}{}\marginpar{BegNP(\new@number)}\fi}
+{\ifshowednotes\marginpar{EndNP(\new@number)}\fi}
+
+\def\ednotemessage{\ifnum\value{ednote}>0\typeout{}%
+\typeout{There are still \arabic{ednote} EdNotes and Issues to resolve!}%
+\typeout{}\fi}
+
+\ifshowednotes
+\def\todolist#1{\message{todolist!}%
+{{\sf To Do: #1}}\bgroup\sf\marginpar{{\sf ToDo}}\begin{itemize}}
+\def\endtodolist{\end{itemize}\egroup}
+\else\def\todolist#1{\comment}\def\endtodolist{\endcomment}\fi
+
+\newenvironment{neu}{\begin{newpart}{no explanation given}}{\end{newpart}}
+
+\def\tweak#1{\ifshowednotes\marginpar{{\sf tweak}(#1)}\fi}
+
+
+\def\df#1{\bf{#1}}
+\def\dfi#1{\bf{\index*{#1}}}
+\def\defemph{\textbf}
+\def\defin#1{\defemph{\index*{#1}}}
+\def\defins#1{\defemph{#1s}\index{#1}}
+\def\emin#1{\em{\index*{#1}}\/}
+\def\emins#1{{\em{#1s}\/}\index{#1}}
+\def\edin#1{\index*{#1}}
+\def\edins#1{\index*{#1}s}
+\def\ttin#1{{\tt{#1}}\index{#1@{\tt{#1}}}}
+\def\ttins#1{{\tt{#1}}s\index{#1@{\tt{#1}}}}
+
+\newenvironment{myfig}[2]%
+{\begin{figure}[!htb]\def\myfiglabel{#1}\def\myfigcaption{{#2}}\begin{center}}
+{\caption{\myfigcaption}\label{fig:\myfiglabel}\end{center}\end{figure}}
+\def\myfigref#1{Figure~\ref{fig:#1}}
+\def\myfigsref#1#2{Figures~\ref{fig:#1} and~\ref{fig:#2}}
+\def\myfiglref#1#2{Figures~\ref{fig:#1} to~\ref{fig:#2}}
+\def\Myfigref#1{Figure~\ref{fig:#1}}  % this one is capitalized for sentence beginnings
diff --git a/helm/papers/matita/klu10.clo b/helm/papers/matita/klu10.clo
new file mode 100644 (file)
index 0000000..fd17650
--- /dev/null
@@ -0,0 +1,253 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[10pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klu10.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\setlength\marginparwidth{.5in}
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klu10.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This between |\scriptsize| and
+% |\tiny|. Allowed type provided values:  5/6, 6/7, 7/8, 8/9.5, 9/11,
+% 10/12, 12/14, 14/18, 17/22, 20/25, 25/30.
+%    \begin{macrocode}
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@xpt\@xiipt
+   \abovedisplayskip 10\p@ \@plus 2\p@ \@minus5\p@
+   \abovedisplayshortskip \z@ \@plus 3\p@
+   \belowdisplayshortskip 6\p@ \@plus 3\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@ixpt{11}%
+   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4\p@ \@plus2\p@ \@minus2\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@viiipt{9.5}%
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand\little{\@setfontsize\little\@vipt\@viipt}
+\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1.5cm}           
+\setlength\voffset{0pt}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {12\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {27.5\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{10pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+    \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin 1in
+  \evensidemargin 1in
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{0pt}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6.65\p@}
+\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{2.2em}
+\setlength{\leftmarginiii}{1.87em}
+\setlength{\leftmarginiv}{1.7em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep  9\p@ \@plus 3\p@ \@minus 5\p@
+  \partopsep 3\p@ \@plus 1\p@ \@minus 2\p@
+  \itemsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 4.5\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klu10.clo'.
diff --git a/helm/papers/matita/klu105.clo b/helm/papers/matita/klu105.clo
new file mode 100644 (file)
index 0000000..d33a0fe
--- /dev/null
@@ -0,0 +1,252 @@
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[11pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klu105.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\setlength\marginparwidth{.5in}
+%\hfuzz=11pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klu105.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This between |\scriptsize| and
+% |\tiny|. Allowed type provided values:  6/7, 7/8, 9/11, 10/11.5,
+% 10.5/12, 11/13, 12/14, 14/18, 17/22, 20/25, 25/30.
+%    \begin{macrocode}
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize{10.5pt}{12}%
+   \abovedisplayskip 10\p@ \@plus 2\p@ \@minus5\p@
+   \abovedisplayshortskip \z@ \@plus 3\p@
+   \belowdisplayshortskip 6\p@ \@plus 3\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@xpt{11.5}%
+   \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 5\p@ \@plus2\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4\p@ \@plus2\p@ \@minus2\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@ixpt\@xipt   
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
+\newcommand\little{\@setfontsize\little\@viipt\@viiipt}
+\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1in}           
+\setlength\voffset{-1in}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {13\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {27.5\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{10pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin \@tempdima
+  \evensidemargin \@tempdima
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{\@tempdima}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6.65\p@}
+\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{2.2em}
+\setlength{\leftmarginiii}{1.87em}
+\setlength{\leftmarginiv}{1.7em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep  9\p@ \@plus 3\p@ \@minus 5\p@
+  \partopsep 3\p@ \@plus 1\p@ \@minus 2\p@
+  \itemsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 4.5\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klu10.clo'.
diff --git a/helm/papers/matita/klu11.clo b/helm/papers/matita/klu11.clo
new file mode 100644 (file)
index 0000000..0c01ccb
--- /dev/null
@@ -0,0 +1,252 @@
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[11pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klu11.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\setlength\marginparwidth{.5in}
+%\hfuzz=11pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klu11.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This between |\scriptsize| and
+% |\tiny|. Allowed type provided values:  6/7, 7/8, 8/9.5, 9/11,
+% 10/12, 11/13, 12/14, 14/18, 17/22, 20/25, 25/30.
+%    \begin{macrocode}
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@xipt{13}%
+   \abovedisplayskip 10\p@ \@plus 2\p@ \@minus5\p@
+   \abovedisplayshortskip \z@ \@plus 3\p@
+   \belowdisplayshortskip 6\p@ \@plus 3\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@xpt\@xiipt
+   \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 5\p@ \@plus2\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4\p@ \@plus2\p@ \@minus2\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@ixpt\@xipt   
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
+\newcommand\little{\@setfontsize\little\@viipt\@viiipt}
+\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1.5cm}           
+\setlength\voffset{0pt}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {13\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {27.5\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{10pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin 1in
+  \evensidemargin 1in
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{0pt}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6.65\p@}
+\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{2.2em}
+\setlength{\leftmarginiii}{1.87em}
+\setlength{\leftmarginiv}{1.7em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep  9\p@ \@plus 3\p@ \@minus 5\p@
+  \partopsep 3\p@ \@plus 1\p@ \@minus 2\p@
+  \itemsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 4.5\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klu10.clo'.
diff --git a/helm/papers/matita/klu12.clo b/helm/papers/matita/klu12.clo
new file mode 100644 (file)
index 0000000..18fbd97
--- /dev/null
@@ -0,0 +1,252 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[12pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klu12.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{8pc}
+%\begin{document}
+%\begin{opening}          
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klu12.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This between |\scriptsize| and
+% |\tiny|. Allowed type provided values:  6/7, 8/9.5, 9/11,
+% 10/12, 11/13 12/14, 14/18, 17/22, 20/25, 25/30.
+%    \begin{macrocode}
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@xiipt{14}%
+   \abovedisplayskip 11\p@ \@plus 2\p@ \@minus5\p@
+   \abovedisplayshortskip 1\p@ \@plus 3\p@
+   \belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@xipt{13}%
+   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4\p@ \@plus2\p@ \@minus2\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@xpt\@xiipt
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@ 
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@ixpt{11}}
+\newcommand\little{\@setfontsize\little\@viiipt{9.5}}
+\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
+\newcommand\large{\@setfontsize\large\@xivpt{18}}
+\newcommand\Large{\@setfontsize\Large\@xviipt{22}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xxpt{25}}
+\newcommand\huge{\@setfontsize\huge\@xxvpt{30}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1.5cm}           
+\setlength\voffset{0pt}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {14\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {27.5\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{12pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin 1in
+  \evensidemargin 1in
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{0pt}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6.65\p@}
+\setlength{\skip\footins}{12\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{2.2em}
+\setlength{\leftmarginiii}{1.87em}
+\setlength{\leftmarginiv}{1.7em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep  11\p@ \@plus 3\p@ \@minus 5\p@
+  \partopsep 4.5\p@ \@plus 1\p@ \@minus 2\p@
+  \itemsep 6\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 6\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 6\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 3\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{24\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{24\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{10\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{10\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klu12.clo'.
diff --git a/helm/papers/matita/klu9.clo b/helm/papers/matita/klu9.clo
new file mode 100644 (file)
index 0000000..249435e
--- /dev/null
@@ -0,0 +1,253 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[9pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klu9.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\setlength\marginparwidth{.5in}
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klu9.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This is identical to |\tiny| here.
+% Allowed type provided values:  5/6, 6/7, 7/8, 8/9.5, 9/11,
+% 10/12, 11/13, 12/14, 14/18, 17/22, 20/25.
+%    \begin{macrocode}                    
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@ixpt{11}%
+   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\listi\@listI}     
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@viiipt{9.5}%
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@viipt{8}%
+   \abovedisplayskip 4\p@ \@plus2\p@ \@minus2\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 2\p@ \@plus\p@ \@minus1\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 2\p@ \@plus\p@ \@minus\p@
+               \parsep 1\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@vipt\@viipt}
+\newcommand\little{\@setfontsize\little\@vpt\@vipt}
+\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand\large{\@setfontsize\large\@xpt\@xiipt}
+\newcommand\Large{\@setfontsize\Large\@xiipt{14}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xivpt{18}}
+\newcommand\huge{\@setfontsize\huge\@xviipt{22}}
+\newcommand\Huge{\@setfontsize\Huge\@xxpt{25}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1in}           
+\setlength\voffset{-1in}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {12\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {25\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{10pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin \@tempdima
+  \evensidemargin \@tempdima
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{\@tempdima}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6\p@}
+\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{1.9em}
+\setlength{\leftmarginii}{2em}
+\setlength{\leftmarginiii}{1.7em}
+\setlength{\leftmarginiv}{1.4em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep 8\p@ \@plus2\p@ \@minus2\p@
+  \partopsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep 4\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 4\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{10\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{18\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{10\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{10\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{18\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klu9.clo'.
diff --git a/helm/papers/matita/kluedit.sty b/helm/papers/matita/kluedit.sty
new file mode 100644 (file)
index 0000000..ed910b9
--- /dev/null
@@ -0,0 +1,565 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/03/13}
+\def\filename{kluedit.sty}
+% \changes{1997/07/13}{changed chaptermark for monographs:
+% use @chapapp and c@chapter instead of CHAPTER thechapter,
+% check for mainmatter}{}
+% \changes{1997/07/25}{raised thepage in edited style titlepage 6pt}{}
+% \changes{1997/08/07}{Inserted kaplogo}{}
+% \changes{1998/02/04}{Inserted "parskip 0pt"}{}
+% \changes{1998/02/06}{Inserted final--double hyphen demerits}{}
+% \changes{1998/02/09}{Full rewrite of firstpage-lastpage code}{}
+% \changes{1998/02/19}{Removed silly ifx \csname bug in setlastpage}{}
+% \changes{1998/02/24}{Fix in "journalcode": removed extra page}{}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\normalsize,\numberline,\protect,\endinput,\hfill}
+%\DoNotIndex{\@compare,\ifx,\global,\gdef,\def,\let,\hbox,\par,\typeout}
+%\CodelineIndex
+%\newcommand{\Bs}{$\backslash$}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=11pt
+%\MakeShortVerb{\|}
+%\setlength{\marginparwidth}{0in}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\runningtitle{\filename\ -- \filedate}
+%\runningauthor{Kluwer Academic Publishers}
+%\editor{Test}
+%\journalcode{test}
+%\begin{abstract}
+% This internal stylefile defines most of the special kluwer
+% commands. amongst these: the |article|
+% environment, the different pagestyles, all of the editor and
+% auxiliary document info commands, and the commands to read in
+% |kapjrnls.kap|.  
+%\end{abstract} 
+%\end{opening}      
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesPackage{kluedit}[\filedate ]
+\newif\if@copyrighthead  \@copyrightheadfalse
+\newif\if@kapidenthead   \@kapidentheadfalse
+\newif\if@noid           \@noidfalse
+\DeclareOption{copyrighthead}{\@copyrightheadtrue}
+\DeclareOption{kapidenthead}{\@kapidentheadtrue}
+\DeclareOption{noid}{\@noidtrue}
+\ExecuteOptions{}
+\ProcessOptions
+%    \end{macrocode}
+% 
+% \subsection{Database info}
+% There are some serious changes made to |kapjrnls.kap|, the
+% corresponding macros are done here.
+%
+% |\journaldata| is the command used in |kapjrnls.kap|. The format for
+% this file is as follows: 
+%\begin{verbatim}
+%\journaldata{acma}
+%\gdef\@journal{Applied Composite Materials}%
+%\def\@stylefile{mathkap}%
+%\dataend
+%\end{verbatim}
+% Optionally, some other journal-specific commands can be done
+% here. In the current file, these are |\country| and |\CLsize|, but
+% more will probably follow.
+%
+% Define record wrapper. This is a primitive, because \LaTeX\ doesn't
+% allow this sort of thing.
+%    \begin{macrocode}
+\long\def\journaldata#1#2\dataend{%
+  \edef\@tempa{@#1}\ifx \@tempa\@currjournal #2\fi}
+%    \end{macrocode}
+% Read file. |\journalcode| triggers reading,
+% so don't specify |\journalcode| without having the file... 
+% (|\@currjournal| is a temporary to keep track of the journal.)
+%
+% If after reading |\@journal| == `journal not defined': Error\\
+% If after reading |\@stylefile| != current class : Error
+%
+% |\@journal|, |\@testjournal| and |\@defaultjournal| are initialized in
+% |kapjrnls.kap|. The \\    
+% |\ver@kluwer.cls| command is defined by \LaTeX;
+% deduced from |\ProvidesClass|. 
+%    \begin{macrocode}
+\def\CLsize{\footnotesize}
+\def\@journal{}  
+\def\@currjournal{}
+\def\journalcode#1{%
+  \edef\@currjournal{@#1}%
+  \makeatletter\input kapjrnls.kap \makeatother
+  \ifx\@journal\@defaultjournal 
+    \PackageError{kluopen}{Journalcode not defined}{Please correct 
+    your typo or contact KAP to update your kapjrnls.kap.}\fi 
+  \ifx\@journal\@testjournal  \else
+  \expandafter\ifx \csname ver@\@stylefile.cls\endcsname\relax 
+    \PackageWarning{kluopen}{Incorrect or superfluous journalcode
+    command}\fi \fi
+  }                           
+%    \end{macrocode}
+% This is a hook for klups.sty (oldstyle numerals)
+%    \begin{macrocode}                           
+\def\i@oldseries{}
+%    \end{macrocode}
+% 
+% 
+% \subsection{copyright commands}
+% This allows changing the copyrightowner and allows for a special
+% type of copyright. 
+%
+% User interface is |\copyrightowner<*>{private}|, where the star form
+% will result in: ``The private right to ..'' together with `(c)
+% Kluwer Academic...' , and the non-star form
+% will result in: `(c) private'.
+%
+% This is implemented as a footnotetext to the title, which is why we
+% need the |\if|-switch. |\AtBeginDocument| is needed to prevent relocation 
+% errors in the stylefile. (|kluopen| has to define |\@speccrightcheck| 
+% as well)
+%    \begin{macrocode}
+\newif\if@speccright \@speccrightfalse              
+\AtBeginDocument{\gdef\@speccrightcheck{%
+   \if@speccright 
+   \footnotetext[4]{\@spectextone{} \@speccright{} \@spectexttwo}%
+   \fi }}
+\def\@spectextone{The}
+\newcommand\spectextone[1]{\gdef\@spectextone{#1}}
+\def\@spectexttwo{right to retain a non-exclusive, royalty free
+                 licence in and to any copyright is acknowledged.}
+\newcommand\spectexttwo[1]{\gdef\@spectexttwo{#1}}
+\newcommand\copyrightowner{\@ifstar{\crightA}{\crightB}}
+\newcommand\crightA[1]{\gdef\@speccright{#1}\global\@speccrighttrue}
+\newcommand\crightB[1]{\gdef\@copyrightowner{#1}\global\@speccrightfalse}
+\def\@speccright{}
+\def\@copyrightowner{Kluwer Academic Publishers}
+%    \end{macrocode}
+% \subsection{Country, volume and year commands}
+%    \begin{macrocode}
+\newcommand\country[1]{\gdef\@country{#1}}
+\def\@country{the Netherlands}
+\newcommand\volume[1]{\gdef\@volume{#1}}
+\def\@volume{00}
+\newcommand\pubyear[1]{\gdef\@pubyear{#1}}
+\def\@pubyear{\number\year}
+%    \end{macrocode}
+% \subsection{paging commands}
+% These macro's have to be a bit smarter than you would expect. This
+% has to work correctly while displaying the information line, not
+% only for the first, but for possibly many of those in one
+% document. Therefore, it will not do to just toggle the page counter.  
+%
+% All of this will only work correctly in one of these conditions: 
+%
+%\begin{itemize}
+%\item Just one opening and no article environment.
+%\item The complete opening environment inside the article.
+%\item Lastpage is also given.
+%\end{itemize}
+%(|\thearticle| is defined below.) 
+%
+%    \begin{macrocode}
+\newif\iflastpagegiven   \lastpagegivenfalse
+%    \end{macrocode}
+% This turned out to be rather easy after all... 
+%
+% Every article will first run |\setlastpage| (on opening), and will write 
+% out a label of the form |{\thearticle lastpage}| (on closing). This will 
+% be the value of |\@lastpage| if no |\lastpage| is given, otherwise it will
+% (of course) be defined by |\lastpage|. 
+%    \begin{macrocode} 
+\newcommand\firstpage[1]{%
+  \gdef\@firstpage{#1}%
+  \ifnum\@firstpage>\c@page  
+    \setcounter{page}{#1}%
+    \PackageWarning{kluopen}{Increasing pagenumber to \@firstpage}%
+  \else \ifnum\@firstpage<\c@page 
+    \PackageWarning{kluopen}{Firstpage lower than pagenumber}\fi\fi
+    \xdef\@firstpage{\the\c@page}%                                 
+    }
+\def\@firstpage{1}
+\def\pagenumbering#1{%
+    \global\c@page \@ne
+    \gdef\thepage{\csname @#1\endcsname \c@page}%
+    \gdef\thefirstpage{% 
+            \csname @#1\endcsname \@firstpage}%
+    \gdef\thelastpage{%
+            \csname @#1\endcsname \@lastpage}%
+    }  
+\pagenumbering{arabic}
+\newcommand\lastpage[1]{\xdef\@lastpage{#1}%
+  \global\lastpagegiventrue}
+\def\@lastpage{0}               
+\def\setlastpage{\iflastpagegiven\else
+    \edef\@tempa{@lastpage@\the\c@article}%
+    \expandafter 
+    \ifx \csname \@tempa \endcsname \relax
+        \gdef\@lastpage{0}%
+    \else
+        \xdef\@lastpage{\@nameuse{@lastpage@\the\c@article}}%
+    \fi
+    \fi }
+\def\writelastpage{%                                    
+    \iflastpagegiven \else
+    \immediate\write\@auxout%
+    {\string\global\string\@namedef{@lastpage@\the\c@article}{\the\c@page}}%
+    \fi                                                       
+    }
+\def\thepagerange{%                                    
+  \ifnum\@lastpage =0 {\ \bf PLEASE RUN AGAIN} \else
+  \ifnum\@lastpage = \@firstpage \ \thefirstpage\else
+  \ \thefirstpage--\thelastpage \fi\fi}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\@prin{Printed in}         
+\@ifundefined{textcopyright}{\def\textcopyright{\copyright}}{}
+\def\copyrightline{\textcopyright~\i@oldseries\@pubyear\
+  {\it\@copyrightowner.~~\@prin\ \@country.}\hfill\hbox{}}
+%    \end{macrocode}
+%\subsection{The copyright information} 
+% This is a three-part operation. 
+% |\@kapidenthead| (|foot|) contains the editor inforamtion and a
+% possible barcode, while |\@copyrighthead| (|foot|) contains both the
+% journal title and the copyright line. |\idline| contains the file
+% information status.                    
+%
+%Here is the copyright information first. |\thejournal| will typeset
+%the first line, |\thecopyright| the second.   Some checks are made to
+%prevent typesetting half of a line.
+%    \begin{macrocode}
+\def\volsep{: }
+\def\thejournal{\ifx\@journal\empty\else\leavevmode \i@oldseries
+     {\it\@journal\/}~~{\bf\i@oldseries\@volume\volsep}\thepagerange,
+     \@pubyear.\hfill\hbox{}\\ \fi}          
+\def\no{no}                               
+\def\crline#1{\gdef\@crline{#1}}
+\def\thecopyright{\ifx\@crline\no \else \copyrightline \par \fi }
+%    \end{macrocode}
+% Now switch for either up or down.  In both cases, the lines will
+% move away from the main text, with the corresponding baseline set at
+% the footer or header.
+%    \begin{macrocode}
+\newtoks\logotoks 
+\catcode`\%=12                  
+\catcode`\#=12                  
+\logotoks={\special{"
+4 4 translate
+989 1138 1 [60 0 0 -60 210 930]
+currentfile 
+/ASCII85Decode filter            
+<< /K -1 /Columns 989 >>
+/CCITTFaxDecode filter
+image
+Q>'H49/K0rjdMhW-(A!cb;A.`/DC9EH"NLrmTGB3G`p9Q"2Q+cbR4Nj7'd7dn1Os5
+\string$DPm^#D5dp.Sq0)HOI.%W!@rm_0-3j?%po`_0-3j?%VDq_0-W'Fr+S1(LXi_Ye(:I
+]*kjT\string$a@6KL"blG_X2L_CTtEVL"blG_X2L_CTtEVY/9RL]*l%#ln6muG.V%6g?j&"
+CUMm`Fr+r%g?j'q?%q#"G.V%_f3rj7?*;dp[G("lm<6*IY1IHshmM2*G.V%_f7)=e
+[G("lm<6*Iqd\string$AVIb/AMCUMmbg?j'qp:FV5rN=b\string$f7)=e^MCT"[GSCL[G(*'m<@rA
+m<6,8\string\:3%Yf7)>#f7)>#f7)>#f7)>#f7)>#f7)>#f7)>#f7)>#rN?+r?2Iq)p:L(d
+GOO8ShmM@LhnNsAIb0&IY5S7k]D(dJn)(P1^OFd`rVKmtp:L(fg@*q6CVP>sqd'*n
+n)(lq^OH.Yp[*1nhnOWlIf90<n(R6f^OH.Yp[@"SCVP>sqtKR:^OH.Yp[@"SCVP>s
+qtKQ8s8U1@C);u92\string$r0TIf90<e+`=g^OH.YpZ,==\string\+]gYg\string\ZD'qgWPOrP,i8rnlK-
+IrF`IDsdM<\string\+]gY<rV"2qgWPOol'6r^UNq9hcBa6g\string\ZJ=mIbDbrP,i8qR?1thqRGR
+g\string\ZJ=X+,'TrP#E4^UNq5\string\+]gYgZYS:s0qsA>CC\string\p\string\,F'GI<PY"lYir`pAJk\string$g]\string$*4
+^:SmLos`Okqg[AbD?"OWhlXZ\string\p"T/KrP"TTpAJk\string$g]\string$*4^:Sj&s0pTuf&'cJ>CC\string\n
+D=uZ_hb.nbI4`5\string$oX=e/f5K6t?,'TlG5Z:Ng\string\&&-Dq<fO^KZ,0qHJI(l#\string$H=V75&p
+f&'cIQJ_E4>CYDlD=uZV\string\(>QLhd*s^hlchCoX=e/dbFH(f5ILprP"TT?+uW^XhMDq
+/\string\\iG[ea3VG5>El[ea3VG5>El[ea3VG5>El[efC`[ea3V/\string\\iF/\string\[P.XhMDq/\string\[P.
+95gZ9f5ILpdbF#'oX=U#J(s4)oX=U#I4`1!hb.mjhb.ma\string\'j\string$qD=k:5>CA*;QJW!c
+oX=U#I4`1FI4`1!hb.ma\string\'j\string$qD=EkK95gZ9_HVF?^(T2bD=eV\string$$#T=CqHJ=n\string\'j\string$i
+/\string\[P.95fJ!hb.m@[eNL6V74;LDl'q[>C7R%qHJ=i[eNL6V74;LDl'q[\string$ZC^,qHJ=Y
+>C7a+_@(:8[eN.*n:KEQQJVs"^(T2Z"h2?QHm#lm6#H*aDh8@8Jm3UF[eLuRp`R\string$?
+6#H*WD=C2:KGNGN/\string\XRt27@;0aCL\string$khf"Uu#*%Ks"Le+7OAWdIj>'(dl*n`EL,P%*
+&6jO::U(jdL-R<W?Jcof\string$<nG'j>\string$a;@XEKW5W@E:h]\string\'fZTZ&2IlgdAO<XZ3Ig*T=
+hna6h\string\+!b`J";.F81K*N-5drJr9P82JLC&riK=?dcL_O,/H-%Tm_N_SP<`=[r2g%Q
+1&S&'fJid;r.0IP.XrTBC_ZpLs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
+s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
+s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!r-X"n
+rVQ?XhnG_tIf90<n)(m/rVQ?XhnG_tIf90<n)(m/rUg'cp[@!8hnOX=o_n[]n)\string$pu
+^OH.RrVQ?XhbW.EIenNlqs""Pn#,X3^7W/hqL8D?l215DVsiNWT>,jOIenNlo_n[O
+qs""Pe+_>cn#,WPn)\string$pu^7W-3^O8=p5CGbE5CGbE5CGbE5CGcgrUg'\string\rUg'\string\qL89h
+5CG_f^7S3Y:Z"sGn#+Y/e*6boo_nFYI6W-DT22BRVpjo-l1Fh#5CG_f:T*ZZe*6N\string$
+I6O9!Vpjo&qL(Q":T)\string\+o_Nu"T21.:I6O9!K_g*\string\T21.:I6O9!K_g*\string\'C#/a:T)'X
+5+`/RpeRg)I6O80o_;48peQS>HmcdY-e%\string$<'B)+gl0qK%pa<q+-c%t[i1C>FT*b&n
+L=7gF:P*s-i1C/I-c%t[j:;B)"QU(.PuEc.AeiBCZN4SP=c/;D"]f?=L:]C?)O[;?
+Ai"3B!'gY\string~>    
+}}  
+\catcode`\%=14
+\catcode`\#=6
+\def\kaplogo{\advance\textwidth -2pc
+    \leavevmode\lower 8pt
+    \hbox to 24pt{\the\logotoks\hss}}
+\if@copyrighthead
+  \gdef\@copyrighthead{{\parindent 0pt\vbox to\headheight {%
+          \hsize\textwidth \vss \kaplogo
+          \parbox{\textwidth}{\CLsize\thejournal\thecopyright}}}}
+  \gdef\@copyrightfoot{}
+\else
+  \gdef\@copyrightfoot{{\parindent 0pt\rlap{\vbox to 0pt{%
+          \hsize\textwidth \vss \kaplogo
+    \parbox{\textwidth}{\CLsize\thejournal\thecopyright}\vss}}}}
+  \gdef\@copyrighthead{}
+\fi
+%    \end{macrocode}
+% Next part. Since this is defined through editor, definition is a bit
+% easier. However, |\editor| is mandatory to get barcodes typeset,
+% which may be a bit unexpected.
+%    \begin{macrocode}     
+\def\@kapidenthead{}
+\def\@kapidentfoot{}          
+\if@kapidenthead
+  \def\editor#1{\gdef\@kapidentfoot{}%
+    \if@noid \gdef\@kapidenthead{}\else
+    \gdef\@kapidenthead{\footnotesize \tt #1 (\klujnlname:\kluclassname)\ v.%
+        \kluclassversion\hfill}\fi}
+\else
+   \def\editor#1{\gdef\@kapidenthead{}%
+     \if@noid \gdef\@kapidentfoot{}\else 
+     \gdef\@kapidentfoot{\vbox to 0pt{%
+       \rlap{\vbox to \id@boxheight{\hbox{}\vfill
+             \hbox to \textwidth{\footnotesize\tt\hbox{}\hfill #1
+             (\klujnlname:\kluclassname)\ v.\kluclassversion}%
+               \vskip 10pt}}\vss}}\fi}
+\fi
+%    \end{macrocode}
+%
+%    \begin{macrocode}                             
+\newcounter{outputpage}
+\def\idline{\if@noid\else
+    \stepcounter{outputpage}%
+    \rlap{\smash{\vtop to \id@boxheight{%
+     \vfil\hbox to\textwidth{%
+     \hfil\footnotesize\tt 
+     \jobname.tex; \TODAY;~\timenow;~p.\theoutputpage}}}}%
+   \fi}
+%    \end{macrocode}
+%\subsection{Headings and page layout}
+% 
+% Change with older versions: |\idline| has been taken separately to
+% allow easier changes. This is defined above, and does not contain
+% any space, either vertical or horizontal (text extends below to the 
+% right, but it can be ignored here).
+%
+%|\DeclareTextAccent| is not very clean, but 
+% without it |\'|, |\`| and |\=| fail if used in the output routine 
+%(i.e. running headlines). Accents always require the use of |\protect|,
+% otherwise they will never be expanded in |\uppercase| versions. 
+%    \begin{macrocode} 
+\DeclareTextAccent{\@acci}{OT1}{19}
+\DeclareTextAccent{\@accii}{OT1}{18}
+\DeclareTextAccent{\@acciii}{OT1}{22}
+\DeclareTextAccent{\@acci}{T1}{1}
+\DeclareTextAccent{\@accii}{T1}{0}
+\DeclareTextAccent{\@acciii}{T1}{9}
+\gdef\markboth#1#2{{\let\protect=\noexpand
+    \xdef\myleftmark{\Uppercase{#1}}%
+    \xdef\myrightmark{\Uppercase{#2}}}}
+\let\imarkboth\markboth
+\def\myleftmark{}
+\def\myrightmark{}
+\def\@markfont{\rm\scriptsize}
+\def\@pgnumfont{\rm\normalsize}
+\def\ps@headings{%
+  \def\@oddfoot{\idline\hfil }%
+  \let\@evenfoot\@oddfoot
+  \def\@evenhead{\hbox{}\@pgnumfont\rlap{\thepage}\hfil
+    \@markfont\myleftmark\hfil}%
+  \def\@oddhead{\hbox{}\hfil\@markfont\myrightmark\hfil
+    \@pgnumfont\llap{\thepage}}%
+  \let\@mkboth\@gobbletwo
+  \def\chaptermark##1{}%
+  \def\sectionmark##1{}%
+  \def\subsectionmark##1{}}
+\def\ps@myheadings{%
+  \def\@oddfoot{\idline\hfil }%
+  \let\@evenfoot\@oddfoot
+  \def\@evenhead{\hbox{}\@pgnumfont\rlap{\thepage}\hfill
+    \@markfont\myleftmark}%
+  \def\@oddhead{\hbox{}\@markfont\myrightmark\hfill
+    \@pgnumfont\llap{\thepage}}%
+  \let\@mkboth\@gobbletwo
+  \def\chaptermark##1{}%
+  \def\sectionmark##1{}%
+  \def\subsectionmark##1{}}
+\def\ps@empty{%
+  \def\@oddfoot{\idline\hfil }%
+  \let\@evenfoot\@oddfoot
+  \def\@evenhead{}%
+  \def\@oddhead{}%
+  \let\@mkboth\@gobbletwo
+  \def\chaptermark##1{}%
+  \def\sectionmark##1{}%
+  \def\subsectionmark##1{}}
+\let\ps@title\ps@empty
+\let\ps@part\ps@empty
+\let\ps@chapter\ps@empty
+%    \end{macrocode}
+% 
+%
+% In a monography chapters place the marks as follows:\\
+% |2    C H A P T E R   O N E     .     T I T L E  O F  C H    3|
+%
+%    \begin{macrocode}
+\def\ps@monoheadings{%
+    \let\@mkboth\@gobbletwo
+    \def\@oddfoot{\idline\hfil}%
+    \let\@evenfoot\@oddfoot      
+    \def\@evenhead{\hbox{}\rm\normalsize\hbox to 0pt{\thepage\hss}\hfil
+         \footnotesize\myleftmark\hfil}%
+    \def\@oddhead{\hbox{}\rm\footnotesize\hfil
+        \myrightmark\hfil
+        \rm\normalsize\hbox to 0pt{\hss\thepage}}%
+    \def\chaptermark##1{%
+        \if@mainmatter
+        \markboth{\@chapapp\ \NUMTOWORD{\c@chapter}}{\@runningtitle}%
+        \else
+        \markboth{\@chapapp\ \thechapter}{\@runningtitle}%
+        \fi }
+    \let\sectionmark\@gobble
+  }
+  \def\ps@monotitle{\let\@mkboth\@gobbletwo
+    \def\@oddhead{\hbox{}\rm\footnotesize\hfil
+         \myleftmark\hfil}%
+    \def\@oddfoot{\idline \@barcode\@kapidentfoot
+        \parbox{\textwidth}{\hfil\thepage\hfil\\ \@copyrightfoot}}
+    \let\@evenhead\@oddhead
+    \let\@evenfoot\@oddfoot
+    \let\chaptermark\@gobbletwo
+    \let\sectionmark\@gobble
+    \let\subsectionmark\@gobble
+  }
+  \def\ps@monochapter{\let\@mkboth\@gobbletwo
+    \def\@oddhead{\hbox{}\hfil\rm\footnotesize
+        \myleftmark\hfil}%
+    \def\@oddfoot{\idline\hfil\rm\normalsize\thepage\hfil}%
+    \let\@evenhead\@oddhead
+    \let\@evenfoot\@oddfoot
+    \let\chaptermark\@gobbletwo
+    \let\sectionmark\@gobble
+    \let\subsectionmark\@gobble
+  }
+%    \end{macrocode}
+% 
+%
+% If editedvolume and if nothing specified
+%                                         
+%
+% Here we have:\\
+% |2  A U T H O R S       .   T I T L E   O F  E N T R Y   3|
+%
+%    \begin{macrocode}
+  \def\ps@editheadings{\let\@mkboth\@gobbletwo
+    \def\@oddfoot{\idline\hfil}%
+    \def\@evenfoot{\idline\hfil}%                           
+    \def\@evenhead{\hbox{}\rm\normalsize\rlap{\thepage}\hfil
+         \footnotesize\myleftmark\hfil}%
+    \def\@oddhead{\hbox{}\rm\footnotesize\hfil\myrightmark\hfil
+        \rm\normalsize\hbox to 0pt{\hss\thepage}}%
+    \def\chaptermark##1{%
+        \markboth{\@runningauthor}{\@runningtitle}}%
+    \let\sectionmark\@gobble
+  } 
+  \def\ps@edittitle{\let\@mkboth\@gobbletwo
+    \def\@oddhead{\hbox{}\rm\footnotesize\hfil
+         \myleftmark\hfil}%
+    \def\@oddfoot{\idline \@barcode\@kapidentfoot
+        \parbox{\textwidth}{\hfil\raise 6pt\hbox{\thepage}\hfil\\ \@copyrightfoot}}
+    \let\@evenhead\@oddhead
+    \let\@evenfoot\@oddfoot}
+%    \end{macrocode}
+% |\ps@opening| does not bother with |\chaptermark| etc, since it will
+% be used only as |\thispagestyle|.
+%    \begin{macrocode}
+\def\theinheadpage{\thepage}
+\def\ps@opening{%
+  \def\@oddhead{\@copyrighthead \@kapidenthead\hss
+            \if@copyrighthead \llap{\theinheadpage}\fi }%       
+  \let\@evenhead\@oddhead
+  \def\@oddfoot{\@copyrightfoot \@barcode\idline\@kapidentfoot\hss}
+  \let\@evenfoot\@oddfoot}
+%    \end{macrocode}
+%\subsection{The article environment} 
+% stepping the counter takes care of |\label| and |\ref|, but maybe there are 
+% no environments at all in the file. In that case, we do not want 
+% |\thearticle| to disrupt things. 
+%
+% The AtEndDocument is an extra check.
+%    \begin{macrocode}
+\newcounter{article}
+\renewcommand{\thearticle}{}
+\let\ilabel=\label
+\let\iref=\ref
+\let\ipageref=\pageref
+\let\art@intdefinecounter\@definecounter
+\newif\ifinarticle % \inarticlefalse
+\newenvironment{article}{% 
+  \def\@definecounter##1{\art@intdefinecounter{##1}%
+    \@addtoreset{##1}{article}}%       
+  \renewcommand{\thearticle}{\roman{article}}%
+  \refstepcounter{article}%
+  \message{Article \number\c@article}%
+  \gdef\@firstpage{\the\c@page}%                                 
+  \ifx\sectioncmd\section             
+    \@addtoreset{section}{article}%
+  \else
+    \@addtoreset{chapter}{article}%
+  \fi                              
+  \@addtoreset{endnote}{article}%
+  \@addtoreset{table}{article}%
+  \@addtoreset{figure}{article}%
+  \@addtoreset{algorithm}{article}%
+  \def\label##1{\ilabel{\thearticle ##1}}%
+  \def\ref##1{\iref{\thearticle ##1}}%
+  \def\pageref##1{\ipageref{\thearticle ##1}}%
+  \setlastpage 
+  \global\inarticletrue
+  }{\make@ao
+    \writelastpage
+    \clearpage
+    \if@openright
+      \ifodd \c@page \else ~\thispagestyle{empty}\newpage \fi
+    \fi
+    \gdef\@dedication{}\gdef\@translation{}%
+    \gdef\@title{}\gdef\@subtitle{}%
+    \gdef\@arttype{}\gdef\@keywords{}\gdef\@classification{}%
+    \gdef\@nomenclature{}\gdef\@abbreviations{}\gdef\@abstract{}%
+    \gdef\@kapidenthead{}\gdef\@kapidentfoot{}%
+    \gdef\@barcode{}\gdef\@firstpage{\thepage}%
+    \gdef\@crline{}%
+    \global\lastpagegivenfalse
+    \global\inarticlefalse
+    }
+\AtBeginDocument{\setlastpage}
+\AtEndDocument{\ifnum \c@article=0 
+    \writelastpage
+    \clearpage\fi}
+\font\barcodefont=cmr10
+\def\barcode#1{\global\font\barcodefont=barcodes
+  \gdef\@barcode{\rlap{\vbox to 0pt{%
+      \vbox to \id@boxheight{\hbox{}\vfill
+           {\barcodefont \hbox{#1}}}\vss}}}}
+\def\@barcode{}
+\def\PIPSID#1{}
+\parskip 0pt
+\hyphenpenalty 200
+\doublehyphendemerits 640000  % corresponds to badness 800
+\finalhyphendemerits  1000000  % corresponds to badness 1000
+\endinput              
+%    \end{macrocode}
+%\PrintIndex
+%\end{document}
+% end of kluedit.sty
+
+        
diff --git a/helm/papers/matita/klufloa.sty b/helm/papers/matita/klufloa.sty
new file mode 100644 (file)
index 0000000..1fd176e
--- /dev/null
@@ -0,0 +1,732 @@
+%
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\def\filedate{1998/03/13}
+%\changes{1997/07/10}{Fixes in @klu@caption: inserted [b] and moved
+%               kaprotate code from the else to after the fi.}
+\def\filename{klufloa.sty}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\gdef,\@cla,\@clb}
+%\DoNotIndex{\normalsize,\protect,\global,\setbox,\hbox,\vbox,\endinput}
+%\DoNotIndex{\egroup,\endgroup,\bgroup,\begingroup,\let}
+%\CodelineIndex
+%\newcommand{\Bs}{$\backslash$}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\setlength{\marginparwidth}{0in}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{T. \surname{Hoekwater}}
+%\institute{Kluwer Academic Publishers, Dordrecht}
+%\begin{abstract}
+% This internal stylefile takes care of floats and the |kaprotate| macro's \\
+%
+%\noindent
+%{\bf Disclaimer:}  This stylefile is to be used by Kluwer Academic
+% Publishers in the contruction of full class files. Therefore, the
+% user interface is not very high-level, and is definately not meant
+% for normal usage. This stylefile is provided {\bf as is}, i.e. we
+% accept no responsibilities whatsoever. You are free to use this file
+% in any way you like, provided you do not make {\it any\/} changes.
+% If you {\it do\/} make changes, you have to rename the changed file.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Usage}
+% At this moment, there are three float environments done here:
+% |table|, |figure| (with their starred and sub... forms) and |algorithm|.
+%                                  
+%
+% In order to facilitate customization, the following commands are
+% exported:
+%
+% \def\pitem[#1]{\item[\ttfamily\string #1]\SpecialUsageIndex{#1}}
+%\begin{description}
+%\pitem[\tabwidth]  Allows setting the width of a table that has to be
+%centered, but does not contain a |tabular| or |TABULAR|. Also,
+%it might be handy for tables that contain more than one |tabular|.
+%(e.g. |\tabwidth{20pc}|)                                             
+%\pitem[\tabfont]  Font specification for the main text of tables.\\
+%           (default value |\footnotesize|)
+%\pitem[\tabcapfont]  Font specification for table captions.
+%               (default value |\footnotesize|)
+%\pitem[\figcapfont]  Font specification for caption of figures. There is no
+% definition for the font of the text of figures.
+%               (defaultvalue |\footnotesize|)
+%\pitem[\tableindent] Indentation for tables. 
+%               (default given by stylefile)
+% Tables and figures can be either indented over a specified width, or
+% centered. This can be done independent of each other, but both
+% always use the same indentation. i.e: You cannot
+% have figures indented 4 picas and tables 2 picas, but you can have
+% indented tables with centered figures.
+%\pitem[\figindent] Indentation for figures. From the note above for these
+%two commands it follows that if both are given, they have to set the same
+% value. If they don't, the last given value will prevail.
+%               (default given by stylefile)
+%\pitem[\figtabdot] The dot after the number. (default value |.|)         
+%\pitem[\captionskip] Vertical skip between caption and main body of float.
+%           (default value 6pt)
+%\pitem[\tabcapspace] Space between heading of caption and
+%text of caption. This is a vertical or horizontal skip, depending on
+%whether captions are split or not. Default value .5em.
+%\pitem[\splittabcaptions] Splits the table captions in two parts.
+%\pitem[\splitfigcaptions] Splits the figure captions in two parts.
+%\pitem[\splitcaptions] Combines both.
+%\pitem[\indentedcaptions] Ordinarily, captions are centered above or below
+%the float. This setting allows you to specify a specific indentation. 
+%\pitem[\captionindent] Value used for the previous option The default value
+%is 0pt (appears to make most sense).
+%\end{description}                  
+%
+%
+% 
+%\newpage\section{Implementation}
+%
+% The |klutab| is necesarry here, because we need the definitions 
+% of tabular \& co that set the correct widths. It also makes sure that
+% these two are nicely tied in to eachother (version control problems).
+%
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{klufloa}[\filedate ]
+\RequirePackage{klutab}[1997/05/30]
+%    \end{macrocode}
+%\subsection{Float parameters}
+% These are standard as in \LaTeXe.
+%    \begin{macrocode}
+\setcounter{topnumber}{2}
+\setcounter{bottomnumber}{1}
+\setcounter{totalnumber}{3}
+\setcounter{dbltopnumber}{2}
+%    \end{macrocode}
+% The parameters below try to ensure that there are not so many float
+% pages. (prevents empty white space). 
+%
+% In the old stylefiles, 
+% |\topfraction| was $.99$, but that was bit to much, resulting in
+% pages with a huge float and only two text lines. Now a float has
+% to be $>.85$|\textheight| before it will result in a float page.
+% (oversimplified, but this is the general idea). This leaves
+% space on the page for a few more textlines.
+%
+% |\bottomfraction| used to be $.3$,  but that is to small for almost 
+% any float this style generates; there are split captions and tabnotes
+% to account for, so the value has increased a bit.
+%    \begin{macrocode}
+\renewcommand{\topfraction}{.85}
+\renewcommand{\textfraction}{.01}
+\renewcommand{\bottomfraction}{.4}
+\renewcommand{\floatpagefraction}{.84}
+\renewcommand{\dblfloatpagefraction}{.84}
+\renewcommand{\dbltopfraction}{.7}
+%    \end{macrocode}
+%\newpage
+% \subsection{Helper macros}
+% |\figtabdot| serves the same purpose as |\sectiondot| elsewhere,
+% and the 
+% names of various strings.
+%    \begin{macrocode}
+\def\figtabdot{.}
+\def\tablename{Table}%
+\def\figurename{Figure}%
+\def\algorithmname{Algorithm}%
+%    \end{macrocode}
+% |\maxfloatwidth| is the allowed width of the table.\\
+% (If this is a rotated table or figure, it will use all of the
+% page. Of course, |\maxfloatwidth| then is |\textheight|.)\\
+% |\figtabbox| will contain the total float as a vbox.
+% |\floatindent| is the indentation skip for indented tables \& figures. 
+% The last defined value will overwrite the previous one.\\
+% |\@tabskip| is an aid in helping to decide indentation of rotated tables.\\
+% |\cap@type| is an aid in keeping track of caption types\\
+% |\captionskip| is the vertical skip between caption and main body.
+%    \begin{macrocode}
+\newdimen\maxfloatwidth
+\newbox\figtabbox
+\newdimen\floatindent
+\newdimen\@tabskip
+\gdef\cap@type{0}
+\newdimen\captionskip
+\setlength\captionskip{6pt}
+%    \end{macrocode}
+%
+%
+% |\@tabwidth| is
+% supposed to contain the width of the table. (the width of |\figtabbox| is
+% probably either |\textwidth| or zero.) |tabular| and |TABULAR| from 
+% |klutab.sty| set
+% this value automatically, but so should every |table|. If your table
+% does not contain a |tabular|, you can set this value yourself:
+% just say |\tabwidth{..}| somewhere in your table.  Your text will
+% be typeset inside a |\vbox| with width |\maxfloatwidth|.
+%    \begin{macrocode}
+\newdimen\@tabwidth
+\setlength\@tabwidth{\textwidth}
+\def\tabwidth#1{\global\setlength\@tabwidth{#1}}
+%    \end{macrocode}
+%
+% |\@getindent| calculates the value of |\maxfloatwidth|, 
+% It is called from figure and table. 
+%
+% For rotated floats, |\maxfloatwidth| == |\vsize|. The use
+% of |\vsize| here is probably 
+% better than |\textheight|, because it allows use of minipages and
+% |\vbox|es to get special effects (where |\textheight| $>$ |\vsize|).
+%
+% |\@floatcorrect| fixes indentation for rotated floats. This and\\
+% |\hbox@to@floatwidth| are just shortcuts. 
+%    \begin{macrocode}
+\def\@getmaxwidth{\maxfloatwidth=\hsize
+    \if@kaprotate \maxfloatwidth=\textheight \fi }
+\def\@floatcorrect{\if@kaprotate\else 
+  \advance\maxfloatwidth -\floatindent \fi }
+\def\hbox@to@floatwidth#1{\leavevmode
+        \hbox to \@tabwidth{#1}}
+%    \end{macrocode}
+%
+% |\@getindent| calculates the values for |\@tabskip| and
+% |\@floatindent|. The first check initializes |\@tabwidth| for
+% anything except tables. The macro\\ |\@centeredfloat| does the
+% hard work for centered floats, where |\floatindent| is not given
+% beforehand.
+%    \begin{macrocode}
+\def\@getindent{%
+   \ifnum\cap@type=2 \else 
+        \@tabwidth=\if@kaprotate \textheight \else \hsize \fi 
+        \if@figindent\advance \@tabwidth -\floatindent \fi\fi
+   \ifnum\cap@type=1
+     \if@figindent \@tabskip\floatindent
+       \else \@centeredfloat \fi
+   \else \ifnum\cap@type=2  
+            \if@tabindent \@tabskip\floatindent 
+               \else \@centeredfloat  \fi
+            \ifdim \@tabwidth > \maxfloatwidth
+                \@tabskip 0pt
+                \floatindent 0pt
+            \fi
+         \else
+            \@centeredfloat
+         \fi
+   \fi        
+}
+%    \end{macrocode}
+%
+% |\@centeredfloat|\\
+% Calculate |\@tabskip| for centering. In this macro, we know the
+% float will be centered. We calculate |\floatindent| ourselves from
+% |\maxfloatwidth|.
+% 
+% We need to maintain this indentation for rotated floats (so they
+%   will be vertically centered), but |\@tabskip| needs to be re-done.
+%
+%    \begin{macrocode}
+\def\@centeredfloat{%
+     \floatindent\maxfloatwidth
+     \advance\floatindent by -\@tabwidth
+     \divide\floatindent by 2
+     \@tabskip\floatindent
+     \if@kaprotate 
+       \@tabskip\hsize
+       \advance\@tabskip by -\ht\figtabbox
+       \advance\@tabskip by -\dp\figtabbox
+       \divide\@tabskip by 2
+     \fi
+}    
+%    \end{macrocode}
+%
+% \subsection{Table caption commands}
+% Here is the code for the captions.
+%
+%
+% |\indentedcaptions| is a user option that indents captions instead 
+% (over a default value of 0pt).  
+%    \begin{macrocode}
+\newif\if@centeredfigcaption 
+\newif\if@centeredtabcaption 
+\@centeredtabcaptiontrue
+\@centeredfigcaptiontrue
+\def\indentedtabcaptions{\global\@centeredtabcaptionfalse }
+\def\indentedfigcaptions{\global\@centeredfigcaptionfalse }
+\def\indentedcaptions{\global\@centeredtabcaptionfalse
+    \global\@centeredfigcaptionfalse}
+\newdimen\captionindent
+\setlength\captionindent{0pt}
+\newtoks\@floatcaption
+\def\tabcapspace{.5em}
+\def\tabcapfont{\footnotesize }
+\long\def\@maketabcaption#1#2{\global\@floatcaption={#2}%
+   \message{\tablename\space\thetable \if@kaprotate 
+     \space(rotated) \fi}}
+%    \end{macrocode}
+%
+% Captions are centered above the table by default.\footnote{
+% In real life, {\tt @klu@caption} would be called {\tt make@caption},
+% since these do the typesetting}. This code is called from |\endtable|. 
+%    \begin{macrocode}
+\def\@klu@caption{%
+  \setbox1=\hbox{\tabcapfont\fnum@table\hskip\tabcapspace
+    \the\@floatcaption}%
+  \noindent
+  \ifdim\wd1 >\@tabwidth
+     {\if@centeredtabcaption\centering\else \hskip \captionindent\fi 
+     \parbox[b]{\@tabwidth}{\tabcapfont\unhbox1}}%
+  \else
+     \hbox to \@tabwidth{%
+       \if@centeredtabcaption \hfil \else \hskip \captionindent\fi
+       \tabcapfont\fnum@table
+       \hskip\tabcapspace{\tabcapfont\the\@floatcaption}\hfil }% 
+  \fi 
+  \if@kaprotate \else \par \vskip -\baselineskip \fi
+  \par 
+}
+\def\@klu@figcaption{%
+  \setbox1=\hbox{\figcapfont\fnum@figure\hskip\tabcapspace
+            \the\@floatcaption}%
+  \noindent
+  \ifdim\wd1 >\@tabwidth
+     {\if@centeredfigcaption\centering\else \hskip \captionindent\fi 
+     \parbox{\@tabwidth}{\figcapfont\unhbox1}}%
+  \else
+     \hbox to \@tabwidth{%
+       \if@centeredfigcaption \hfil\else \hskip \captionindent\fi
+       \tabcapfont\fnum@figure
+       \hskip\tabcapspace{\figcapfont\the\@floatcaption}\hfil}%
+  \fi 
+  \par 
+}
+%    \end{macrocode}
+%
+% |\splitcaptions| is a user option to generate a caption in which the
+% `Table 1' is separated from the caption text. The resulting
+% definitions depend on being inside a
+% vbox when called.
+%    \begin{macrocode}
+\def\splitcaptions{\splittabcaptions\splitfigcaptions}
+\def\splittabcaptions{
+  \def\@klu@caption{%
+    \setbox1=\hbox{\tabcapfont\the\@floatcaption}%
+    \noindent
+    \ifdim\wd1 >\@tabwidth 
+     \hbox to \@tabwidth{\if@centeredtabcaption\hss\else 
+       \hskip\captionindent\fi
+     \tabcapfont\fnum@table\hss}\vskip \tabcapspace
+       \vskip 6pt
+     {\if@centeredtabcaption\centering\fi 
+       \hskip \captionindent
+          \parbox{\@tabwidth}{\tabcapfont\unhbox1}}%
+   \else
+     \hbox to \@tabwidth{%
+       \if@centeredtabcaption \hfil\else \hskip\captionindent\fi
+       \tabcapfont\fnum@table\strut\hfil }\vskip \tabcapspace
+      \hbox to \@tabwidth{%
+       \if@centeredtabcaption \hfil\else \hskip\captionindent \fi
+       \tabcapfont\the\@floatcaption \hfil }%
+       \if@kaprotate \else \par \vskip -\baselineskip \fi
+   \fi 
+   \par 
+}}
+\def\splitfigcaptions{\def\@klu@figcaption{%
+    \setbox1=\hbox{\figcapfont\the\@floatcaption}%
+    \noindent
+    \ifdim\wd1 >\@tabwidth 
+     \hbox to \@tabwidth{\if@centeredfigcaption\hfil\else 
+       \hskip\captionindent\fi
+            \figcapfont\fnum@figure\hfil}\vskip \tabcapspace
+       \vskip 6pt
+     {\if@centeredfigcaption\centering\fi \hskip \captionindent
+            \parbox{\@tabwidth}{\figcapfont\unhbox1}}%
+   \else
+     \hbox to \@tabwidth{%
+       \if@centeredfigcaption \hfil\else \hskip\captionindent\fi
+       \figcapfont\fnum@figure\strut\hfil }\vskip \tabcapspace
+      \hbox to \@tabwidth{%
+       \if@centeredfigcaption \hfil\else \hskip\captionindent\fi
+       \figcapfont\the\@floatcaption \hfil }%
+   \fi 
+   \par 
+}}%
+%    \end{macrocode}
+%\newpage
+%\subsection{Table}
+% Standard \LaTeX\ definitions first:
+%
+% |\newcounter| removed 7/6/96 to prevent errors when used as package.
+% (`counter |\c@table| already defined')
+%    \begin{macrocode}
+\@ifundefined{thetable}{\newcounter{table}}{}
+\def\thetable{\arabic{table}}
+\def\fps@table{tbp}
+\def\ftype@table{2}
+\def\ext@table{lot}
+\def\fnum@table{\tablename~\thetable\figtabdot}
+%    \end{macrocode}
+% Now the switch to control indentation.
+%
+%    \begin{macrocode}
+\newif\if@tabindent \@tabindentfalse
+\def\tableindent#1{%
+   \global\floatindent= #1\global\@tabindenttrue }
+%    \end{macrocode}
+% Default font for tables.
+% This could also be used to redefine the font
+% defaults like family and shape.
+%    \begin{macrocode}
+\def\tabfont{\footnotesize}
+%    \end{macrocode}
+% |\tabnotes| is intended to be used as `footnote' to a tabular
+% environment. |\@tabnotes| will be cleared before every table.
+%    \begin{macrocode}
+\def\@tabnotes{}
+\newcounter{tabnote}
+\def\tabnotemark{\ensuremath{^{\thetabnote}}}
+\def\thetabnote{\arabic{tabnote}}
+\def\tabnotesep{\par}
+\def\tabnote#1{\stepcounter{tabnote}%
+    \rlap{\tabnotemark }%
+    \begingroup
+    \let\tabnotesep\relax
+    \xdef\@tabnotes{\@tabnotes\tabnotesep \tabnotemark #1\par}%
+    \endgroup }
+\long\def\tabnotes#1{\gdef\@tabnotes{{\tabfont\noindent #1\par}}}
+%    \end{macrocode}
+% Now for the macro's that set the table itself. Just to recall: \\[6pt]
+%|\maxfloatwidth|== max. width of table\\
+%|\@tabskip|== horizontal offset\\
+%|\floatindent|==indent before table proper\\
+%|\@tabnotes|==macro containing tabnotes (in Tabfont)\\
+%|\figtabbox|==vbox containing table (minus caption \& tabnotes)
+%
+% Non-rotated version:\\
+% Check width of caption. If it is too wide to fit on one line, put it
+% in a |\parbox| with proper |\floatindent| before it.
+%
+%    \begin{macrocode}
+\def\@setnotrotatedtabbox{%
+  \setbox4=\hbox to \maxfloatwidth{\vbox{\hsize=\maxfloatwidth
+     \@klu@caption 
+     \vskip\captionskip \leavevmode
+     \unvbox\figtabbox\par
+     \noindent\parbox{\@tabwidth}{\tabfont\@tabnotes}\par}}% 
+      \if@fixedfloat\calc@fixedspace4\fi                  
+  \noindent\kern \floatindent\box4
+ }
+%    \end{macrocode}
+% Rotated version. We are inside a |\vbox| here, so we typeset 3
+% hboxes (and a |\vskip|).
+%
+% |\maxfloatwidth| is |\textheight| here, causing overfull boxes.
+%
+%    \begin{macrocode}
+\def\@setrotatedtabbox{\begingroup \hfuzz=\vsize   
+     \setbox2\hbox to \textheight{\hfil
+        \vbox to \hsize{\hsize=\vsize
+         \vfil
+         \hbox{\hbox@to@floatwidth{\vbox{\@klu@caption }}}
+         \vskip\captionskip 
+         \hbox{\hbox@to@floatwidth{\box\figtabbox\hss}}%        
+         \hbox{\hbox@to@floatwidth{\parbox{\@tabwidth}{\tabfont\@tabnotes}\hfil }}%
+         \vss                
+    }\hss}\rotl{2}\endgroup
+}
+%    \end{macrocode}
+% |\@makecaption| will be |\let| to |\@maketabcaption| in for the
+% duration of the table.
+%
+% This is quite simple code, apart from handling the optional argument
+% ourselves. |kaprotate| effectively kills Overfull and Underfull
+% hbox-es. I don't like that, but I also don't like the messages I
+% always get (Overfull hbox with width = |\textheight| $-$ |\textwidth|).
+%    \begin{macrocode}
+\def\table{\let\@makecaption\@maketabcaption
+    \global\@floatcaption={}%
+    \gdef\@tabnotes{}\setcounter{tabnote}{0}\gdef\cap@type{2}%
+    \@ifnextchar[{\t@blewithoptions}{\t@blewithoptions[tbp]}}
+\def\t@blewithoptions[#1]{%
+    \if H#1\@fixedtable \else \@float{table}[#1]\fi
+    \@getmaxwidth \if@tabindent \@floatcorrect \fi
+    \setbox\figtabbox\vbox\bgroup\tabfont
+    \if@kaprotate\hfuzz=\vsize\fi }%
+%    \end{macrocode}
+%
+% This |\hfuzz| is a bit more precise. At least ik will warn if the
+%    tabular itself is too large.
+%    \begin{macrocode}
+\def\endtable{\egroup \@getindent
+  \gdef\cap@type{0}\noindent
+  \hfuzz=\floatindent 
+    \if@kaprotate \@setrotatedtabbox 
+    \else \@setnotrotatedtabbox \fi 
+  \if@fixedfloat \vskip\intextsep \@fixedfloatfalse   
+  \else \end@float \fi 
+  \hfuzz =0.1pt }%
+%    \end{macrocode}
+%\subsection{Table starred} 
+% This code is basically identical to the code above.
+% Multicolumn `Here' floats in twocolumn layout don't work, for obvious
+%  reasons. If you need something like that, fake it with the
+%  twocolumn package.
+%    \begin{macrocode}
+\@namedef{table*}{\let\@makecaption\@maketabcaption
+    \global\@floatcaption={}%
+    \gdef\@tabnotes{}\setcounter{tabnote}{0}\gdef\cap@type{2}%
+    \@ifnextchar[{\dt@blewithoptions}{\dt@blewithoptions[tbp]}}
+\def\dt@blewithoptions[#1]{%
+    \if H#1\if@twocolumn \@dblfloat{table}[t]\else \@fixedtable\fi 
+    \else \@dblfloat{table}[#1]\fi
+    \@getmaxwidth \if@tabindent \@floatcorrect \fi
+    \setbox\figtabbox\vbox\bgroup\tabfont
+    \if@kaprotate \hfuzz=\vsize \fi }%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\@namedef{endtable*}{\egroup  \@getindent
+    \gdef\cap@type{0}\noindent
+    \hfuzz=\floatindent
+    \if@kaprotate \@setrotatedtabbox
+    \else \@setnotrotatedtabbox \fi
+    \if@fixedfloat  \vskip\intextsep \@fixedfloatfalse   
+    \else \end@dblfloat \fi 
+    \hfuzz=0.1pt }%
+%    \end{macrocode}
+% \subsection{fixed point tables and figures}
+% The fixedtable option. If there is enough room on the page, the 
+% box is typeset right away. If there is not enough space, the page is
+% ended and the box is typeset at the top of the next page. This may
+% conflict with following `top' floats, but the exact location in
+% the text is maintained.
+%
+% Don't try to use |[H]| on rotated tables, and twocolumn will produce
+% overlapping text in the second column, also, these will not appear
+%    in a `list of tables' unless you specifically ask that.
+%    \begin{macrocode}
+\newif\if@fixedfloat
+\def\@fixedtable{\vskip\intextsep \@fixedfloattrue  
+    \def\caption{\@ifnextchar[{\f@xedcap{table}}%
+      {\f@xedcap{table}[]}}}
+\def\@fixedfigure{\vskip\intextsep \@fixedfloattrue
+    \def\caption{\@ifnextchar[{\f@xedcap{figure}}%
+      {\f@xedcap{figure}[]}}}
+\def\f@xedcap#1[#2]#3{\refstepcounter{#1}\def\@tempa{#2}%
+  \ifx\@tempa\empty
+  \else \addcontentsline{\csname ext@#1\endcsname}{#1}{#2}\fi
+    \message{#1\space\csname the#1\endcsname \space (fixed)}%
+    \global\@floatcaption={#3}}
+\def\calc@fixedspace#1{%                 
+       \@tempdima=\pagegoal    
+       \@tempdimb=\dp#1      
+       \advance\@tempdimb \ht#1      
+       \advance\@tempdima -\pagetotal
+       \advance\@tempdima -2\intextsep
+         \wlog{pageleft= \the\@tempdima, 
+           size= \the\@tempdimb }%
+       \ifdim\@tempdima>\@tempdimb \else \newpage \fi}    
+%    \end{macrocode}
+%
+%\newpage \subsection{Figure}
+% Now we are going to do this all over again for
+% figures. Documentation will only mark important differences.
+%
+% Parameters.
+%
+%    \begin{macrocode}
+\@ifundefined{thefigure}{\newcounter{figure}}{}
+\def\thefigure{\arabic{figure}}
+\def\fps@figure{tbp}
+\def\ftype@figure{1}
+\def\ext@figure{lof}
+\def\fnum@figure{\figurename~\thefigure\figtabdot}
+%    \end{macrocode}
+% Indentation, font and caption.
+%    \begin{macrocode}
+\newif\if@figindent   \@figindentfalse   
+\def\figindent#1{%
+  \global\floatindent #1
+  \global\@figindenttrue }
+\def\figcapfont{\footnotesize}
+\long\def\@makefigcaption#1#2{%
+  \message{\figurename\space\thefigure 
+      \if@kaprotate \space (rotated)\fi }%
+  \global\@floatcaption={#2}}
+%    \end{macrocode}
+% 
+% The |fixed| option. 
+% 
+%    \begin{macrocode}
+%    \end{macrocode}
+% The figure environment itself.
+%    \begin{macrocode}
+\def\figure{%
+   \gdef\cap@type{1}%
+   \let\@makecaption\@makefigcaption
+   \global\@floatcaption={}%
+   \@ifnextchar[{\f@gurewithoptions}{\f@gurewithoptions[tbp]}}%
+\def\f@gurewithoptions[#1]{%
+  \let\saved@centerline\centerline
+  \if H#1\@fixedfigure \else \@float{figure}[#1]\fi
+    \@getmaxwidth \if@figindent \@floatcorrect 
+        \def\centerline##1{##1}\fi
+  \setbox\figtabbox\vbox\bgroup }%
+\def\endfigure{\egroup   
+       \@getindent \gdef\cap@type{0}%
+       \hfuzz=\floatindent
+       \if@kaprotate \@setrotatedfigbox \pagebreak
+       \else \@setnotrotatedfigbox \fi 
+       \let\centerline\saved@centerline
+       \if@fixedfloat \vskip\intextsep \@fixedfloatfalse   
+       \else \end@float \fi 
+       \hfuzz=0.1pt }%
+%    \end{macrocode}
+% \subsection{figure starred}
+%    \begin{macrocode}
+\@namedef{figure*}{%
+    \def\cap@type{1}%
+    \let\@makecaption\@makefigcaption
+    \global\@floatcaption={}%
+    \@ifnextchar[{\df@gurewithoptions}{\df@gurewithoptions[ttp]}}
+\def\df@gurewithoptions[#1]{%
+  \let\saved@centerline\centerline
+  \if H#1 \@fixedfigure \else \@dblfloat{figure}[#1]\fi
+    \@getmaxwidth \if@figindent \@floatcorrect 
+        \def\centerline##1{##1}\fi
+     \setbox\figtabbox\vbox\bgroup }%
+\@namedef{endfigure*}{\egroup
+        \@getindent \gdef\cap@type{0}% 
+        \hfuzz=\floatindent
+        \if@kaprotate \@setrotatedfigbox
+        \else \@setnotrotatedfigbox \fi 
+         \let\centerline\saved@centerline
+        \if@fixedfloat \vskip\intextsep \@fixedfloatfalse
+        \else \end@dblfloat \fi
+        \hfuzz=0.1pt }%
+%    \end{macrocode}
+% Non-rotated version (in figures |\caption| is done last):
+%    \begin{macrocode}
+\def\@setnotrotatedfigbox{%
+  \setbox4=\hbox to \maxfloatwidth{\vbox{\hsize=\maxfloatwidth
+     \unvbox\figtabbox
+     \vskip\captionskip 
+     \@klu@figcaption }}% 
+      \if@fixedfloat\calc@fixedspace4 \fi                  
+  \noindent\kern \floatindent\box4 
+}
+%    \end{macrocode}
+% Rotated version: 
+%
+%    \begin{macrocode}
+\def\@setrotatedfigbox{%
+     \setbox2\vbox to \hsize{\hsize=\textheight
+         \leavevmode
+         \vrule width \textheight height 0pt depth 0pt\par
+         \vskip \@tabskip                                      
+         \hbox to \textheight{\hss\box\figtabbox\hss}%
+         \vskip\captionskip 
+         \hbox to \textheight{\vbox{\@klu@figcaption }}
+         \vss
+    }\rotl{2}}%
+%    \end{macrocode}
+%\newpage \subsection{Algorithm} 
+% This is a `standard' float. 
+%    \begin{macrocode}
+\newcounter{algorithm}
+\def\thealgorithm{\arabic{algorithm}}
+\def\fps@algorithm{tbp}
+\def\ftype@algorithm{4}
+\def\ext@algorithm{lof}
+\long\def\@makealgocaption#1#2{%
+     \hbox to \hsize{\parbox[t]{\hsize}{{\vskip 1ex \tabcapfont
+     #1\figtabdot~~#2}}}}
+\def\fnum@algorithm{\algorithmname\space \thealgorithm}
+\def\algorithm{\let\@makecaption\@makealgocaption
+                \@float{algorithm}\footnotesize\obeyspaces\obeylines}
+\let\endalgorithm\end@float
+%    \end{macrocode}
+%\subsection{subtable and subfigure}
+% These are the sub... environments. If you need comment on what
+% happens, please see |kluthm.sty|, definition of |subequation|.
+%    \begin{macrocode}
+\def\subtable{\@ifnextchar[{\@subtable}{\@subtable[alph]}}
+\def\@subtable[#1]{\refstepcounter{table}%
+  \def\@testoption{arabic}\def\@testparam{#1}%
+  \begingroup
+  \edef\old@table{\the\c@table}%
+  \edef\old@thetable{\thetable}%
+  \setcounter{table}{0}%
+  \ifx\@testoption\@testparam
+     \def\thetable{\old@thetable.\csname #1\endcsname{table}}%
+  \else
+     \def\thetable{\old@thetable\csname #1\endcsname{table}}%
+  \fi}
+\def\endsubtable{\setcounter{table}{\old@table}%
+  \endgroup \global\@ignoretrue}
+\def\subfigure{\@ifnextchar[{\@subfigure}{\@subfigure[alph]}}
+\def\@subfigure[#1]{\refstepcounter{figure}%
+  \def\@testoption{arabic}\def\@testparam{#1}%
+  \begingroup
+  \edef\old@figure{\the\c@figure}%
+  \edef\old@thefigure{\thefigure}%
+  \setcounter{figure}{0}%
+  \ifx\@testoption\@testparam
+     \def\thefigure{\old@thefigure.\csname #1\endcsname{figure}}%
+   \else
+     \def\thefigure{\old@thefigure\csname #1\endcsname{figure}}%
+   \fi}
+\def\endsubfigure{\setcounter{figure}{\old@figure}%
+  \endgroup \global\@ignoretrue}
+%    \end{macrocode}
+% \subsection{kaprotate}
+% This appears to be an afterthought now, but in fact it is a quite
+% handy command.  The environment is defined in this file, because
+% this reflects common usage, and this allows loading as a package
+% in e.g. |article|.
+%
+%    \begin{macrocode}
+
+\newif\if@kaprotate \@kaprotatefalse
+\def\kaprotate{\global\@kaprotatetrue}
+\def\endkaprotate{\global\@kaprotatefalse}
+
+%    \end{macrocode}
+%
+% \subsubsection{Rotation macros}
+% These are used in the |kaprotate| environment. Note that these
+% macros depend on PostScript output at this moment. Later,
+% I might include commands for (at least) Tpic.
+%
+% These are just a few macro's, so it isn't really worth including |graphicx|
+% at the moment.
+%
+% |\rotl| and |\rotr| rotate a given box over resp. 270 and 90 degrees
+% while typesetting that box. The new box has $wd_{new}=dp_1 + ht_1$ and
+% $ht_{new}=wd_1$, with $dp_{new} ==0$.
+%    \begin{macrocode} 
+\newdimen\rotdimen
+\def\rotstart#1{\special{ps: gsave currentpoint currentpoint translate
+    #1 neg exch neg exch translate}}
+\def\rotfinish{\special{ps: currentpoint grestore moveto}}
+\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1
+    \hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1
+    \rotstart{270 rotate}\box #1\vss}\hss}\rotfinish}
+\def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1
+    \hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1
+    \rotstart{90 rotate}\box #1\vss}\hss}\rotfinish}
+\endinput
+%    \end{macrocode}
+%\newpage
+%\def\IndexParms{\hbadness=10000}
+%\PrintIndex
+%\end{document}
+% end of klufloa.sty
+
+
+
+
+
diff --git a/helm/papers/matita/klulist.sty b/helm/papers/matita/klulist.sty
new file mode 100644 (file)
index 0000000..b24bca2
--- /dev/null
@@ -0,0 +1,276 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/03/17}
+\def\filename{klulist.sty}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\normalsize,\numberline,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{$\backslash$}      
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal stylefile takes care of list definitions and `general'
+% environments. There is one option: |kaplist|. 
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Usage}
+% For the time being, all environments for which it is not so clear
+% where to put them are placed in this file. This came about because
+% most of these are |\trivlist| alike, but is quite arbitrary.
+%
+% As a result, this stylefile defines the following `common'
+% environments: \\[6pt]
+%|verse|\\
+%|quote|\\
+%|quotation|\\
+%|frontmatter|\\
+%|acknowledgements|\\
+%|notes|\\
+%|vitae|\\
+%|ao|\\
+%~
+% And, of course, |itemize|, |enumerate| and |description|.
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesPackage{klulist}[\filedate ]
+\newif\if@kaplist
+\DeclareOption{kaplist}{\@kaplisttrue}
+\ExecuteOptions{}
+\ProcessOptions
+%    \end{macrocode}
+% The label and counter default values for |enumerate|. Reference
+% output at a level above 3 starts to look ridiculous.
+%    \begin{macrocode}
+\def\labelenumi{\arabic{enumi}.}        % 1.
+\def\theenumi{\arabic{enumi}}           % 1
+\def\labelenumii{\alph{enumii})}        % a)
+\def\theenumii{\alph{enumii}}           % a
+\def\p@enumii{\theenumi}                % 1a
+\def\labelenumiii{\it\roman{enumiii})}  % \it i)
+\def\theenumiii{\roman{enumiii}}        % i
+\def\p@enumiii{\theenumi(\theenumii)}   % 1(a)\it i) 
+\def\labelenumiv{\Alph{enumiv})}        % A)
+\def\theenumiv{\Alph{enumiv}}           % A
+\def\p@enumiv{\p@enumiii\theenumiii}    % 1(a)\it i)A
+%    \end{macrocode}
+% Itemize labels 
+%    \begin{macrocode}
+\def\labelitemi{\m@th$-$}            
+\def\labelitemii{\m@th$\bullet$}    
+\def\labelitemiii{\m@th$\ast$}      
+\def\labelitemiv{{\footnotesize +}}  
+%    \end{macrocode}
+% Description list.
+%    \begin{macrocode}
+\def\descriptionlabel#1{\hspace\labelsep \bf #1}
+\newenvironment{description}{%
+  \list{}{%
+    \labelwidth\z@
+    \itemindent -\leftmargin
+    \let\makelabel\descriptionlabel
+    }}{\endlist}
+%    \end{macrocode}
+%\newpage
+% \subsection{kaplist}
+% This changes quite a lot of things. 
+%
+% Insert different options to |\list|
+%    \begin{macrocode}
+\if@kaplist
+  \def\kapitemargs{%
+   \topsep        \z@ \@plus 1pt
+   \partopsep     \z@ \@plus 1pt
+   \itemsep       \z@ \@plus \z@
+   \parsep        \z@ \@plus 1pt
+   \leftmargini   \z@
+   \leftmarginii  1em
+   \leftmarginiii 1em
+   \leftmarginiv  1em
+   \rightmargin   \z@
+   \listparindent \z@
+   \itemindent    \z@
+  }           
+  \let\kapenumargs\kapitemargs
+%    \end{macrocode}
+% Changed |\@mklab| from |[    1]| to |[1     ]|
+%    \begin{macrocode}
+  \renewcommand{\@mklab}[1]{#1\hfil}
+\else
+\def\kapenumargs{}
+\def\kapitemargs{}
+\fi
+%    \end{macrocode}
+% \newpage \subsection{Other environments}
+% These are the environments that we {\it have\/} to define.
+%
+% This enumerate has an optional argument and uses that to implement dynamic
+% resizing of the left margin.
+%
+% This itemize has an extra optional argument that gives the default label.
+%    \begin{macrocode}
+\def\enumerate{%
+    \@ifnextchar[{\kap@enumerate}{\kap@enumerate[00]}}
+\def\kap@enumerate[#1]{%
+     \ifnum \@enumdepth >3 \@toodeep\else
+     \advance\@enumdepth \@ne
+     \edef\@enumctr{enum\romannumeral\the\@enumdepth}
+     \list{\csname label\@enumctr\endcsname}{%
+       \kapenumargs 
+       \usecounter{\@enumctr}
+       \settowidth\labelwidth{#1.}
+       \setlength{\leftmargin}{\labelwidth} 
+       \addtolength{\leftmargin}{\labelsep}
+       \def\makelabel##1{\hss \llap{##1}}}%
+     \fi
+   }
+\let\endenumerate\endlist
+\def\itemize{\@ifnextchar[{\kap@itemize}{\kap@itemize[]}}
+\def\kap@itemize[#1]{\def\klu@arg{#1}%  
+    \ifnum \@itemdepth >3 \@toodeep
+    \else
+      \advance\@itemdepth \@ne 
+      \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+      \ifx \klu@arg\empty 
+        \list {\csname\@itemitem\endcsname}%
+        {\kapitemargs
+         \def\makelabel##1{\hss ##1\hfil}}%
+      \else 
+        \list {\klu@arg }%
+        {\kapitemargs
+         \def\makelabel##1{\hss ##1\hfil}}%
+      \fi
+    \fi 
+    }
+\let\enditemize\endlist
+\def\verse{\let\\=\@centercr
+  \list{}{\itemsep\z@
+      \itemindent -1.5em
+      \listparindent \itemindent
+      \rightmargin\leftmargin
+      \advance\leftmargin 1.5em
+  }\item[]}
+\let\endverse\endlist               
+
+\def\quotation{\quoteskip
+  \list{}{%
+     \listparindent 1.5em
+     \topsep .5ex plus 2pt minus 1pt
+     \itemindent\listparindent
+     \parsep 0pt plus 1pt
+     }\item[]
+  \hskip-\listparindent}
+\def\endquotation{\endlist\quoteskip}
+
+\def\quote{\quoteskip\list{}{%
+  \leftmargin 1.5em
+  \topsep .5ex plus 2pt minus 1pt
+  }\item[]}
+\def\endquote{\endlist\quoteskip}
+\def\quoteskip{}
+
+\def\frontmatter{\begingroup\thispagestyle{empty}%
+    \renewcommand{\thepage}{\roman{page}}\setcounter{page}{1}}
+\def\endfrontmatter{\newpage\endgroup\setcounter{page}{1}}
+%    \end{macrocode}
+% \newpage\subsection{`New' environments}
+% The |notes| environment is used for incapsulation of `endnotes' that
+% are typed in.
+%    \begin{macrocode}
+\newenvironment{notes}{\sectioncmd*{\notesname}\footnotesize
+                    \begin{enumerate}}{\end{enumerate}%
+                      \par \vskip 6pt \@plus 12pt \@minus 2pt}
+\def\notesname{Notes}
+%    \end{macrocode}
+% 
+% This is the |vitae| environment. It does not use a list, but `item's
+% are specified through |\Vauthor|. The name is defined in
+% |\vitaename| and |\multiplevitaename|. 
+%
+% The choice between these two names is done by checking the value of
+% |enumiv|, which is incremented by every |\Vauthor|.
+%    \begin{macrocode}
+\newenvironment{vitae}{%
+    \begingroup 
+    \setcounter{enumiv}{0}%
+    \global\setbox0=\vbox\bgroup
+    }{%
+    \egroup
+    \ifnum \c@enumiv > 1
+      \par\section*{\multiplevitaename}%
+    \else
+      \par\section*{\vitaename}%
+    \fi
+    \unvbox0 \endgroup \par
+    \vspace{24pt}%
+  }
+\newcommand{\Vauthor}[1]{%
+    \addtocounter{enumiv}{1}%
+    \subsubsection*{#1}%
+    }
+  \def\vitaename{Author's Vitae}%      
+  \def\multiplevitaename{Authors' Vitae}%
+%    \end{macrocode}
+% |ao| will be typeset at the end of an article. 
+% I exchanged the |\if| for a permanent |\box|, because
+% the box is needed anyway. 
+%    \begin{macrocode}
+\newbox\aobox
+\newenvironment{ao}{%
+  \global\setbox\aobox
+  \vbox\bgroup
+    \footnotesize\noindent
+%    \end{macrocode}
+% Watch out for the fixed space here. 
+%    \begin{macrocode}
+    \ifx\offprintsaddress\empty 
+    \leavevmode
+    \else
+      {\it \offprintsaddress:\/}\ 
+    \fi
+  }
+  {\par\vskip18pt\egroup}
+\newcommand{\make@ao}{%
+    \@tempdima \ht\aobox 
+    \ifdim \@tempdima > 0pt
+    \par\noindent \unvbox\aobox 
+    \fi 
+    }
+%    \end{macrocode}                 
+% This is a name that is not done at |\begin{document}|, because
+% certain style may want to change this. The saveguard above is in
+% case a style defines it to be empty.
+%    \begin{macrocode}
+\newcommand{\offprintsaddress}{Address for Offprints}
+\newenvironment{thenomenclature}{\section*{Nomenclature}
+    \parbox[t]{.48\textwidth}\bgroup\parindent 0pt
+    \footnotesize \begin{tabular}{p{2pc}p{11pc}}}{%
+              \end{tabular}\egroup}
+\newcommand{\splitnomen}{\end{tabular}\egroup~\parbox[t]{.48\textwidth}%
+    \bgroup\parindent 0pt \footnotesize \begin{tabular}{p{2pc}p{11pc}}}
+\newcommand{\nmc}[1]{\parbox[t]{11pc}{\raggedright #1}}
+\def\verbatim@font{\normalsize\tt}
+\def\acknowledgementsname{Acknowledgements}%
+\def\acknowledgements{\section*{\acknowledgementsname}%
+  \message{\acknowledgementsname}}
+\def\endacknowledgements{\par \bigskip} 
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+% end of klulist.sty
+
diff --git a/helm/papers/matita/klumac.sty b/helm/papers/matita/klumac.sty
new file mode 100644 (file)
index 0000000..5b337cd
--- /dev/null
@@ -0,0 +1,359 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klumac.sty}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\gdef,\@cla,\@clb}
+%\DoNotIndex{\normalsize,\protect,\global,\setbox,\hbox,\vbox,\endinput}
+%\DoNotIndex{\egroup,\endgroup,\bgroup,\begingroup,\let}
+%\CodelineIndex
+%\newcommand{\Bs}{$\backslash$}%
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal stylefile defines some handy macros and exports the special 
+% \AmSTeX\ fonts if available.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Usage}
+%Here are tests for the macro commands used and defined in this file:   
+%{\def\mentry#1{$#1$ & \$\string #1\$ &}
+%\def\tentry#1{#1 & \string #1 &} 
+%
+%\begin{tabular}{lllllllll}\hline
+%$\I         $&\verb!$\I$!         &$\iduaal$     &\verb!$\iduaal$!     \\
+%$\restrict  $&\verb!$\restrict$!  &$\diamond$    &\verb!$\diamond$!    \\
+%$\depth     $&\verb!$\depth$!     &$\dom$        &\verb!$\dom$!        \\
+%$\mapdown{a}$&\verb!$\mapdown{a}$!&$\dC$         &\verb!$\dC$!         \\
+%$\dF        $&\verb!$\dF$!        &$\dP$         &\verb!$\dP$!         \\
+%$\dZ        $&\verb!$\dZ$!        &$\dQ$         &\verb!$\dQ$!         \\
+%$\gsim      $&\verb!$\gsim$!      &$\logr$       &\verb!$\logr$!       \\
+%$\dres      $&\verb!$\dres$!      &\today        &\verb!\today!      \\
+%$\forces    $&\verb!$\forces$!    &\.{a} & \verb!\.{a}! \\
+%$\concat    $&\verb!$\concat$!    &$\lh$         &\verb!$\lh$!         \\  
+%$\range     $&\verb!$\range$!     &$\mapright{a}$&\verb!$\mapright{a}$!\\
+%$\dL        $&\verb!$\dL$!        &$\dE$         &\verb!$\dE$!\\
+%$\dN        $&\verb!$\dN$!        &$\dR$         &\verb!$\dR$!\\
+%$\nequiv    $&\verb!$\nequiv$!    &$\lsim$       &\verb!$\lsim$!\\  
+%$\grlo      $&\verb!$\grlo$!      &$\oast$       &\verb!$\oast$!   \\
+%$\res$       &\verb!$\res$!       &$\dres$        &\verb!$\dres$!  \\
+%$\bigo{a}$   &\verb!$\bigo{a}$!   &$\Res{a}$       &\verb!$\Res{a}$!\\ 
+%$\down{a}$   &\verb!$\down{a}$!   &\timenow      &\verb!\timenow!&  \\
+%\TODAY       &\verb!\TODAY!       &\nbox{6}{500}{}{.}{4}{1}&
+%\verb!\nbox{6}{500}{0}{.}{4}{1}! \\
+%\cb[6pc]{Quite a bit to long a text to fit in one column}& 
+%\verb!\cb[6pc]{Qu.... mn}!& \nbox{6}{600}{}{.}{4}{74}  & 
+%\verb!\nbox{6}{600}{0}{.}{4}{74}!\\
+%\hline
+%\end{tabular}                      
+%          
+% \begin{itemize}
+% \spitem spitem. (\verb!\spitem spitem. !)                         
+% \spitem item) (\verb!\spitem spitem) !)                         
+% \spitem em] (\verb!\spitem spitem] !)                         
+% \spitem - (\verb!\spitem spitem- !)                         
+% \spitem * (\verb!\spitem spitem* !)
+% \end{itemize}                         
+%\newpage\section{Implementation}   
+% Input special fonts. The commands for kluwer's internal font are
+% always valid, but this option defines the font. This is needed
+% because we do not intend to supply the font to everyone. 
+%
+% Policy is that we want the ams fonts defined. However, not everybody
+% has these fonts installed, so it's better to be careful.
+%    \begin{macrocode}              
+\ProvidesPackage{klumac}[\filedate ]
+\font\@klusymfont=cmr10             
+\DeclareOption{klusym}{\font\@klusymfont=klusym10 }
+\ExecuteOptions{}
+\ProcessOptions
+\IfFileExists{amssymb.sty}{\RequirePackage{amssymb}%
+    \global\font\smallmsa=msam7
+    \gdef\Register{$^{\mbox{\smallmsa\char114}}$~}}{}
+\IfFileExists{wasysym.sty}{\RequirePackage{wasysym}}{%
+  \IfFileExists{wasysym.tex}{\input{wasysym}}{}}
+%    \end{macrocode}
+% 
+% \subsection{Math macro's}
+%    \begin{macrocode}
+\newcommand\I{{\bf I}}
+\newcommand\iduaal{\overline{\I}}
+\let\forces\Vdash
+\newcommand\rrestrict{\hbox{$\mid$ \kern-5pt \raise3.6pt\hbox{$
+                      \scriptscriptstyle \backslash$}}}
+\newcommand\restrict{\mathrel{\mathpalette\rrestrict{}}}
+\let\diamond\lozenge
+\newcommand\concat{\mathrel{\raise1pt\hbox{$\!\!^\frown\!\!$}}}
+\newcommand\lh{\mathop\mathrm{lh}}
+\newcommand\depth{\mathop\mathrm{depth}}
+\newcommand\dom{\mathop\mathrm{dom}}
+\newcommand\range{\mathop\mathrm{range}}
+\newcommand\mapright[1]{\smash{\mathop{\longrightarrow}\limits^{#1}}}
+\newcommand\mapdown[1]{\big\downarrow
+                       \rlap{$\vcenter{\hbox{$\scriptstyle#1$}}$}}
+\newcommand{\dC}{C \! \! \! \! {\scriptscriptstyle {}^{{}_|}}\ }
+\newcommand{\dL}{I \! \! L}
+\newcommand{\dE}{I \! \! E}
+\newcommand{\dF}{I \! \! F}
+\newcommand{\dP}{I \! \! P}
+\newcommand{\dN}{I \! \! N}
+\newcommand{\dR}{I \! \! R}
+\newcommand{\dZ}{Z \! \! \! Z}
+\newcommand{\dQ}{Q \! \! \! \! {\scriptscriptstyle {}^|}\ }
+\newcommand{\nequiv}{\setbox0\hbox{$\equiv$}%
+                     \rlap{\hbox{$\equiv$}}%
+                     \hbox to \wd0{\hfil $/$\hfil}}
+\newcommand{\lsim}{\rlap{\raise -.3ex\hbox{${\scriptstyle\sim}$}}%
+                   \raise .6ex\hbox{${\scriptstyle <}$}}%
+\newcommand{\gsim}{\rlap{\raise -.3ex\hbox{${\scriptstyle\sim}$}}%
+                   \raise .6ex\hbox{${\scriptstyle >}$}}%
+\newcommand{\logr}{\rlap{\raise -.3ex\hbox{${\scriptstyle <}$}}%
+                   \raise .6ex\hbox{${\scriptstyle >}$}}%
+\newcommand{\grlo}{\rlap{\raise -.3ex\hbox{${\scriptstyle >}$}}%
+                   \raise .6ex\hbox{${\scriptstyle <}$}}%
+\newcommand{\oast}{\setbox0\hbox{$\odot$}%
+                   \rlap{\hbox to \wd0{\hfil$\ast$\hfil}}\box0}
+\newcommand{\res}{\oalign{\hbox{$\grave{}$\kern-3pt$\mid$}}}
+\newcommand{\dres}{\mid \! \res}
+\newcommand{\bigo}[1]{\setbox0\hbox{$\bigcirc$}%
+             \rlap{\raise .2ex\hbox to \wd0{\hfil ${\scriptscriptstyle
+                   #1}$\hfil}}\box0}
+\newcommand{\Res}[1]{\mathop{\hbox{Res}}\limits_{\scriptscriptstyle #1}}
+\newcommand{\down}[1]{\raise -1ex\hbox{{$\scriptstyle #1$}}}
+%    \end{macrocode}
+% \subsection{General}
+% 
+%    \begin{macrocode} 
+\newcount\@cla
+\newcount\@clb
+\hyphenation{equiv-a-lent equiv-a-lent-ly sat-is-fy sat-is-fies
+             sat-is-fied}
+\newcommand\fn{\hspace*{14pt} \= \kill}
+\newcommand\mc{\multicolumn}
+\newcommand{\dummy}[1]{}
+\def\today{\ifcase\month\or January\or February\or March\or April\or 
+   May\or June\or July\or August\or September\or October\or November\or 
+   December\fi \space\number\day, \number\year}
+\def\TODAY{\number\day/\ifcase\month\or 01\or 02\or 03\or 04\or 05\or 
+    06\or 07\or 08\or 09\or 10\or 11\or 12\fi/\number\year}
+\def\timenow{%
+  \@tempcnta=\time \divide\@tempcnta by 60 \number\@tempcnta:\multiply
+  \@tempcnta by 60 \@tempcntb=\time \advance\@tempcntb by -\@tempcnta
+  \ifnum\@tempcntb <10 0\number\@tempcntb\else\number\@tempcntb\fi}
+\def\numtoword#1{\ifcase#1\or one\or two\or three\or four\or
+  five\or six\or seven\or eight\or nine\or ten\or eleven\or twelve\or
+  thirteen\or fourteen\or fifteen\or sixteen\or seventeen\or
+  eighteen\or nineteen\or twenty\fi}
+\def\NUMTOWORD#1{\ifcase#1\or ONE\or TWO\or THREE\or FOUR\or
+  FIVE\or SIX\or SEVEN\or EIGHT\or NINE\or TEN\or ELEVEN\or TWELVE\or
+  THIRTEEN\or FOURTEEN\or FIFTEEN\or SIXTEEN\or SEVENTEEN\or
+  EIGHTEEN\or NINETEEN\or TWENTY\fi}
+
+%    \end{macrocode}
+% |\genaccent| is defined below. |\ifempty| is a shortcut used inside
+% |\genaccent|.
+%    \begin{macrocode}
+\def\ifempty#1#2#3{\def\inner{#1}\ifx\inner\empty 
+   #2\else #3\fi }
+\def\ifdef#1{\edef\tempa{\expandafter\@gobble\string #1}%
+   \expandafter\expandafter\expandafter\ifx\expandafter\csname
+   \tempa \endcsname\relax
+   \let\next\nosw \else \let\next=\yessw \fi \next}
+\def\nosw{\iffalse}
+\def\yessw{\iftrue}
+%    \end{macrocode}
+% \subsubsection{Spitem} 
+% This can be done better. 
+%    \begin{macrocode}
+\newif\ifklaar
+\newbox\bdj                   
+\def\onestep#1{\ifklaar\else
+           \if#1){)}\klaartrue\else
+           \if#1.{.}\klaartrue\else
+           \if#1]{]}\klaartrue\else
+           \if#1-{--}\klaartrue\else
+           \if#1*{*}\klaartrue\else
+           #1%
+           \fi\fi\fi\fi\fi
+               \fi}
+\def\subspitem#1{\scan#1\end}
+\def\spitem#1 {%
+  \def\scan##1##2\end{\def\aux{##1}%
+     \ifklaar\global\setbox\bdj=\hbox{##1##2\space}\else
+     \ifx\aux\empty \else \def\aux{##2}\onestep{##1}%
+     \ifx\aux\empty \else \scan##2\end \fi \fi \fi}%
+  \global\setbox\bdj\hbox{}%
+  \klaarfalse\expandafter\item[\subspitem{#1}]%
+  \unhbox\bdj}
+%    \end{macrocode}
+% \subsubsection{Genaccent}
+%    \begin{macrocode}
+\font\genacc=cmr10
+\def\genaccent#1#2#3#4#5{\protect\@genaccent{#1}{#2}{#3}{#4}{#5}}
+\def\@genaccent#1#2#3#4#5{%
+   \leavevmode\setbox0=\hbox{#3}%
+   \vbox{\offinterlineskip
+   \ifempty{#1}{}{%\else 
+    \hbox to\wd0{\hss\genacc \char#1\hss}}%
+    \ifempty{#4}{\kern -.8ex}{\kern #4}%
+   \vbox to\ht0{\copy0\vss}%
+   \vtop{\null\vbox to\dp0{\vss}%
+   \ifempty{#2}{}{%\else
+     \ifempty{#5}{\kern .2ex}{\kern#5}%
+     \hbox to \wd0{\hss \genacc\char #2\hss}}%
+    }}}
+\renewcommand\.[1]{\genaccent{95}{}{#1}{}{}}
+%    \end{macrocode}
+% \subsubsection{Table labels}
+% Note that these are font-dependant, the option |klusym| is needed to
+% initialize the correct font, otherwise the symbols will be in |cmr|.
+%    \begin{macrocode}
+\newcommand\BlackBox{\hbox{\@klusymfont B}~}
+\newcommand\EmptyBox{\hbox{\@klusymfont E}~}
+\newcommand\HstripeBox{\hbox{\@klusymfont H}~}
+\newcommand\VstripeBox{\hbox{\@klusymfont V}~}
+\newcommand\LstripeBox{\hbox{\@klusymfont L}~}
+\newcommand\RstripeBox{\hbox{\@klusymfont R}~}
+\newcommand\UpCrossBox{\hbox{\@klusymfont U}~}
+\newcommand\DiagCrossBox{\hbox{\@klusymfont D}~}
+%    \end{macrocode}
+% \subsection{Table macro's} 
+% |\cb| it a typing shortcut for |\parbox|, without forcing this
+% width. 
+%    \begin{macrocode}
+\def\cb{\@ifnextchar[{\@cbone}{\@cbone[8pc]}}
+\def\@cbone[#1]#2{{\setbox0\hbox{#2}%
+     \ifdim\wd0 >#1 \parbox[t]{#1}{#2}\else #2\fi}}
+%    \end{macrocode}
+% |\nbox| allows typesetting of aligned numbers. Arguments \#1, \#3
+% and \#5 specify widths in number of digits for the arguments \#2,
+% \#4 and \#6. Typeset as |lcr|.  Empty arguments  for widths  means
+% natural width. This macro is a lot easier to use inside of another
+% macro.   
+%    \begin{macrocode}
+\def\nbox#1#2#3#4#5#6{\begingroup\setbox0\hbox{0}%
+    \ifempty{#1}{\hfil #2}{\hbox to #1\wd0{\hfil #2}}%
+    \ifempty{#3}{\hbox{#4}}{\hbox to #3\wd0{\hfil #4\hfil }}%
+    \ifempty{#5}{#6 \hfil}{\hbox to #5\wd0{#6\hfil }}% 
+    \endgroup}
+%    \end{macrocode}
+% 
+%
+% \subsection{Charkern macro's}
+%  
+% These are not very readable, but they work quite well.
+%
+% Use dollars for inlinemath, not |\(....\)|.
+%
+% Special handling added for the (quite often appearing) case of 
+% |\charkern{\notesname}|, and a security check for the often
+% appearing case of no argument at all.    
+%    \begin{macrocode}
+\newif\ifkern@mathmode \kern@mathmodefalse
+\def\charkerncharspace{\kern 0.5ex}
+\def\charkernwordspace{\kern 0.5em\penalty 10}
+\let\charkerncommand\uppercase
+\def\@kap@tfor#1:=#2\do#3{\ifempty{#1}{}{%
+  \@tforloop#2\@nil\@nil\@@#1{#3}}}
+\def\charkern#1{%
+    \ifempty{#1}{}{%else             
+  \begingroup             
+  \def\test##1##2!!!!{\def\@tempa{##2}}\test#1!!!!%
+  \ifx\@tempa\empty \edef\@@kc{#1}\else \def\@@kc{#1}\fi
+  \def\c@@k{@s@e@v@y}%
+  \def\ck@@##1 @s@e@v@y\@@ck{\def\@@kc{##1}}%
+  \def\ck@##1 ##2\@@ck{\def\@kc{##1}\def\@@kc{##2}}%
+%    \end{macrocode}
+%   |\@kc| == first word of remaining sentence
+%    \begin{macrocode}
+  \def\iterate{\expandafter\expandafter\expandafter\ck@
+%    \end{macrocode}
+% The |\space| forces the line to end on with a space.
+%
+% In |\@kernword| most of the real work is done
+%
+% 
+%    \begin{macrocode}
+    \expandafter\@@kc\space @s@e@v@y\@@ck
+    \expandafter\@kernword\expandafter{\@kc}%
+    \ifx\@@kc\c@@k
+      \let\next\relax
+    \else
+      \expandafter\ck@@\@@kc\@@ck
+      \let\next\iterate\charkernwordspace
+    \fi\next}\iterate
+  \endgroup
+  }}
+     
+\def\@kernword#1{\def\d@ll@rm@th{$}\@kap@tfor\@nextchar:=#1\do{%
+    \ifx\@nextchar\d@ll@rm@th
+      \ifkern@mathmode
+        \kern@mathmodefalse
+%    \end{macrocode}
+%
+% Here all collected math is typeset
+%
+%    \begin{macrocode}
+        $\kern@math$%
+      \else
+        \kern@mathmodetrue
+        \xdef\kern@math{}%
+      \fi
+    \else
+      \ifkern@mathmode
+        \begingroup
+          \def\protect{\noexpand}%
+%    \end{macrocode}
+% 
+% eat up math char by char
+% 
+% |ab -> A\kern .5ex B\kern .5ex|
+%                              
+%    \begin{macrocode}
+          \xdef\kern@math{\kern@math\@nextchar}%
+        \endgroup
+      \else 
+          \charkerncommand\expandafter{\@nextchar}\charkerncharspace
+      \fi
+    \fi
+}}          
+
+\newcount\tracingkluwer
+\def\kludebug#1{\relax\ifcase\tracingkluwer \or
+    \wlog{kap: #1}\or \typeout{kap: #1}\else
+    \immediate\wlog{kap*: #1}\typeout{kap: #1}\fi}
+\global\tracingkluwer=3
+\def\kluverbatim{\par\begingroup\vbox \bgroup\trivlist 
+    \item\relax \vskip\parskip 
+    \rightskip\z@skip \parindent\z@
+    \parfillskip\@flushglue \parskip0pt \@@par \@tempswafalse
+    \def\par{\if@tempswa \leavevmode\null\@@par\penalty\interlinepenalty
+    \else \@tempswatrue \ifhmode\@@par\penalty\interlinepenalty\fi \fi}
+    \let\do\@makeother \catcode`\|=0 
+    \obeylines \verbatim@font \@noligs \dospecials \catcode`\%=14 
+    \frenchspacing\@vobeyspaces
+    \everypar \expandafter{\the\everypar \unpenalty }}
+\def\endkluverbatim{\endtrivlist\egroup\endgroup}
+\endinput       
+%    \end{macrocode}
+%\PrintIndex
+%\end{document}
+%% end of klumac.sty
+                    
+
+
+
diff --git a/helm/papers/matita/klumath.sty b/helm/papers/matita/klumath.sty
new file mode 100644 (file)
index 0000000..9ef1c5c
--- /dev/null
@@ -0,0 +1,463 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\def\filedate{1998/03/13}
+\def\filename{klumath.sty}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\normalsize,\numberline,\protect,\endinput}
+%\DoNotIndex{\@compare,\ifx,\global}
+%\CodelineIndex
+%\newcommand{\Bs}{$\backslash$}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\setlength{\marginparwidth}{0in}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{T. \surname{Hoekwater}}
+%\institute{Kluwer Academic Publishers}
+%\begin{abstract}
+% The math environments |varequation| and |subequation|, and the
+% |mathsec| and |mathchap| options have been moved here. 
+% These are  intended for large articles or books.
+%
+% This package also implements theorem-like environment
+% support. There is one option: |thms|, which also defines the
+% theorems, instead of just controlling layout for user defined
+% theorems. This option is only supplied for backward compatibility,
+% use is deprecated.   
+%\end{abstract} 
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Usage notes}
+%\subsection{Math environments}
+% Two environments are defined to use with equations: |varequation|
+% and\\ |subequation|. 
+%
+%  For |varequation|, there is one argument needed to be typeset as the
+%  `equation counter'. Usage example: 
+%\begin{verbatim}
+%\begin{varequation}{A.345}
+%...  
+%\end{varequation}
+%\end{verbatim}
+%results in: 
+%\begin{varequation}{A.345}
+%...  
+%\end{varequation}
+% This environment does not step the equation counter.
+% 
+% For |subequation|,
+% there is one {\it optional\/} argument, that allows selecting the formatted
+% layout of the added part of the equation number. Example usage:
+%\begin{verbatim}
+%\begin{subequation}[alph] % this is also the default value
+%\begin{equation}
+%...    
+%\end{equation}
+%\end{subequation}
+%\end{verbatim}  
+%
+% There are four package options, namely:
+% \begin{itemize}
+% \item[leqno] For equation numbers on the left.
+% \item[fleqn] For flush left equations.
+%\item[mathsec] For numbering within sections.
+%\item[mathchap] For numbering within chapters. 
+% (make sure the chapter counter is defined before you use this one)                                             
+% \end{itemize}
+%
+% There are two user settings:
+% \begin{itemize}
+% \item |\mathindent| controls the amount of left indentation of
+%    equations under |fleqn|. 
+% \item |\eqnoindent| controls indentation for equation numbers. 
+% This only makes sense when used together with flush left equations, in 
+% which case it will move the equation counter from the right side to 
+% the left, with the specified indentation from the margin.                                                                     
+%                                                         
+% \end{itemize}
+%
+% \subsection{Theorems}
+% This part of the stylefile is a bit strange, because it doesn't really do
+% much. For the theorem part, all it does is redefining the internal
+% \LaTeX\ command from |\newtheorem| to recognize some common
+% strings. Then it tries to extract meaning from the string it has
+% found, and typesets the entire theorem accordingly. 
+%
+% All this has the following effect: If you define something like 
+%\begin{verbatim}
+%\newtheorem{thm}{THEOREM}[subsubsection] 
+%\end{verbatim}
+% It will still be typeset according to the rules defined in the
+% stylefile you're using, regardless of the environment name and the
+% used counter. 
+%
+% At this time, the following ``names'' are recognized: 
+%
+%\begin{tabular}{lllll} \hline
+%THEOREM & COROLLARY & LEMMA & CLAIM\\
+%ALGORITHM & DEFINITION & EXAMPLE & REMARK\\
+%PROBLEM & CONJECTURE & PROPOSITION & \\[6pt]
+%Remark & Note & Summary & Case & Criterion\\ \hline
+%\end{tabular}
+%
+% The case distinction is significant here, so please note that
+% |REMARK| and |Remark| are typeset differently.
+%
+% \subsection{Proof environments}
+%
+% The stylefile defines the environments |pf|  and |pf*| for use in
+% proofs. |pf*| requires one argument, to be used as the `name' of the
+% proof. Example usage:
+%\begin{verbatim}
+%\begin{thm}
+%......  
+%\end{thm}
+%\begin{pf*}{Proofs}  
+%....
+%\end{pf*}\qed
+%\end{verbatim}
+%\begin{pf*}{Proofs}  
+%....
+%\end{pf*}\qed
+% |\qed| Typesets an open box on the right margin.
+%
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{klumath}[\filedate ]
+\DeclareOption{leqno}{\AtEndOfPackage{\varleqno}}                       
+\DeclareOption{fleqn}{\AtEndOfPackage{\varfleqn}}      
+\DeclareOption{mathsec}{%
+   \def\theequation{\arabic{section}.\arabic{equation}}}
+\DeclareOption{mathchap}{%
+   \def\theequation{\arabic{chapter}.\arabic{equation}}}
+\newif\if@thms \@thmsfalse
+\DeclareOption{thms}{\@thmstrue } 
+\DeclareOption{secthm}{\AtEndOfPackage{\if@thms
+    \renewcommand{\thethm}{\thesection.\arabic{thm}.}%
+    \renewcommand{\thecrit}{\thesection.\arabic{crit}.}%            
+    \renewcommand{\therem}{\thesection.\arabic{rem}.}%
+    \renewcommand{\theNote}{\thesection.\arabic{Note}.}%
+    \renewcommand{\thesumm}{\thesection.\arabic{summ}.}%
+    \renewcommand{\thecase}{\thesection.\arabic{case}.}%
+    \fi
+    }}                    
+\ExecuteOptions{}
+\ProcessOptions 
+%    \end{macrocode}
+% \subsection{Math environments} 
+% First off is |varequation|. Doesn't step any counters, and it has one
+% argument to define the `equationnumber' to be used.  The option
+% |\eqnoindent| allows fooling around with the location of the number.
+% 
+%    \begin{macrocode}
+\newdimen\eqnoindent
+\eqnoindent=0pt
+\def\varequation#1{$$ \gdef\curr@vareq{#1}}
+\def\endvarequation{\eqno \var@eqnnum $$\global\@ignoretrue }
+\def\var@eqnnum{\reset@font\normalcolor  (\curr@vareq)}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\varleqno{%
+   \def\@eqnnum{\hbox to .01\p@{}%
+     \rlap{\reset@font\rmfamily\normalcolor
+     \hskip -\displaywidth (\theequation)}}%
+   \def\var@eqnnum{\hbox to .01\p@{}%
+     \rlap{\reset@font\rmfamily\normalcolor
+     \hskip -\displaywidth (\curr@vareq)}}%
+}%
+%    \end{macrocode}      
+% For |fleqn|, |varequation| has to be redefined, because it uses a
+% trivlist.
+%    \begin{macrocode}                                  
+\def\varfleqn{%
+  \newdimen\mathindent
+  \mathindent\leftmargini
+  \def\varequation##1{%
+    \@beginparpenalty\predisplaypenalty
+    \@endparpenalty\postdisplaypenalty                  
+    \gdef\curr@vareq{##1}\trivlist 
+    \item[]\leavevmode
+    \hbox to\linewidth\bgroup $ \displaystyle              
+    \hskip\mathindent }%
+  \def\endvarequation{$\hfil \displaywidth\linewidth 
+    \ifdim \eqnoindent =\z@ 
+       \llap{\hbox{\var@eqnnum}}%
+     \else                                
+       \llap{\hbox to 2pc{\var@eqnnum\hss}\kern \displaywidth
+        \kern -\eqnoindent}%
+     \fi
+     \egroup  \endtrivlist}%
+%
+  \def\[{\relax \ifmmode\@badmath
+         \else \trivlist 
+         \@beginparpenalty\predisplaypenalty
+         \@endparpenalty\postdisplaypenalty
+         \item[]\leavevmode
+         \hbox to\linewidth\bgroup $\m@th\displaystyle %$
+         \hskip\mathindent\bgroup \fi}%
+  \def\]{\relax \ifmmode \egroup $\hfil \egroup \endtrivlist % $
+         \else \@badmath \fi }%
+%
+  \renewenvironment{equation}%
+    {\@beginparpenalty\predisplaypenalty
+     \@endparpenalty\postdisplaypenalty
+     \refstepcounter{equation}%
+     \trivlist \item[]\leavevmode
+       \hbox to\linewidth\bgroup $\m@th% $
+         \displaystyle
+         \hskip\mathindent}%
+        {$\hfil % $
+         \displaywidth\linewidth
+    \ifdim \eqnoindent =\z@ 
+       \llap{\hbox{\@eqnnum}}%
+     \else
+       \llap{\hbox to 2pc{\@eqnnum\hss}\kern \displaywidth
+        \kern -\eqnoindent}%
+     \fi
+       \egroup
+     \endtrivlist}%
+%
+  \renewenvironment{eqnarray}{%
+    \stepcounter{equation}%
+    \def\@currentlabel{\p@equation\theequation}%
+    \global\@eqnswtrue\m@th
+    \global\@eqcnt\z@
+    \tabskip\mathindent
+    \let\\=\@eqncr
+    \setlength{\abovedisplayskip}{\topsep}%
+    \ifvmode
+      \addtolength{\abovedisplayskip}{\partopsep}%
+    \fi
+    \addtolength{\abovedisplayskip}{\parskip}%
+    \setlength{\belowdisplayskip}{\abovedisplayskip}%
+    \setlength{\belowdisplayshortskip}{\abovedisplayskip}%
+    \setlength{\abovedisplayshortskip}{\abovedisplayskip}%
+    $$\everycr{}\halign to\linewidth% $$
+    \bgroup
+      \hskip\@centering
+      $\displaystyle\tabskip\z@skip{####}$\@eqnsel&%
+      \global\@eqcnt\@ne \hskip \tw@\arraycolsep \hfil${####}$\hfil&%
+      \global\@eqcnt\tw@ \hskip \tw@\arraycolsep
+        $\displaystyle{####}$\hfil \tabskip\@centering&%
+      \global\@eqcnt\thr@@
+           \llap \bgroup 
+          \ifdim \eqnoindent =\z@ \else
+         \hbox to 2pc \bgroup \fi 
+              ####\ifdim \eqnoindent =\z@ 
+              \egroup \else \hss\egroup\kern \displaywidth
+        \kern -\eqnoindent\egroup
+     \fi \tabskip\z@skip\cr}%
+      {\@@eqncr
+    \egroup
+    \global\advance\c@equation\m@ne$$% $$
+    \global\@ignoretrue
+    }}                   
+%    \end{macrocode}
+% |subequation| is a lot smarter, it implements subnumbering by
+% moving the current value of the |equation| counter to a fixed place,
+% then resets |equation| and restarts numbering. 
+%
+%  Now the equation number consists of the `fixed' part and the
+%  updated new part. 
+%
+%    \begin{macrocode}
+\def\subequation{\@ifnextchar[{\@subequation}{\@subequation[alph]}}
+\def\@subequation[#1]{\refstepcounter{equation}%
+%    \end{macrocode}
+% |\@testoption| is needed because we would like to have 
+% $$\hfill (1.1)$$
+% with a dot, but 
+%$$\hfill (1a)$$ without.  
+% 
+%    \begin{macrocode}
+  \def\@testoption{arabic}%
+  \def\@testparam{#1}%
+  \begingroup
+%    \end{macrocode}
+% Save old values
+%    \begin{macrocode}
+  \edef\old@equation{\the\c@equation}%
+  \edef\old@theequation{\theequation}%
+  \setcounter{equation}{0}%
+%    \end{macrocode}
+% If the optional arg. == arabic; typeset a dot in between.
+%    \begin{macrocode}
+  \ifx\@testoption\@testparam
+    \def\theequation{\old@theequation.\csname #1\endcsname{equation}}
+  \else
+    \def\theequation{\old@theequation\csname #1\endcsname{equation}}
+  \fi}
+%    \end{macrocode}
+% Restore old values
+%    \begin{macrocode}
+\def\endsubequation{%
+  \setcounter{equation}{\old@equation}%
+  \endgroup
+  \global\@ignoretrue}
+%    \end{macrocode}
+%\section{Theorems}
+% \subsection{Fixed macros}
+%    \begin{macrocode}
+\newif\if@novspace
+\let\@thmscase\uppercase
+\newdimen\theoremsep
+\theoremsep\z@
+\def\thmdot{.}
+\def\@stylehead{\rm }
+\def\@styletext{\em }
+\let\@dispcase\relax  
+\newdimen\dispsep
+\dispsep\parindent
+\def\dispdot{.}
+\def\@disphead{\it }
+\def\@disptext{\rm }
+%    \end{macrocode}
+% Definition of the |pf| and |pf*| environments. These take into
+% account the value of |\if@novspace| that is set by the theorem-like
+% environments. 
+%    \begin{macrocode} 
+\def\newproof#1#2{% 
+  \expandafter\def\csname #1\endcsname{\par
+    \if@novspace \vskip-\lastskip
+    \else \addvspace{1\baselineskip 
+            \@plus 0.5\baselineskip \@minus 0.1\baselineskip}%
+    \fi \indent
+    {\it #2.\/} \ignorespaces }%
+   \expandafter\def\csname end#1\endcsname
+   {\par \addvspace{1\baselineskip \@plus 0.5\baselineskip \@minus 
+        0.1\baselineskip}%
+    \global\@novspacefalse
+    }}
+\newproof{pf}{Proof}
+
+%    \end{macrocode}
+% |pf*| has an argument that allow on-the-spot redefinition of
+% |\proofname|. 
+%    \begin{macrocode}
+\@namedef{pf*}#1{\par
+                 \begingroup
+                 \def\proofname{#1}\pf
+                 \endgroup
+                 \ignorespaces}
+\@namedef{endpf*}{\endpf}
+%    \end{macrocode}
+% |\qed| takes into account whether it is called during math mode or
+% text mode. This is important because outside of math mode there will
+% usually be a line to much in the output.
+%    \begin{macrocode}
+\def\qed{\relax
+     \ifmmode
+       ~\hfill\Box
+     \else
+        \unskip\nobreak ~\hfill$\Box$%
+      \fi \par}
+%    \end{macrocode}
+%|\@begintheorem| and |\@opargbegintheorem| do the real work.  Both
+%have roughly the same layout: 
+%    \begin{macrocode}
+\def\@begintheorem#1#2{\trivlist  
+    \global\@novspacetrue \itemindent\theoremsep 
+     \item[\kern\labelsep 
+     {\@stylehead\@thmscase{#1}\ #2\thmdot\/}]\ \@styletext}
+\def\@opargbegintheorem#1#2#3{\trivlist \labelsep\z@  
+      \global\@novspacetrue \itemindent\theoremsep 
+      \item[\kern \labelsep {\@stylehead\@thmscase{#1}\ #2\thmdot\ 
+      (#3). \/}]\ \@styletext}
+\def\@endtheorem{\endtrivlist}     
+\def\rmtheorem#1{% 
+    \expandafter\g@addto@macro\csname #1\endcsname{\rmfamily\upshape }%
+    }
+%    \end{macrocode}
+%
+% |\newdisplay|.
+%
+% This is taken from |ltthm.dtx|. It echoes the redefinitions
+% for theorems. 
+%    \begin{macrocode} 
+\def\newdisplay#1{\@ifnextchar[{\@odisp{#1}}{\@ndisp{#1}}}
+\def\@ndisp#1#2{%
+  \@ifnextchar[{\@xndisp{#1}{#2}}{\@yndisp{#1}{#2}}}
+\def\@xndisp#1#2[#3]{\expandafter\@ifdefinable\csname #1\endcsname
+  {\@definecounter{#1}\@newctr{#1}[#3]%                     
+      \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand
+        \csname the#3\endcsname \@dispcountersep \@dispcounter{#1}}%
+\global\@namedef{#1}{%
+  \@disp{#1}{#2}}\global\@namedef{end#1}{\@enddisplay}}}
+\def\@yndisp#1#2{\expandafter\@ifdefinable\csname #1\endcsname
+{\@definecounter{#1}%
+\expandafter\xdef\csname the#1\endcsname{\@dispcounter{#1}}%
+\global\@namedef{#1}{%
+  \@disp{#1}{#2}}\global\@namedef{end#1}{\@enddisplay}}}
+\def\@odisp#1[#2]#3{%
+  \@ifundefined{c@#2}{\@nocounterr{#2}}%
+  {\expandafter\@ifdefinable\csname #1\endcsname
+  {\global\@namedef{the#1}{\@nameuse{the#2}}%
+\global\@namedef{#1}{\@disp{#2}{#3}}%
+\global\@namedef{end#1}{\@enddisplay}}}}
+\def\@disp#1#2{\refstepcounter         
+    {#1}\@ifnextchar[{\@ydisp{#1}{#2}}{\@xdisp{#1}{#2}}}
+\def\@xdisp#1#2{\@begindisplay{#2}{\csname the#1\endcsname}\ignorespaces}
+\def\@ydisp#1#2[#3]{\@opargbegindisplay{#2}{\csname
+       the#1\endcsname}{#3}\ignorespaces}
+\def\@dispcounter#1{\noexpand\arabic{#1}}
+\def\@dispcountersep{.}
+\def\@begindisplay#1#2{\trivlist
+    \global\@novspacefalse \itemindent\dispsep
+        \item[{\@disphead 
+        \@dispcase{#1}\ #2\dispdot \/}]\@disptext}
+\def\@opargbegindisplay#1#2#3{\trivlist
+      \global\@novspacefalse
+      \itemindent \dispsep
+      \item[{\@disphead \@dispcase{#1}\ #2\dispdot\ 
+      (\@dispcase{#3})\/}]\@disptext}
+\def\@enddisplay{\endtrivlist}     
+%    \end{macrocode}
+%    \begin{macrocode}
+\if@thms
+  \newtheorem{thm}{THEOREM}
+  \newtheorem{cor}[thm]{COROLLARY} 
+  \newtheorem{lem}[thm]{LEMMA}
+  \newtheorem{claim}[thm]{CLAIM}
+  \newtheorem{conj}[thm]{CONJECTURE}
+  \newtheorem{prop}[thm]{PROPOSITION}
+  \newtheorem{exer}[thm]{EXERCISE}
+  \newtheorem{REM}[thm]{REMARK}
+  \newtheorem{prob}[thm]{PROBLEM}
+  \newtheorem{alg}{ALGORITHM}
+  \rmtheorem{alg}
+  \newtheorem{defn}[thm]{DEFINITION}
+  \rmtheorem{defn}
+  \newtheorem{exmp}[thm]{EXAMPLE}
+  \rmtheorem{exmp}
+  \newdisplay{crit}{Criterion}
+  \newdisplay{rem}{Remark}
+  \newdisplay{Note}{Note}
+  \newdisplay{summ}{Summary}
+  \newdisplay{case}{Case}
+\fi
+\arraycolsep = 3pt
+\endinput
+%    \end{macrocode}
+% \IndexParms{\hbadness=10000}
+%\PrintIndex
+%\end{document}
+% end of klumath.sty
+
+
+
+
+
+
+
+
diff --git a/helm/papers/matita/klunamed.bst b/helm/papers/matita/klunamed.bst
new file mode 100644 (file)
index 0000000..716c456
--- /dev/null
@@ -0,0 +1,1161 @@
+% This style produces citations in the `author-year' format.
+% It supports two forms of citation: the \cite command produces:  (Author, year)
+% in the text; the \cite* command only:  (year) .
+
+ENTRY
+  { address
+    author
+    booktitle
+    chapter
+    edition
+    editor
+    howpublished
+    institution
+    journal
+    key
+    note
+    number
+    organization
+    pages
+    publisher
+    school
+    series
+    title
+    type
+    volume
+    year
+  }
+  {}
+  { label extra.label sort.label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+  #1 'mid.sentence :=
+  #2 'after.sentence :=
+  #3 'after.block :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+  output.state mid.sentence =
+    { ", " * write$ }
+    { output.state after.block =
+        { add.period$ write$
+          newline$
+          "\newblock " write$
+        }
+        { output.state before.all =
+            'write$
+            { add.period$ " " * write$ }
+          if$
+        }
+      if$
+      mid.sentence 'output.state :=
+    }
+  if$
+  s
+}
+FUNCTION {output.nonnull.extra}
+{ 's :=
+  output.state mid.sentence =
+    { " " * write$ }
+    { output.state after.block =
+        { add.period$  write$
+          newline$
+          "\newblock " write$
+        }
+        { output.state before.all =
+            'write$
+            { add.period$ " " * write$ }
+          if$
+        }
+      if$
+      mid.sentence 'output.state :=
+    }
+  if$
+  s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+    'pop$
+    'output.nonnull
+  if$
+}
+FUNCTION {output.extra}
+{ duplicate$ empty$
+    'pop$
+    'output.nonnull.extra
+  if$
+}
+FUNCTION {output.check}
+{ 't :=
+  duplicate$ empty$
+    { pop$ "empty " t * " in " * cite$ * warning$ }
+    'output.nonnull
+  if$
+}
+FUNCTION {output.check.extra}
+{ 't :=
+  duplicate$ empty$
+    { pop$ "empty " t * " in " * cite$ * warning$ }
+    'output.nonnull.extra
+  if$
+}
+FUNCTION {output.year.check}
+{ year empty$
+    { "empty year in " cite$ * warning$ }
+    { write$
+      ": " year * extra.label * 
+      mid.sentence 'output.state :=
+    }
+  if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+  "\bibitem[" write$
+  label write$
+  "]{" write$
+  cite$ write$
+  "}" write$
+  newline$
+  ""
+  before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+  write$
+  newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+    'skip$
+    { after.block 'output.state := }
+  if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+    'skip$
+    { output.state before.all =
+        'skip$
+        { after.sentence 'output.state := }
+      if$
+    }
+  if$
+}
+FUNCTION {not}
+{   { #0 }
+    { #1 }
+  if$
+}
+FUNCTION {and}
+{   'skip$
+    { pop$ #0 }
+  if$
+}
+FUNCTION {or}
+{   { pop$ #1 }
+    'skip$
+  if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+  swap$ empty$
+  and
+    'skip$
+    'new.block
+  if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+    { pop$ "" }
+    'skip$
+  if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+    { pop$ "" }
+    { "{\bf " swap$ * "}" * }
+  if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+    { pop$ "" }
+    { "{\em " swap$ * "}" * }
+  if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { nameptr #1 >
+        { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := }
+        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
+      if$
+      nameptr #1 >
+        { namesleft #1 >
+            { ", " * t * }
+            { numnames #2 >
+                { "," * }
+                'skip$
+              if$
+              t "others" =
+                { " et~al." * }
+                { " and " * t * }
+              if$
+            }
+          if$
+        }
+        't
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+FUNCTION {format.ed.names}
+{ 's :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { nameptr #1 >
+        { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := }
+        { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := }
+      if$
+      nameptr #1 >
+        { namesleft #1 >
+            { ", " * t * }
+            { numnames #2 >
+                { "," * }
+                'skip$
+              if$
+              t "others" =
+                { " et~al." * }
+                { " and " * t * }
+              if$
+            }
+          if$
+        }
+        't
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+    { "" }
+    { author format.names }
+  if$
+}
+FUNCTION {format.key}
+{ empty$
+    { key field.or.null }
+    { "" }
+  if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+    { "" }
+    { editor format.names
+      editor num.names$ #1 >
+        { " (eds.)" * }
+        { " (ed.)" * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.editors.extra}
+{ editor empty$
+    { "" }
+    { editor format.ed.names
+      editor num.names$ #1 >
+        { " (eds.)" * }
+        { " (ed.)" * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.title}
+{ title empty$
+    { "" }
+    { "`" title "'" * * }
+  if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+  ""
+    { t empty$ not }
+    { t #1 #1 substring$ "-" =
+        { t #1 #2 substring$ "--" = not
+            { "--" *
+              t #2 global.max$ substring$ 't :=
+            }
+            {   { t #1 #1 substring$ "-" = }
+                { "-" *
+                  t #2 global.max$ substring$ 't :=
+                }
+              while$
+            }
+          if$
+        }
+        { t #1 #1 substring$ *
+          t #2 global.max$ substring$ 't :=
+        }
+      if$
+    }
+  while$
+}
+FUNCTION {first.page.number}
+{ 't :=
+  ""
+    { t "" =
+        { #0 }
+        { t #1 #1 substring$ "-" = not }
+      if$
+    }
+    { t #1 #1 substring$ *
+      t #2 global.max$ substring$ 't :=
+    }
+  while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+    { "~" }
+    { " " }
+  if$
+  swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+    'pop$
+    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+  if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+    { "" }
+    { "Vol." volume tie.or.space.connect
+      series empty$
+        'skip$
+        { " of " * series emphasize * }
+      if$
+      "volume and number" number either.or.check
+    }
+  if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+    { number empty$
+        { series field.or.null }
+        { output.state mid.sentence =
+            { "No." }
+            { "No." }
+          if$
+          number tie.or.space.connect
+          series empty$
+            { "there's a number but no series in " cite$ * warning$ }
+            { " in " * series * }
+          if$
+        }
+      if$
+    }
+    { "" }
+  if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+    { "" }
+    { output.state mid.sentence =
+        { edition "l" change.case$ " edition" * }
+        { edition "t" change.case$ " edition" * }
+      if$
+    }
+  if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+  #0 'multiresult :=
+    { multiresult not
+      t empty$ not
+      and
+    }
+    { t #1 #1 substring$
+      duplicate$ "-" =
+      swap$ duplicate$ "," =
+      swap$ "+" =
+      or or
+        { #1 'multiresult := }
+        { t #2 global.max$ substring$ 't := }
+      if$
+    }
+  while$
+  multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+    { "" }
+    { pages multi.page.check
+        { "pp." pages n.dashify tie.or.space.connect }
+        { "p." pages tie.or.space.connect }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.page}
+{ pages empty$
+    { "" }
+    { "p.~" pages first.page.number * }
+  if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+  volume empty$
+    'skip$
+    { boldface }
+  if$
+  number empty$
+    'skip$
+    { "(" number * ")" * *
+      volume empty$
+        { "there's a number but no volume in " cite$ * warning$ }
+        'skip$
+      if$
+    }
+  if$
+  pages empty$
+    'skip$
+    { duplicate$ empty$
+        { pop$ format.pages }
+        { ", " * pages n.dashify * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.vol.num.page}
+{ volume field.or.null
+  volume empty$
+    'skip$
+    { boldface }
+  if$
+  number empty$
+    'skip$
+    { "(" number * ")" * *
+      volume empty$
+        { "there's a number but no volume in " cite$ * warning$ }
+        'skip$
+      if$
+    }
+  if$
+  pages empty$
+    'skip$
+    { duplicate$ empty$
+        { pop$ format.pages }
+        { ", " * pages first.page.number * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+    'format.pages
+    { type empty$
+        { "Chapt." }
+        { type "l" change.case$ }
+      if$
+      chapter tie.or.space.connect
+      pages empty$
+        'skip$
+        { ", " * format.pages * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+    { "" }
+    { editor empty$
+        { "In: " booktitle emphasize * }
+        { "In: " format.editors.extra * ": " * booktitle emphasize * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.in.booktitle.or.series}
+{ booktitle empty$
+    { series empty$
+        { "" }
+        { "In: " series emphasize * }
+      if$
+    }
+    { editor empty$
+        { "In: " booktitle emphasize * }
+        { "In: " format.editors.extra * ": " * booktitle emphasize * }
+      if$ 
+    }
+  if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+    'skip$
+    { pop$
+      type "t" change.case$
+    }
+  if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+    { "Technical Report" }
+    'type
+  if$
+  number empty$
+    { "t" change.case$ }
+    { number tie.or.space.connect }
+  if$
+}
+FUNCTION {format.article.crossref}
+{ "in"
+  " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+      "in "
+    }
+    { "Vol." volume tie.or.space.connect
+      " of " *
+    }
+  if$
+  "\cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ "in"
+  " \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { journal emphasize "journal" output.check.extra
+      format.vol.num.pages output.extra
+    }
+    { format.article.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check
+      editor format.key output
+    }
+    { format.authors output.nonnull
+      crossref missing$
+        { "author and editor" editor either.or.check }
+        'skip$
+      if$
+    }
+  if$
+  output.year.check
+  format.btitle "title" output.check
+  crossref missing$
+    { format.bvolume output
+      format.number.series output
+      new.block
+      address empty$
+        'skip$
+        { address ":" * output }
+      if$
+      publisher "publisher" output.check.extra
+    }
+    { new.block
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.edition output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  output.year.check
+  format.btitle "title" output.check
+  new.block
+  howpublished output
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check
+      editor format.key output
+    }
+    { format.authors output.nonnull
+      crossref missing$
+        { "author and editor" editor either.or.check }
+        'skip$
+      if$
+    }
+  if$
+  output.year.check
+  format.btitle "title" output.check
+  crossref missing$
+    { format.bvolume output
+      format.chapter.pages "chapter and pages" output.check
+      format.number.series output
+      new.block
+      address empty$
+        'skip$
+        { address ":" * output }
+      if$
+      publisher "publisher" output.check.extra
+    }
+    { format.chapter.pages "chapter and pages" output.check
+      new.block
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.edition output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { format.in.ed.booktitle "booktitle" output.check
+      format.bvolume output
+      format.number.series output
+      new.block
+      address empty$
+        'skip$
+        { address ":" * output }
+      if$
+      publisher "publisher" output.check.extra
+      format.edition output
+      format.chapter.pages output
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.chapter.pages output
+    }
+  if$
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { format.in.booktitle.or.series "booktitle or series" output.check
+      format.bvolume output
+      new.sentence
+      address output
+      format.pages output
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  organization output
+  address output
+  format.edition output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  "Master's thesis" format.thesis.type output.nonnull
+  school "school" output.check
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  output.year.check
+  format.title output
+  new.block
+  howpublished output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  "Ph.D. thesis" format.thesis.type output.nonnull
+  school "school" output.check
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+  format.editors output
+  editor format.key output
+  output.year.check
+  format.title "title" output.check
+  format.bvolume output
+  format.number.series output
+  new.block
+  address empty$
+     'skip$
+     { address ":" * output }
+  if$
+  organization output.extra
+  publisher output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  format.tr.number output.nonnull
+  institution "institution" output.check
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  note "note" output.check
+  fin.entry
+}
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr,"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+READ
+FUNCTION {sortify}
+{ purify$
+  "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+  'len :=
+  s #1 len substring$ =
+    { s len #1 + global.max$ substring$ }
+    's
+  if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+  s #1 "{vv~}{ll}" format.name$
+  s num.names$ duplicate$
+  #2 >
+    { pop$ " et~al." * }
+    { #2 <
+        'skip$
+        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+            { " et~al." * }
+            { " and " * s #2 "{vv~}{ll}" format.name$ * }
+          if$
+        }
+      if$
+    }
+  if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+    { key empty$
+        { cite$ #1 #3 substring$ }
+        'key
+      if$
+    }
+    { author format.lab.names }
+  if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+    { editor empty$
+        { key empty$
+            { cite$ #1 #3 substring$ }
+            'key
+          if$
+        }
+        { editor format.lab.names }
+      if$
+    }
+    { author format.lab.names }
+  if$
+}
+FUNCTION {editor.key.label}
+{ editor empty$
+    { key empty$
+        { cite$ #1 #3 substring$ }
+        'key
+      if$
+    }
+    { editor format.lab.names }
+  if$
+}
+FUNCTION {calc.label}
+{ type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.key.label
+    { type$ "proceedings" =
+        'editor.key.label
+        'author.key.label
+      if$
+    }
+  if$
+  "\protect\citeauthoryear{" swap$ * "}{"
+  *
+  year field.or.null purify$ #-1 #4 substring$
+  *
+  'label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+  #1 'nameptr :=
+  ""
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { nameptr #1 >
+        { "   " * }
+        'skip$
+      if$
+      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
+      nameptr numnames = t "others" = and
+        { "et al" * }
+        { t sortify * }
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+  "A " #2
+    "An " #3
+      "The " #4 t chop.word
+    chop.word
+  chop.word
+  sortify
+  #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+    { key empty$
+        { "to sort, need author or key in " cite$ * warning$
+          ""
+        }
+        { key sortify }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+    { editor empty$
+        { key empty$
+            { "to sort, need author, editor, or key in " cite$ * warning$
+              ""
+            }
+            { key sortify }
+          if$
+        }
+        { editor sort.format.names }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+    { key empty$
+        { "to sort, need editor or key in " cite$ * warning$
+          ""
+        }
+        { key sortify }
+      if$
+    }
+    { editor sort.format.names }
+  if$
+}
+FUNCTION {presort}
+{ calc.label
+  label sortify
+  "    "
+  *
+  type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.sort
+    { type$ "proceedings" =
+        'editor.sort
+        'author.sort
+      if$
+    }
+  if$
+  #1 entry.max$ substring$
+  'sort.label :=
+  sort.label
+  *
+  "    "
+  *
+  title field.or.null
+  sort.format.title
+  *
+  #1 entry.max$ substring$
+  'sort.key$ :=
+}
+ITERATE {presort}
+SORT            % by label, sort.label, title---for final label calculation
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+  "" 'next.extra :=
+  #0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+    { last.extra.num #1 + 'last.extra.num :=
+      last.extra.num int.to.chr$ 'extra.label :=
+    }
+    { "a" chr.to.int$ 'last.extra.num :=
+      "" 'extra.label :=
+      label 'last.label :=
+    }
+  if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+    { "a" 'extra.label := }
+    'skip$
+  if$
+  label extra.label * "}" * 'label :=
+  extra.label 'next.extra :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+  "    "
+  *
+  year field.or.null sortify
+  *
+  "    "
+  *
+  title field.or.null
+  sort.format.title
+  *
+  #1 entry.max$ substring$
+  'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT            % by sort.label, year, title---giving final bibliography order
+FUNCTION {begin.bib}
+{ preamble$ empty$
+    'skip$
+    { preamble$ write$ newline$ }
+  if$
+  "\begin{thebibliography}{}" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+  "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+
diff --git a/helm/papers/matita/klunote.sty b/helm/papers/matita/klunote.sty
new file mode 100644 (file)
index 0000000..07d2353
--- /dev/null
@@ -0,0 +1,201 @@
+%
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\def\filedate{1998/02/11}
+\def\filename{klunote.sty}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\gdef,\@cla,\@clb}
+%\DoNotIndex{\normalsize,\protect,\global,\setbox,\hbox,\vbox,\endinput}
+%\DoNotIndex{\egroup,\endgroup,\bgroup,\begingroup,\let}
+%\CodelineIndex
+%\newcommand{\Bs}{$\backslash$}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=11pt
+%\MakeShortVerb{\|} 
+%\setlength{\marginparwidth}{0in} 
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{T. \surname{Hoekwater}}
+%\institute{Kluwer Academic Publishers}
+%\begin{abstract}
+% This internal stylefile takes care of footnotes, endnotes and marginpars.
+%\end{abstract}                                                            
+%\end{opening}
+%\tableofcontents
+%\section{Usage}
+%
+%
+% Footnotes are quite normal in usage, so please see Lamport for
+% details. 
+%
+% Endnotes were originally code from |endnotes.sty| (\LaTeX 2.09
+% package),  with some minor adjustments to aid\endnote{Example}
+% kluwer layout. Endnotes can be used just as |\footnote|s, with the
+% command |\endnote| and family. Say |\theendnotes| where you
+% want\endnote{another}. 
+% them to appear in your document. 
+%
+% This endnote code {\it does\/} obey |\nofiles|, but will not work
+% then (prevents an NFS error i've had). This means: any
+% writing command will be ignored, but the file will be read if
+% available. Note that this might mean that the endnotes are incorrect! 
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{klunote}[\filedate ]
+%    \end{macrocode}
+% 
+%
+% \subsection{Footnotes}
+%
+% Most stylefiles need to redefine the following lines, but we
+% need a default anyway... 
+%    \begin{macrocode}
+\def\footnoterule{\kern-3\p@
+  \hrule width 3pc
+  \kern 2.6\p@}
+\long\def\@makefntext#1{\parindent 1em\noindent
+ \hbox to 1.5em{\hss$^{\@thefnmark}$}\hskip0.5em\footnotesize#1}
+\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+\footnotesep 6pt
+\skip\footins 10pt plus 4pt minus 2pt
+%    \end{macrocode}
+% \subsection{Endnotes}
+% User options first. 
+%    \begin{macrocode}
+\newcounter{endnote}
+\def\theendnote{\arabic{endnote}}
+\def\@makeenmark{\hbox{$^{\@theenmark}$}}
+\newdimen\endnotesep
+\setlength\endnotesep{1pt}
+\def\notesname{Notes}% <------ JK
+\def\endnotesize{\footnotesize}
+\def\endnoteformat{\vskip\endnotesep
+     \rightskip\z@ \leftskip\z@ 
+     \parindent=1.8em\leavevmode\llap{\hbox{$^{\@theenmark}$ }}}
+%    \end{macrocode}
+% User level interface: |\endnote|, |\addtoendnotes| and
+% |\theendnotes|. 
+%    \begin{macrocode}
+\def\endnote{%
+   \@ifnextchar[
+      {\@xendnote}%
+      {\stepcounter{endnote}%
+          \xdef\@theenmark{\theendnote}%
+          \@endnotemark
+          \@endnotetext}}
+\long\def\addtoendnotes#1{%
+     \if@endnotesopen \else \@openendnotes \fi
+     \begingroup
+        \newlinechar='40
+        \let\protect\string
+        \if@filesw \immediate\write\@endnotes{#1}\fi
+     \endgroup}
+%    \end{macrocode}
+%
+% I can't remember what the |\makeatletter| is doing here.
+%
+%    \begin{macrocode}
+\def\theendnotes{%
+  \if@filesw \immediate\closeout\@endnotes \fi
+  \global\@endnotesopenfalse
+  \begingroup
+    \makeatletter
+    \def\@doanendnote##1##2>{%
+        \def\@theenmark{##1}%
+        \par\begingroup
+        \endnoteformat}%
+    \def\@endanendnote{\par\endgroup}%
+    \def\ETC.{\PackageError{klunote}{%
+         Some endnotes will be truncated}{%
+         Because of memory constraints, LaTeX truncated some\MessageBreak 
+         long endnotes while writing the auxiliary file.\MessageBreak
+         Use a bigger TeX main memory size to avoid this,\MessageBreak
+         It is save to continue by pressing <enter>}%
+         \def\ETC.{\relax}}%
+       \IfFileExists{\jobname.ent}{%
+    \endnoteheading
+    \endnotesize
+    \@input{\jobname.ent}}{}%
+  \endgroup }
+%    \end{macrocode}
+% The less commonly used part of the user interface.
+%    \begin{macrocode}
+\def\endnotemark{%
+  \@ifnextchar[{\@xendnotemark}%
+               {\stepcounter{endnote}%
+                \xdef\@theenmark{\theendnote}%
+                \@endnotemark}}
+\def\endnotetext{%
+   \@ifnextchar[{\@xendnotenext}%
+                {\xdef\@theenmark{\theendnote}%
+                 \@endnotetext}}
+\def\endnoteheading{\section*{\notesname
+     \imarkboth{\notesname}{\notesname}}\leavevmode\par}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\@xendnote[#1]{\begingroup 
+   \c@endnote=#1\relax
+   \xdef\@theenmark{\theendnote}\endgroup
+   \@endnotemark\@endnotetext}
+\let\@doanendnote=0
+\let\@endanendnote=0
+\newwrite\@endnotes
+\newif\if@endnotesopen \@endnotesopenfalse
+\def\@openendnotes{%
+      \if@filesw \immediate\openout\@endnotes=\jobname.ent\relax
+                 \global\@endnotesopentrue \fi}
+\long\def\@endnotetext#1{%
+     \if@endnotesopen \else \@openendnotes \fi
+     \if@filesw \immediate\write\@endnotes{\@doanendnote{\@theenmark}}\fi
+     \begingroup
+        \def\next{#1}%
+        \newlinechar='40
+        \if@filesw \immediate\write\@endnotes{\meaning\next}\fi
+     \endgroup
+     \if@filesw \immediate\write\@endnotes{\@endanendnote}\fi
+     \edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}}
+\def\@xendnotemark[#1]{%
+    \begingroup 
+    \c@endnote #1\relax
+    \xdef\@theenmark{\theendnote}\endgroup 
+    \@endnotemark}
+\def\@endnotemark{%
+   \leavevmode
+   \ifhmode \edef\@x@sf{\the\spacefactor}\fi 
+   \@makeenmark
+   \ifhmode\spacefactor\@x@sf\fi\relax}
+\def\@xendnotenext[#1]{%
+   \begingroup \c@endnote=#1\relax
+   \xdef\@theenmark{\theendnote}\endgroup 
+   \@endnotetext}
+%    \end{macrocode}
+% 
+%
+% \subsection{marginparbox}
+% This redefinition puts a |\marginparbox| in a |\fbox|. I am not sure
+% whether we want this, because it is quite hard to restore if needed.
+%    \begin{macrocode}
+%\long\def\@savemarbox#1#2{%
+%  \global\setbox #1
+%     \vtop{\fbox{\vtop{\hsize\marginparwidth
+%              \@parboxrestore  
+%              \raggedright
+%              \footnotesize 
+%              #2}}}}
+\endinput
+%    \end{macrocode}
+% \theendnotes
+%\PrintIndex
+%\end{document}
+% end of klunote.sty
+
+                               
\ No newline at end of file
diff --git a/helm/papers/matita/klunum.bst b/helm/papers/matita/klunum.bst
new file mode 100644 (file)
index 0000000..3b931cb
--- /dev/null
@@ -0,0 +1,1159 @@
+% This style produces citations in the `author-year' format.
+% It supports two forms of citation: the \cite command produces:  (Author, year)
+% in the text; the \cite* command only:  (year) .
+
+ENTRY
+  { address
+    author
+    booktitle
+    chapter
+    edition
+    editor
+    howpublished
+    institution
+    journal
+    key
+    note
+    number
+    organization
+    pages
+    publisher
+    school
+    series
+    title
+    type
+    volume
+    year
+  }
+  {}
+  { label extra.label sort.label }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+  #1 'mid.sentence :=
+  #2 'after.sentence :=
+  #3 'after.block :=
+}
+STRINGS { s t }
+FUNCTION {output.nonnull}
+{ 's :=
+  output.state mid.sentence =
+    { ", " * write$ }
+    { output.state after.block =
+        { add.period$ write$
+          newline$
+          "\newblock " write$
+        }
+        { output.state before.all =
+            'write$
+            { add.period$ " " * write$ }
+          if$
+        }
+      if$
+      mid.sentence 'output.state :=
+    }
+  if$
+  s
+}
+FUNCTION {output.nonnull.extra}
+{ 's :=
+  output.state mid.sentence =
+    { " " * write$ }
+    { output.state after.block =
+        { add.period$  write$
+          newline$
+          "\newblock " write$
+        }
+        { output.state before.all =
+            'write$
+            { add.period$ " " * write$ }
+          if$
+        }
+      if$
+      mid.sentence 'output.state :=
+    }
+  if$
+  s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+    'pop$
+    'output.nonnull
+  if$
+}
+FUNCTION {output.extra}
+{ duplicate$ empty$
+    'pop$
+    'output.nonnull.extra
+  if$
+}
+FUNCTION {output.check}
+{ 't :=
+  duplicate$ empty$
+    { pop$ "empty " t * " in " * cite$ * warning$ }
+    'output.nonnull
+  if$
+}
+FUNCTION {output.check.extra}
+{ 't :=
+  duplicate$ empty$
+    { pop$ "empty " t * " in " * cite$ * warning$ }
+    'output.nonnull.extra
+  if$
+}
+FUNCTION {output.year.check}
+{ year empty$
+    { "empty year in " cite$ * warning$ }
+    { write$
+      ": " year * extra.label * 
+      mid.sentence 'output.state :=
+    }
+  if$
+}
+FUNCTION {output.bibitem}
+{ newline$
+  "\bibitem{" write$
+  cite$ write$
+  "}" write$
+  newline$
+  ""
+  before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$
+  write$
+  newline$
+}
+FUNCTION {new.block}
+{ output.state before.all =
+    'skip$
+    { after.block 'output.state := }
+  if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+    'skip$
+    { output.state before.all =
+        'skip$
+        { after.sentence 'output.state := }
+      if$
+    }
+  if$
+}
+FUNCTION {not}
+{   { #0 }
+    { #1 }
+  if$
+}
+FUNCTION {and}
+{   'skip$
+    { pop$ #0 }
+  if$
+}
+FUNCTION {or}
+{   { pop$ #1 }
+    'skip$
+  if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+  swap$ empty$
+  and
+    'skip$
+    'new.block
+  if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+    { pop$ "" }
+    'skip$
+  if$
+}
+FUNCTION {boldface}
+{ duplicate$ empty$
+    { pop$ "" }
+    { "{\bf " swap$ * "}" * }
+  if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+    { pop$ "" }
+    { "{\em " swap$ * "}" * }
+  if$
+}
+INTEGERS { nameptr namesleft numnames }
+FUNCTION {format.names}
+{ 's :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { nameptr #1 >
+        { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := }
+        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := }
+      if$
+      nameptr #1 >
+        { namesleft #1 >
+            { ", " * t * }
+            { numnames #2 >
+                { "," * }
+                'skip$
+              if$
+              t "others" =
+                { " et~al." * }
+                { " and " * t * }
+              if$
+            }
+          if$
+        }
+        't
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+FUNCTION {format.ed.names}
+{ 's :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { nameptr #1 >
+        { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := }
+        { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't := }
+      if$
+      nameptr #1 >
+        { namesleft #1 >
+            { ", " * t * }
+            { numnames #2 >
+                { "," * }
+                'skip$
+              if$
+              t "others" =
+                { " et~al." * }
+                { " and " * t * }
+              if$
+            }
+          if$
+        }
+        't
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+    { "" }
+    { author format.names }
+  if$
+}
+FUNCTION {format.key}
+{ empty$
+    { key field.or.null }
+    { "" }
+  if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+    { "" }
+    { editor format.names
+      editor num.names$ #1 >
+        { " (eds.)" * }
+        { " (ed.)" * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.editors.extra}
+{ editor empty$
+    { "" }
+    { editor format.ed.names
+      editor num.names$ #1 >
+        { " (eds.)" * }
+        { " (ed.)" * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.title}
+{ title empty$
+    { "" }
+    { "`" title "'" * * }
+  if$
+}
+FUNCTION {n.dashify}
+{ 't :=
+  ""
+    { t empty$ not }
+    { t #1 #1 substring$ "-" =
+        { t #1 #2 substring$ "--" = not
+            { "--" *
+              t #2 global.max$ substring$ 't :=
+            }
+            {   { t #1 #1 substring$ "-" = }
+                { "-" *
+                  t #2 global.max$ substring$ 't :=
+                }
+              while$
+            }
+          if$
+        }
+        { t #1 #1 substring$ *
+          t #2 global.max$ substring$ 't :=
+        }
+      if$
+    }
+  while$
+}
+FUNCTION {first.page.number}
+{ 't :=
+  ""
+    { t "" =
+        { #0 }
+        { t #1 #1 substring$ "-" = not }
+      if$
+    }
+    { t #1 #1 substring$ *
+      t #2 global.max$ substring$ 't :=
+    }
+  while$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+    { "~" }
+    { " " }
+  if$
+  swap$ * *
+}
+FUNCTION {either.or.check}
+{ empty$
+    'pop$
+    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+  if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+    { "" }
+    { "Vol." volume tie.or.space.connect
+      series empty$
+        'skip$
+        { " of " * series emphasize * }
+      if$
+      "volume and number" number either.or.check
+    }
+  if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+    { number empty$
+        { series field.or.null }
+        { output.state mid.sentence =
+            { "No." }
+            { "No." }
+          if$
+          number tie.or.space.connect
+          series empty$
+            { "there's a number but no series in " cite$ * warning$ }
+            { " in " * series * }
+          if$
+        }
+      if$
+    }
+    { "" }
+  if$
+}
+FUNCTION {format.edition}
+{ edition empty$
+    { "" }
+    { output.state mid.sentence =
+        { edition "l" change.case$ " edition" * }
+        { edition "t" change.case$ " edition" * }
+      if$
+    }
+  if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+  #0 'multiresult :=
+    { multiresult not
+      t empty$ not
+      and
+    }
+    { t #1 #1 substring$
+      duplicate$ "-" =
+      swap$ duplicate$ "," =
+      swap$ "+" =
+      or or
+        { #1 'multiresult := }
+        { t #2 global.max$ substring$ 't := }
+      if$
+    }
+  while$
+  multiresult
+}
+FUNCTION {format.pages}
+{ pages empty$
+    { "" }
+    { pages multi.page.check
+        { "pp." pages n.dashify tie.or.space.connect }
+        { "p." pages tie.or.space.connect }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.page}
+{ pages empty$
+    { "" }
+    { "p.~" pages first.page.number * }
+  if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+  volume empty$
+    'skip$
+    { boldface }
+  if$
+  number empty$
+    'skip$
+    { "(" number * ")" * *
+      volume empty$
+        { "there's a number but no volume in " cite$ * warning$ }
+        'skip$
+      if$
+    }
+  if$
+  pages empty$
+    'skip$
+    { duplicate$ empty$
+        { pop$ format.pages }
+        { ", " * pages n.dashify * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.vol.num.page}
+{ volume field.or.null
+  volume empty$
+    'skip$
+    { boldface }
+  if$
+  number empty$
+    'skip$
+    { "(" number * ")" * *
+      volume empty$
+        { "there's a number but no volume in " cite$ * warning$ }
+        'skip$
+      if$
+    }
+  if$
+  pages empty$
+    'skip$
+    { duplicate$ empty$
+        { pop$ format.pages }
+        { ", " * pages first.page.number * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+    'format.pages
+    { type empty$
+        { "Chapt." }
+        { type "l" change.case$ }
+      if$
+      chapter tie.or.space.connect
+      pages empty$
+        'skip$
+        { ", " * format.pages * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+    { "" }
+    { editor empty$
+        { "In: " booktitle emphasize * }
+        { "In: " format.editors.extra * ": " * booktitle emphasize * }
+      if$
+    }
+  if$
+}
+FUNCTION {format.in.booktitle.or.series}
+{ booktitle empty$
+    { series empty$
+        { "" }
+        { "In: " series emphasize * }
+      if$
+    }
+    { editor empty$
+        { "In: " booktitle emphasize * }
+        { "In: " format.editors.extra * ": " * booktitle emphasize * }
+      if$ 
+    }
+  if$
+}
+FUNCTION {format.thesis.type}
+{ type empty$
+    'skip$
+    { pop$
+      type "t" change.case$
+    }
+  if$
+}
+FUNCTION {format.tr.number}
+{ type empty$
+    { "Technical Report" }
+    'type
+  if$
+  number empty$
+    { "t" change.case$ }
+    { number tie.or.space.connect }
+  if$
+}
+FUNCTION {format.article.crossref}
+{ "in"
+  " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume empty$
+    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+      "in "
+    }
+    { "Vol." volume tie.or.space.connect
+      " of " *
+    }
+  if$
+  "\cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{ "in"
+  " \cite{" * crossref * "}" *
+}
+FUNCTION {article}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { journal emphasize "journal" output.check.extra
+      format.vol.num.pages output.extra
+    }
+    { format.article.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check
+      editor format.key output
+    }
+    { format.authors output.nonnull
+      crossref missing$
+        { "author and editor" editor either.or.check }
+        'skip$
+      if$
+    }
+  if$
+  output.year.check
+  format.btitle "title" output.check
+  crossref missing$
+    { format.bvolume output
+      format.number.series output
+      new.block
+      address empty$
+        'skip$
+        { address ":" * output }
+      if$
+      publisher "publisher" output.check.extra
+    }
+    { new.block
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.edition output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  output.year.check
+  format.btitle "title" output.check
+  new.block
+  howpublished output
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {inbook}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check
+      editor format.key output
+    }
+    { format.authors output.nonnull
+      crossref missing$
+        { "author and editor" editor either.or.check }
+        'skip$
+      if$
+    }
+  if$
+  output.year.check
+  format.btitle "title" output.check
+  crossref missing$
+    { format.bvolume output
+      format.chapter.pages "chapter and pages" output.check
+      format.number.series output
+      new.block
+      address empty$
+        'skip$
+        { address ":" * output }
+      if$
+      publisher "publisher" output.check.extra
+    }
+    { format.chapter.pages "chapter and pages" output.check
+      new.block
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.edition output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {incollection}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { format.in.ed.booktitle "booktitle" output.check
+      format.bvolume output
+      format.number.series output
+      new.block
+      address empty$
+        'skip$
+        { address ":" * output }
+      if$
+      publisher "publisher" output.check.extra
+      format.edition output
+      format.chapter.pages output
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.chapter.pages output
+    }
+  if$
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { format.in.booktitle.or.series "booktitle or series" output.check
+      format.bvolume output
+      new.sentence
+      address output
+      format.pages output
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  organization output
+  address output
+  format.edition output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {mastersthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  "Master's thesis" format.thesis.type output.nonnull
+  school "school" output.check
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {misc}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  output.year.check
+  format.title output
+  new.block
+  howpublished output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  "Ph.D. thesis" format.thesis.type output.nonnull
+  school "school" output.check
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {proceedings}
+{ output.bibitem
+  format.editors output
+  editor format.key output
+  output.year.check
+  format.title "title" output.check
+  format.bvolume output
+  format.number.series output
+  new.block
+  address empty$
+     'skip$
+     { address ":" * output }
+  if$
+  organization output.extra
+  publisher output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {techreport}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  format.tr.number output.nonnull
+  institution "institution" output.check
+  address output
+  new.block
+  note output
+  fin.entry
+}
+FUNCTION {unpublished}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  output.year.check
+  format.title "title" output.check
+  new.block
+  note "note" output.check
+  fin.entry
+}
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr,"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sept."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+READ
+FUNCTION {sortify}
+{ purify$
+  "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+  'len :=
+  s #1 len substring$ =
+    { s len #1 + global.max$ substring$ }
+    's
+  if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+  s #1 "{vv~}{ll}" format.name$
+  s num.names$ duplicate$
+  #2 >
+    { pop$ " et~al." * }
+    { #2 <
+        'skip$
+        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+            { " et~al." * }
+            { " and " * s #2 "{vv~}{ll}" format.name$ * }
+          if$
+        }
+      if$
+    }
+  if$
+}
+FUNCTION {author.key.label}
+{ author empty$
+    { key empty$
+        { cite$ #1 #3 substring$ }
+        'key
+      if$
+    }
+    { author format.lab.names }
+  if$
+}
+FUNCTION {author.editor.key.label}
+{ author empty$
+    { editor empty$
+        { key empty$
+            { cite$ #1 #3 substring$ }
+            'key
+          if$
+        }
+        { editor format.lab.names }
+      if$
+    }
+    { author format.lab.names }
+  if$
+}
+FUNCTION {editor.key.label}
+{ editor empty$
+    { key empty$
+        { cite$ #1 #3 substring$ }
+        'key
+      if$
+    }
+    { editor format.lab.names }
+  if$
+}
+FUNCTION {calc.label}
+{ type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.key.label
+    { type$ "proceedings" =
+        'editor.key.label
+        'author.key.label
+      if$
+    }
+  if$
+  "" swap$ * "}{"
+  *
+  year field.or.null purify$ #-1 #4 substring$
+  *
+  'label :=
+}
+FUNCTION {sort.format.names}
+{ 's :=
+  #1 'nameptr :=
+  ""
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { nameptr #1 >
+        { "   " * }
+        'skip$
+      if$
+      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
+      nameptr numnames = t "others" = and
+        { "et al" * }
+        { t sortify * }
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+FUNCTION {sort.format.title}
+{ 't :=
+  "A " #2
+    "An " #3
+      "The " #4 t chop.word
+    chop.word
+  chop.word
+  sortify
+  #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+    { key empty$
+        { "to sort, need author or key in " cite$ * warning$
+          ""
+        }
+        { key sortify }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+    { editor empty$
+        { key empty$
+            { "to sort, need author, editor, or key in " cite$ * warning$
+              ""
+            }
+            { key sortify }
+          if$
+        }
+        { editor sort.format.names }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+    { key empty$
+        { "to sort, need editor or key in " cite$ * warning$
+          ""
+        }
+        { key sortify }
+      if$
+    }
+    { editor sort.format.names }
+  if$
+}
+FUNCTION {presort}
+{ calc.label
+  label sortify
+  "    "
+  *
+  type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.sort
+    { type$ "proceedings" =
+        'editor.sort
+        'author.sort
+      if$
+    }
+  if$
+  #1 entry.max$ substring$
+  'sort.label :=
+  sort.label
+  *
+  "    "
+  *
+  title field.or.null
+  sort.format.title
+  *
+  #1 entry.max$ substring$
+  'sort.key$ :=
+}
+ITERATE {presort}
+SORT            % by label, sort.label, title---for final label calculation
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+  "" 'next.extra :=
+  #0 'last.extra.num :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+    { last.extra.num #1 + 'last.extra.num :=
+      last.extra.num int.to.chr$ 'extra.label :=
+    }
+    { "a" chr.to.int$ 'last.extra.num :=
+      "" 'extra.label :=
+      label 'last.label :=
+    }
+  if$
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+    { "a" 'extra.label := }
+    'skip$
+  if$
+  label extra.label * "}" * 'label :=
+  extra.label 'next.extra :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+  "    "
+  *
+  year field.or.null sortify
+  *
+  "    "
+  *
+  title field.or.null
+  sort.format.title
+  *
+  #1 entry.max$ substring$
+  'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT            % by sort.label, year, title---giving final bibliography order
+FUNCTION {begin.bib}
+{ preamble$ empty$
+    'skip$
+    { preamble$ write$ newline$ }
+  if$
+  "\begin{thebibliography}{00}" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+  "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+
diff --git a/helm/papers/matita/kluopen.sty b/helm/papers/matita/kluopen.sty
new file mode 100644 (file)
index 0000000..7afd7ec
--- /dev/null
@@ -0,0 +1,586 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}    
+% \def\changes#1#2{}
+% \changes{1997/07/10}{bugfix in title@thanks: move thanks into ititle@.}
+% \changes{1997/07/10}{bugfix in opening: inserted hsize == textwidth. This
+%               to enforce double width in abstract (twocolumn layouts)}
+% \changes{1997/07/10}{changes in ititle@ to correct spacing of thanks. This
+%    removed the need for title@@ and title@thanks: both removed}
+% \changes{1997/07/10}{speccright etc. removed (never used)}
+% \changes{1997/07/10}{crude vertical spacing fix for @arttype if copyrighthead}
+% \changes{1998/01/06}{fix thispagestyle (crt. endup on 2nd page if abstract too long)}
+% \changes{1998/02/04}{added new hooks: "beforeartskip", "titlebaselinefactor"}
+% \changes{1998/02/04}{made "classification", "keywords", "abbreviations" and "nomenclature" long}
+% \changes{1998/02/06}{force "email" lowercase}
+% \changes{1998/02/06}{removed () around defaulted dates}
+\def\filedate{1998/02/11}                                            
+\def\filename{kluopen.sty}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\normalsize,\numberline,\protect,\endinput,\hfill}
+%\DoNotIndex{\@compare,\ifx,\global,\gdef,\def,\let,\hbox,\par,\typeout}
+%\CodelineIndex
+%\newcommand{\Bs}{$\backslash$}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=11pt
+%\MakeShortVerb{\|}
+%\setlength{\marginparwidth}{0in}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\runningtitle{\filename\ -- \filedate}
+%\runningauthor{Kluwer Academic Publishers}
+%\editor{Test}
+%\journalcode{test}
+%\begin{abstract}
+% This internal stylefile defines most of the special kluwer
+% opening commands. 
+%\end{abstract} 
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesPackage{kluopen}[\filedate ]
+%    \end{macrocode}
+% \subsection{The opening environment}
+% The beginning of this environment is rather empty, there is not much
+% need to do anything here. All definitions inside the `opening' have
+% to be indirect |\def|s anyway, so we will start worrying about
+% typesetting things at the end of the environment. 
+%
+%    \begin{macrocode}
+\gdef\title#1{\title@{#1}}
+\gdef\author#1{\author@{#1}}
+\gdef\date#1{\date@{#1}} 
+\def\opening{%
+  \let\title=\title@
+  \let\author=\author@
+  \let\date=\date@
+  \let\arttype=\arttype@
+  \let\subtitle=\subtitle@
+  \let\dedication=\dedication@
+  \let\translation=\translation@
+  \let\received=\received@
+  \let\orf=\orf@     
+  \let\accepted=\accepted@
+  \let\revised=\revised@
+  \let\institute=\institute@ 
+  \hsize\textwidth
+  }
+%    \end{macrocode}
+% Since |\listfiles| is a definite `preambleonly' command, we can test
+% for that. IF |\listfiles| = |\@notprerr| typeset opening, ELSE
+% typeset opening at begin document. 
+%
+% If new commands are added to this list, don't forget to add them
+% above too. Also, please gobble all arguments carefully. Als note
+% that these redefinitions only take place if there is an |opening|
+% environment. 
+%
+% The new syntax for |opening| is to use it {\it after\/}
+% |\begin{document}| and/or |\begin{article}|, but we still honour the
+% old syntax. Also, because I wanted to support |\maketitle| the
+% ordinary way, |\maketitle| is |\let| to |\endopening|.     
+%    \begin{macrocode}
+\gdef\maketitle{\endopening}
+\def\endopening{%
+  \ifx\listfiles\@notprerr \maketitle@@ \else 
+  \AtBeginDocument{\maketitle@@}\fi
+  \gdef\title##1{\opening@only\title}
+  \gdef\subtitle##1{\opening@only\subtitle}
+  \gdef\orf##1{\opening@only\orf}
+  \gdef\dedication##1{\opening@only\dedication}
+  \gdef\translation##1{\opening@only\translation}
+  \gdef\received##1{\opening@only\received}
+  \gdef\revised##1{\opening@only\revised}
+  \gdef\author##1{\opening@only\author}
+  \gdef\institute##1{\opening@only\institute}
+  \gdef\date##1{\opening@only\date}%
+  \gdef\arttype##1{\opening@only\arttype}
+  }
+%    \end{macrocode}
+% Let `opening only' == warning.
+%    \begin{macrocode}
+\def\opening@only#1{\PackageWarning{kluopen}{\string#1\space 
+                effective only inside opening environment.}}
+%    \end{macrocode}
+% \subsection{Internal Author and institute commands}
+% author and institute commands are seriously intertwined. Too bad
+% about the relocation that used to happen in |humnkap|, because has
+% been sacrificed again. It turned out be more of a fuzz than it was
+% worth. 
+%
+% The general idea is to keep four different command lists that stack
+% the authors and institutes. 
+%
+% Let's do the easy thing first. These are the `user' changeable
+% parameters for authors and institutes. 
+%    \begin{macrocode}
+\def\authorsize{\normalsize \raggedright}
+\def\authorcase#1{#1}                  
+\def\authorindent{0pt}
+\def\afterallauthorsskip{1em\relax}
+\def\afterauthorskip{0pt}
+\def\institutesize{\footnotesize\it}
+\def\institutecase#1{#1}
+\def\instituteindent{0pt}
+\def\institutesep{.4\baselineskip}
+\def\authorand{and}
+%    \end{macrocode}
+% This is a hook for klups.sty (oldstyle numerals)
+%    \begin{macrocode}                           
+\def\i@oldseries{}
+%    \end{macrocode}
+% 
+% We only need |\@temptokenb|, because |\@temptokena| is a \LaTeX\
+% scratch register.  
+%    \begin{macrocode}
+\newtoks\@temptokenb
+%    \end{macrocode}
+% The list will, for example, look like this:
+%\begin{verbatim}
+%\@authors == {\@k@p {A. \surname{Thor}}\@k@p {B. \surname{Thor}}} 
+%\end{verbatim}
+%    \begin{macrocode}
+\long\def\append@item#1\to#2{%
+  \@temptokena={\@k@p{#1}}%
+  \@temptokenb=\expandafter{#2}%
+  \xdef#2{\the\@temptokenb\the\@temptokena}}
+%    \end{macrocode}
+% Extraction macros. Typical usage: 
+%
+%\begin{verbatim}
+%\get@left\@instituteauthors\to\@curauths
+%\end{verbatim}
+%
+% This will expand into: 
+%
+%\begin{verbatim}
+%\g@l\@k@p \ITEM1\@k@p \ITEM2 ...\g@l \@instituteauthors \@curauths
+%\end{verbatim} 
+%
+% And from there into
+%
+%\begin{verbatim}
+%\def\@curauths \ITEM1 \def\@institeauthors{\ITEM2 ...}
+%\end{verbatim}
+%
+% Gee, this looks so easy if you write it out :-). 
+%    \begin{macrocode}
+\def\get@left#1\to#2{\expandafter\g@l#1\g@l#1#2}
+\long\def\g@l\@k@p#1#2\g@l#3#4{\def#4{#1}\def#3{#2}}
+%    \end{macrocode}
+% This will contain the authors for the current institute.
+%    \begin{macrocode}
+\def\@authors{}%
+%    \end{macrocode}
+% This will contain all authors.
+%    \begin{macrocode}
+\def\@allauthors{}%
+%    \end{macrocode}
+% This will contain all institutes.
+%    \begin{macrocode}
+\def\@institutes{}%
+%    \end{macrocode}
+% This will contain items containing all of the authors that are
+% tied up to one institute.  
+%    \begin{macrocode}
+\def\@instituteauthors{}%
+%    \end{macrocode}
+% These two are temporaries that need to be initialized.
+%    \begin{macrocode}
+\def\@curauths{}
+\def\@curinst{}
+%    \end{macrocode}
+% These are the insertion macros. |\author@| is the internal version
+% of |\author|, and just adds to the two author lists.
+%
+% |\institute@| is a bit trickier, it has to store the institute
+% itself for later retrieval, but it also has to clear |\@authors|, so
+% it can be used again for the next institute. It does this by moving
+% all of the collected authors in the |\@authors| list as one item
+% into the |\authors@institute| list. 
+%
+% Because |\@institutes| and |\@instituteauthors| are parallel, there
+% will be an error condition if there are authors after the last
+% institute. The |\expandafter|'s are needed to get |\@authors| folded
+% out. 
+%    \begin{macrocode}
+\def\author@#1{\append@item#1\to\@authors
+  \append@item#1\to\@allauthors }                            
+\def\institute@#1{\append@item#1\to\@institutes
+  \expandafter\append@item\expandafter{\@authors}\to\@instituteauthors
+  \gdef\@authors{}}
+%    \end{macrocode}
+% Format one name. 
+%
+% The box in the first part is needed because we have to typeset once
+% in order to get the |\thanks|.
+%
+% The |\expandafter|'s in the second part bypass grouping. Param \#2
+% is either a comma or nothing. The italic correction is needed if
+% authors are typeset in Italics, or the thankssymbol will come out to
+% far to the left.
+% 
+% \changes{1997/08/13}{Removed null box for thankssymbol and switched 
+%                         places with comma (hor. spacing bugs)}
+%    \begin{macrocode}
+\newif\ifthanks
+\def\orf@#1{#1}
+\def\@formatname#1#2{\begingroup
+   \def\thanks##1{\global\thankstrue}\setbox0\vbox{#1}%
+   \endgroup
+   \begingroup
+   \ifthanks 
+     \edef\fn##1\thanks##2{\authorcase{##1}\/%
+        \noexpand\thanks{##2}#2}\expandafter\fn#1
+   \else
+      \edef\fn##1{{\authorcase{##1}}#2}%
+        \expandafter\fn\expandafter{#1}%
+   \fi
+   \endgroup\global\thanksfalse }
+%    \end{macrocode} 
+%
+% Format authors presently in |\@curauths| (These are the ones belonging
+% to one specific institute). 
+%
+% First, loop over |\@curauths| counting the number of authors. Then
+% we know how many, so loop over again, typesetting all. The |,| needs
+% to be given separately to make sure |\thanks| works inside an
+% author. 
+%
+% It there are 0 authors, nothing will happen at all.
+%    \begin{macrocode}
+\newcount\cnt@authors
+\def\@formatauthors{\begingroup 
+  \authorsize
+  \leavevmode
+  \gdef\surname##1{##1}%
+  \gdef\email##1{ \hbox{({\tt \lowercase{##1}})}}%
+  \cnt@authors=0
+  \def\@k@p##1{\advance\cnt@authors by 1}\@curauths
+  \def\@k@p##1{\advance\cnt@authors by -1
+    \ifnum\cnt@authors>1 
+    \@formatname{##1}{,}\penalty0\ \fi     % signif. space
+    \ifnum\cnt@authors=1                               % before \fi's !!
+    \@formatname{##1}{} \authorand \penalty0\ \fi        
+    \ifnum\cnt@authors<1 
+    \@formatname{##1}{}\par\fi}\@curauths
+   \vskip \afterauthorskip
+  \endgroup}
+%    \end{macrocode}
+% Format one institute.
+%    \begin{macrocode}
+\def\@formatinstitute{{\institutesize \institutecase{\@curinst}\par}}
+%    \end{macrocode}
+% Format all authors and all institutes. Indentation is done through
+% parindent and hangindent instead of rightskip, because otherwise a
+% |\centering| would fail. 
+%
+% There is a space of |\institutesep| + |\parskip| between every
+% author\,/\,institute block, and double that space between the last
+% two (don't understand that). 
+%
+% This macro also takes care of the case that there is no institute at
+% all given, which is likely to happen in the \LaTeX\ compatibility
+% mode. {\it This does not allow you to have only the last author without
+% an institute\/}. 
+%
+% The |\relax| after |\@institutes| is absolutely necessary, or the
+% author will be set twice!
+%    \begin{macrocode}
+\newcount\cnt@institutes
+\def\@authorsandinstitutes{\begingroup 
+  \authorsize
+  \cnt@authors=0
+  \def\@k@p##1{\advance\cnt@authors by 1}\@allauthors
+  \cnt@institutes=0                      
+  \def\@k@p##1{\advance\cnt@institutes by 1}\@institutes\relax
+  \ifnum\cnt@institutes=0 
+    \let\@curauths\@allauthors
+    \parindent=\authorindent
+    \hangindent=\authorindent
+    \@formatauthors 
+  \fi
+  \loop\ifnum\cnt@institutes>0
+    \get@left\@instituteauthors\to\@curauths
+    \parindent=\authorindent
+    \hangindent=\authorindent
+    \@formatauthors
+    \get@left\@institutes\to\@curinst
+    \parindent=\instituteindent
+    \hangindent=\instituteindent
+    \@formatinstitute
+    \ifnum\cnt@institutes=2 \vskip \institutesep\relax \fi
+    \ifnum\cnt@institutes>1 \vskip \institutesep\relax \fi
+    \advance\cnt@institutes by -1
+  \repeat
+  \vskip \afterallauthorsskip
+  \gdef\@authors{}%
+  \gdef\@allauthors{}%
+  \gdef\@institutes{}%
+  \gdef\@instituteauthors{}%
+  \gdef\@curauths{}%
+  \gdef\@curinst{}%
+\endgroup}
+%    \end{macrocode}
+% \subsection{Typesetting the title and subtitle}
+% First, here are the user settings again:
+%    \begin{macrocode}
+\def\titleflushstyle{}
+\def\titlefont{\Large\rm}
+\def\titlecase#1{#1}
+\def\titleindent{0pt}
+\def\aftertitleskip{1.8pc }
+\def\presubtitleskip{-1.4pc }
+\def\aftersubtitleskip{1pc }
+\def\subtitlefont{\large\it}
+\def\subtitleflushstyle{}
+%    \end{macrocode}
+% Internal commands. |\@maketitle| will call |\@title|. |\title@| is
+% just an internal for |\title|.
+%    \begin{macrocode}
+\def\title@#1{\gdef\@title{%
+    \@formattitle{#1}\par \vskip \aftertitleskip }}
+\def\@title{}
+%    \end{macrocode}
+% The trick with the vbox is the same as above, to get |\thanks|.
+%    \begin{macrocode}
+\def\@formattitle#1{\begingroup
+  \def\thanks##1{\global\thankstrue}%
+  \setbox\@tempboxa\vbox{#1}\endgroup
+  \begingroup
+    \titleflushstyle
+    \ifthanks
+      \def\fn##1\thanks##2{\ititle@{##1}{\,\thanks{##2}}}%
+      \expandafter\fn#1
+    \else
+      \def\fn##1{\ititle@{##1}{}}\expandafter\fn\expandafter{#1}%
+    \fi
+  \endgroup\global\thanksfalse }
+%    \end{macrocode}
+% Not much left to do here. The flush style has been set by
+% |\@formattitle|,  skips before and after by |\@title|. 
+%    \begin{macrocode}           
+\def\titlebaselinefactor{1.05}
+\def\ititle@#1#2{\begingroup     
+    \parindent \titleindent
+    \hangindent \titleindent
+    \hyphenpenalty10000
+    {\titlefont\titlecase{#1}#2%
+    \baselineskip=\titlebaselinefactor\baselineskip
+    \par} 
+    \endgroup}
+%    \end{macrocode}
+% Basically, this is just an echo of title.
+%    \begin{macrocode}
+\def\@subtitle{}
+\def\subtitle@#1{\gdef\@subtitle{\vskip \presubtitleskip 
+    \@formatsubtitle{#1}\par \vskip \aftersubtitleskip }}
+\def\@formatsubtitle#1{\begingroup
+  \def\thanks##1{\global\thankstrue}\setbox0\vbox{#1}\endgroup
+  \begingroup \subtitleflushstyle
+    \ifthanks
+  \def\fn##1\thanks##2{\subtitle@thanks{##1}{##2}}\expandafter\fn#1
+    \else
+      \def\fn##1{\subtitle@@{##1}}\expandafter\fn\expandafter{#1}\fi
+  \endgroup
+  \par\global\thanksfalse}
+\def\subtitle@thanks#1#2{\isubtitle@{#1}\thanks{#2}\par
+    \ignorespaces}
+\def\subtitle@@#1{\isubtitle@{#1}\par\ignorespaces}
+\def\isubtitle@#1{{\subtitlefont #1}}
+%    \end{macrocode}
+% \subsection{Date, article type, dedication and translation.}
+% These are all fairly straightforward, so I will not pay too much
+% attention to these commands.
+%    \begin{macrocode}
+\def\afterdateskip{.7\baselineskip}
+\def\datesize{\footnotesize}
+\def\@date{{\i@oldseries\datesize Received: \@received ; 
+    Accepted\@accepted}\vskip \afterdateskip
+    \gdef\@received{\ldots\ldots}%
+    \gdef\@accepted{\ldots\ldots}}
+\def\date@#1{\gdef\@date{{\i@oldseries\datesize #1\par}\vskip \afterdateskip
+    \gdef\@received{\ldots\ldots}%
+    \gdef\@accepted{\ldots\ldots}}}
+\def\@received{\ldots\ldots}
+\def\@accepted{: \ldots\ldots}
+\def\revised@#1{\gdef\@accepted{ in revised form: #1}}
+\def\received@#1{\gdef\@received{#1}}
+\def\accepted@#1{\gdef\@accepted{ in final form: #1}}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\def\artsize{\normalsize\it}
+\def\afterartskip{1.5pc}
+\def\beforeartskip{0pc}
+\def\@arttype{}
+\def\arttype@#1{\gdef\@arttype{\vskip\beforeartskip\noindent
+      {\artsize #1\vskip\afterartskip}}}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\@dedication{}
+\def\dedicationsize{\normalsize\it\raggedright}
+\def\prededicationskip{18pt}
+\def\afterdedicationskip{18pt}
+\def\dedication@#1{\gdef\@dedication{%
+     \unskip\vskip \prededicationskip
+     {\dedicationsize #1\par}%
+     \vskip \afterdedicationskip}}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\@translation{}
+\def\translationsize{\normalsize\it\raggedright}
+\def\pretranslationskip{18pt}
+\def\aftertranslationskip{18pt}
+\def\translation@#1{\gdef\@translation{%
+     \unskip\vskip \pretranslationskip
+     {\translationsize #1\par}%
+     \vskip \aftertranslationskip}}
+%    \end{macrocode}
+% \subsection{Abstract, keywords, abbreviations, classification 
+% and nomenclature} 
+% All of these are suppposed to have the same size. The only one with
+% a flexible before/after skip is |abstract|, but they all have their
+% own font defined for the name. 
+%    \begin{macrocode}
+\providecommand{\abstractname}{Abstract}
+\providecommand{\keywordsname}{Keywords}
+\providecommand{\abbreviationsname}{Abbreviations}
+\providecommand{\nomenclaturename}{Nomenclature}
+\def\abstractsize{\footnotesize}  
+\def\abstractnamefont{\bf}
+\def\abstractdot{.~}
+\def\keynamefont{\bf}
+\def\nomennamefont{\bf}
+\def\abbrevnamefont{\bf}
+\def\classnamefont{\bf}
+\def\afterabstractskip{.7\baselineskip\relax}
+\def\preabstractskip{0pt\relax}
+%    \end{macrocode}
+% Abstract is a box, because we still want to support the opening
+% environment before |\begin{document}|. 
+%
+%{\it Note that the stylefile is resposible for making sure that these
+%are typeset at all}.              
+%    \begin{macrocode}
+\newbox\@abstractbox 
+\def\@abstract{}
+\newenvironment{abstract}{%
+  \gdef\@abstract{\message{\abstractname}%
+    {\vskip\preabstractskip
+    \noindent
+    \unvbox\@abstractbox 
+    \vskip\afterabstractskip }}%
+  \global\setbox\@abstractbox\vbox\bgroup \abstractsize \noindent
+    {\abstractnamefont\abstractname\abstractdot}}{\par\egroup }
+\def\@keywords{}
+\long\def\keywords#1{%          
+    \gdef\@keywords{\message{\keywordsname}%
+        {\abstractsize\noindent{\keynamefont
+      \keywordsname:~}#1\par \vskip.7\baselineskip}}}
+\def\@abbreviations{}
+\def\abbrev#1#2{#1 -- #2}              
+\long\def\abbreviations#1{%
+     \gdef\@abbreviations{\message{\abbreviationsname}% 
+        {\abstractsize\noindent{\abbrevnamefont \abbreviationsname:~}%
+        #1\par \vskip.7\baselineskip}}}
+\def\@nomenclature{}
+\def\nomen#1#2{#1 -- #2}              
+\long\def\nomenclature#1{%
+     \gdef\@nomenclature{\message{\nomenclaturename}% 
+       {\abstractsize\noindent{\nomennamefont
+       \nomenclaturename:\par}\noindent #1\par \vskip.7\baselineskip}}}
+\def\@classification{}
+\long\def\classification#1#2{%
+     \gdef\@classification{\message{Classification}% 
+       {\abstractsize\noindent{\classnamefont #1: }% 
+       #2\par \vskip.7\baselineskip}}}
+\def\motto{\@ifnextchar[{\prosemotto}{\poemmotto}}
+\newbox\mottobox     
+\def\@motto{}
+\long\def\poemmotto{\global\setbox\mottobox\vbox \bgroup   
+        \noindent
+         \hbox to\hsize\bgroup\begingroup 
+            \hfill\vbox\bgroup\hsize =15pc
+            \footnotesize \raggedright \noindent
+            \parskip=3pt}
+\long\def\prosemotto[#1]{\global\setbox\mottobox\vbox \bgroup   
+            \noindent
+         \hbox to\hsize\bgroup \begingroup
+            \hfill\vbox\bgroup\hsize =15pc
+            \raggedright \footnotesize \noindent 
+            \parskip=3pt}
+\def\endmotto{\par \egroup \endgroup \egroup  
+    \vspace{1\baselineskip}\egroup 
+    \gdef\@motto{\par\message{Motto}\box\mottobox \gdef\@motto{}}}
+%    \end{macrocode}
+% \subsection{@maketitle}
+% Internal commands for typesetting of the front part. |\@maketitle|
+% has been kept as simple as possible, making it easy to redefine the
+% order inside a stylefile. For twocolumn output, everything that is
+% done inside |\@maketitle| is typeset over two columns.
+%
+% As noted above, if the stylefile feels like removing some of these
+% commands, it also has to find a way to have them typeset, because
+% that will no longer be automatic. 
+%    \begin{macrocode}
+\def\@maketitle{% 
+   \@arttype \@title \@subtitle \@authorsandinstitutes \@date 
+   \@abstract \@keywords \@abbreviations \@classification 
+   \@nomenclature \@translation \@dedication \@motto}
+%    \end{macrocode}
+% This command is called by |\endopening| and |\maketitle|.  
+%    \begin{macrocode}
+\def\openingflushstyle{}
+\def\maketitle@@{%
+  \begingroup
+     \setcounter{footnote}{0}%
+     \def\thefootnote{\fnsymbol{footnote}}%
+     \if@twocolumn
+        \twocolumn[{\openingflushstyle
+                 \parindent 0pt
+                 \@maketitle}]
+        \thispagestyle{opening}%
+        \@extramaketitle
+     \else  
+       \newpage\global\@topnum\z@ 
+       \thispagestyle{opening}%
+       {\openingflushstyle \parindent 0pt \@maketitle}%
+     \fi
+     \markboth{\@runningauthor}{\@runningtitle}%
+     \@thanks
+   \endgroup
+   \setcounter{footnote}{0}%
+   \let\@maketitle\relax
+   \gdef\@thanks{}%
+   \gdef\@title{}%
+   \let\thanks\relax }
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\runningtitle#1{\gdef\@runningtitle{#1}}
+\gdef\@runningtitle{}
+\def\runningauthor#1{\gdef\@runningauthor{#1}}
+\gdef\@runningauthor{}
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document}
+% end of kluopen.sty
+
+
+
+
+
diff --git a/helm/papers/matita/klups.sty b/helm/papers/matita/klups.sty
new file mode 100644 (file)
index 0000000..ede6b9f
--- /dev/null
@@ -0,0 +1,488 @@
+
+%
+% This input file (c) Kluwer Academic Publishers.
+% You are free to use this file as you see fit, provided 
+% that you do not make changes. 
+% If you DO make changes, you are required to rename the files.
+%        
+% \changes{1998/02/04}{Removed oldstyle numerals}
+%
+\def\fileversion{1.15}
+\def\filedate{1998/03/13}
+\NeedsTeXFormat{LaTeX2e}
+%
+%
+% Options: mathtime's options
+% exported commands: \rmgreek (decl) \greekrm (#1)                           
+%
+%
+\ProvidesPackage{klups}[\filedate\space\fileversion\space
+ Kluwer PSfonts package]
+                                                               
+\DeclareOption{uprightgreek}{%
+    \AtEndOfPackage{\rmgreek@redefs}}
+\DeclareOption*{\PassOptionsToPackage\CurrentOption{mathtime}}
+\ProcessOptions\relax
+
+% Sans Serifs in 90% Helvetica
+% Running text Times-Roman
+% Typewriter Courier narrowed
+%                                                        
+                  
+\def\spaces{\space\space\space\space\space} 
+\def\@fontwarnings{}
+\def\@addtofontwarning#1{\g@addto@macro
+        \@fontwarnings{.\MessageBreak #1}}
+                                        
+\renewcommand{\sfdefault}{phv}                         
+\renewcommand{\rmdefault}{ptm}
+\renewcommand{\ttdefault}{pcr}
+\newif\if@couriernarrow \@couriernarrowtrue
+\normalfont
+% Try loading T1 font-encoding (only if psnfss installed)
+% 
+\IfFileExists{T1ptm.fd}{\RequirePackage[T1]{fontenc}}{%
+    \IfFileExists{t1ptm.fd}{\RequirePackage[T1]{fontenc}
+        \let\@acci\`
+        \let\@accii\'
+        \let\@acciii\=
+        }{%
+     \PackageError{klups}{%
+     No encoding for T1 PostScript fonts found}{%
+     Please check your distribution of LaTeX thoroughly!\MessageBreak%
+     There seem to be some files missing the implement the\MessageBreak%
+     new 256 character font encodings
+     }}}%                   
+
+% Try loading text companion fonts (only if psnfss installed)
+% 
+
+\IfFileExists{TS1ptm.fd}{\RequirePackage{textcomp}}{%
+    \IfFileExists{ts1ptm.fd}{\RequirePackage{textcomp}}{%
+            \PassOptionsToPackage{noTS1}{mathtime}%    
+            \@addtofontwarning{%
+            No text companion fonts for Times found,\MessageBreak%
+            \spaces not loading textcomp style}}}
+
+          
+% fontdim5=ex-height
+\def\klutest@font#1#2{\def\klu@font@error{n}%
+    \batchmode \font\klutch=#1 \errorstopmode
+    \ifdim \the\fontdimen5\klutch < 1pt   
+        \def\klu@font@error{y}%
+        \@addtofontwarning{%
+        Font #2 is not available}%                                            
+    \fi \let\klutch\relax
+    }                 
+                         
+\def\eightt{8t}
+\batchmode \font\klutch=ptmr8t \errorstopmode
+\ifdim \the\fontdimen5\klutch < 1pt   
+    \batchmode \font\klutch=ptmrq \errorstopmode
+    \ifdim \the\fontdimen5\klutch < 1pt    %%EEKS
+    \else
+    \gdef\eightt{q}%
+    \@addtofontwarning{%
+    Using old PostScript metrics,\MessageBreak 
+    \spaces consider updating your LaTeX fonts}%
+    \fi                                                             
+\fi 
+\let\klutch\relax
+
+\def\hvtmpl{7tn}
+\def\hvtmph{\eightt n}
+{\def\@tempa{OT1}
+\ifx \@tempa\encodingdefault
+    \batchmode \font\klutch=phvr7tn \errorstopmode
+    \ifdim \the\fontdimen5\klutch < 1pt   
+        \batchmode \font\klutch=phvrn7t \errorstopmode
+        \ifdim \the\fontdimen5\klutch < 1pt   
+            \@addtofontwarning{%
+            Font Helvetica Narrow is not available}% 
+        \else
+            \gdef\hvtmpl{n7t}
+            \gdef\hvtmph{n\eightt}
+        \fi
+    \fi 
+    \let\klutch\relax
+    \klutest@font{phvl7t}{Helvetica Light}
+    \klutest@font{pcrr7tn}{Courier Narrow}
+    \if y\klu@font@error
+     \global\@couriernarrowfalse
+    \fi
+\else
+    \batchmode \font\klutch=phvr\eightt n \errorstopmode
+    \ifdim \the\fontdimen5\klutch < 1pt   
+        \batchmode \font\klutch=phvrn\eightt \errorstopmode
+        \ifdim \the\fontdimen5\klutch < 1pt   
+            \@addtofontwarning{%
+            Font Helvetica Narrow is not available}% 
+        \else
+            \gdef\hvtmpl{n7t}
+            \gdef\hvtmph{n\eightt}
+        \fi
+    \fi 
+    \klutest@font{phvl\eightt}{Helvetica Light}
+    \klutest@font{pcrr8tn}{Courier Narrow}
+    \if y\klu@font@error
+      \global\@couriernarrowfalse
+    \fi
+\fi 
+}
+
+\newif\if@OSF \@OSFfalse
+%\klutest@font{ptmr8dc}{Times SmallCaps and OSF}
+%\if y\klu@font@error
+%    \global\@OSFfalse
+%\fi
+                                           
+\if@OSF       
+    \DeclareTextFontCommand{\textbo}{\boseries}
+    \DeclareTextFontCommand{\textmo}{\moseries}
+    \DeclareRobustCommand\boseries
+        {\not@math@alphabet\boseries\relax
+         \fontseries{bo}\selectfont}
+    \DeclareRobustCommand\moseries
+        {\not@math@alphabet\moseries\relax
+         \fontseries{mo}\selectfont}
+    \def\oldstyle#1{{\fontseries{\f@series o}\selectfont #1}} 
+    \def\oldseries{\fontseries{\f@series o}\selectfont} 
+    \let\i@oldseries\oldseries
+\fi                                                           
+% start .fd files
+
+                                         
+\begingroup \nfss@catcodes
+
+%% Times
+\if@OSF
+
+\DeclareFontFamily{T1}{ptm}{}
+
+\DeclareFontShape{T1}{ptm}{b}{n}{<-> ptmb8t}{}
+\DeclareFontShape{T1}{ptm}{b}{sc}{<-> ptmb8dc}{}
+\DeclareFontShape{T1}{ptm}{b}{sl}{<-> ptmbo8t}{}
+\DeclareFontShape{T1}{ptm}{b}{it}{<-> ptmbi8t}{}
+                             
+\DeclareFontShape{T1}{ptm}{bo}{n}{<-> ptmb8d}{}
+\DeclareFontShape{T1}{ptm}{bo}{sc}{<-> ptmb8dc}{}
+\DeclareFontShape{T1}{ptm}{bo}{sl}{<-> ptmbi8d}{}
+\DeclareFontShape{T1}{ptm}{bo}{it}{<-> ptmbi8d}{}
+
+\DeclareFontShape{T1}{ptm}{m}{n}{<-> ptmr8t}{}
+\DeclareFontShape{T1}{ptm}{m}{sc}{<-> ptmr8dc}{}
+\DeclareFontShape{T1}{ptm}{m}{sl}{<-> ptmro8t}{}
+\DeclareFontShape{T1}{ptm}{m}{it}{<-> ptmri8t}{}
+                             
+\DeclareFontShape{T1}{ptm}{mo}{n}{<-> ptmr8d}{}
+\DeclareFontShape{T1}{ptm}{mo}{sc}{<-> ptmr8dc}{}
+\DeclareFontShape{T1}{ptm}{mo}{sl}{<-> ptmri8d}{}
+\DeclareFontShape{T1}{ptm}{mo}{it}{<-> ptmri8d}{}
+
+\DeclareFontShape{T1}{ptm}{bx}{n}{<->ssub * ptm/b/n}{}
+\DeclareFontShape{T1}{ptm}{bx}{sc}{<->ssub * ptm/b/sc}{}
+\DeclareFontShape{T1}{ptm}{bx}{sl}{<->ssub * ptm/b/sl}{}
+\DeclareFontShape{T1}{ptm}{bx}{it}{<->ssub * ptm/b/it}{}
+          
+\DeclareFontShape{T1}{ptm}{bxo}{n}{<->ssub * ptm/bo/n}{}
+\DeclareFontShape{T1}{ptm}{bxo}{sc}{<->ssub * ptm/bo/sc}{}
+\DeclareFontShape{T1}{ptm}{bxo}{sl}{<->ssub * ptm/bo/sl}{}
+\DeclareFontShape{T1}{ptm}{bxo}{it}{<->ssub * ptm/bo/it}{}
+
+\DeclareFontShape{T1}{ptm}{l}{n}{<->ssub * ptm/m/n}{}
+\DeclareFontShape{T1}{ptm}{l}{sc}{<->ssub * ptm/m/sc}{}
+\DeclareFontShape{T1}{ptm}{l}{sl}{<->ssub * ptm/m/sl}{}
+\DeclareFontShape{T1}{ptm}{l}{it}{<->ssub * ptm/m/it}{}
+
+\DeclareFontShape{T1}{ptm}{lo}{n}{<->ssub * ptm/mo/n}{}
+\DeclareFontShape{T1}{ptm}{lo}{sc}{<->ssub * ptm/mo/sc}{}
+\DeclareFontShape{T1}{ptm}{lo}{sl}{<->ssub * ptm/mo/sl}{}
+\DeclareFontShape{T1}{ptm}{lo}{it}{<->ssub * ptm/mo/it}{}
+
+\fi
+                       
+%% OT1 Courier
+
+\DeclareFontFamily{OT1}{pcr}{\hyphenchar \font =-1}%
+
+\DeclareFontShape{OT1}{pcr}{b}{sc}{<-> pcrbc7t}{}%
+\DeclareFontShape{OT1}{pcr}{m}{sc}{<-> pcrrc7t}{}%
+%%%% condensed courier
+\if@couriernarrow
+\DeclareFontShape{OT1}{pcr}{m}{n}{<-> pcrr7tn}{}%
+\DeclareFontShape{OT1}{pcr}{b}{n}{<-> pcrb7tn}{}%
+\DeclareFontShape{OT1}{pcr}{b}{sl}{<-> pcrbo7tn}{}%
+\DeclareFontShape{OT1}{pcr}{m}{sl}{<-> pcrro7tn}{}%
+\else                                         
+\DeclareFontShape{OT1}{pcr}{m}{n}{<-> pcrr7t}{}%
+\DeclareFontShape{OT1}{pcr}{b}{n}{<-> pcrb7t}{}%
+\DeclareFontShape{OT1}{pcr}{b}{sl}{<-> pcrbo7t}{}%
+\DeclareFontShape{OT1}{pcr}{m}{sl}{<-> pcrro7t}{}%
+\fi
+%%%% substitutions
+\DeclareFontShape{OT1}{pcr}{bx}{it}{<->ssub * pcr/b/it}{}%
+\DeclareFontShape{OT1}{pcr}{bx}{n}{<->ssub * pcr/b/n}{}%
+\DeclareFontShape{OT1}{pcr}{bx}{sc}{<->ssub * pcr/b/sc}{}%
+\DeclareFontShape{OT1}{pcr}{bx}{sl}{<->ssub * pcr/b/sl}{}%
+\DeclareFontShape{OT1}{pcr}{b}{it}{<->ssub * pcr/b/sl}{}%
+\DeclareFontShape{OT1}{pcr}{b}{ui}{<->ssub * pcr/b/it}{}
+\DeclareFontShape{OT1}{pcr}{l}{it}{<->ssub * pcr/m/it}{}
+\DeclareFontShape{OT1}{pcr}{l}{n}{<->ssub * pcr/m/n}{}
+\DeclareFontShape{OT1}{pcr}{l}{sc}{<->ssub * pcr/m/sc}{}
+\DeclareFontShape{OT1}{pcr}{l}{sl}{<->ssub * pcr/m/sl}{}
+\DeclareFontShape{OT1}{pcr}{m}{it}{<->ssub * pcr/m/sl}{}
+\DeclareFontShape{OT1}{pcr}{m}{ui}{<->ssub * pcr/m/it}{}
+
+%%%% T1 courier
+
+\DeclareFontFamily{T1}{pcr}{\hyphenchar \font =-1}%
+
+\DeclareFontShape{T1}{pcr}{b}{sc}{<-> pcrbc\eightt}{}%
+\DeclareFontShape{T1}{pcr}{m}{sc}{<-> pcrrc\eightt}{}%
+%%%% condensed courier
+\if@couriernarrow
+\DeclareFontShape{T1}{pcr}{m}{n}{<-> pcrr8tn}{}%
+\DeclareFontShape{T1}{pcr}{b}{n}{<-> pcrb8tn}{}%
+\DeclareFontShape{T1}{pcr}{b}{sl}{<-> pcrbo8tn}{}%
+\DeclareFontShape{T1}{pcr}{m}{sl}{<-> pcrro8tn}{}%
+\else                                              
+\DeclareFontShape{T1}{pcr}{b}{n}{<-> pcrb\eightt}{}%
+\DeclareFontShape{T1}{pcr}{b}{sl}{<-> pcrbo\eightt}{}%
+\DeclareFontShape{T1}{pcr}{m}{sl}{<-> pcrro\eightt}{}%
+\DeclareFontShape{T1}{pcr}{m}{n}{<-> pcrr\eightt}{}%
+\fi                                                  
+%%%% substitutions
+\DeclareFontShape{T1}{pcr}{bx}{n}{<->ssub * pcr/b/n}{}
+\DeclareFontShape{T1}{pcr}{bx}{sc}{<->ssub * pcr/b/sc}{}
+\DeclareFontShape{T1}{pcr}{bx}{sl}{<->ssub * pcr/b/sl}{}
+\DeclareFontShape{T1}{pcr}{b}{it}{<->ssub * pcr/b/sl}{}
+\DeclareFontShape{T1}{pcr}{bx}{it}{<->ssub * pcr/b/it}{}
+\DeclareFontShape{T1}{pcr}{l}{n}{<->ssub * pcr/m/n}{}
+\DeclareFontShape{T1}{pcr}{l}{sc}{<->ssub * pcr/m/sc}{}
+\DeclareFontShape{T1}{pcr}{l}{sl}{<->ssub * pcr/m/sl}{}
+\DeclareFontShape{T1}{pcr}{m}{it}{<->ssub * pcr/m/sl}{}
+\DeclareFontShape{T1}{pcr}{l}{it}{<->ssub * pcr/m/it}{}
+
+% OT1 Helvetica
+
+\DeclareFontFamily{OT1}{phv}{}
+\DeclareFontShape{OT1}{phv}{b}{n}{<-> s * [.9] phvb7t}{}
+\DeclareFontShape{OT1}{phv}{b}{sc}{<-> s * [.9] phvbc7t}{}
+\DeclareFontShape{OT1}{phv}{b}{sl}{<-> s * [.9] phvbo7t}{}
+\DeclareFontShape{OT1}{phv}{bc}{n}{<-> s * [.9] phvb\hvtmpl}{}
+\DeclareFontShape{OT1}{phv}{bc}{sc}{<-> s * [.9] phvbc\hvtmpl}{}
+\DeclareFontShape{OT1}{phv}{bc}{sl}{<-> s * [.9] phvbo\hvtmpl}{}
+\DeclareFontShape{OT1}{phv}{l}{n}{<-> s * [.9] phvl7t}{}
+\DeclareFontShape{OT1}{phv}{l}{sc}{<-> s * [.9] phvlc7t}{}
+\DeclareFontShape{OT1}{phv}{l}{sl}{<-> s * [.9] phvlo7t}{}
+\DeclareFontShape{OT1}{phv}{m}{n}{<-> s * [.9] phvr7t}{}
+\DeclareFontShape{OT1}{phv}{m}{sc}{<-> s * [.9] phvrc7t}{}
+\DeclareFontShape{OT1}{phv}{m}{sl}{<-> s * [.9] phvro7t}{}
+\DeclareFontShape{OT1}{phv}{mc}{n}{<-> s * [.9] phvr\hvtmpl}{}
+\DeclareFontShape{OT1}{phv}{mc}{sc}{<-> s * [.9] phvrc\hvtmpl}{}
+\DeclareFontShape{OT1}{phv}{mc}{sl}{<-> s * [.9] phvro\hvtmpl}{}
+
+\DeclareFontShape{OT1}{phv}{bx}{n}{<->ssub * phv/b/n}{}
+\DeclareFontShape{OT1}{phv}{bx}{sc}{<->ssub * phv/b/sc}{}
+\DeclareFontShape{OT1}{phv}{bx}{sl}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{OT1}{phv}{b}{it}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{OT1}{phv}{bx}{it}{<->ssub * phv/b/it}{}
+\DeclareFontShape{OT1}{phv}{bc}{it}{<->ssub * phv/bc/sl}{}
+\DeclareFontShape{OT1}{phv}{l}{it}{<->ssub * phv/l/sl}{}
+\DeclareFontShape{OT1}{phv}{m}{it}{<->ssub * phv/m/sl}{}
+\DeclareFontShape{OT1}{phv}{mc}{it}{<->ssub * phv/mc/sl}{}
+\DeclareFontShape{OT1}{phv}{m}{ui}{<->ssub * phv/m/it}{}
+\DeclareFontShape{OT1}{phv}{b}{ui}{<->ssub * phv/b/it}{}
+                                      
+%%%% T1 Helvetica
+
+
+\DeclareFontFamily{T1}{phv}{}
+
+\DeclareFontShape{T1}{phv}{b}{n}{<-> s * [.9] phvb\eightt}{}
+\DeclareFontShape{T1}{phv}{b}{sc}{<-> s * [.9] phvbc\eightt}{}
+\DeclareFontShape{T1}{phv}{b}{sl}{<-> s * [.9] phvbo\eightt}{}
+\DeclareFontShape{T1}{phv}{bc}{n}{<-> s * [.9] phvb\hvtmph}{}
+\DeclareFontShape{T1}{phv}{bc}{sc}{<-> s * [.9] phvbc\hvtmph}{}
+\DeclareFontShape{T1}{phv}{bc}{sl}{<-> s * [.9] phvbo\hvtmph}{}
+\DeclareFontShape{T1}{phv}{l}{n}{<-> s * [.9] phvl\eightt}{}
+\DeclareFontShape{T1}{phv}{l}{sc}{<-> s * [.9] phvlc\eightt}{}
+\DeclareFontShape{T1}{phv}{l}{sl}{<-> s * [.9] phvlo\eightt}{}
+\DeclareFontShape{T1}{phv}{m}{n}{<-> s * [.9] phvr\eightt}{}
+\DeclareFontShape{T1}{phv}{m}{sc}{<-> s * [.9] phvrc\eightt}{}
+\DeclareFontShape{T1}{phv}{m}{sl}{<-> s * [.9] phvro\eightt}{}
+\DeclareFontShape{T1}{phv}{mc}{n}{<-> s * [.9] phvr\hvtmph}{}
+\DeclareFontShape{T1}{phv}{mc}{sc}{<-> s * [.9] phvrc\hvtmph}{}
+\DeclareFontShape{T1}{phv}{mc}{sl}{<-> s * [.9] phvro\hvtmph}{}
+                                                
+\DeclareFontShape{T1}{phv}{bx}{n}{<->ssub * phv/b/n}{}
+\DeclareFontShape{T1}{phv}{bx}{sc}{<->ssub * phv/b/sc}{}
+\DeclareFontShape{T1}{phv}{bx}{sl}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{T1}{phv}{b}{it}{<->ssub * phv/b/sl}{}
+\DeclareFontShape{T1}{phv}{bx}{it}{<->ssub * phv/b/it}{}
+\DeclareFontShape{T1}{phv}{bc}{it}{<->ssub * phv/bc/sl}{}
+\DeclareFontShape{T1}{phv}{l}{it}{<->ssub * phv/l/sl}{}
+\DeclareFontShape{T1}{phv}{m}{it}{<->ssub * phv/m/sl}{}
+\DeclareFontShape{T1}{phv}{mc}{it}{<->ssub * phv/mc/sl}{}
+
+\endgroup
+
+
+\klutest@font{MTSY}{Mathtime}
+\if y\klu@font@error
+    \IfFileExists{mathptm.sty}{%
+    \PackageWarningNoLine{klups}{%
+    Using mathptm, possibly incorrect output for math fonts}%
+    \RequirePackage{mathptm}}{%
+    \PackageError{klups}{%
+    Incorrect output for all math fonts}{%
+    Because I could not find the MathTime package, I am reverting\MessageBreak
+    to Computer Modern for Calligraphics and all math.\MessageBreak 
+    Sorry, but you don't even have mathptm.sty installed!
+    }} 
+\else 
+\klutest@font{MTSYB}{Mathtime Plus}
+\if y\klu@font@error
+    \PackageError{klups}{%
+    Unstable output encoding for \string\boldmath}{%
+    Because I could not find the MathTime plus fonts, I am reverting\MessageBreak
+    to Computer Modern for Calligraphics and bold math. This looks\MessageBreak 
+    bad and may even give incorrect characters if you use \string\boldmath
+    }%
+    \RequirePackage{mathtime}
+\else 
+    \RequirePackage[mtbold,mtpluscal]{mathtime}
+\fi
+\fi   
+\klutest@font{MTGU}{Mathtime Plus upright greek}
+\if y\klu@font@error 
+    \@addtofontwarning{%
+        \spaces disabling \string\psgreek\space and \string\greekps}
+    \AtEndOfPackage{\let\rmgreek@redefs\relax }%
+\else
+
+
+\begingroup \nfss@catcodes
+\DeclareFontFamily{U}{mtgu}{}
+\DeclareFontShape{U}{mtgu}{m}{n}{<-> MTGU}{}
+\DeclareFontShape{U}{mtgu}{b}{n}{<-> MTGUB}{}
+\endgroup
+
+\DeclareSymbolFont{uprightlcgreek}{U}{mtgu}{m}{n}
+%                   
+%  This is not clean. bold lowercase greek should come
+%  from the 'letters' font (MTMIB) to avoid confusion. 
+%  However, there are the same glyphs in both fonts.
+%
+\SetSymbolFont{uprightlcgreek}{bold}{U}{mtgu}{b}{n} 
+         
+
+\DeclareMathSymbol{\upr@alpha    }{\mathord}{uprightlcgreek}{`a}
+\DeclareMathSymbol{\upr@beta     }{\mathord}{uprightlcgreek}{`b}
+\DeclareMathSymbol{\upr@gamma    }{\mathord}{uprightlcgreek}{`g}
+\DeclareMathSymbol{\upr@delta    }{\mathord}{uprightlcgreek}{`d}
+\DeclareMathSymbol{\upr@epsilon  }{\mathord}{uprightlcgreek}{`e}
+\DeclareMathSymbol{\upr@zeta     }{\mathord}{uprightlcgreek}{`z}
+\DeclareMathSymbol{\upr@eta      }{\mathord}{uprightlcgreek}{'041}
+\DeclareMathSymbol{\upr@theta    }{\mathord}{uprightlcgreek}{'042}
+\DeclareMathSymbol{\upr@iota     }{\mathord}{uprightlcgreek}{`i}
+\DeclareMathSymbol{\upr@kappa    }{\mathord}{uprightlcgreek}{`k}
+\DeclareMathSymbol{\upr@lambda   }{\mathord}{uprightlcgreek}{`l}
+\DeclareMathSymbol{\upr@mu       }{\mathord}{uprightlcgreek}{`m}
+\DeclareMathSymbol{\upr@nu       }{\mathord}{uprightlcgreek}{`n}
+\DeclareMathSymbol{\upr@xi       }{\mathord}{uprightlcgreek}{`x}
+\DeclareMathSymbol{\upr@pi       }{\mathord}{uprightlcgreek}{`p}
+\DeclareMathSymbol{\upr@rho      }{\mathord}{uprightlcgreek}{`r}
+\DeclareMathSymbol{\upr@sigma    }{\mathord}{uprightlcgreek}{`s}
+\DeclareMathSymbol{\upr@tau      }{\mathord}{uprightlcgreek}{`t}
+\DeclareMathSymbol{\upr@upsilon  }{\mathord}{uprightlcgreek}{`u}
+\DeclareMathSymbol{\upr@phi      }{\mathord}{uprightlcgreek}{'043}
+\DeclareMathSymbol{\upr@chi      }{\mathord}{uprightlcgreek}{'044}
+\DeclareMathSymbol{\upr@psi      }{\mathord}{uprightlcgreek}{'045}
+\DeclareMathSymbol{\upr@omega    }{\mathord}{uprightlcgreek}{'046}
+\DeclareMathSymbol{\upr@varepsilon}{\mathord}{uprightlcgreek}{'053}
+\DeclareMathSymbol{\upr@vartheta }{\mathord}{uprightlcgreek}{'054}
+\DeclareMathSymbol{\upr@varpi    }{\mathord}{uprightlcgreek}{'055}
+\DeclareMathSymbol{\upr@varrho   }{\mathord}{uprightlcgreek}{'056}
+\DeclareMathSymbol{\upr@varsigma }{\mathord}{uprightlcgreek}{'057}
+\DeclareMathSymbol{\upr@varphi   }{\mathord}{uprightlcgreek}{'060}
+\DeclareMathSymbol{\upr@varkappa }{\mathord}{uprightlcgreek}{'061}
+              
+                               
+\let\italicalpha      \alpha        
+\let\italicbeta       \beta         
+\let\italicgamma      \gamma        
+\let\italicdelta      \delta        
+\let\italicepsilon    \epsilon      
+\let\italiczeta       \zeta         
+\let\italiceta        \eta          
+\let\italictheta      \theta        
+\let\italiciota       \iota         
+\let\italickappa      \kappa        
+\let\italiclambda     \lambda       
+\let\italicmu         \mu           
+\let\italicnu         \nu           
+\let\italicxi         \xi           
+\let\italicpi         \pi           
+\let\italicrho        \rho          
+\let\italicsigma      \sigma        
+\let\italictau        \tau          
+\let\italicupsilon    \upsilon      
+\let\italicphi        \phi          
+\let\italicchi        \chi          
+\let\italicpsi        \psi          
+\let\italicomega      \omega        
+\let\italicvarepsilon \varepsilon   
+\let\italicvartheta   \vartheta     
+\let\italicvarpi      \varpi        
+\let\italicvarrho     \varrho       
+\let\italicvarsigma   \varsigma     
+\let\italicvarphi     \varphi       
+\let\italicvarkappa   \varkappa     
+
+\def\rmgreek@redefs{%
+\def\alpha       {\upr@alpha      }%
+\def\beta        {\upr@beta       }%
+\def\gamma       {\upr@gamma      }%
+\def\delta       {\upr@delta      }%
+\def\epsilon     {\upr@epsilon    }%
+\def\zeta        {\upr@zeta       }%
+\def\eta         {\upr@eta        }%
+\def\theta       {\upr@theta      }%
+\def\iota        {\upr@iota       }%
+\def\kappa       {\upr@kappa      }%
+\def\lambda      {\upr@lambda     }%
+\def\mu          {\upr@mu         }%
+\def\nu          {\upr@nu         }%
+\def\xi          {\upr@xi         }%
+\def\pi          {\upr@pi         }%
+\def\rho         {\upr@rho        }%
+\def\sigma       {\upr@sigma      }%
+\def\tau         {\upr@tau        }%
+\def\upsilon     {\upr@upsilon    }%
+\def\phi         {\upr@phi        }%
+\def\chi         {\upr@chi        }%
+\def\psi         {\upr@psi        }%
+\def\omega       {\upr@omega      }%
+\def\varepsilon  {\upr@varepsilon }%
+\def\vartheta    {\upr@vartheta   }%
+\def\varpi       {\upr@varpi      }%
+\def\varrho      {\upr@varrho     }%
+\def\varsigma    {\upr@varsigma   }%
+\def\varphi      {\upr@varphi     }%
+\def\varkappa    {\upr@varkappa   }%
+    }                       
+
+\def\rmgreek{\rmgreek@redefs }
+\def\greekrm#1{{\rmgreek #1}}
+\fi
+    
+\ifx\@fontwarnings\empty \else
+    \PackageWarningNoLine{klups}{\@fontwarnings}
+\fi                             
+\normalfont                          
+\endinput                   
+
+%%                          
+%% End of file `klups.sty'. 
+
diff --git a/helm/papers/matita/kluref.sty b/helm/papers/matita/kluref.sty
new file mode 100644 (file)
index 0000000..df49b6f
--- /dev/null
@@ -0,0 +1,441 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filename{kluref.sty}
+\def\filedate{1998/03/17}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\normalsize,\numberline,\protect,\endinput}
+%\changes{1998/03/17}{TH: Fixed optional argument to cite for numreferences}
+%\changes{1997/02/18}{TH: Toggled lines for cite definition and citation write (3x)}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=10pt
+%\addtolength{\textwidth}{4pc}
+%\MakeShortVerb{\|}  
+%\begin{document}
+%\begin{article}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+%This internal stylefile provides commands for references. Options are
+%|openbib|, |numreferences| and |namedreferences|. This documentation
+%is compiled on |kluwer.cls| to give some examples.
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage
+%\section{Interface}
+% This file provides |namedreferences| and |numreferences| options
+% for the stylefiles. |namedreferences| use the syntax that is
+% explained in the |named.sty| package, but will be repeated
+% below. |numreferences| we wrote ourselves, the major difference with
+% standard \LaTeX\ iss that the brackets in the `references' section
+% have turned into a dot.  
+% \subsection{Named references} 
+% This presumes that the reference list you use is sorted
+% alphabetically. The general chape of the references section is this:
+% 
+% \begin{verbatim}
+% \begin{thebibliography}{}
+% \bibitem[\protect\citeauthoryear{author's name}{year}]{key} 
+% \end{verbatim}
+% In a `real' example this is what it looks like: 
+% \begin{verbatim}
+% \begin{thebibliography}{}
+%\bibitem[\protect\citeauthoryear{Bisogni~Jr and Arroyo}{1991}]{BJA91}
+%J.J. Bisogni~Jr and S.L. Arroyo.
+%\newblock The effect of carbon dioxide equilibrium on p{H} in dilute lakes.
+%\newblock {\em Water Research}, 25(2):185--190, 1991.
+% \end{verbatim}
+% This entry was generated by \BibTeX, using the file |named.bst|
+% to do the formatting and sorting. This method of generating
+% references is highly recommended, because it tends to prevent
+% errors. (The |\protect| is only needed if the output is in an
+% external file, like the |.bbl| file.) Until we have a `private'
+% |.bst| file, |named.bst| is the best option.
+%
+% Allthough keying this sort of thing in is quite tedious, It also has
+% some advantages: this allows you to use some `special' |\cite|
+% commands that are normally not available. The following shows what
+% the respective commands output on the previous example:
+%
+% \begin{tabular}{ll} \hline
+%Call:                &Produces:\\ \hline
+%|\cite{BJA91}|       &\cite{BJA91}\\
+%|\cite*{BJA91}|      &\cite*{BJA91}\\
+%|\shortcite{BJA91}|  &\shortcite{BJA91}\\
+%|\citeyear{BJA91}|   &\citeyear{BJA91}\\
+%|\inlinecite{BJA91}| &\inlinecite{BJA91}\\
+%|\opencite{BJA91}|   &\opencite{BJA91}
+%\end{tabular}
+%\section{Implementation}
+% From the options follows that the default value is
+% |namedreferences|.                           
+% 
+%    \begin{macrocode}
+\ProvidesPackage{kluref}[\filedate ]
+\newif\if@numreferences 
+\DeclareOption{namedreferences}{\@numreferencesfalse}
+\DeclareOption{numreferences}{\@numreferencestrue}
+%    \end{macrocode}
+%
+% openbib is ignored (for now ?). 
+%
+%    \begin{macrocode}
+\DeclareOption{openbib}{}
+\ExecuteOptions{namedreferences}
+\ProcessOptions*
+%    \end{macrocode}
+% 
+%
+% |\sectioncmd| is either |\section| or |\chapter|, depending on the used
+% major stylefile. Same goes for |\Uppercase|, with regard to pagestyles.
+%
+%
+%    \begin{macrocode}
+\newenvironment{thebibliography}[1]{%
+  \sectioncmd*{\refname}\imarkboth{\bibname}{\bibname}%
+  \footnotesize
+  \message{\refname}
+  \def\bibwidthlabel{\releft#1\reright}%
+%    \end{macrocode}
+%  |\releft| and |\reright| are usually empty, but they can be defined
+%  to contain brackets, for instance. This is only useful using
+%  |numreferences|.
+%
+% The list and counter are defined below. They vary for the different
+% options. 
+%    \begin{macrocode}
+  \list{\kapbib@counter}{\kapbib@list}
+  \let\makelabel\@biblabel
+  \def\newblock{\hskip .11em plus .33em minus .07em}%
+  \sloppy
+  \clubpenalty10000
+  \widowpenalty10000
+  \sfcode`\.=1000\relax
+  }{\endlist}
+%    \end{macrocode}
+% 
+% \subsection{Some utilities} 
+%
+% |\refname| and |\bibname| are not |\providecommand|'s to allow for 
+% already existing definitions, because  we do need to be absolutely
+% sure we are in control. That's why they are inside 
+% |\AtBeginDocument|, to circumvent the |babel| package.
+%
+% I should ask for french/german names, though.
+%
+%    \begin{macrocode}
+\AtBeginDocument{%
+  \def\refname{References}%
+  \def\bibname{References}}
+%    \end{macrocode}
+% 
+% 
+%
+% |\releft| and |\reright| are around the text inside the optional
+% argument to |\bibitem|. Together with |\redot|, this allows the 
+% following hack: 
+%
+%\begin{verbatim}
+%\documentclass[numreferences]{kluwer}
+%\renewcommand{\releft}{[}
+%\renewcommand{\reright}{]}
+%\renewcommand{\redot}{}
+%\begin{document}
+%......
+%\begin{thebibliography}{abs}
+%\bibitem[abs]{key}...
+%\end{verbatim}
+%... and the references will look identical to \LaTeX\ Article 
+% `namedreferences', except for size. Note that this will only work
+% using numreferences.
+%
+% |\coleft| and |\ccright| are the same sort of thing, they allow you
+% to change the braces around |\cite| commands into something else.
+% 
+% This is a hook for klups.sty (oldstyle numerals)
+%    \begin{macrocode}                           
+\def\i@oldseries{}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newlength{\bibhang}
+\setlength{\bibhang}{14pt}
+\newcommand{\redot}{.}
+\newcommand{\releft}{}
+\newcommand{\reright}{}
+\newcommand{\coleft}{(}
+\newcommand{\ccright}{)}
+\let\oldcite\cite 
+%    \end{macrocode}
+% \newpage\subsection{Numbered references}
+%    \begin{macrocode}
+\def\numreferences{%
+  \typeout{KAP -- Numbered references}%
+  \def\kapbib@counter{\arabic{enumiv}}%
+  \def\labelsepwidth{1em}%
+  \def\kapbib@list{%
+    \setlength{\labelsep}{\labelsepwidth}%
+    \settowidth{\labelwidth}{\@biblabel{\bibwidthlabel}}%
+    \setlength{\leftmargin}{\labelwidth}%
+    \addtolength{\leftmargin}{\labelsep}%
+    \setlength{\itemindent}{0pt}%
+    \setlength{\itemsep}{0pt}%
+    \setlength{\parsep}{0pt}%
+    \usecounter{enumiv}%
+    \let\makelabel\kap@biblabel}%
+%    \end{macrocode}
+%  This makes flush right labels
+%    \begin{macrocode}
+  \def\@biblabel##1{\hfill\releft##1\redot\reright}%
+%    \end{macrocode}
+% |\@bibitem| writes out either |\bibcite{key}{number}| or
+% |\bibcite{number}{number}| in case there is no key given. This
+% allows |\cite{2}| without a key.
+%    \begin{macrocode}
+  \def\@bibitem##1{\item               
+    \def\@tempa{##1}%
+    \ifx\@tempa\empty
+      \if@filesw
+      \immediate\write\@auxout 
+      {\string\bibcite{\thearticle \the\value{\@listctr}}%
+                        {\the\value{\@listctr}}}%
+      \fi
+    \else
+      \if@filesw
+      \immediate\write\@auxout 
+      {\string\bibcite{\thearticle ##1}{\the\value{\@listctr}}}%
+      \fi
+    \fi 
+    \ignorespaces
+    }%
+%    \end{macrocode}
+% |\@lbibitem| handles the optional argument version. 
+%
+% If no key
+% is given, we presume numbered references are really wanted. (It would
+% be a bit strange to have entries like |\bibitem[A95]{}| and
+% to reference using a counter as in |\cite{1}|). 
+%                                     
+%    \begin{macrocode}
+  \def\@lbibitem[##1]##2{%
+    \def\@biblabel####1{####1}%
+    \let\makelabel\@biblabel
+    \def\@tempa{##2}%
+    \ifx\@tempa\empty          
+      \item[\@biblabel{\hfill\releft 
+          \arabic{\@listctr}\redot\reright}]%
+      \if@filesw
+        {\def\protect####1{\string ####1\space}\immediate
+        \write\@auxout{\string\bibcite{\thearticle \the\value{\@listctr}}%
+        {\the\value{\@listctr}}}}%
+      \fi
+%    \end{macrocode}
+% Otherwise, typeset the argument and write out both argument and key
+% to the |.aux| file.
+%    \begin{macrocode}
+    \else
+      \item[\@biblabel{\hfill\releft ##1\redot\reright}]%
+      \if@filesw 
+        {\def\protect####1{\string ####1\space}\immediate
+        \write\@auxout{\string\bibcite{\thearticle ##2}{##1}}}%
+      \fi  
+    \fi  
+    \ignorespaces
+    }%
+%    \end{macrocode}
+% Now allow some |namedreferences| commands to a least mean something.
+%    \begin{macrocode}
+  \let\@internalcite\oldcite
+  \let\shortcite\@internalcite
+  \let\citeauthor\@internalcite
+  \let\citeyear\@internalcite
+  \let\inlinecite\@internalcite
+  \let\opencite\@internalcite
+  \let\cite\@internalcite
+  \def\citeauthoryear##1##2{}%
+%    \end{macrocode}
+% To end: relatively standard definition of |\@citex|. 
+%    \begin{macrocode}
+\def\@citex[##1]##2{%                        
+  \let\@citea\@empty
+  \@cite{\@for\@citeb:=##2\do
+    {\@citea\def\@citea{,\penalty\@m\ }%
+     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+     \edef\gl@citeb{\expandafter\@firstofone\@citeb}%
+     \edef\@citeb{\thearticle\expandafter\@firstofone\@citeb}%
+     \@ifundefined{b@\@citeb}{%
+        \@ifundefined{b@\gl@citeb}{%
+            \mbox{\reset@font\bfseries ?}%
+            \G@refundefinedtrue
+            \@latex@warning
+            {Citation `\@citeb' on page \thepage \space undefined}}%
+            {\hbox{\csname b@\gl@citeb\endcsname}}}%
+         {\hbox{\csname b@\@citeb\endcsname}}%
+       }}{##1}}
+}
+%    \end{macrocode}
+%\newpage \subsection{Named references}
+%    \begin{macrocode}                       
+\def\namedreferences{%
+  \typeout{KAP -- Named references}%
+%    \end{macrocode}
+% This (having no optional argument and/or key) 
+% is typically one of those things that happen if you switch from
+% |num| to |named|. Just write out something to indicate that there
+% may be a problem.  
+%
+%    \begin{macrocode}
+  \def\@bibitem##1{\item
+    \def\@tempa{##1}%
+    \ifx\@tempa\empty                              
+      \if@filesw \immediate\write\@auxout{%
+        \string\bibcite{\thearticle ??}{??}}\fi
+    \else
+      \if@filesw \immediate\write\@auxout{%
+        \string\bibcite{\thearticle ##1}{??}}\fi
+    \fi
+    \ignorespaces
+    }%
+%    \end{macrocode}
+% Not having a key probably indicates that the optional argument is
+% also wrong, but hey, we can't do everything. At least now |\cite|
+% is something useful if you can count very well...
+%
+% It is also possible
+% that the optional argument is empty, but that is never a problem
+% because it will not be typeset anyway (|\@biblabel| will gobble the 
+% argument).  
+%
+% 21/3/1997 inserted increment of |\@listctr| to prevent multiply 
+% defined labels.
+%    \begin{macrocode}
+  \def\@lbibitem[##1]##2{\item[\@biblabel{##1}\hfill]%
+    \def\@tempa{##2}%   
+    \stepcounter{\@listctr}%
+    \ifx\@tempa\empty
+      \if@filesw{\def\protect####1{\string ####1\space}\immediate
+       \write\@auxout{\string\bibcite{\thearticle 
+        \the\value\@listctr}{##1}}}\fi
+    \else
+      \if@filesw{\def\protect####1{\string ####1\space}\immediate
+       \write\@auxout{\string\bibcite{\thearticle ##2}{##1}}}\fi
+    \fi
+    \ignorespaces
+    }% 
+\def\labelsepwidth{1em}%
+%    \end{macrocode}
+% Here is the list again. |\bibhang| allows control over the amount 
+% of hanging indentation.
+%    \begin{macrocode}
+\def\kapbib@counter{\relax }%
+  \def\kapbib@list{%
+    \setlength{\labelsep}{0em}%
+    \setlength{\labelwidth}{0pt}%
+    \setlength{\itemindent}{-\bibhang}%
+    \setlength{\itemsep}{0pt}%
+    \setlength{\parsep}{0pt}%
+    \usecounter{enumiv}%                        
+    \setlength{\leftmargin}{\bibhang}%
+    \i@oldseries
+    }%
+%    \end{macrocode}
+% Gobble |\@biblabel|. Also, save meaning of |\cite| for later use.
+%    \begin{macrocode}
+  \def\@biblabel##1{}%
+  \let\@internalcite\oldcite
+%    \end{macrocode}
+% Differences between these |\cite| commands can be seen above.
+%    \begin{macrocode}
+  \def\cite{\@ifstar{\citeyear}{\klu@cite}}%
+                                                       
+  \def\klu@cite{\def\@citeseppen{1000}%       
+    \def\@cite####1####2{\coleft{####1\if@tempswa , ####2\fi}\ccright}%
+    \def\citeauthoryear####1####2{{\rm\i@oldseries ####1, ####2}}\@internalcite }%
+
+  \def\shortcite{\def\@citeseppen{1000}%
+    \def\@cite####1####2{\coleft{####1\if@tempswa , ####2\fi}\ccright}%
+    \def\citeauthoryear####1####2{{\rm\i@oldseries ####2}}\@internalcite }%
+
+  \def\citeauthor##1{\def\@citeseppen{1000}%
+    \def\@cite####1####2{{####1\if@tempswa , ####2\fi}}%
+    \def\citeauthoryear####1####2{\rm ####1}\@citedata{##1}}%
+
+  \def\citeyear##1{\def\@citeseppen{1000}%
+    \def\@cite####1####2{{####1\if@tempswa , ####2\fi}}%
+    \def\citeauthoryear####1####2{{\rm\i@oldseries ####2}}\@citedata{##1}}%
+                                                       
+  \def\opencite##1{\citeauthor{##1}, \citeyear{##1}}%
+
+  \def\inlinecite##1{\citeauthor{##1} (\citeyear{##1})}%
+%    \end{macrocode}
+% This is rather tricky stuff, these macros  come from |named.sty| and
+% I remember that I understood them once, but not any more,
+% apparantly. Checking this is left as an exersize to the reader.
+%    \begin{macrocode}
+\def\@citedata##1{%    
+    \@tempswafalse%
+  \let\@citea\@empty
+  \@cite{\@for\@citeb:=##1\do
+    {\@citea\def\@citea{,\penalty\@citeseppen\ }%
+     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+     \edef\gl@citeb{\expandafter\@firstofone\@citeb}%
+     \edef\@citeb{\thearticle\expandafter\@firstofone\@citeb}%
+     \@ifundefined{b@\@citeb}{%
+        \@ifundefined{b@\gl@citeb}{%
+            \mbox{\reset@font\bfseries ?}%
+            \G@refundefinedtrue
+            \@latex@warning
+            {Citation `\@citeb' on page \thepage \space undefined}}%
+            {\csname b@\gl@citeb\endcsname}}%
+         {\csname b@\@citeb\endcsname}}}{}}
+\def\@citex[##1]##2{%    
+  \let\@citea\@empty
+  \@cite{\@for\@citeb:=##2\do
+    {\@citea\def\@citea{;\penalty\@citeseppen\ }%
+     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+     \edef\gl@citeb{\expandafter\@firstofone\@citeb}%
+     \edef\@citeb{\thearticle\expandafter\@firstofone\@citeb}%
+     \@ifundefined{b@\@citeb}{%
+        \@ifundefined{b@\gl@citeb}{%
+            \mbox{\reset@font\bfseries ?}%
+            \G@refundefinedtrue
+            \@latex@warning
+            {Citation `\@citeb' on page \thepage \space undefined}}%
+            {\csname b@\gl@citeb\endcsname}}%
+         {\csname b@\@citeb\endcsname}}}{##1}}
+%    \end{macrocode}
+% Allow |\citeauthoryear| in |\write|       
+%    \begin{macrocode}
+\def\citeauthoryear##1##2{\string\citeauthoryear{##1}{##2}}}
+%%%%%%%%%%%%%%%%%%%%%%%%%
+\if@numreferences
+    \numreferences
+\else
+    \namedreferences
+\fi
+\endinput
+%    \end{macrocode}
+%\begin{thebibliography}{}
+%\bibitem[\citeauthoryear{Bisogni~Jr and Arroyo}{1991}]{BJA91}%
+%J.J. Bisogni~Jr and S.L. Arroyo.
+%\newblock The effect of carbon dioxide equilibrium on p{H} in dilute lakes.
+%\newblock {\em Water Research}, 25(2):185--190, 1991.
+%\end{thebibliography}
+%\PrintIndex   
+%\end{article}
+%\end{document}
+% end of kluref.sty
+
+
+
+
diff --git a/helm/papers/matita/klusec.sty b/helm/papers/matita/klusec.sty
new file mode 100644 (file)
index 0000000..d1e4594
--- /dev/null
@@ -0,0 +1,625 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\def\filedate{1998/03/13}
+\def\filename{klusec.sty}
+%\changes{1997/07/13}{Inserted mainmatter switch}{}
+%\changes{1997/07/13}{Inserted tocentry in theindex}{}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\normalsize,\numberline,\protect,\endinput}
+%\CodelineIndex         
+%\changes{1997/02/12}{TH: added a space after 'partname'.}{}
+%\newcommand{\Bs}{$\backslash$}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\setlength\marginparwidth{0pt}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\runningtitle{\filename\ -- \filedate}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers}
+%\runningauthor{Kluwer Academic Publishers}
+%\institute{~}
+%\begin{abstract}
+%This internal stylefile  defines all sectioning commands used by
+%all kluwer style files. In order to facilitate usage by different
+%stylefiles, most command herein are parameterised. 
+%There is an option to include a definition for \verb!\chapter!
+%(|chapter|).
+%\end{abstract}
+%\end{opening}
+%\tableofcontents
+%\newpage
+%\section{Interface}
+%All `ordinary' sectioning command such as |\section| |\subsection| etc.
+%Have the following macros defined:
+%
+%\begin{tabular}{ll}
+%\Bs{\it X}hang       & (1arg)\\
+%\Bs{\it X}spaceabove\\
+%\Bs{\it X}spaceafter \\
+%\Bs{\it X}flushstyle\\
+%\Bs{\it X}numstyle\\
+%\Bs{\it X}textstyle\\
+%\Bs{\it X}case       & (1arg)
+%\end{tabular}
+
+%Where {\it X} is one of the following:
+
+%\begin{tabular}{ll}
+%C   &chapter\\
+%S   &section\\
+%SS  &subsection\\
+%SSS &subsubsection\\
+%P   &paragraph\\
+%SP  &subparagraph
+%\end{tabular}
+
+%\begin{itemize}
+%\item
+%The {\it X}hang macro encapsulates the number and the separating
+%space. In the default
+%configuration, for instance, |\SShang| sets hanging indentation
+%for the subsection title to the width of the number, resulting in 
+%sections looking like this:
+
+%\end{itemize}
+%\subsection{This is a very long example of an otherwise quite 
+%    ordinary section. I stretched it a lot so you can see the
+%   runover..... }
+%\begin{itemize}
+%\item
+%This is implemented by this line:
+
+%\begin{verbatim}
+%\newcommand{\SShang}[1]{\Forcedhang{#1}}
+%\end{verbatim}
+
+%where the macro \Bs Forcedhang calculates the needed \Bs hangafter. 
+%Another use for this macro could be:
+
+%\begin{verbatim}
+%\renewcommand{\Shang}[1]{\charkern{#1}} 
+%\end{verbatim}
+
+%To get spaced out numbering (somewhat trivial example) or 
+
+%\begin{verbatim}
+%\renewcommand{\Shang}[1]{}
+%\end{verbatim}
+%To force  |\section*| like layout.
+
+%\item
+%\Bs{\it X}spaceabove is a skip value in the vertical direction. 
+%e.g.\\ |\renewcommand{\Pspaceabove}{.5\baselineskip}|
+
+%\item
+%\Bs{\it X}spaceafter is a `real' macro, that is supposed to typeset
+%either a horizontal or a vertical skip. However, this macro can do
+%anything:\\ |\renewcommand{\Pspaceafter}{\hskip 1em}|  
+
+%\item
+%\Bs{\it X}flushstyle is for |\centering| etc.
+
+%\item
+%\Bs{\it X}numstyle and \Bs{\it X}textstyle control things like 
+%sizes and fontshape. These two and \Bs{\it X}flushstyle are inside the
+%same group, so there is no need to define things like |\bfseries|
+%twice in a row.
+
+%\item
+%\Bs{\it X}case behaves identical to \Bs{\it X}hang, but it braces
+%the text of the sectioning command.
+%\end{itemize}
+% \section{Considerations}
+%The following need extra attention:
+%\begin{itemize}
+%\item 
+%|\part|, |\chapter| and |\index| set |\thispagestyle| to the pagestyle with 
+%the same name. This needs to be taken care of in |kluopen.sty| of the 
+% stylefile. This file (\filename) simply |\let|'s them all to |empty|.
+%\item
+%|\sectioncmd| is either  |\section| or |\chapter|. This is more efficient
+% than doing everything twice. The stylefile has to set this like this:\\
+%|\AtBeginDocument{\let\sectioncmd\section}|, or it will fail.
+%
+%\item 
+%|\@secnumdepth| works, for the first time in  any kluwer stylefile that I 
+%know of. It's default value is 4, so only |\subparagraph| does NOT have a
+%section number attached.
+%\item |\sectiondot| and |\chapterdot| contain a dot to be typeset after
+%the number of the section$\|$chapter.
+%\end{itemize}
+% \section{Defaults}
+% The following table contains the default values as set in this
+% file. 
+%
+%{\little
+%\begin{tabular}{llllllll} \hline
+%Type&spaceabove&spacebelow&flushstyle&numstyle&textstyle&hang&case\\ \hline
+%C  &33pt       &vskip 33pt       &centering  &large rm &- &-&-\\
+%S  &2bs+6pt-4pt&vskip 1bs+3pt-2pt&centering  &bf       &- &Forcedhang&-\\
+%SS &1bs+3pt-2pt&vskip 1bs+3pt-2pt&raggedright&rm       &sc&Forcedhang&-\\
+%SSS&1bs+3pt-2pt&vskip 1sp        &raggedright&rm       &it&Forcedhang&-\\
+%P  &1bs+3pt-2pt&hskip .5em       &-         &rm        &it&-&-\\
+%SP &1bs+3pt-2pt&hskip .5em       &-         &rm        &it&-&-\\ \hline
+%\end{tabular}
+%
+% bs = |\baselineskip|
+%}
+% \section{Implementation}  
+%     \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{klusec}[\filedate ]
+\newif\if@chapterdef  \@chapterdeffalse
+\DeclareOption{chapter}{\@chapterdeftrue }
+\ExecuteOptions{}
+\ProcessOptions
+%    \end{macrocode}
+%\newpage\subsection{Part}
+% Definition of |\part|. Not much work is done on this, because it is
+% not used this often, and fairly easy to circumvent (if needed).
+%    \begin{macrocode}
+\newcommand{\part}{%
+  \cleardoublepage
+  \thispagestyle{part}%
+  \hbox{}\vskip 2in
+  \secdef\@part\@spart}
+\def\@part[#1]#2{%
+  \ifnum \c@secnumdepth >-2\relax
+    \refstepcounter{part}%
+    \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+  \else
+    \addcontentsline{toc}{part}{#1}%
+  \fi
+  \imarkboth{}{}%
+  {\centering
+    \ifnum \c@secnumdepth >-2\relax
+      \huge\bf \partname\ \thepart
+      \par
+      \vskip 20pt 
+    \fi
+    \Huge \bf #1\par
+  }%
+  \@endpart
+  }
+
+\def\@spart#1{{\centering\Huge \bf #1\par}\@endpart}
+\def\@endpart{\vfil\cleardoublepage}                       
+\def\partname{Part}
+\let\ps@part\ps@empty
+%
+%    \end{macrocode}
+%\newpage\subsection{Chapter}
+%    \begin{macrocode}
+               
+\if@chapterdef
+
+  %
+  % Typeset text and number. 
+  %
+  \newcommand{\@makechapterhead}[2]{\vspace*{\Cspaceabove}%
+    {\parindent 0pt \hyphenpenalty 10000
+     \Cflushstyle \Cnumstyle
+     \Chang{#1}%
+     \Ctextstyle \Ccase{#2}\par
+     \nobreak \Cspaceafter \relax
+    }}
+
+  \newcommand{\chapter}{%
+%    \end{macrocode}
+%
+% openright will be handled by the stylefile
+%
+%    \begin{macrocode}
+    \if@openright
+        \cleardoublepage 
+    \else
+       \clearpage
+    \fi
+    \thispagestyle{chapter}%
+    \global\@topnum\z@
+    \@afterindentfalse 
+    \secdef\@chapter\@schapter
+    }
+  \def\@chapter[#1]#2{%
+    \ifnum \c@secnumdepth >\m@ne
+      \refstepcounter{chapter}%
+      \message{\@chapapp\space\thechapter\chapterdot}%
+      \addcontentsline{toc}{chapter}{\protect
+        \numberline{\thechapter}#1}%
+    \else
+      \addcontentsline{toc}{chapter}{#1}%
+    \fi
+    \chaptermark{#1}%
+    \addtocontents{lof}{\protect\addvspace{10pt}}%
+    \addtocontents{lot}{\protect\addvspace{10pt}}%
+    \@makechapterhead{\thechapter\chapterdot\ }{#2}% 
+    \@afterheading
+    }
+  \newcommand{\@schapter}[1]{\@makechapterhead{}{#1} \@afterheading}
+  \newcommand{\Chang}[1]{#1}
+  \newcommand{\Cspaceabove}{33pt}
+  \newcommand{\Cspaceafter}{\vskip 33pt}
+  \newcommand{\Cflushstyle}{\centering} 
+  \newcommand{\Cnumstyle}{\large\rm}
+  \newcommand{\Ctextstyle}{}
+  \newcommand{\Ccase}[1]{#1}
+  \newcommand{\@chapapp}{\chaptername}
+  \newcommand{\chapterdot}{.}
+  \let\ps@chapter\ps@empty
+\fi                    
+%    \end{macrocode}
+%\newpage\subsection{Utility macro's}
+% 
+% The |\@haveatleast| is (loosely) borrowed from the \TeX Book. Because
+% of it's implementation, it will do `raggedbottom'-like things to pages,
+% but the other option turned out to be worse. A page optimizer would come
+% very handy indeed! The penalty is rather high, because we'd rather borrow 
+% some whitespace from the rest of the page.
+% \changes{1997/07/13}{Change of policy: penalty is 0 now}{}
+% \changes{1997/07/13}{nobreak inserted between box and glue}{}
+%    \begin{macrocode}
+\newcommand{\vsecspace}[1]{%
+   \if@nobreak\else
+     \vskip #1\relax \fi}
+\def\Shaveatleast{5\baselineskip}
+\def\SShaveatleast{4\baselineskip}
+\def\SSShaveatleast{4\baselineskip}
+\newcommand{\@haveatleast}[1]{\relax\par \vskip #1 
+     \penalty 0\vskip -#1 \relax }
+\def\@Xsect{%
+    \global\@nobreakfalse
+    \global\@noskipsectrue
+    \everypar{\setbox0\lastbox
+      \global\@noskipsecfalse
+      \begingroup \@Svsechd \endgroup 
+      \everypar{}%
+     }}
+%    \end{macrocode}
+%|\Forcedhang| is named after it's normal usage. However, it is a bit more  
+% general than that, so maybe it will move to some other place eventually.
+% Typesets its argument and sets the current paragraph's |\hangafter| to
+% be the width of the argument.
+%    \begin{macrocode}
+\newcommand{\Forcedhang}[1]{\leavevmode
+    \setbox0=\hbox{#1}\hangindent\wd0
+    \hangafter=1 \box0 }
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\contentsname{Table of Contents}%
+\def\listfigurename{List of Figures}%
+\def\listtablename{List of Tables}%
+\def\chaptername{Chapter}%
+\def\sectionname{Section}%
+\def\appendixname{Appendix}%
+%    \end{macrocode} 
+%\newpage\subsection{Section}
+%    \begin{macrocode}
+\newcommand{\@makesectionhead}[2]{\vsecspace{\Sspaceabove}%
+  {\parindent0pt \hyphenpenalty=10000 \baselineskip12pt
+   \Sflushstyle \Snumstyle                   
+   \Shang{#1}%
+   \Stextstyle \Scase{#2}\par
+   \nobreak \Sspaceafter \relax 
+   }}
+
+\newcommand{\section}{\@haveatleast{\Shaveatleast
+    }\@afterindentfalse \secdef\@section\@ssection}
+
+\def\@section[#1]#2{%
+  \ifnum \c@secnumdepth >\z@
+    \refstepcounter{section}%
+    \addcontentsline{toc}{section}{\protect \numberline{\thesection}#1}%
+  \else
+    \addcontentsline{toc}{section}{#1}%
+  \fi
+  \sectionmark{#1}%
+  \@makesectionhead{\thesection\sectiondot\hskip 0.7em}{#2}%
+  \@afterheading
+  }
+
+\def\@ssection#1{\@makesectionhead{}{#1}\@afterheading}
+
+\newcommand{\Shang}[1]{\Forcedhang{#1}}
+\newcommand{\Sflushstyle}{\centering}
+\newcommand{\Snumstyle}{\normalsize\bf}
+\newcommand{\Stextstyle}{}
+\newcommand{\Sspaceabove}{2\baselineskip plus6pt minus4pt}
+\newcommand{\Sspaceafter}{\vskip 1\baselineskip plus3pt minus2pt}
+\newcommand{\Scase}[1]{#1}
+\newcommand{\sectiondot}{.}
+%    \end{macrocode}
+%\newpage\subsection{Subsection}
+%    \begin{macrocode}
+\newcommand{\@makesubsectionhead}[2]{\vsecspace{\SSspaceabove}% 
+  {\parindent0pt \hyphenpenalty=10000 \baselineskip12pt
+   \SSflushstyle \SSnumstyle
+   \SShang{#1}%
+   \SStextstyle \SScase{#2}\par
+   \nobreak \SSspaceafter \relax
+   }}
+
+\newcommand{\subsection}{\@haveatleast{\SShaveatleast}%
+  \@afterindentfalse \secdef\@subsection\@ssubsection
+  }
+
+\def\@subsection[#1]#2{%
+  \ifnum \c@secnumdepth >\@ne
+    \refstepcounter{subsection}%
+    \addcontentsline{toc}{subsection}{\protect
+      \numberline{\thesubsection}#1}%
+  \else
+    \addcontentsline{toc}{subsection}{#1}%
+  \fi
+  \subsectionmark{#1}
+  \@makesubsectionhead{\thesubsection\sectiondot\hskip 0.7em}{#2}%
+  \@afterheading
+  }
+\def\@ssubsection#1{\@makesubsectionhead{}{#1}\@afterheading}
+
+
+\newcommand{\SShang}[1]{\Forcedhang{#1}}
+\newcommand{\SSflushstyle}{\raggedright}
+\newcommand{\SSnumstyle}{\normalsize\rm}
+\newcommand{\SStextstyle}{\sc}
+\newcommand{\SSspaceabove}{1\baselineskip plus3pt minus2pt}
+\newcommand{\SSspaceafter}{\vskip .8\baselineskip plus2pt minus2pt}
+\newcommand{\SScase}[1]{#1}                           
+%    \end{macrocode}
+%\newpage\subsection{Subsubsection}
+%    \begin{macrocode}
+\newcommand{\@makesubsubsectionhead}[2]{\vsecspace{\SSSspaceabove}%         
+  {\parindent0pt \hyphenpenalty=10000 \baselineskip12pt
+    \SSSflushstyle \SSSnumstyle
+    \SSShang{#1}%
+    \SSStextstyle \SSScase{#2}\par
+    \nobreak \SSSspaceafter \relax
+    }}
+
+\newcommand{\subsubsection}{\@haveatleast{\SSShaveatleast
+    }\@afterindentfalse 
+  \secdef\@subsubsection\@ssubsubsection}
+\def\@subsubsection[#1]#2{%
+  \ifnum \c@secnumdepth >2
+    \refstepcounter{subsubsection}
+    \addcontentsline{toc}{subsubsection}{\protect
+       \numberline{\thesubsubsection}#1}%
+  \else
+     \addcontentsline{toc}{subsubsection}{#1}%
+  \fi
+  \subsubsectionmark{#1}
+  \@makesubsubsectionhead{\thesubsubsection\sectiondot\hskip0.7em}{#2}%
+  \@afterheading
+  }
+\def\@ssubsubsection#1{\@makesubsubsectionhead{}{#1}\@afterheading}
+
+\newcommand{\SSShang}[1]{\Forcedhang{#1}}
+\newcommand{\SSSflushstyle}{\raggedright}
+\newcommand{\SSSnumstyle}{\normalsize\rm}
+\newcommand{\SSStextstyle}{\it}
+\newcommand{\SSSspaceabove}{1\baselineskip plus3pt minus2pt}
+\newcommand{\SSSspaceafter}{\vskip 1sp}
+\newcommand{\SSScase}[1]{#1}
+%    \end{macrocode}
+%\newpage\subsection{Paragraph}
+%    \begin{macrocode}
+\newcommand{\@makeparagraphhead}[2]{%
+    \vsecspace{\Pspaceabove }%               
+ \def\@Svsechd{% 
+    {\Pflushstyle \Pnumstyle
+      \Phang{#1}%
+      \Ptextstyle \Pcase{#2}% 
+      \Pspaceafter \relax }}\@Xsect
+     }
+
+\newcommand{\paragraph}{\par \@afterindentfalse 
+  \secdef\@paragraph\@sparagraph }
+
+\def\@paragraph[#1]#2{%
+  \ifnum \c@secnumdepth >3
+    \refstepcounter{paragraph}%
+    \addcontentsline{toc}{paragraph}{\protect
+       \numberline{\theparagraph}#1}%
+  \else
+    \addcontentsline{toc}{paragraph}{#1}%
+  \fi
+  \paragraphmark{#1}%
+  \@makeparagraphhead{\theparagraph\sectiondot\hskip 0.7em}{#2}%
+  }
+\def\@sparagraph#1{\@makeparagraphhead{}{#1}}
+                                            
+\newcommand{\Pspaceabove}{1\baselineskip plus3pt minus2pt}
+\newcommand{\Phang}[1]{#1}
+\newcommand{\Pflushstyle}{}
+\newcommand{\Pnumstyle}{\normalsize\rm}
+\newcommand{\Ptextstyle}{\it}
+\newcommand{\Pcase}[1]{#1}
+\newcommand{\Pspaceafter}{\hskip 1em}
+%    \end{macrocode}
+%\newpage\subsection{Subparagraph}
+%    \begin{macrocode}
+\newcommand{\@makesubparagraphhead}[2]{%
+     \vskip \SPspaceabove
+ \def\@Svsechd{%
+    {\SPflushstyle \SPnumstyle
+      \SPhang{#1}%
+      \SPtextstyle \SPcase{#2}%
+      \SPspaceafter \relax}}\@Xsect
+     }
+\newcommand{\subparagraph}{\par\@afterindentfalse 
+  \secdef\@subparagraph\@ssubparagraph }
+                                       
+\def\@subparagraph[#1]#2{%
+  \ifnum \c@secnumdepth >4
+    \refstepcounter{subparagraph}%
+    \addcontentsline{toc}{subparagraph}{\protect
+       \numberline{\thesubparagraph}#1}%
+  \else
+    \addcontentsline{toc}{subparagraph}{#1}%
+  \fi
+  \paragraphmark{#1}%
+  \@makesubparagraphhead{\thesubparagraph\sectiondot\hskip 0.7em}{#2}%
+  }            
+\def\@ssubparagraph#1{\@makesubparagraphhead{}{#1}}
+
+\newcommand{\SPspaceabove}{1\baselineskip plus3pt minus2pt}
+\newcommand{\SPhang}[1]{}
+\newcommand{\SPflushstyle}{}
+\newcommand{\SPnumstyle}{\normalsize\rm}
+\newcommand{\SPtextstyle}{\it}
+\newcommand{\SPcase}[1]{#1}
+\newcommand{\SPspaceafter}{\hskip 1em}
+%    \end{macrocode}
+%\newpage\subsection{Counters}
+%    \begin{macrocode}
+\newcounter{part}
+\renewcommand{\thepart}{\Roman{part}}
+\if@chapterdef
+  \newcounter{chapter}
+  \renewcommand{\thechapter}{\arabic{chapter}}
+  \newcounter{section}[chapter]
+  \renewcommand{\thesection}{\thechapter.\arabic{section}}
+\else
+  \newcounter{section}
+  \renewcommand{\thesection}{\arabic{section}}
+\fi
+\newcounter{subsection}[section]
+\newcounter{subsubsection}[subsection]
+\newcounter{paragraph}[subsubsection]
+\newcounter{subparagraph}[paragraph]
+\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
+\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
+\renewcommand{\theparagraph}{\thesubsubsection.\arabic{paragraph}}
+\renewcommand{\thesubparagraph}{\theparagraph.\arabic{subparagraph}}
+%    \end{macrocode}
+%\newpage\subsection{Table of Contents}
+%    \begin{macrocode}
+\def\@pnumwidth{1.55em}
+\def\@tocrmarg{2.55em}
+\def\@dotsep{10000}
+
+\setcounter{tocdepth}{2}
+\setcounter{secnumdepth}{4}
+%    \end{macrocode}
+%The macro |\imarkboth| is defined in |kluopen.sty|, allowing the current
+% pagestyle and/or stylefile to define the meaning.
+%    \begin{macrocode}
+\def\tableofcontents{\sectioncmd *{\contentsname}%
+  \imarkboth{\contentsname}{\contentsname}%
+  \message{\contentsname}%
+  \@starttoc{toc}\newpage}
+\def\listoffigures{\sectioncmd *{\listfigurename}\imarkboth
+  {\listfigurename}{\listfigurename}%
+  \message{\listfigurename}%
+  \@starttoc{lof}}
+\def\listoftables{\sectioncmd *{\listtablename}\imarkboth
+  {\listtablename}{\listtablename}%
+  \message{\listtablename}%
+  \@starttoc{lot}}
+
+\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
+\let\l@table\l@figure
+
+\def\l@part#1#2{%
+  \addpenalty{-\@highpenalty}
+  \addvspace{2.25em plus 1pt}
+  \begingroup
+     \@tempdima 3em
+     \parindent \z@ \rightskip \@pnumwidth
+     \parfillskip -\@pnumwidth
+     {\large \bf
+       \leavevmode
+       #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
+     \nobreak
+     \global\@nobreaktrue
+     \everypar{\global\@nobreakfalse\everypar{}}
+   \endgroup
+   }
+
+\def\l@chapter#1#2{\addpenalty{-\@highpenalty}
+   \vskip 1.0em plus 1pt
+   \@tempdima 1.5em
+   \begingroup
+     \parindent \z@ \rightskip \@pnumwidth
+     \parfillskip -\@pnumwidth
+     \bf
+     \leavevmode
+     \advance\leftskip\@tempdima
+     \hskip -\leftskip
+     #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
+     \penalty\@highpenalty
+   \endgroup
+   }
+
+\def\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
+\def\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
+\def\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
+\def\l@paragraph{\@dottedtocline{4}{10em}{5em}}
+\def\l@subparagraph{\@dottedtocline{5}{12em}{6em}}
+%    \end{macrocode}
+%\newpage   
+%
+%    \begin{macrocode}
+\newif\if@mainmatter \@mainmattertrue
+\if@chapterdef 
+  \newcommand{\appendix}{\par 
+    \@mainmatterfalse
+    \setcounter{chapter}{0}%
+    \setcounter{section}{0}%
+    \renewcommand{\thechapter}{\Alph{chapter}}%
+    \renewcommand{\@chapapp}{\appendixname}%
+    \message{\appendixname}%
+    }
+\else
+  \newcommand{\appendix}{\par
+    \section*{Appendix}%
+    \setcounter{section}{0}%
+    \setcounter{subsection}{0}%
+    \renewcommand{\thesection}{\Alph{section}}%
+    \message{\appendixname}%
+    }
+\fi
+
+\newenvironment{theindex}{%
+  \columnseprule \z@
+  \columnsep \indexsep
+  \if@chapterdef
+    \twocolumn[\@makechapterhead{}{\indexname}]
+    \addcontentsline{toc}{chapter}{\indexname}%
+  \else
+    \twocolumn[\@makesectionhead{}{\indexname}]
+    \addcontentsline{toc}{section}{\indexname}%
+  \fi
+  \imarkboth{\indexname}{\indexname}%
+  \message{\indexname}%
+  \thispagestyle{index}%
+  \parindent\z@
+  \parskip\z@ plus .3pt\relax
+  \let\item\@idxitem \indexfont
+  }{\onecolumn}   
+\def\indexfont{\footnotesize}
+\let\ps@index\ps@empty
+\def\@idxitem{\par\hangindent 36pt}
+\def\subitem{\par\hangindent 36pt \hspace*{12pt}}
+\def\subsubitem{\par\hangindent 36pt \hspace*{24pt}}
+\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}
+\def\indexsep{24pt}
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document}
+% end of klusec.sty
+
+
+
+
diff --git a/helm/papers/matita/klut10.clo b/helm/papers/matita/klut10.clo
new file mode 100644 (file)
index 0000000..9683c7c
--- /dev/null
@@ -0,0 +1,256 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[10pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klut10.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\setlength\marginparwidth{.5in}
+%\hfuzz=11pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\runningtitle{\filename\ -- \filedate}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers}
+%\runningauthor{Kluwer Academic Publishers}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options. This is a the `tight' file.
+%\end{abstract}                                       
+%\end{opening}
+%\tableofcontents 
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klut10.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This between |\scriptsize| and
+% |\tiny|. Allowed type provided values:  5/6, 6/7, 7/8, 8/9, 9/10.5,
+% 10/11.5, 12/14, 14/18, 17/22, 20/25, 25/30.
+%    \begin{macrocode}
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@xpt{11.5}%
+   \abovedisplayskip 10\p@ \@plus 2\p@ \@minus5\p@
+   \abovedisplayshortskip \z@ \@plus 3\p@
+   \belowdisplayshortskip 6\p@ \@plus 3\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@ixpt{10.5}%
+   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4\p@ \@plus2\p@ \@minus2\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@viiipt{9}%
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
+\newcommand\little{\@setfontsize\little\@vipt\@viipt}
+\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1in}           
+\setlength\voffset{-1in}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {12\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {27.5\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{10pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin \@tempdima
+  \evensidemargin \@tempdima
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{\@tempdima}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6.65\p@}
+\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{2.2em}
+\setlength{\leftmarginiii}{1.87em}
+\setlength{\leftmarginiv}{1.7em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep  9\p@ \@plus 3\p@ \@minus 5\p@
+  \partopsep 3\p@ \@plus 1\p@ \@minus 2\p@
+  \itemsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 4.5\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klut10.clo'.
+
diff --git a/helm/papers/matita/klut11.clo b/helm/papers/matita/klut11.clo
new file mode 100644 (file)
index 0000000..3293907
--- /dev/null
@@ -0,0 +1,253 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[11pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klut11.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\setlength\marginparwidth{.5in}
+%\hfuzz=11pt
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options. This is a the `tight' file.
+%\end{abstract}                                       
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klut11.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This between |\scriptsize| and
+% |\tiny|. Allowed type provided values:  6/7, 7/8, 8/9, 9/10.5,
+% 10/11.5, 11/12.5, 12/14, 14/18, 17/22, 20/25, 25/30.
+%    \begin{macrocode}
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@xipt{12.5}%
+   \abovedisplayskip 10\p@ \@plus 2\p@ \@minus5\p@
+   \abovedisplayshortskip \z@ \@plus 3\p@
+   \belowdisplayshortskip 6\p@ \@plus 3\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@xpt{11.5}%
+   \abovedisplayskip 9\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 5\p@ \@plus2\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4\p@ \@plus2\p@ \@minus2\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@ixpt{10.5}%   
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
+\newcommand\little{\@setfontsize\little\@viipt\@viiipt}
+\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
+\newcommand\large{\@setfontsize\large\@xiipt{14}}
+\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1in}           
+\setlength\voffset{-1in}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {12\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {27.5\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{10pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin \@tempdima
+  \evensidemargin \@tempdima
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{\@tempdima}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6.65\p@}
+\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{2.2em}
+\setlength{\leftmarginiii}{1.87em}
+\setlength{\leftmarginiv}{1.7em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep  9\p@ \@plus 3\p@ \@minus 5\p@
+  \partopsep 3\p@ \@plus 1\p@ \@minus 2\p@
+  \itemsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 4.5\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klu10.clo'.
diff --git a/helm/papers/matita/klut12.clo b/helm/papers/matita/klut12.clo
new file mode 100644 (file)
index 0000000..17fd0f2
--- /dev/null
@@ -0,0 +1,253 @@
+%
+%     
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[12pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klut12.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\setlength\marginparwidth{0in}
+%\addtolength{\textwidth}{8pc}
+%\begin{document}
+%\begin{opening}          
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options. This is a tight version.
+%\end{abstract}                              
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klut12.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This between |\scriptsize| and
+% |\tiny|. Allowed type provided values:  6/7, 8/9, 9/10.5,
+% 10/11.5, 11/12.5 12/13.5, 14/18, 17/22, 20/25, 25/30.
+%    \begin{macrocode}          
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@xiipt{13.5}%
+   \abovedisplayskip 11\p@ \@plus 2\p@ \@minus5\p@
+   \abovedisplayshortskip 1\p@ \@plus 3\p@
+   \belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@xipt{12.5}%
+   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4\p@ \@plus2\p@ \@minus2\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@xpt{11.5}%
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@ 
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@ixpt{10.5}}
+\newcommand\little{\@setfontsize\little\@viiipt{9}}
+\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
+\newcommand\large{\@setfontsize\large\@xivpt{18}}
+\newcommand\Large{\@setfontsize\Large\@xviipt{22}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xxpt{25}}
+\newcommand\huge{\@setfontsize\huge\@xxvpt{30}}
+\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1in}           
+\setlength\voffset{-1in}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {12\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {27.5\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{12pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin \@tempdima
+  \evensidemargin \@tempdima
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{\@tempdima}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6.65\p@}
+\setlength{\skip\footins}{12\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{2.2em}
+\setlength{\leftmarginiii}{1.87em}
+\setlength{\leftmarginiv}{1.7em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep  11\p@ \@plus 3\p@ \@minus 5\p@
+  \partopsep 4.5\p@ \@plus 1\p@ \@minus 2\p@
+  \itemsep 6\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 6\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 6\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 3\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{24\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{12\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{24\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{10\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{10\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}                   
+%\PrintIndex
+%\end{document} 
+%% End of file `klut12.clo'.
diff --git a/helm/papers/matita/klut9.clo b/helm/papers/matita/klut9.clo
new file mode 100644 (file)
index 0000000..8f7a587
--- /dev/null
@@ -0,0 +1,253 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass[9pt]{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\NeedsTeXFormat{LaTeX2e}
+\def\filedate{1998/02/11}
+\def\filename{klut9.clo}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\p@,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\refstepcounter}
+%\DoNotIndex{\setlength,\@plus,\@minus,\protect,\endinput}
+%\CodelineIndex
+%\newcommand{\Bs}{}
+%\parindent=0pt
+%\parskip=3pt 
+%\setlength\marginparwidth{0in}
+%\hfuzz=10pt               
+%\MakeShortVerb{\|}
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal file takes care of list definitions and `general'
+% point size options. This is a `tight' file.
+%\end{abstract}                               
+%\end{opening}
+%\tableofcontents
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\ProvidesFile{klut9.clo}[\filedate ]
+%    \end{macrocode}
+% \subsection{Section size commands}
+% added command: |\little|. This is identical to |\tiny| here.
+% Allowed type provided values:  5/6, 6/7, 7/8, 8/9, 9/10.5,
+% 10/11.5, 11/13, 12/14, 14/18, 17/22, 20/25.
+%    \begin{macrocode}                    
+\renewcommand\normalsize{%
+   \@setfontsize\normalsize\@ixpt{10.5}%
+   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus2\p@
+   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\listi\@listI}     
+\normalsize
+\newcommand\small{%
+   \@setfontsize\small\@viiipt{9}%
+   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 3\p@ \@plus\p@ \@minus\p@
+               \parsep 2\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\footnotesize{%
+   \@setfontsize\footnotesize\@viipt{8}%
+   \abovedisplayskip 4\p@ \@plus2\p@ \@minus2\p@
+   \abovedisplayshortskip \z@ \@plus\p@
+   \belowdisplayshortskip 2\p@ \@plus\p@ \@minus1\p@
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 2\p@ \@plus\p@ \@minus\p@
+               \parsep 1\p@ \@plus\p@ \@minus\p@
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\newcommand\scriptsize{\@setfontsize\scriptsize\@vipt\@viipt}
+\newcommand\little{\@setfontsize\little\@vpt\@vipt}
+\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
+\newcommand\large{\@setfontsize\large\@xpt{11.5}}
+\newcommand\Large{\@setfontsize\Large\@xiipt{14}}
+\newcommand\LARGE{\@setfontsize\LARGE\@xivpt{18}}
+\newcommand\huge{\@setfontsize\huge\@xviipt{22}}
+\newcommand\Huge{\@setfontsize\Huge\@xxpt{25}}
+%    \end{macrocode}
+% \subsection{Various values} 
+% Note that |\hoffset| and |\voffset| are both compensated. This makes
+% the calculations below easier.
+%    \begin{macrocode}
+\setlength\hoffset{-1in}           
+\setlength\voffset{-1in}
+\setlength\parindent {14\p@}
+\setlength\headheight{12\p@}
+\setlength\headsep   {12\p@}
+\setlength\topskip   {10\p@}
+\setlength\footskip  {25\p@}
+\setlength\marginparsep{10pt}
+\setlength\marginparpush{5\p@}
+\setlength\maxdepth  {.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\columnsep{10pt}
+\setlength\columnseprule{0pt}
+\setlength\fboxsep{3pt}
+\setlength\fboxrule{.4pt}
+%    \end{macrocode}
+% \subsection{Textheight and textwidth}
+% These are the main reason for the existence of these files. For some
+% stupid reason, \LaTeX\ calculates textwidth out of |\paperwidth|. We
+% did want to support letter paper, but our |\textwidth| is fixed,
+% with the margins being calculated. 
+%
+% Presume |\textwidth| and |\marginparwidth| are set in the stylefile,
+% or we're in trouble. The |2pc| value is used to                     
+% compensate for the `dead' corners in most laserprinters. 
+%
+% Calculations are done `AtBeginDocument' to allow changes made in the
+% preamble and later on in the stylefile.
+%    \begin{macrocode}
+\newdimen\id@boxheight
+\AtBeginDocument{%
+  \setlength\@tempdima{\paperwidth}%      
+  \addtolength\@tempdima{-\textwidth}%    
+  \divide\@tempdima by 2                  
+  \setlength\@tempdimb\marginparwidth     
+  \addtolength\@tempdimb\marginparsep
+  \addtolength\@tempdimb{2pc}%
+  \ifdim \@tempdima <\@tempdimb
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Marginpars disabled}{}{You made 
+      your \string\textwidth\space (\the\textwidth) and 
+      \string\marginparwidth (\the\marginparwidth) too wide.\MessageBreak
+      The allowed value for margin space: (\the\@tempdima). Needed value: 
+      (\the\@tempdimb).\MessageBreak                        
+      This is not enough,
+      so I will set \string\marginparwidth\space  to 0pt.\MessageBreak
+      Let's hope that fixes it.
+     }%
+     \marginparwidth \z@
+     \marginparsep \z@ 
+  \fi
+  \ifdim \@tempdima <2pc                   
+     \@tempdimb=\paperwidth
+     \advance\@tempdimb by -4pc
+     \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textwidth\space (\the\textwidth) 
+     wider than the available total\MessageBreak 
+     (Which is: \the\@tempdimb). Please press X and try again.              
+     }%
+  \fi
+  \oddsidemargin \@tempdima
+  \evensidemargin \@tempdima
+%    \end{macrocode}
+% These calculations are a lot easier. 
+% |\textheight| should have been set already. This does not check for the 
+% correct placement of the identification line!!
+%    \begin{macrocode} 
+  \setlength\@tempdima{\paperheight}
+  \addtolength\@tempdima{-\footskip}
+  \addtolength\@tempdima{-\headheight}
+  \addtolength\@tempdima{-\headsep} 
+  \setlength\@tempdimb{\@tempdima}
+  \addtolength\@tempdima{-\textheight}
+  \divide\@tempdima by 2
+  \ifdim \@tempdima <2pc
+  \advance\@tempdimb by -4pc
+  \@settopoint\@tempdimb
+     \GenericError{Pointsize}{Pointsize Error: Invalid sizes given}{}{You 
+     made your \string\textheight\space (\the\textheight)
+     more than the available total.\MessageBreak        
+     (Which is: \the\@tempdimb). Please press X and try again.                         
+     }%
+  \fi
+  \setlength\topmargin{\@tempdima}
+  \setlength\id@boxheight{\@tempdima}
+  \advance\id@boxheight by -2pc
+}
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\setlength\footnotesep{6\p@}
+\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
+%    \end{macrocode}
+% \subsection{Lists}
+% List default values
+%    \begin{macrocode}
+\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
+\setlength{\leftmargini}{1.9em}
+\setlength{\leftmarginii}{2em}
+\setlength{\leftmarginiii}{1.7em}
+\setlength{\leftmarginiv}{1.4em}
+\setlength{\leftmarginv}{1em}
+\setlength{\leftmarginvi}{1em}
+\setlength{\labelsep}{.4em}
+\setlength{\labelwidth}{\leftmargini} 
+\addtolength{\labelwidth}{-\labelsep}
+%    \end{macrocode}
+% Note that lists below level 3 do nothing else then readjusting the
+% |\labelwidth|. This results in very small labels for the inner lists.
+%    \begin{macrocode}
+\def\@listI{%
+  \leftmargin \leftmargini
+  \topsep 8\p@ \@plus2\p@ \@minus2\p@
+  \partopsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep 4\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 4\p@ \@plus 2\p@ \@minus 1\p@ }
+\def\@listii{%
+  \leftmargin \leftmarginii
+  \labelwidth \leftmarginii
+  \advance\labelwidth by -\labelsep
+  \topsep 4.5\p@ \@plus 2\p@ \@minus 1\p@
+  \parsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \itemsep \parsep}
+\def\@listiii{%
+  \leftmargin \leftmarginiii
+  \labelwidth \leftmarginiii
+  \advance\labelwidth by -\labelsep
+  \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
+  \parsep \z@  
+  \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@
+  \itemsep \topsep}
+\def\@listiv{%
+  \setlength{\leftmargin}{\leftmarginiv}%
+  \setlength{\labelwidth}{\leftmarginiv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listv{%
+  \setlength{\leftmargin}{\leftmarginv}%
+  \setlength{\labelwidth}{\leftmarginv}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\def\@listvi{%
+  \setlength{\leftmargin}{\leftmarginvi}%
+  \setlength{\labelwidth}{\leftmarginvi}%
+  \addtolength{\labelwidth}{-\labelsep}}
+\let\@listi\@listI
+\@listi
+%    \end{macrocode}
+% \subsection{Float separation parameters}
+% Separation on text pages.
+%    \begin{macrocode}
+\setlength\floatsep{10\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\textfloatsep{18\p@ \@plus 2\p@ \@minus 4\p@} 
+\setlength\intextsep{10\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dblfloatsep{10\p@ \@plus 2\p@ \@minus 2\p@} 
+\setlength\dbltextfloatsep{18\p@ \@plus 2\p@ \@minus 4\p@} 
+%    \end{macrocode}
+% Separation on float pages
+%    \begin{macrocode}
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{8\p@ \@plus 2fil}
+\setlength\@fpbot{0\p@ \@plus 1fil}
+\setlength\@dblfptop{0\p@ \@plus 1fil}
+\setlength\@dblfpsep{8\p@ \@plus 2fil}
+\setlength\@dblfpbot{0\p@ \@plus 1fil}
+
+\endinput
+%    \end{macrocode}
+%\PrintIndex
+%\end{document} 
+%% End of file `klu9.clo'.
diff --git a/helm/papers/matita/klutab.sty b/helm/papers/matita/klutab.sty
new file mode 100644 (file)
index 0000000..f59dc11
--- /dev/null
@@ -0,0 +1,242 @@
+%
+%
+\ifcat a\noexpand @\let\next\relax\else \def\next{%
+\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
+\def\filedate{1998/02/11}
+\def\filename{klutab.sty}
+%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
+%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
+%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\gdef,\@cla,\@clb}
+%\DoNotIndex{\normalsize,\protect,\global,\setbox,\hbox,\vbox,\endinput}
+%\DoNotIndex{\egroup,\endgroup,\bgroup,\begingroup,\let}
+%\CodelineIndex 
+%\changes{1997/02/12}{TH: Inserted definition of `array' to accomodate `hline'.}
+%\newcommand{\Bs}{$\backslash$}
+%\parindent=0pt
+%\parskip=3pt
+%\hfuzz=10pt
+%\MakeShortVerb{\|}
+%\setlength{\marginparwidth}{0in} 
+%\addtolength{\textwidth}{4pc}
+%\begin{document}
+%\begin{opening}
+%\title{\filename}
+%\date{\filedate}
+%\author{Kluwer Academic Publishers\surname{}}
+%\institute{~}
+%\begin{abstract}
+% This internal stylefile takes care of tabulars.
+%\end{abstract}                                 
+%\end{opening}
+%\tableofcontents
+%\section{Usage}
+%
+% All of this is quite simple code. What happens
+% is that some extra lines for use in tabulars are defined and
+% included in the original definition of |tabular| and
+% |tabular*|. These have a bit of extra vertical space which breaks
+% the use of vertical rules in tabular's, which is why the old
+% definitions are saved as |TABULAR| and |TABULAR*|. 
+%
+% There are some variations on |\cline|. I moved internal commands out of the
+% definition of |tabular| so they could be used in |tabular*| easily. \\[6pt]
+% |\rcline| == hbox 3pt to the left\\
+% |\lcline| == hbox 3pt to the right\\
+% |\lrcline| == both \\
+% |\rlcline| == |\lrcline| (to provide symmetry)
+%
+% All of the environments  have
+% been changed so that they also set the value of |\@tabwidth|, which
+% is needed by |klufloa.sty|.
+%
+% |tabular*| has been adjusted to flush out the excess space over all
+% columns instead of to the right of the last one. This is controlled
+% by the value of |\stretchtabsep|, whose default value equals |\hfil|
+%
+%\newpage\section{Implementation}
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{klutab}[\filedate ]
+%    \end{macrocode}
+% \subsection{Tabular}
+% First some needed values. The `array' things may not belong here,
+% but is also not save to put them somewhere else. After all, \LaTeX\
+% seems to think this is correct. 
+%    \begin{macrocode}
+\arraycolsep 6pt
+\tabcolsep 6pt
+\arrayrulewidth .4pt
+\doublerulesep 2pt
+%    \end{macrocode}
+%
+% Internal versions of the rules check whether first arg $>1$, and assign
+% |\@tabklu@tmpa| accordingly. Next, execute |\@tabklu@tmpa| and
+% unskip vertical width of rule. (All three are similar)
+%    \begin{macrocode}
+\def\@rcline[#1-#2]{%
+  \noalign{%
+       \global\@cla #1\relax
+       \global\advance\@cla\m@ne
+       \ifnum\@cla >0 
+         \global\let\@tabklu@tmpa\@rclinea
+       \else
+         \global\let\@tabklu@tmpa\@rclineb
+       \fi
+       \global\@clb #2\relax
+       \global\advance\@clb-\@cla }%
+    \@tabklu@tmpa
+    \noalign{\vskip-\arrayrulewidth}%
+  }%
+\def\@rclinea{%
+    \multispan\@cla&\multispan\@clb 
+    \hbox to 3pt{\hfil }%
+    \unskip
+    \leaders\hrule \@height \arrayrulewidth\hfill 
+    \cr}%
+\def\@rclineb{%
+   \multispan\@clb 
+   \hbox to 3pt{\hfil }%
+   \unskip
+   \leaders\hrule \@height \arrayrulewidth\hfill 
+   \cr}%
+\def\@lcline[#1-#2]{%
+  \noalign{%
+     \global\@cla #1\relax
+     \global\advance\@cla\m@ne
+     \ifnum\@cla >0
+        \global\let\@tabklu@tmpa\@lclinea
+     \else
+        \global\let\@tabklu@tmpa\@lclineb
+     \fi
+     \global\@clb #2\relax
+     \global\advance\@clb-\@cla
+  }\@tabklu@tmpa
+  \noalign{\vskip-\arrayrulewidth}%
+}%
+\def\@lclinea{%
+     \multispan\@cla&\multispan\@clb
+     \unskip
+     \leaders\hrule \@height \arrayrulewidth\hfill
+     \hbox to 3pt{\hfil }\cr}%
+\def\@lclineb{%
+     \multispan\@clb
+     \unskip
+     \leaders\hrule \@height \arrayrulewidth\hfill
+     \hbox to 3pt{\hfil }\cr}%
+\def\@lrcline[#1-#2]{%
+   \noalign{%
+     \global\@cla #1\relax
+     \global\advance\@cla\m@ne
+     \ifnum\@cla>0
+        \global \let\@tabklu@tmpa\@lrclinea
+     \else
+        \global \let\@tabklu@tmpa\@lrclineb
+     \fi
+     \global \@clb #2\relax
+     \global \advance\@clb-\@cla
+     }%
+     \@tabklu@tmpa
+     \noalign{\vskip -\arrayrulewidth}%
+  }%
+\def\@lrclinea{%
+     \multispan\@cla&\multispan\@clb 
+     \hbox to 3pt{\hfil }%
+     \unskip\leaders\hrule \@height \arrayrulewidth\hfill
+     \hbox to 3pt{\hfil }%
+     \cr}%
+\def\@lrclineb{%
+     \multispan\@clb 
+     \hbox to 3pt{\hfil }%
+     \unskip\leaders\hrule \@height \arrayrulewidth\hfill
+     \hbox to 3pt{\hfil }%
+     \cr}%
+%    \end{macrocode}
+% This is used for |tabular*|
+%    \begin{macrocode}
+\newlength\stretchtabsep
+\setlength\stretchtabsep{0pt plus 1fil}
+%    \end{macrocode}
+% |\hline| has been redefined to provide some extra vertical
+% space. Unforunately, we could not do the same for |\cline| and
+% friend, because there can be more than one in one row. The old value
+% of |\hline| is saved in |\savehline| in case you need it.
+%
+% |\arraystretch| is left to it's default value, but we did want extra
+% spacing, so |\strut| is redefined (indirectly) to give some.
+%
+% And then, the entire tabular is saved in a |\hbox| so we can measure
+% it up later. (See above for why we need to know this). There is a
+% grouping level added to stop definitions from running away, but
+% maybe this isn't needed. Not sure.
+%    \begin{macrocode}
+\let\savehline\hline
+\def\tabular{\begingroup
+   \def\hline{\noalign{\vskip3pt}\savehline\noalign{\vskip3pt}}%
+   \def\rcline##1{\@rcline[##1]}%   
+   \def\lcline##1{\@lcline[##1]}%   
+   \def\lrcline##1{\@lrcline[##1]}%
+   \let\rlcline=\lrcline   
+    \setbox\strutbox\hbox{\vrule height.8\baselineskip
+            depth.4\baselineskip width\z@}%
+    \setbox0=\hbox\bgroup\def\@halignto{}\@tabular}%
+%    \end{macrocode}
+% |\endtabular| is quite straightforward.
+%    \begin{macrocode}
+\def\endtabular{\crcr\egroup\egroup $\egroup
+  \egroup \tabwidth{\wd0}\unhbox0 \endgroup}%
+%    \end{macrocode}     
+% 
+% Apparently we need to restore the definition of |\hline|
+% inside of array's. This is just a quick hack that 'fixes' 
+% the problem.
+%    \begin{macrocode}
+\let\klu@intarray\array     
+\let\klu@intendarray\endarray     
+\def\array{\begingroup \let\hline\savehline \klu@intarray }
+\def\endarray{\klu@intendarray \endgroup}   
+%    \end{macrocode}     
+%
+% |tabular*| follows the same rules, except for redefining
+% |\@tabacol| to insert a |\hfil| value for |\tabskip| in the first
+% preamble-entry (and all following, but these don't count), 
+% thereby stretching out all intercolumn space instead
+% of just the last (\LaTeX\ standard behaviour).  
+%    \begin{macrocode}
+\@namedef{tabular*}#1{%
+   \begingroup 
+   \let\savehline\hline
+   \def\hline{\noalign{\vskip3pt}\savehline\noalign{\vskip3pt}}%
+   \def\rcline##1{\@rcline[##1]}%   
+   \def\lcline##1{\@lcline[##1]}%   
+   \def\lrcline##1{\@lrcline[##1]}%   
+   \let\rlcline=\lrcline   
+   \setbox\strutbox\hbox{\vrule height.8\baselineskip
+            depth.4\baselineskip width\z@}%
+    \setbox0=\hbox\bgroup\def\@halignto{to #1}%
+        \def\@tabacol{\edef\@preamble{\@preamble 
+            \tabskip \stretchtabsep \hskip \tabcolsep}}\@tabular}
+\@namedef{endtabular*}{\endtabular}
+%
+%    \end{macrocode}
+% \subsection{TABULAR}
+% This is just ordinary \LaTeX\ tabular, apart from the |\hbox|. 
+%    \begin{macrocode}
+\def\TABULAR{%
+     \let\savehline\hline %compatibility
+     \let\rcline\cline \let\lcline\cline 
+     \let\lrcline\cline \let\rlcline\cline 
+     \setbox0=\hbox\bgroup\def\@halignto{}\@tabular}%
+\def\endTABULAR{\crcr\egroup\egroup $\egroup
+  \egroup \tabwidth{\wd0}\unhbox0 }%
+\@namedef{TABULAR*}#1{%
+     \let\savehline\hline %compatibility
+     \let\rcline\cline \let\lcline\cline 
+     \let\lrcline\cline \let\rlcline\cline 
+     \setbox0=\hbox\bgroup\def\@halignto{to #1}\@tabular}%
+\@namedef{endTABULAR*}{\endtabular}
+\endinput
+%    \end{macrocode}
+%\def\IndexParms{\hbadness=10000}
+%\PrintIndex
+%\end{document}
+% end of klutab.sty
diff --git a/helm/papers/matita/kluwer.cls b/helm/papers/matita/kluwer.cls
new file mode 100644 (file)
index 0000000..2ebcc17
--- /dev/null
@@ -0,0 +1,122 @@
+%
+% This class file (c) Kluwer Academic Publishers.
+% You are free to use this class file as you see fit, provided 
+% that you do not make changes to the included macro files. 
+% If you DO make changes, you are required to rename the files.
+%        
+\def\filedate{1998/02/11}
+\def\kluclassname{kluwer}
+\def\kluclassversion{1.1}
+\def\klujnlname{none}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{kluwer}[\filedate\space \kluclassversion\space
+    Kluwer base document class]
+\newcommand\@ptsize{}
+\newcommand\@pttensize{1}
+\newif\if@restonecol
+\newif\if@openright
+\DeclareOption{noid}{\PassOptionsToPackage{\CurrentOption}{kluedit}}
+\DeclareOption{namedreferences}{\PassOptionsToPackage{\CurrentOption}{kluref}}
+\DeclareOption{numreferences}{\PassOptionsToPackage{\CurrentOption}{kluref}}
+\DeclareOption{openbib}{\PassOptionsToPackage{\CurrentOption}{kluref}}
+\DeclareOption{thms}{\PassOptionsToPackage{\CurrentOption}{klumath}}
+\DeclareOption{mathsec}{\PassOptionsToPackage{\CurrentOption}{klumath}}
+\DeclareOption{fleqn}{\PassOptionsToPackage{\CurrentOption}{klumath}}
+\DeclareOption{leqno}{\PassOptionsToPackage{\CurrentOption}{klumath}}
+\DeclareOption{titlepage}{\PassOptionsToPackage{\CurrentOption}{klulist}}
+\DeclareOption{klusym}{\PassOptionsToPackage{\CurrentOption}{klumac}}
+\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}}
+\DeclareOption{9pt}{\renewcommand\@pttensize{}\renewcommand\@ptsize{9}}
+\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
+\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
+\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+\DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
+\DeclareOption{openright}{\@openrighttrue}                       
+\DeclareOption{draft}{\setlength\overfullrule{5pt}}
+\DeclareOption{final}{\setlength\overfullrule{0pt}}
+\DeclareOption{onecolumn}{\@twocolumnfalse}
+\DeclareOption{twocolumn}{\@twocolumntrue}
+\ExecuteOptions{a4paper,11pt,twoside,onecolumn,final,openright}
+\ProcessOptions
+%\renewcommand{\encodingdefault}{T1}
+\IfFileExists{klumac.sty}{\RequirePackage{klumac}[1998/02/11]}{}
+\AtBeginDocument{\let\sectioncmd\section}               
+\input{klu\@pttensize\@ptsize.clo}
+\def\Uppercase#1{#1}
+\RequirePackage{klulist}[1998/02/11]
+\RequirePackage{kluopen}[1998/02/11]
+    \def\@date{\vskip \afterdateskip } % no default dates
+\RequirePackage{kluedit}[1998/02/11]
+\AtBeginDocument{\let\imarkboth\@gobbletwo}
+\RequirePackage{klufloa}[1998/02/11]
+\renewcommand{\fnum@figure}{{\itshape\figurename~\thefigure\figtabdot\/}}
+\renewcommand{\thetable}{\Roman{table}}
+\indentedcaptions
+\RequirePackage{klunote}[1998/02/11]
+\RequirePackage{kluref}[1998/02/11]
+\RequirePackage{klumath}[1998/02/11]
+\RequirePackage{klusec}[1998/02/11]
+\setlength\textheight{559pt}
+\setlength\textwidth{28pc}
+\setlength\marginparwidth{0pt}
+\setlength\lineskip{1\p@}
+\setlength\normallineskip{1\p@}
+\renewcommand\baselinestretch{}
+\@lowpenalty 51
+\@medpenalty 151
+\@highpenalty 301
+\@beginparpenalty -\@lowpenalty
+\@endparpenalty -\@lowpenalty
+\@itempenalty -\@lowpenalty
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
+\providecommand{\cal}{\protect\pcal}
+\newcommand{\pcal}{\@fontswitch{\relax}{\mathcal}}
+\providecommand{\mit}{\protect\pmit}
+\newcommand{\pmit}{\@fontswitch{\relax}{\mathnormal}}
+\setlength\tabbingsep{\labelsep}
+\clubpenalty=10000
+\widowpenalty=10000
+%%%%%%%                                            
+\def\kapmathindent{14pt}
+\pagestyle{headings}
+\pagenumbering{arabic}
+\frenchspacing
+\endinput
+%% 
+%% End of file `kluwer.cls'.
+                                        
+
+
+
+
+
+
+
diff --git a/helm/papers/matita/llncs.cls b/helm/papers/matita/llncs.cls
deleted file mode 100644 (file)
index df98f8a..0000000
+++ /dev/null
@@ -1,1015 +0,0 @@
-% LLNCS DOCUMENT CLASS -- version 2.8
-% for LaTeX2e
-%
-\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{llncs}[2000/05/16 v2.8
-^^JLaTeX document class for Lecture Notes in Computer Science]
-% Options
-\let\if@envcntreset\iffalse
-\DeclareOption{envcountreset}{\let\if@envcntreset\iftrue}
-\DeclareOption{citeauthoryear}{\let\citeauthoryear=Y}
-\DeclareOption{oribibl}{\let\oribibl=Y}
-\let\if@custvec\iftrue
-\DeclareOption{orivec}{\let\if@custvec\iffalse}
-\let\if@envcntsame\iffalse
-\DeclareOption{envcountsame}{\let\if@envcntsame\iftrue}
-\let\if@envcntsect\iffalse
-\DeclareOption{envcountsect}{\let\if@envcntsect\iftrue}
-\let\if@runhead\iffalse
-\DeclareOption{runningheads}{\let\if@runhead\iftrue}
-
-\let\if@openbib\iffalse
-\DeclareOption{openbib}{\let\if@openbib\iftrue}
-
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
-
-\ProcessOptions
-
-\LoadClass[twoside]{article}
-\RequirePackage{multicol} % needed for the list of participants, index
-
-\setlength{\textwidth}{12.2cm}
-\setlength{\textheight}{19.3cm}
-
-% Ragged bottom for the actual page
-\def\thisbottomragged{\def\@textbottom{\vskip\z@ plus.0001fil
-\global\let\@textbottom\relax}}
-
-\renewcommand\small{%
-   \@setfontsize\small\@ixpt{11}%
-   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
-   \abovedisplayshortskip \z@ \@plus2\p@
-   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
-   \def\@listi{\leftmargin\leftmargini
-               \parsep 0\p@ \@plus1\p@ \@minus\p@
-               \topsep 8\p@ \@plus2\p@ \@minus4\p@
-               \itemsep0\p@}%
-   \belowdisplayskip \abovedisplayskip
-}
-
-\frenchspacing
-\widowpenalty=10000
-\clubpenalty=10000
-
-\setlength\oddsidemargin   {63\p@}
-\setlength\evensidemargin  {63\p@}
-\setlength\marginparwidth  {90\p@}
-
-\setlength\headsep   {16\p@}
-
-\setlength\footnotesep{7.7\p@}
-\setlength\textfloatsep{8mm\@plus 2\p@ \@minus 4\p@}
-\setlength\intextsep   {8mm\@plus 2\p@ \@minus 2\p@}
-
-\setcounter{secnumdepth}{2}
-
-\newcounter {chapter}
-\renewcommand\thechapter      {\@arabic\c@chapter}
-
-\newif\if@mainmatter \@mainmattertrue
-\newcommand\frontmatter{\cleardoublepage
-            \@mainmatterfalse\pagenumbering{Roman}}
-\newcommand\mainmatter{\cleardoublepage
-       \@mainmattertrue\pagenumbering{arabic}}
-\newcommand\backmatter{\if@openright\cleardoublepage\else\clearpage\fi
-      \@mainmatterfalse}
-
-\renewcommand\part{\cleardoublepage
-                 \thispagestyle{empty}%
-                 \if@twocolumn
-                     \onecolumn
-                     \@tempswatrue
-                   \else
-                     \@tempswafalse
-                 \fi
-                 \null\vfil
-                 \secdef\@part\@spart}
-
-\def\@part[#1]#2{%
-    \ifnum \c@secnumdepth >-2\relax
-      \refstepcounter{part}%
-      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
-    \else
-      \addcontentsline{toc}{part}{#1}%
-    \fi
-    \markboth{}{}%
-    {\centering
-     \interlinepenalty \@M
-     \normalfont
-     \ifnum \c@secnumdepth >-2\relax
-       \huge\bfseries \partname~\thepart
-       \par
-       \vskip 20\p@
-     \fi
-     \Huge \bfseries #2\par}%
-    \@endpart}
-\def\@spart#1{%
-    {\centering
-     \interlinepenalty \@M
-     \normalfont
-     \Huge \bfseries #1\par}%
-    \@endpart}
-\def\@endpart{\vfil\newpage
-              \if@twoside
-                \null
-                \thispagestyle{empty}%
-                \newpage
-              \fi
-              \if@tempswa
-                \twocolumn
-              \fi}
-
-\newcommand\chapter{\clearpage
-                    \thispagestyle{empty}%
-                    \global\@topnum\z@
-                    \@afterindentfalse
-                    \secdef\@chapter\@schapter}
-\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
-                       \if@mainmatter
-                         \refstepcounter{chapter}%
-                         \typeout{\@chapapp\space\thechapter.}%
-                         \addcontentsline{toc}{chapter}%
-                                  {\protect\numberline{\thechapter}#1}%
-                       \else
-                         \addcontentsline{toc}{chapter}{#1}%
-                       \fi
-                    \else
-                      \addcontentsline{toc}{chapter}{#1}%
-                    \fi
-                    \chaptermark{#1}%
-                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
-                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
-                    \if@twocolumn
-                      \@topnewpage[\@makechapterhead{#2}]%
-                    \else
-                      \@makechapterhead{#2}%
-                      \@afterheading
-                    \fi}
-\def\@makechapterhead#1{%
-% \vspace*{50\p@}%
-  {\centering
-    \ifnum \c@secnumdepth >\m@ne
-      \if@mainmatter
-        \large\bfseries \@chapapp{} \thechapter
-        \par\nobreak
-        \vskip 20\p@
-      \fi
-    \fi
-    \interlinepenalty\@M
-    \Large \bfseries #1\par\nobreak
-    \vskip 40\p@
-  }}
-\def\@schapter#1{\if@twocolumn
-                   \@topnewpage[\@makeschapterhead{#1}]%
-                 \else
-                   \@makeschapterhead{#1}%
-                   \@afterheading
-                 \fi}
-\def\@makeschapterhead#1{%
-% \vspace*{50\p@}%
-  {\centering
-    \normalfont
-    \interlinepenalty\@M
-    \Large \bfseries  #1\par\nobreak
-    \vskip 40\p@
-  }}
-
-\renewcommand\section{\@startsection{section}{1}{\z@}%
-                       {-18\p@ \@plus -4\p@ \@minus -4\p@}%
-                       {12\p@ \@plus 4\p@ \@minus 4\p@}%
-                       {\normalfont\large\bfseries\boldmath
-                        \rightskip=\z@ \@plus 8em\pretolerance=10000 }}
-\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
-                       {-18\p@ \@plus -4\p@ \@minus -4\p@}%
-                       {8\p@ \@plus 4\p@ \@minus 4\p@}%
-                       {\normalfont\normalsize\bfseries\boldmath
-                        \rightskip=\z@ \@plus 8em\pretolerance=10000 }}
-\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
-                       {-18\p@ \@plus -4\p@ \@minus -4\p@}%
-                       {-0.5em \@plus -0.22em \@minus -0.1em}%
-                       {\normalfont\normalsize\bfseries\boldmath}}
-\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
-                       {-12\p@ \@plus -4\p@ \@minus -4\p@}%
-                       {-0.5em \@plus -0.22em \@minus -0.1em}%
-                       {\normalfont\normalsize\itshape}}
-\renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not use
-                  \string\subparagraph\space with this class}\vskip0.5cm
-You should not use \verb|\subparagraph| with this class.\vskip0.5cm}
-
-\DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00}
-\DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01}
-\DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02}
-\DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03}
-\DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04}
-\DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05}
-\DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06}
-\DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07}
-\DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08}
-\DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09}
-\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}
-
-\let\footnotesize\small
-
-\if@custvec
-\def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle#1$}}
-{\mbox{\boldmath$\textstyle#1$}}
-{\mbox{\boldmath$\scriptstyle#1$}}
-{\mbox{\boldmath$\scriptscriptstyle#1$}}}
-\fi
-
-\def\squareforqed{\hbox{\rlap{$\sqcap$}$\sqcup$}}
-\def\qed{\ifmmode\squareforqed\else{\unskip\nobreak\hfil
-\penalty50\hskip1em\null\nobreak\hfil\squareforqed
-\parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi}
-
-\def\getsto{\mathrel{\mathchoice {\vcenter{\offinterlineskip
-\halign{\hfil
-$\displaystyle##$\hfil\cr\gets\cr\to\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr\gets
-\cr\to\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr\gets
-\cr\to\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr
-\gets\cr\to\cr}}}}}
-\def\lid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil
-$\displaystyle##$\hfil\cr<\cr\noalign{\vskip1.2pt}=\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr<\cr
-\noalign{\vskip1.2pt}=\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr<\cr
-\noalign{\vskip1pt}=\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr
-<\cr
-\noalign{\vskip0.9pt}=\cr}}}}}
-\def\gid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil
-$\displaystyle##$\hfil\cr>\cr\noalign{\vskip1.2pt}=\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr>\cr
-\noalign{\vskip1.2pt}=\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr>\cr
-\noalign{\vskip1pt}=\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr
->\cr
-\noalign{\vskip0.9pt}=\cr}}}}}
-\def\grole{\mathrel{\mathchoice {\vcenter{\offinterlineskip
-\halign{\hfil
-$\displaystyle##$\hfil\cr>\cr\noalign{\vskip-1pt}<\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr
->\cr\noalign{\vskip-1pt}<\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr
->\cr\noalign{\vskip-0.8pt}<\cr}}}
-{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr
->\cr\noalign{\vskip-0.3pt}<\cr}}}}}
-\def\bbbr{{\rm I\!R}} %reelle Zahlen
-\def\bbbm{{\rm I\!M}}
-\def\bbbn{{\rm I\!N}} %natuerliche Zahlen
-\def\bbbf{{\rm I\!F}}
-\def\bbbh{{\rm I\!H}}
-\def\bbbk{{\rm I\!K}}
-\def\bbbp{{\rm I\!P}}
-\def\bbbone{{\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l}
-{\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}}
-\def\bbbc{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm C$}\hbox{\hbox
-to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}
-{\setbox0=\hbox{$\textstyle\rm C$}\hbox{\hbox
-to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptstyle\rm C$}\hbox{\hbox
-to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptscriptstyle\rm C$}\hbox{\hbox
-to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}}}
-\def\bbbq{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm
-Q$}\hbox{\raise
-0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}}
-{\setbox0=\hbox{$\textstyle\rm Q$}\hbox{\raise
-0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptstyle\rm Q$}\hbox{\raise
-0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptscriptstyle\rm Q$}\hbox{\raise
-0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}}}}
-\def\bbbt{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm
-T$}\hbox{\hbox to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}
-{\setbox0=\hbox{$\textstyle\rm T$}\hbox{\hbox
-to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptstyle\rm T$}\hbox{\hbox
-to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptscriptstyle\rm T$}\hbox{\hbox
-to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}}}
-\def\bbbs{{\mathchoice
-{\setbox0=\hbox{$\displaystyle     \rm S$}\hbox{\raise0.5\ht0\hbox
-to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox
-to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}}
-{\setbox0=\hbox{$\textstyle        \rm S$}\hbox{\raise0.5\ht0\hbox
-to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox
-to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptstyle      \rm S$}\hbox{\raise0.5\ht0\hbox
-to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox
-to0pt{\kern0.5\wd0\vrule height0.45\ht0\hss}\box0}}
-{\setbox0=\hbox{$\scriptscriptstyle\rm S$}\hbox{\raise0.5\ht0\hbox
-to0pt{\kern0.4\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox
-to0pt{\kern0.55\wd0\vrule height0.45\ht0\hss}\box0}}}}
-\def\bbbz{{\mathchoice {\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}}
-{\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}}
-{\hbox{$\mathsf\scriptstyle Z\kern-0.3em Z$}}
-{\hbox{$\mathsf\scriptscriptstyle Z\kern-0.2em Z$}}}}
-
-\let\ts\,
-
-\setlength\leftmargini  {17\p@}
-\setlength\leftmargin    {\leftmargini}
-\setlength\leftmarginii  {\leftmargini}
-\setlength\leftmarginiii {\leftmargini}
-\setlength\leftmarginiv  {\leftmargini}
-\setlength  \labelsep  {.5em}
-\setlength  \labelwidth{\leftmargini}
-\addtolength\labelwidth{-\labelsep}
-
-\def\@listI{\leftmargin\leftmargini
-            \parsep 0\p@ \@plus1\p@ \@minus\p@
-            \topsep 8\p@ \@plus2\p@ \@minus4\p@
-            \itemsep0\p@}
-\let\@listi\@listI
-\@listi
-\def\@listii {\leftmargin\leftmarginii
-              \labelwidth\leftmarginii
-              \advance\labelwidth-\labelsep
-              \topsep    0\p@ \@plus2\p@ \@minus\p@}
-\def\@listiii{\leftmargin\leftmarginiii
-              \labelwidth\leftmarginiii
-              \advance\labelwidth-\labelsep
-              \topsep    0\p@ \@plus\p@\@minus\p@
-              \parsep    \z@
-              \partopsep \p@ \@plus\z@ \@minus\p@}
-
-\renewcommand\labelitemi{\normalfont\bfseries --}
-\renewcommand\labelitemii{$\m@th\bullet$}
-
-\setlength\arraycolsep{1.4\p@}
-\setlength\tabcolsep{1.4\p@}
-
-\def\tableofcontents{\chapter*{\contentsname\@mkboth{{\contentsname}}%
-                                                    {{\contentsname}}}
- \def\authcount##1{\setcounter{auco}{##1}\setcounter{@auth}{1}}
- \def\lastand{\ifnum\value{auco}=2\relax
-                 \unskip{} \andname\
-              \else
-                 \unskip \lastandname\
-              \fi}%
- \def\and{\stepcounter{@auth}\relax
-          \ifnum\value{@auth}=\value{auco}%
-             \lastand
-          \else
-             \unskip,
-          \fi}%
- \@starttoc{toc}\if@restonecol\twocolumn\fi}
-
-\def\l@part#1#2{\addpenalty{\@secpenalty}%
-   \addvspace{2em plus\p@}%  % space above part line
-   \begingroup
-     \parindent \z@
-     \rightskip \z@ plus 5em
-     \hrule\vskip5pt
-     \large               % same size as for a contribution heading
-     \bfseries\boldmath   % set line in boldface
-     \leavevmode          % TeX command to enter horizontal mode.
-     #1\par
-     \vskip5pt
-     \hrule
-     \vskip1pt
-     \nobreak             % Never break after part entry
-   \endgroup}
-
-\def\@dotsep{2}
-
-\def\hyperhrefextend{\ifx\hyper@anchor\@undefined\else
-{chapter.\thechapter}\fi}
-
-\def\addnumcontentsmark#1#2#3{%
-\addtocontents{#1}{\protect\contentsline{#2}{\protect\numberline
-                     {\thechapter}#3}{\thepage}\hyperhrefextend}}
-\def\addcontentsmark#1#2#3{%
-\addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}\hyperhrefextend}}
-\def\addcontentsmarkwop#1#2#3{%
-\addtocontents{#1}{\protect\contentsline{#2}{#3}{0}\hyperhrefextend}}
-
-\def\@adcmk[#1]{\ifcase #1 \or
-\def\@gtempa{\addnumcontentsmark}%
-  \or    \def\@gtempa{\addcontentsmark}%
-  \or    \def\@gtempa{\addcontentsmarkwop}%
-  \fi\@gtempa{toc}{chapter}}
-\def\addtocmark{\@ifnextchar[{\@adcmk}{\@adcmk[3]}}
-
-\def\l@chapter#1#2{\addpenalty{-\@highpenalty}
- \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip
- {\large\bfseries\boldmath#1}\ifx0#2\hfil\null
- \else
-      \nobreak
-      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern
-      \@dotsep mu$}\hfill
-      \nobreak\hbox to\@pnumwidth{\hss #2}%
- \fi\par
- \penalty\@highpenalty \endgroup}
-
-\def\l@title#1#2{\addpenalty{-\@highpenalty}
- \addvspace{8pt plus 1pt}
- \@tempdima \z@
- \begingroup
- \parindent \z@ \rightskip \@tocrmarg
- \parfillskip -\@tocrmarg
- \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip
- #1\nobreak
- \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern
- \@dotsep mu$}\hfill
- \nobreak\hbox to\@pnumwidth{\hss #2}\par
- \penalty\@highpenalty \endgroup}
-
-\setcounter{tocdepth}{0}
-\newdimen\tocchpnum
-\newdimen\tocsecnum
-\newdimen\tocsectotal
-\newdimen\tocsubsecnum
-\newdimen\tocsubsectotal
-\newdimen\tocsubsubsecnum
-\newdimen\tocsubsubsectotal
-\newdimen\tocparanum
-\newdimen\tocparatotal
-\newdimen\tocsubparanum
-\tocchpnum=\z@            % no chapter numbers
-\tocsecnum=15\p@          % section 88. plus 2.222pt
-\tocsubsecnum=23\p@       % subsection 88.8 plus 2.222pt
-\tocsubsubsecnum=27\p@    % subsubsection 88.8.8 plus 1.444pt
-\tocparanum=35\p@         % paragraph 88.8.8.8 plus 1.666pt
-\tocsubparanum=43\p@      % subparagraph 88.8.8.8.8 plus 1.888pt
-\def\calctocindent{%
-\tocsectotal=\tocchpnum
-\advance\tocsectotal by\tocsecnum
-\tocsubsectotal=\tocsectotal
-\advance\tocsubsectotal by\tocsubsecnum
-\tocsubsubsectotal=\tocsubsectotal
-\advance\tocsubsubsectotal by\tocsubsubsecnum
-\tocparatotal=\tocsubsubsectotal
-\advance\tocparatotal by\tocparanum}
-\calctocindent
-
-\def\l@section{\@dottedtocline{1}{\tocchpnum}{\tocsecnum}}
-\def\l@subsection{\@dottedtocline{2}{\tocsectotal}{\tocsubsecnum}}
-\def\l@subsubsection{\@dottedtocline{3}{\tocsubsectotal}{\tocsubsubsecnum}}
-\def\l@paragraph{\@dottedtocline{4}{\tocsubsubsectotal}{\tocparanum}}
-\def\l@subparagraph{\@dottedtocline{5}{\tocparatotal}{\tocsubparanum}}
-
-\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
- \fi\section*{\listfigurename\@mkboth{{\listfigurename}}{{\listfigurename}}}
- \@starttoc{lof}\if@restonecol\twocolumn\fi}
-\def\l@figure{\@dottedtocline{1}{0em}{1.5em}}
-
-\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
- \fi\section*{\listtablename\@mkboth{{\listtablename}}{{\listtablename}}}
- \@starttoc{lot}\if@restonecol\twocolumn\fi}
-\let\l@table\l@figure
-
-\renewcommand\listoffigures{%
-    \section*{\listfigurename
-      \@mkboth{\listfigurename}{\listfigurename}}%
-    \@starttoc{lof}%
-    }
-
-\renewcommand\listoftables{%
-    \section*{\listtablename
-      \@mkboth{\listtablename}{\listtablename}}%
-    \@starttoc{lot}%
-    }
-
-\ifx\oribibl\undefined
-\ifx\citeauthoryear\undefined
-\renewenvironment{thebibliography}[1]
-     {\section*{\refname}
-      \def\@biblabel##1{##1.}
-      \small
-      \list{\@biblabel{\@arabic\c@enumiv}}%
-           {\settowidth\labelwidth{\@biblabel{#1}}%
-            \leftmargin\labelwidth
-            \advance\leftmargin\labelsep
-            \if@openbib
-              \advance\leftmargin\bibindent
-              \itemindent -\bibindent
-              \listparindent \itemindent
-              \parsep \z@
-            \fi
-            \usecounter{enumiv}%
-            \let\p@enumiv\@empty
-            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
-      \if@openbib
-        \renewcommand\newblock{\par}%
-      \else
-        \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
-      \fi
-      \sloppy\clubpenalty4000\widowpenalty4000%
-      \sfcode`\.=\@m}
-     {\def\@noitemerr
-       {\@latex@warning{Empty `thebibliography' environment}}%
-      \endlist}
-\def\@lbibitem[#1]#2{\item[{[#1]}\hfill]\if@filesw
-     {\let\protect\noexpand\immediate
-     \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
-\newcount\@tempcntc
-\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
-  \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do
-    {\@ifundefined
-       {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bfseries
-        ?}\@warning
-       {Citation `\@citeb' on page \thepage \space undefined}}%
-    {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}%
-     \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne
-       \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}%
-     \else
-      \advance\@tempcntb\@ne
-      \ifnum\@tempcntb=\@tempcntc
-      \else\advance\@tempcntb\m@ne\@citeo
-      \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}}
-\def\@citeo{\ifnum\@tempcnta>\@tempcntb\else
-               \@citea\def\@citea{,\,\hskip\z@skip}%
-               \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else
-               {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else
-                \def\@citea{--}\fi
-      \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi}
-\else
-\renewenvironment{thebibliography}[1]
-     {\section*{\refname}
-      \small
-      \list{}%
-           {\settowidth\labelwidth{}%
-            \leftmargin\parindent
-            \itemindent=-\parindent
-            \labelsep=\z@
-            \if@openbib
-              \advance\leftmargin\bibindent
-              \itemindent -\bibindent
-              \listparindent \itemindent
-              \parsep \z@
-            \fi
-            \usecounter{enumiv}%
-            \let\p@enumiv\@empty
-            \renewcommand\theenumiv{}}%
-      \if@openbib
-        \renewcommand\newblock{\par}%
-      \else
-        \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
-      \fi
-      \sloppy\clubpenalty4000\widowpenalty4000%
-      \sfcode`\.=\@m}
-     {\def\@noitemerr
-       {\@latex@warning{Empty `thebibliography' environment}}%
-      \endlist}
-      \def\@cite#1{#1}%
-      \def\@lbibitem[#1]#2{\item[]\if@filesw
-        {\def\protect##1{\string ##1\space}\immediate
-      \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
-   \fi
-\else
-\@cons\@openbib@code{\noexpand\small}
-\fi
-
-\def\idxquad{\hskip 10\p@}% space that divides entry from number
-
-\def\@idxitem{\par\hangindent 10\p@}
-
-\def\subitem{\par\setbox0=\hbox{--\enspace}% second order
-                \noindent\hangindent\wd0\box0}% index entry
-
-\def\subsubitem{\par\setbox0=\hbox{--\,--\enspace}% third
-                \noindent\hangindent\wd0\box0}% order index entry
-
-\def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax}
-
-\renewenvironment{theindex}
-               {\@mkboth{\indexname}{\indexname}%
-                \thispagestyle{empty}\parindent\z@
-                \parskip\z@ \@plus .3\p@\relax
-                \let\item\par
-                \def\,{\relax\ifmmode\mskip\thinmuskip
-                             \else\hskip0.2em\ignorespaces\fi}%
-                \normalfont\small
-                \begin{multicols}{2}[\@makeschapterhead{\indexname}]%
-                }
-                {\end{multicols}}
-
-\renewcommand\footnoterule{%
-  \kern-3\p@
-  \hrule\@width 2truecm
-  \kern2.6\p@}
-  \newdimen\fnindent
-  \fnindent1em
-\long\def\@makefntext#1{%
-    \parindent \fnindent%
-    \leftskip \fnindent%
-    \noindent
-    \llap{\hb@xt@1em{\hss\@makefnmark\ }}\ignorespaces#1}
-
-\long\def\@makecaption#1#2{%
-  \vskip\abovecaptionskip
-  \sbox\@tempboxa{{\bfseries #1.} #2}%
-  \ifdim \wd\@tempboxa >\hsize
-    {\bfseries #1.} #2\par
-  \else
-    \global \@minipagefalse
-    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
-  \fi
-  \vskip\belowcaptionskip}
-
-\def\fps@figure{htbp}
-\def\fnum@figure{\figurename\thinspace\thefigure}
-\def \@floatboxreset {%
-        \reset@font
-        \small
-        \@setnobreak
-        \@setminipage
-}
-\def\fps@table{htbp}
-\def\fnum@table{\tablename~\thetable}
-\renewenvironment{table}
-               {\setlength\abovecaptionskip{0\p@}%
-                \setlength\belowcaptionskip{10\p@}%
-                \@float{table}}
-               {\end@float}
-\renewenvironment{table*}
-               {\setlength\abovecaptionskip{0\p@}%
-                \setlength\belowcaptionskip{10\p@}%
-                \@dblfloat{table}}
-               {\end@dblfloat}
-
-\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
-  ext@#1\endcsname}{#1}{\protect\numberline{\csname
-  the#1\endcsname}{\ignorespaces #2}}\begingroup
-    \@parboxrestore
-    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
-  \endgroup}
-
-% LaTeX does not provide a command to enter the authors institute
-% addresses. The \institute command is defined here.
-
-\newcounter{@inst}
-\newcounter{@auth}
-\newcounter{auco}
-\def\andname{and}
-\def\lastandname{\unskip, and}
-\newdimen\instindent
-\newbox\authrun
-\newtoks\authorrunning
-\newtoks\tocauthor
-\newbox\titrun
-\newtoks\titlerunning
-\newtoks\toctitle
-
-\def\clearheadinfo{\gdef\@author{No Author Given}%
-                   \gdef\@title{No Title Given}%
-                   \gdef\@subtitle{}%
-                   \gdef\@institute{No Institute Given}%
-                   \gdef\@thanks{}%
-                   \global\titlerunning={}\global\authorrunning={}%
-                   \global\toctitle={}\global\tocauthor={}}
-
-\def\institute#1{\gdef\@institute{#1}}
-
-\def\institutename{\par
- \begingroup
- \parskip=\z@
- \parindent=\z@
- \setcounter{@inst}{1}%
- \def\and{\par\stepcounter{@inst}%
- \noindent$^{\the@inst}$\enspace\ignorespaces}%
- \setbox0=\vbox{\def\thanks##1{}\@institute}%
- \ifnum\c@@inst=1\relax
- \else
-   \setcounter{footnote}{\c@@inst}%
-   \setcounter{@inst}{1}%
-   \noindent$^{\the@inst}$\enspace
- \fi
- \ignorespaces
- \@institute\par
- \endgroup}
-
-\def\@fnsymbol#1{\ensuremath{\ifcase#1\or\star\or{\star\star}\or
-   {\star\star\star}\or \dagger\or \ddagger\or
-   \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger
-   \or \ddagger\ddagger \else\@ctrerr\fi}}
-
-\def\inst#1{\unskip$^{#1}$}
-\def\fnmsep{\unskip$^,$}
-\def\email#1{{\tt#1}}
-\AtBeginDocument{\@ifundefined{url}{\def\url#1{#1}}{}}
-\def\homedir{\~{ }}
-
-\def\subtitle#1{\gdef\@subtitle{#1}}
-\clearheadinfo
-
-\renewcommand\maketitle{\newpage
-  \refstepcounter{chapter}%
-  \stepcounter{section}%
-  \setcounter{section}{0}%
-  \setcounter{subsection}{0}%
-  \setcounter{figure}{0}
-  \setcounter{table}{0}
-  \setcounter{equation}{0}
-  \setcounter{footnote}{0}%
-  \begingroup
-    \parindent=\z@
-    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
-    \if@twocolumn
-      \ifnum \col@number=\@ne
-        \@maketitle
-      \else
-        \twocolumn[\@maketitle]%
-      \fi
-    \else
-      \newpage
-      \global\@topnum\z@   % Prevents figures from going at top of page.
-      \@maketitle
-    \fi
-    \thispagestyle{empty}\@thanks
-%
-    \def\\{\unskip\ \ignorespaces}\def\inst##1{\unskip{}}%
-    \def\thanks##1{\unskip{}}\def\fnmsep{\unskip}%
-    \instindent=\hsize
-    \advance\instindent by-\headlineindent
-    \if!\the\toctitle!\addcontentsline{toc}{title}{\@title}\else
-       \addcontentsline{toc}{title}{\the\toctitle}\fi
-    \if@runhead
-       \if!\the\titlerunning!\else
-         \edef\@title{\the\titlerunning}%
-       \fi
-       \global\setbox\titrun=\hbox{\small\rm\unboldmath\ignorespaces\@title}%
-       \ifdim\wd\titrun>\instindent
-          \typeout{Title too long for running head. Please supply}%
-          \typeout{a shorter form with \string\titlerunning\space prior to
-                   \string\maketitle}%
-          \global\setbox\titrun=\hbox{\small\rm
-          Title Suppressed Due to Excessive Length}%
-       \fi
-       \xdef\@title{\copy\titrun}%
-    \fi
-%
-    \if!\the\tocauthor!\relax
-      {\def\and{\noexpand\protect\noexpand\and}%
-      \protected@xdef\toc@uthor{\@author}}%
-    \else
-      \def\\{\noexpand\protect\noexpand\newline}%
-      \protected@xdef\scratch{\the\tocauthor}%
-      \protected@xdef\toc@uthor{\scratch}%
-    \fi
-    \addtocontents{toc}{{\protect\raggedright\protect\leftskip15\p@
-    \protect\rightskip\@tocrmarg
-    \protect\itshape\toc@uthor\protect\endgraf}}%
-    \if@runhead
-       \if!\the\authorrunning!
-         \value{@inst}=\value{@auth}%
-         \setcounter{@auth}{1}%
-       \else
-         \edef\@author{\the\authorrunning}%
-       \fi
-       \global\setbox\authrun=\hbox{\small\unboldmath\@author\unskip}%
-       \ifdim\wd\authrun>\instindent
-          \typeout{Names of authors too long for running head. Please supply}%
-          \typeout{a shorter form with \string\authorrunning\space prior to
-                   \string\maketitle}%
-          \global\setbox\authrun=\hbox{\small\rm
-          Authors Suppressed Due to Excessive Length}%
-       \fi
-       \xdef\@author{\copy\authrun}%
-       \markboth{\@author}{\@title}%
-     \fi
-  \endgroup
-  \setcounter{footnote}{0}%
-  \clearheadinfo}
-%
-\def\@maketitle{\newpage
- \markboth{}{}%
- \def\lastand{\ifnum\value{@inst}=2\relax
-                 \unskip{} \andname\
-              \else
-                 \unskip \lastandname\
-              \fi}%
- \def\and{\stepcounter{@auth}\relax
-          \ifnum\value{@auth}=\value{@inst}%
-             \lastand
-          \else
-             \unskip,
-          \fi}%
- \begin{center}%
- {\Large \bfseries\boldmath
-  \pretolerance=10000
-  \@title \par}\vskip .8cm
-\if!\@subtitle!\else {\large \bfseries\boldmath
-  \vskip -.65cm
-  \pretolerance=10000
-  \@subtitle \par}\vskip .8cm\fi
- \setbox0=\vbox{\setcounter{@auth}{1}\def\and{\stepcounter{@auth}}%
- \def\thanks##1{}\@author}%
- \global\value{@inst}=\value{@auth}%
- \global\value{auco}=\value{@auth}%
- \setcounter{@auth}{1}%
-{\lineskip .5em
-\noindent\ignorespaces
-\@author\vskip.35cm}
- {\small\institutename}
- \end{center}%
- }
-
-% definition of the "\spnewtheorem" command.
-%
-% Usage:
-%
-%     \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font}
-% or  \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font}
-% or  \spnewtheorem*{env_nam}{caption}{cap_font}{body_font}
-%
-% New is "cap_font" and "body_font". It stands for
-% fontdefinition of the caption and the text itself.
-%
-% "\spnewtheorem*" gives a theorem without number.
-%
-% A defined spnewthoerem environment is used as described
-% by Lamport.
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\@thmcountersep{}
-\def\@thmcounterend{.}
-
-\def\spnewtheorem{\@ifstar{\@sthm}{\@Sthm}}
-
-% definition of \spnewtheorem with number
-
-\def\@spnthm#1#2{%
-  \@ifnextchar[{\@spxnthm{#1}{#2}}{\@spynthm{#1}{#2}}}
-\def\@Sthm#1{\@ifnextchar[{\@spothm{#1}}{\@spnthm{#1}}}
-
-\def\@spxnthm#1#2[#3]#4#5{\expandafter\@ifdefinable\csname #1\endcsname
-   {\@definecounter{#1}\@addtoreset{#1}{#3}%
-   \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand
-     \csname the#3\endcsname \noexpand\@thmcountersep \@thmcounter{#1}}%
-   \expandafter\xdef\csname #1name\endcsname{#2}%
-   \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}%
-                              \global\@namedef{end#1}{\@endtheorem}}}
-
-\def\@spynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname
-   {\@definecounter{#1}%
-   \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
-   \expandafter\xdef\csname #1name\endcsname{#2}%
-   \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#3}{#4}}%
-                               \global\@namedef{end#1}{\@endtheorem}}}
-
-\def\@spothm#1[#2]#3#4#5{%
-  \@ifundefined{c@#2}{\@latexerr{No theorem environment `#2' defined}\@eha}%
-  {\expandafter\@ifdefinable\csname #1\endcsname
-  {\global\@namedef{the#1}{\@nameuse{the#2}}%
-  \expandafter\xdef\csname #1name\endcsname{#3}%
-  \global\@namedef{#1}{\@spthm{#2}{\csname #1name\endcsname}{#4}{#5}}%
-  \global\@namedef{end#1}{\@endtheorem}}}}
-
-\def\@spthm#1#2#3#4{\topsep 7\p@ \@plus2\p@ \@minus4\p@
-\refstepcounter{#1}%
-\@ifnextchar[{\@spythm{#1}{#2}{#3}{#4}}{\@spxthm{#1}{#2}{#3}{#4}}}
-
-\def\@spxthm#1#2#3#4{\@spbegintheorem{#2}{\csname the#1\endcsname}{#3}{#4}%
-                    \ignorespaces}
-
-\def\@spythm#1#2#3#4[#5]{\@spopargbegintheorem{#2}{\csname
-       the#1\endcsname}{#5}{#3}{#4}\ignorespaces}
-
-\def\@spbegintheorem#1#2#3#4{\trivlist
-                 \item[\hskip\labelsep{#3#1\ #2\@thmcounterend}]#4}
-
-\def\@spopargbegintheorem#1#2#3#4#5{\trivlist
-      \item[\hskip\labelsep{#4#1\ #2}]{#4(#3)\@thmcounterend\ }#5}
-
-% definition of \spnewtheorem* without number
-
-\def\@sthm#1#2{\@Ynthm{#1}{#2}}
-
-\def\@Ynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname
-   {\global\@namedef{#1}{\@Thm{\csname #1name\endcsname}{#3}{#4}}%
-    \expandafter\xdef\csname #1name\endcsname{#2}%
-    \global\@namedef{end#1}{\@endtheorem}}}
-
-\def\@Thm#1#2#3{\topsep 7\p@ \@plus2\p@ \@minus4\p@
-\@ifnextchar[{\@Ythm{#1}{#2}{#3}}{\@Xthm{#1}{#2}{#3}}}
-
-\def\@Xthm#1#2#3{\@Begintheorem{#1}{#2}{#3}\ignorespaces}
-
-\def\@Ythm#1#2#3[#4]{\@Opargbegintheorem{#1}
-       {#4}{#2}{#3}\ignorespaces}
-
-\def\@Begintheorem#1#2#3{#3\trivlist
-                           \item[\hskip\labelsep{#2#1\@thmcounterend}]}
-
-\def\@Opargbegintheorem#1#2#3#4{#4\trivlist
-      \item[\hskip\labelsep{#3#1}]{#3(#2)\@thmcounterend\ }}
-
-\if@envcntsect
-   \def\@thmcountersep{.}
-   \spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape}
-\else
-   \spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape}
-   \if@envcntreset
-      \@addtoreset{theorem}{section}
-   \else
-      \@addtoreset{theorem}{chapter}
-   \fi
-\fi
-
-%definition of divers theorem environments
-\spnewtheorem*{claim}{Claim}{\itshape}{\rmfamily}
-\spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily}
-\if@envcntsame % alle Umgebungen wie Theorem.
-   \def\spn@wtheorem#1#2#3#4{\@spothm{#1}[theorem]{#2}{#3}{#4}}
-\else % alle Umgebungen mit eigenem Zaehler
-   \if@envcntsect % mit section numeriert
-      \def\spn@wtheorem#1#2#3#4{\@spxnthm{#1}{#2}[section]{#3}{#4}}
-   \else % nicht mit section numeriert
-      \if@envcntreset
-         \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4}
-                                   \@addtoreset{#1}{section}}
-      \else
-         \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4}
-                                   \@addtoreset{#1}{chapter}}%
-      \fi
-   \fi
-\fi
-\spn@wtheorem{case}{Case}{\itshape}{\rmfamily}
-\spn@wtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily}
-\spn@wtheorem{corollary}{Corollary}{\bfseries}{\itshape}
-\spn@wtheorem{definition}{Definition}{\bfseries}{\itshape}
-\spn@wtheorem{example}{Example}{\itshape}{\rmfamily}
-\spn@wtheorem{exercise}{Exercise}{\itshape}{\rmfamily}
-\spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape}
-\spn@wtheorem{note}{Note}{\itshape}{\rmfamily}
-\spn@wtheorem{problem}{Problem}{\itshape}{\rmfamily}
-\spn@wtheorem{property}{Property}{\itshape}{\rmfamily}
-\spn@wtheorem{proposition}{Proposition}{\bfseries}{\itshape}
-\spn@wtheorem{question}{Question}{\itshape}{\rmfamily}
-\spn@wtheorem{solution}{Solution}{\itshape}{\rmfamily}
-\spn@wtheorem{remark}{Remark}{\itshape}{\rmfamily}
-
-\def\@takefromreset#1#2{%
-    \def\@tempa{#1}%
-    \let\@tempd\@elt
-    \def\@elt##1{%
-        \def\@tempb{##1}%
-        \ifx\@tempa\@tempb\else
-            \@addtoreset{##1}{#2}%
-        \fi}%
-    \expandafter\expandafter\let\expandafter\@tempc\csname cl@#2\endcsname
-    \expandafter\def\csname cl@#2\endcsname{}%
-    \@tempc
-    \let\@elt\@tempd}
-
-\def\theopargself{\def\@spopargbegintheorem##1##2##3##4##5{\trivlist
-      \item[\hskip\labelsep{##4##1\ ##2}]{##4##3\@thmcounterend\ }##5}
-                  \def\@Opargbegintheorem##1##2##3##4{##4\trivlist
-      \item[\hskip\labelsep{##3##1}]{##3##2\@thmcounterend\ }}
-      }
-
-\renewenvironment{abstract}{%
-      \list{}{\advance\topsep by0.35cm\relax\small
-      \leftmargin=1cm
-      \labelwidth=\z@
-      \listparindent=\z@
-      \itemindent\listparindent
-      \rightmargin\leftmargin}\item[\hskip\labelsep
-                                    \bfseries\abstractname]}
-    {\endlist}
-\renewcommand{\abstractname}{Abstract.}
-\renewcommand{\contentsname}{Table of Contents}
-\renewcommand{\figurename}{Fig.}
-\renewcommand{\tablename}{Table}
-
-\newdimen\headlineindent             % dimension for space between
-\headlineindent=1.166cm              % number and text of headings.
-
-\def\ps@headings{\let\@mkboth\@gobbletwo
-   \let\@oddfoot\@empty\let\@evenfoot\@empty
-   \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}%
-                  \leftmark\hfil}
-   \def\@oddhead{\normalfont\small\hfil\rightmark\hspace{\headlineindent}%
-                 \llap{\thepage}}
-   \def\chaptermark##1{}%
-   \def\sectionmark##1{}%
-   \def\subsectionmark##1{}}
-
-\def\ps@titlepage{\let\@mkboth\@gobbletwo
-   \let\@oddfoot\@empty\let\@evenfoot\@empty
-   \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}%
-                  \hfil}
-   \def\@oddhead{\normalfont\small\hfil\hspace{\headlineindent}%
-                 \llap{\thepage}}
-   \def\chaptermark##1{}%
-   \def\sectionmark##1{}%
-   \def\subsectionmark##1{}}
-
-\if@runhead\ps@headings\else
-\ps@empty\fi
-
-\setlength\arraycolsep{1.4\p@}
-\setlength\tabcolsep{1.4\p@}
-
-\endinput
index ff307e80fcac3b657baa5670bcfb1f185d004157..ddcc9e6ced7f85eaf4df0faf4b58068c9ebc6082 100644 (file)
@@ -1,12 +1,12 @@
-\documentclass[a4paper]{llncs}
-\pagestyle{headings}
+\documentclass{kluwer}
 \usepackage{color}
 \usepackage{graphicx}
-\usepackage{amssymb,amsmath}
+\usepackage{amssymb,amsmath}
 \usepackage{hyperref}
-\usepackage{picins}
+\usepackage{picins}
 \usepackage{color}
 \usepackage{fancyvrb}
+\usepackage[show]{ed}
 
 \definecolor{gray}{gray}{0.85}
 %\newcommand{\logo}[3]{
    \fcolorbox{black}{gray}{\BUseVerbatim[boxwidth=0.9\linewidth]{boxtmp}}
   \end{center}}
 
+\newcounter{example}
+\newenvironment{example}{\stepcounter{example}\emph{Example} \arabic{example}.}
+ {}
 \newcommand{\ASSIGNEDTO}[1]{\textbf{Assigned to:} #1}
 \newcommand{\FILE}[1]{\texttt{#1}}
-\newcommand{\NOTE}[1]{\marginpar{\scriptsize #1}}
+% \newcommand{\NOTE}[1]{\ifodd \arabic{page} \else \hspace{-2cm}\fi\ednote{#1}}
+\newcommand{\NOTE}[1]{\ednote{x~\hspace{-10cm}y#1}{foo}}
 \newcommand{\TODO}[1]{\textbf{TODO: #1}}
 
 \newsavebox{\tmpxyz}
    \fcolorbox{black}{gray}{\usebox{\tmpxyz}}
   \end{center}}
 
+\bibliographystyle{plain}
+
+\begin{document}
+
+\begin{opening}
+
 \title{The Matita proof assistant}
+\runningtitle{The Matita proof assistant}
+
 \author{Andrea Asperti, Claudio Sacerdoti Coen, Enrico Tassi
  and Stefano Zacchiroli}
+\runningauthor{Andrea Asperti, Claudio Sacerdoti Coen, Enrico Tassi
+ and Stefano Zacchiroli}
+
 \institute{Department of Computer Science, University of Bologna\\
  Mura Anteo Zamboni, 7 --- 40127 Bologna, ITALY\\
  \email{$\{$asperti,sacerdot,tassi,zacchiro$\}$@cs.unibo.it}}
-\bibliographystyle{plain}
 
-\begin{document}
-\maketitle
+\date{data}
 
 \begin{abstract}
+ abstract qui
 \end{abstract}
 
+\keywords{parole, chiave}
+
+\end{opening}
+
 \section{Introduction}
 \label{sec:intro}
 {\em Matita} is the proof assistant under development by the \HELM{} team
@@ -221,292 +239,34 @@ reduce our code in sensible way).\NOTE{righe\\\COQ{}}
   \end{itemize}
 \end{itemize}
 
-\section{Features}
+\section{\HELM{} library(??)}
 
-\subsection{mathml}
-\ASSIGNEDTO{zack}
-
-\subsection{metavariabili}
-\label{sec:metavariables}
+\subsection{libreria tutta visibile}
 \ASSIGNEDTO{csc}
 
-\subsection{pattern}
-\ASSIGNEDTO{gares}\\
-Patterns are the textual counterpart of the MathML widget graphical
-selection.
-
-Matita benefits of a graphical interface and a powerful MathML rendering
-widget that allows the user to select pieces of the sequent he is working
-on. While this is an extremely intuitive way for the user to
-restrict the application of tactics, for example, to some subterms of the
-conclusion or some hypothesis, the way this action is recorded to the text
-script is not obvious.\\
-In \MATITA{} this issue is addressed by patterns.
-
-\subsubsection{Pattern syntax}
-A pattern is composed of two terms: a $\NT{sequent\_path}$ and a
-$\NT{wanted}$.
-The former mocks-up a sequent, discharging unwanted subterms with $?$ and
-selecting the interesting parts with the placeholder $\%$. 
-The latter is a term that lives in the context of the placeholders.
-
-The concrete syntax is reported in table \ref{tab:pathsyn}
-\NOTE{uso nomi diversi \\dalla grammatica \\ ma che hanno + senso}
-\begin{table}
- \caption{\label{tab:pathsyn} Concrete syntax of \MATITA{} patterns.\strut}
-\hrule
-\[
-\begin{array}{@{}rcll@{}}
-  \NT{pattern} & 
-    ::= & [~\verb+in match+~\NT{wanted}~]~[~\verb+in+~\NT{sequent\_path}~] & \\
-  \NT{sequent\_path} & 
-    ::= & \{~\NT{ident}~[~\verb+:+~\NT{multipath}~]~\}~
-      [~\verb+\vdash+~\NT{multipath}~] & \\
-  \NT{wanted} & ::= & \NT{term} & \\
-  \NT{multipath} & ::= & \NT{term\_with\_placeholders} & \\
-\end{array}
-\]
-\hrule
-\end{table}
-
-\subsubsection{How patterns work}
-Patterns mimic the user's selection in two steps. The first one
-selects roots (subterms) of the sequent, using the
-$\NT{sequent\_path}$,  while the second 
-one searches the $\NT{wanted}$ term starting from these roots. Both are
-optional steps, and by convention the empty pattern selects the whole
-conclusion.
-
-\begin{description}
-\item[Phase 1]
-  concerns only the $[~\verb+in+~\NT{sequent\_path}~]$
-  part of the syntax. $\NT{ident}$ is an hypothesis name and
-  selects the assumption where the following optional $\NT{multipath}$
-  will operate. \verb+\vdash+ can be considered the name for the goal.
-  If the whole pattern is omitted, the whole goal will be selected.
-  If one or more hypotheses names are given the selection is restricted to 
-  these assumptions. If a $\NT{multipath}$ is omitted the whole
-  assumption is selected. Remember that the user can be mostly
-  unaware of this syntax, since the system is able to write down a 
-  $\NT{sequent\_path}$ starting from a visual selection.
-  \NOTE{Questo ancora non va\\in matita}
-
-  A $\NT{multipath}$ is a CiC term in which a special constant $\%$
-  is allowed.
-  The roots of discharged subterms are marked with $?$, while $\%$
-  is used to select roots. The default $\NT{multipath}$, the one that
-  selects the whole term, is simply $\%$.
-  Valid $\NT{multipath}$ are, for example, $(?~\%~?)$ or $\%~\verb+\to+~(\%~?)$
-  that respectively select the first argument of an application or
-  the source of an arrow and the head of the application that is
-  found in the arrow target.
-
-  The first phase selects not only terms (roots of subterms) but also 
-  their context that will be eventually used in the second phase.
-
-\item[Phase 2] 
-  plays a role only if the $[~\verb+in match+~\NT{wanted}~]$
-  part is specified. From the first phase we have some terms, that we
-  will see as subterm roots, and their context. For each of these
-  contexts the $\NT{wanted}$ term is disambiguated in it and the
-  corresponding root is searched for a subterm $\alpha$-equivalent to
-  $\NT{wanted}$. The result of this search is the selection the
-  pattern represents.
-
-\end{description}
-
-\noindent
-Since the first step is equipotent to the composition of the two
-steps, the system uses it to represent each visual selection.
-The second step is only meant for the
-experienced user that writes patterns by hand, since it really
-helps in writing concise patterns as we will see in the
-following examples.
-
-\subsubsection{Examples}
-To explain how the first step works let's give an example. Consider
-you want to prove the uniqueness of the identity element $0$ for natural
-sum, and that you can relay on the previously demonstrated left
-injectivity of the sum, that is $inj\_plus\_l:\forall x,y,z.x+y=z+y \to x =z$.
-Typing
-\begin{grafite}
-theorem valid_name: \forall n,m. m + n = n \to m = O.
-  intros (n m H).
-\end{grafite}
-\noindent
-leads you to the following sequent 
-\sequent{
-n:nat\\
-m:nat\\
-H: m + n = n}{
-m=O
-}
-\noindent
-where you want to change the right part of the equivalence of the $H$
-hypothesis with $O + n$ and then use $inj\_plus\_l$ to prove $m=O$.
-\begin{grafite}
-  change in H:(? ? ? %) with (O + n).
-\end{grafite}
-\noindent
-This pattern, that is a simple instance of the $\NT{sequent\_path}$
-grammar entry, acts on $H$ that has type (without notation) $(eq~nat~(m+n)~n)$
-and discharges the head of the application and the first two arguments with a
-$?$ and selects the last argument with $\%$. The syntax may seem uncomfortable,
-but the user can simply select with the mouse the right part of the equivalence
-and left to the system the burden of writing down in the script file the
-corresponding pattern with $?$ and $\%$ in the right place (that is not
-trivial, expecially where implicit arguments are hidden by the notation, like
-the type $nat$ in this example).
-
-Changing all the occurrences of $n$ in the hypothesis $H$ with $O+n$ 
-works too and can be done, by the experienced user, writing directly
-a simpler pattern that uses the second phase.
-\begin{grafite}
-  change in match n in H with (O + n).
-\end{grafite}
-\noindent
-In this case the $\NT{sequent\_path}$ selects the whole $H$, while
-the second phase searches the wanted $n$ inside it by
-$\alpha$-equivalence. The resulting
-equivalence will be $m+(O+n)=O+n$ since the second phase found two
-occurrences of $n$ in $H$ and the tactic changed both.
-
-Just for completeness the second pattern is equivalent to the
-following one, that is less readable but uses only the first phase.
-\begin{grafite}
-  change in H:(? ? (? ? %) %) with (O + n).
-\end{grafite}
-\noindent
-
-\subsubsection{Tactics supporting patterns}
-In \MATITA{} all the tactics that can be restricted to subterm of the working
-sequent accept the pattern syntax. In particular these tactics are: simplify,
-change, fold, unfold, generalize, replace and rewrite.
-
-\NOTE{attualmente rewrite e \\ fold non supportano \\ phase 2. per
-supportarlo\\bisogna far loro trasformare\\il pattern phase1+phase2\\
-in un pattern phase1only\\come faccio nell'ultimo esempio.\\lo si fa
-con una pattern\_of(select(pattern))}
-
-\subsubsection{Comparison with Coq}
-Coq has a two diffrent ways of restricting the application of tactis to
-subterms of the sequent, both relaying on the same special syntax to identify
-a term occurrence.
-
-The first way is to use this special syntax to specify directly to the
-tactic the occurrnces of a wanted term that should be affected, while
-the second is to prepare the sequent with another tactic called
-pattern and the apply the real tactic. Note that the choice is not
-left to the user, since some tactics needs the sequent to be prepared
-with pattern and do not accept directly this special syntax.
-
-The base idea is that to identify a subterm of the sequent we can
-write it and say that we want, for example, the third and the fifth
-occurce of it (counting from left to right). In our previous example,
-to change only the left part of the equivalence, the correct command
-is
-\begin{grafite}
-  change n at 2 in H with (O + n)
-\end{grafite} 
-\noindent
-meaning that in the hypothesis $H$ the $n$ we want to change is the
-second we encounter proceeding from left toright.
-
-The tactic pattern computes a
-$\beta$-expansion of a part of the sequent with respect to some
-occurrences of the given term. In the previous example the following
-command
-\begin{grafite}
-  pattern n at 2 in H
-\end{grafite}
-\noindent
-would have resulted in this sequent
-\begin{grafite}
-  n : nat
-  m : nat
-  H : (fun n0 : nat => m + n = n0) n
-  ============================
-   m = 0
-\end{grafite}
-\noindent
-where $H$ is $\beta$-expanded over the second $n$
-occurrence. This is a trick to make the unification algorithm ignore
-the head of the application (since the unification is essentially
-first-order) but normally operate on the arguments. 
-This works for some tactics, like rewrite and replace,
-but for example not for change and other tactics that do not relay on
-unification. 
+\subsection{ricerca e indicizzazione}
+\label{sec:metadata}
+\ASSIGNEDTO{andrea}
 
-The idea behind this way of identifying subterms in not really far
-from the idea behind patterns, but really fails in extending to
-complex notation, since it relays on a mono-dimensional sequent representation.
-Real math notation places arguments upside-down (like in indexed sums or
-integrations) or even puts them inside a bidimensional matrix.  
-In these cases using the mouse to select the wanted term is probably the 
-only way to tell the system exactly what you want to do. 
+\subsection{auto}
+\ASSIGNEDTO{andrea}
 
-One of the goals of \MATITA{} is to use modern publishing techiques, and
-adopting a method for restricting tactics application domain that discourages 
-using heavy math notation, would definitively be a bad choice.
+\subsection{sostituzioni esplicite vs moduli}
+\ASSIGNEDTO{csc}
 
-\subsection{tatticali}
+\subsection{xml / gestione della libreria}
 \ASSIGNEDTO{gares}
 
-\begin{verbatim}
 
-\end{verbatim}
+\section{User Interface (da cambiare)}
+
+\subsection{assenza di proof tree / resa in linguaggio naturale}
+\ASSIGNEDTO{andrea}
 
 \subsection{Disambiguation}
 \label{sec:disambiguation}
 \ASSIGNEDTO{zack}
 
-\begin{table}
- \caption{\label{tab:termsyn} Concrete syntax of CIC terms: built-in
- notation\strut}
-\hrule
-\[
-\begin{array}{@{}rcll@{}}
-  \NT{term} & ::= & & \mbox{\bf terms} \\
-    &     & x & \mbox{(identifier)} \\
-    &  |  & n & \mbox{(number)} \\
-    &  |  & s & \mbox{(symbol)} \\
-    &  |  & \mathrm{URI} & \mbox{(URI)} \\
-    &  |  & \verb+_+ & \mbox{(implicit)}\TODO{sync} \\
-    &  |  & \verb+?+n~[\verb+[+~\{\NT{subst}\}~\verb+]+] & \mbox{(meta)} \\
-    &  |  & \verb+let+~\NT{ptname}~\verb+\def+~\NT{term}~\verb+in+~\NT{term} \\
-    &  |  & \verb+let+~\NT{kind}~\NT{defs}~\verb+in+~\NT{term} \\
-    &  |  & \NT{binder}~\{\NT{ptnames}\}^{+}~\verb+.+~\NT{term} \\
-    &  |  & \NT{term}~\NT{term} & \mbox{(application)} \\
-    &  |  & \verb+Prop+ \mid \verb+Set+ \mid \verb+Type+ \mid \verb+CProp+ & \mbox{(sort)} \\
-    &  |  & \verb+match+~\NT{term}~ & \mbox{(pattern matching)} \\
-    &     & ~ ~ [\verb+[+~\verb+in+~x~\verb+]+]
-             ~ [\verb+[+~\verb+return+~\NT{term}~\verb+]+] \\
-    &     & ~ ~ \verb+with [+~[\NT{rule}~\{\verb+|+~\NT{rule}\}]~\verb+]+ & \\
-    &  |  & \verb+(+~\NT{term}~\verb+:+~\NT{term}~\verb+)+ & \mbox{(cast)} \\
-    &  |  & \verb+(+~\NT{term}~\verb+)+ \\
-  \NT{defs}  & ::= & & \mbox{\bf mutual definitions} \\
-    &     & \NT{fun}~\{\verb+and+~\NT{fun}\} \\
-  \NT{fun} & ::= & & \mbox{\bf functions} \\
-    &     & \NT{arg}~\{\NT{ptnames}\}^{+}~[\verb+on+~x]~\verb+\def+~\NT{term} \\
-  \NT{binder} & ::= & & \mbox{\bf binders} \\
-    &     & \verb+\forall+ \mid \verb+\lambda+ \\
-  \NT{arg} & ::= & & \mbox{\bf single argument} \\
-    &     & \verb+_+ \mid x \\
-  \NT{ptname} & ::= & & \mbox{\bf possibly typed name} \\
-    &     & \NT{arg} \\
-    &  |  & \verb+(+~\NT{arg}~\verb+:+~\NT{term}~\verb+)+ \\
-  \NT{ptnames} & ::= & & \mbox{\bf bound variables} \\
-    &     & \NT{arg} \\
-    &  |  & \verb+(+~\NT{arg}~\{\verb+,+~\NT{arg}\}~[\verb+:+~\NT{term}]~\verb+)+ \\
-  \NT{kind} & ::= & & \mbox{\bf induction kind} \\
-    &     & \verb+rec+ \mid \verb+corec+ \\
-  \NT{rule} & ::= & & \mbox{\bf rules} \\
-    &     & x~\{\NT{ptname}\}~\verb+\Rightarrow+~\NT{term}
-\end{array}
-\]
-\hrule
-\end{table}
-
 \subsubsection{Term input}
 
 The primary form of user interaction employed by \MATITA{} is textual script
@@ -626,8 +386,8 @@ Number interpretation functions can be defined in OCaml or directly using
 \TODO{notazione per i numeri}.
 
 \emph{Operators} (question 3) are intuitively head of applications, as such they
-are always applied to a non empty sequence of arguments. Their ambiguity is a
-need since it is often the case that some notation is used in an overloaded
+are always applied to a (possiblt empty) sequence of arguments. Their ambiguity
+is a need since it is often the case that some notation is used in an overloaded
 fashion to hide the use of different CIC constants which encodes similar
 concepts. For example, in the standard library of \MATITA{} the infix \texttt{+}
 notation is available building a binary \texttt{Op(+)} node, whose
@@ -668,7 +428,6 @@ polymorhpic equality.
       gia' parlato\\
       di refine}
 
-
 A \emph{disambiguation algorithm} takes as input a content level term and return
 a fully determined CIC term. The key observation on which a disambiguation
 algorithm is based is that given a content level term with more than one sources
@@ -678,7 +437,8 @@ interpretation of \texttt{ln} as a function from \IR to \IR and the
 interpretation of \texttt{1} as the Peano number $1$ can't coexists. The notion
 of ``can't coexists'' in the disambiguation of \MATITA{} is inherited from the
 refiner described in Sect.~\ref{sec:metavariables}: as long as
-$\mathit{refine}(c)\neq\bot$, the combination of interpretation which led to $c$
+$\mathit{refine}(c)\neq\epsilon$, the combination of interpretation which led to
+$c$
 can coexists.
 
 The \emph{naive disambiguation algorithm} takes as input a content level term
@@ -694,7 +454,7 @@ $t$ and proceeds as follows:
   interpretation for $t$. Given $t$ and an interpretation $\Phi$, a CIC term is
   fully determined. Iterate over all possible interpretations of $t$ and refine
   the corresponding CIC terms, keep only interpretations which lead to CIC terms
-  $c$ s.t. $\mathit{refine}(c)\neq\bot$ (i.e. interpretations that determine
+  $c$ s.t. $\mathit{refine}(c)\neq\epsilon$ (i.e. interpretations that determine
   typable terms).
 
  \item Let $n$ be the number of interpretations who survived step 2. If $n=0$
@@ -711,6 +471,10 @@ interpretations $\Phi$ grows exponentially with the number of ambiguity sources.
 The actual algorithm used in \MATITA{} is far more efficient being, in the
 average case, linear in the number of ambiguity sources.
 
+The efficient algorithm --- thoroughly described along with an analysis of its
+complexity in~\cite{disambiguation} --- exploit the refiner and the metavariable
+extension (Sect.~\ref{sec:metavariables}) of the calculus used in \MATITA.
+
 \TODO{FINQUI}
 
 The efficient algorithm can be applied if the logic can be extended with
@@ -761,34 +525,249 @@ Details of the disambiguation algorithm of \WHELP{} can
 be found in~\cite{disambiguation}, where an equivalent algorithm
 that avoids backtracking is also presented.
 
+
 \subsection{notazione}
 \label{sec:notation}
 \ASSIGNEDTO{zack}
 
-\subsection{libreria tutta visibile}
-\ASSIGNEDTO{csc}
+\subsection{mathml}
+\ASSIGNEDTO{zack}
 
-\subsection{ricerca e indicizzazione}
-\label{sec:metadata}
-\ASSIGNEDTO{andrea}
+\subsection{selezione semantica, cut paste, hyperlink}
+\ASSIGNEDTO{zack}
 
-\subsection{auto}
-\ASSIGNEDTO{andrea}
+\subsection{pattern}
+\ASSIGNEDTO{gares}\\
+Patterns are the textual counterpart of the MathML widget graphical
+selection.
 
-\subsection{xml / gestione della libreria}
+Matita benefits of a graphical interface and a powerful MathML rendering
+widget that allows the user to select pieces of the sequent he is working
+on. While this is an extremely intuitive way for the user to
+restrict the application of tactics, for example, to some subterms of the
+conclusion or some hypothesis, the way this action is recorded to the text
+script is not obvious.\\
+In \MATITA{} this issue is addressed by patterns.
+
+\subsubsection{Pattern syntax}
+A pattern is composed of two terms: a $\NT{sequent\_path}$ and a
+$\NT{wanted}$.
+The former mocks-up a sequent, discharging unwanted subterms with $?$ and
+selecting the interesting parts with the placeholder $\%$. 
+The latter is a term that lives in the context of the placeholders.
+
+The concrete syntax is reported in table \ref{tab:pathsyn}
+\NOTE{uso nomi diversi \\dalla grammatica \\ ma che hanno + senso}
+\begin{table}
+ \caption{\label{tab:pathsyn} Concrete syntax of \MATITA{} patterns.\strut}
+\hrule
+\[
+\begin{array}{@{}rcll@{}}
+  \NT{pattern} & 
+    ::= & [~\verb+in match+~\NT{wanted}~]~[~\verb+in+~\NT{sequent\_path}~] & \\
+  \NT{sequent\_path} & 
+    ::= & \{~\NT{ident}~[~\verb+:+~\NT{multipath}~]~\}~
+      [~\verb+\vdash+~\NT{multipath}~] & \\
+  \NT{wanted} & ::= & \NT{term} & \\
+  \NT{multipath} & ::= & \NT{term\_with\_placeholders} & \\
+\end{array}
+\]
+\hrule
+\end{table}
+
+\subsubsection{How patterns work}
+Patterns mimic the user's selection in two steps. The first one
+selects roots (subterms) of the sequent, using the
+$\NT{sequent\_path}$,  while the second 
+one searches the $\NT{wanted}$ term starting from these roots. Both are
+optional steps, and by convention the empty pattern selects the whole
+conclusion.
+
+\begin{description}
+\item[Phase 1]
+  concerns only the $[~\verb+in+~\NT{sequent\_path}~]$
+  part of the syntax. $\NT{ident}$ is an hypothesis name and
+  selects the assumption where the following optional $\NT{multipath}$
+  will operate. \verb+\vdash+ can be considered the name for the goal.
+  If the whole pattern is omitted, the whole goal will be selected.
+  If one or more hypotheses names are given the selection is restricted to 
+  these assumptions. If a $\NT{multipath}$ is omitted the whole
+  assumption is selected. Remember that the user can be mostly
+  unaware of this syntax, since the system is able to write down a 
+  $\NT{sequent\_path}$ starting from a visual selection.
+  \NOTE{Questo ancora non va\\in matita}
+
+  A $\NT{multipath}$ is a CiC term in which a special constant $\%$
+  is allowed.
+  The roots of discharged subterms are marked with $?$, while $\%$
+  is used to select roots. The default $\NT{multipath}$, the one that
+  selects the whole term, is simply $\%$.
+  Valid $\NT{multipath}$ are, for example, $(?~\%~?)$ or $\%~\verb+\to+~(\%~?)$
+  that respectively select the first argument of an application or
+  the source of an arrow and the head of the application that is
+  found in the arrow target.
+
+  The first phase selects not only terms (roots of subterms) but also 
+  their context that will be eventually used in the second phase.
+
+\item[Phase 2] 
+  plays a role only if the $[~\verb+in match+~\NT{wanted}~]$
+  part is specified. From the first phase we have some terms, that we
+  will see as subterm roots, and their context. For each of these
+  contexts the $\NT{wanted}$ term is disambiguated in it and the
+  corresponding root is searched for a subterm $\alpha$-equivalent to
+  $\NT{wanted}$. The result of this search is the selection the
+  pattern represents.
+
+\end{description}
+
+\noindent
+Since the first step is equipotent to the composition of the two
+steps, the system uses it to represent each visual selection.
+The second step is only meant for the
+experienced user that writes patterns by hand, since it really
+helps in writing concise patterns as we will see in the
+following examples.
+
+\subsubsection{Examples}
+To explain how the first step works let's give an example. Consider
+you want to prove the uniqueness of the identity element $0$ for natural
+sum, and that you can relay on the previously demonstrated left
+injectivity of the sum, that is $inj\_plus\_l:\forall x,y,z.x+y=z+y \to x =z$.
+Typing
+\begin{grafite}
+theorem valid_name: \forall n,m. m + n = n \to m = O.
+  intros (n m H).
+\end{grafite}
+\noindent
+leads you to the following sequent 
+\sequent{
+n:nat\\
+m:nat\\
+H: m + n = n}{
+m=O
+}
+\noindent
+where you want to change the right part of the equivalence of the $H$
+hypothesis with $O + n$ and then use $inj\_plus\_l$ to prove $m=O$.
+\begin{grafite}
+  change in H:(? ? ? %) with (O + n).
+\end{grafite}
+\noindent
+This pattern, that is a simple instance of the $\NT{sequent\_path}$
+grammar entry, acts on $H$ that has type (without notation) $(eq~nat~(m+n)~n)$
+and discharges the head of the application and the first two arguments with a
+$?$ and selects the last argument with $\%$. The syntax may seem uncomfortable,
+but the user can simply select with the mouse the right part of the equivalence
+and left to the system the burden of writing down in the script file the
+corresponding pattern with $?$ and $\%$ in the right place (that is not
+trivial, expecially where implicit arguments are hidden by the notation, like
+the type $nat$ in this example).
+
+Changing all the occurrences of $n$ in the hypothesis $H$ with $O+n$ 
+works too and can be done, by the experienced user, writing directly
+a simpler pattern that uses the second phase.
+\begin{grafite}
+  change in match n in H with (O + n).
+\end{grafite}
+\noindent
+In this case the $\NT{sequent\_path}$ selects the whole $H$, while
+the second phase searches the wanted $n$ inside it by
+$\alpha$-equivalence. The resulting
+equivalence will be $m+(O+n)=O+n$ since the second phase found two
+occurrences of $n$ in $H$ and the tactic changed both.
+
+Just for completeness the second pattern is equivalent to the
+following one, that is less readable but uses only the first phase.
+\begin{grafite}
+  change in H:(? ? (? ? %) %) with (O + n).
+\end{grafite}
+\noindent
+
+\subsubsection{Tactics supporting patterns}
+In \MATITA{} all the tactics that can be restricted to subterm of the working
+sequent accept the pattern syntax. In particular these tactics are: simplify,
+change, fold, unfold, generalize, replace and rewrite.
+
+\NOTE{attualmente rewrite e \\ fold non supportano \\ phase 2. per
+supportarlo\\bisogna far loro trasformare\\il pattern phase1+phase2\\
+in un pattern phase1only\\come faccio nell'ultimo esempio.\\lo si fa
+con una pattern\_of(select(pattern))}
+
+\subsubsection{Comparison with Coq}
+Coq has a two diffrent ways of restricting the application of tactis to
+subterms of the sequent, both relaying on the same special syntax to identify
+a term occurrence.
+
+The first way is to use this special syntax to specify directly to the
+tactic the occurrnces of a wanted term that should be affected, while
+the second is to prepare the sequent with another tactic called
+pattern and the apply the real tactic. Note that the choice is not
+left to the user, since some tactics needs the sequent to be prepared
+with pattern and do not accept directly this special syntax.
+
+The base idea is that to identify a subterm of the sequent we can
+write it and say that we want, for example, the third and the fifth
+occurce of it (counting from left to right). In our previous example,
+to change only the left part of the equivalence, the correct command
+is
+\begin{grafite}
+  change n at 2 in H with (O + n)
+\end{grafite} 
+\noindent
+meaning that in the hypothesis $H$ the $n$ we want to change is the
+second we encounter proceeding from left toright.
+
+The tactic pattern computes a
+$\beta$-expansion of a part of the sequent with respect to some
+occurrences of the given term. In the previous example the following
+command
+\begin{grafite}
+  pattern n at 2 in H
+\end{grafite}
+\noindent
+would have resulted in this sequent
+\begin{grafite}
+  n : nat
+  m : nat
+  H : (fun n0 : nat => m + n = n0) n
+  ============================
+   m = 0
+\end{grafite}
+\noindent
+where $H$ is $\beta$-expanded over the second $n$
+occurrence. This is a trick to make the unification algorithm ignore
+the head of the application (since the unification is essentially
+first-order) but normally operate on the arguments. 
+This works for some tactics, like rewrite and replace,
+but for example not for change and other tactics that do not relay on
+unification. 
+
+The idea behind this way of identifying subterms in not really far
+from the idea behind patterns, but really fails in extending to
+complex notation, since it relays on a mono-dimensional sequent representation.
+Real math notation places arguments upside-down (like in indexed sums or
+integrations) or even puts them inside a bidimensional matrix.  
+In these cases using the mouse to select the wanted term is probably the 
+only way to tell the system exactly what you want to do. 
+
+One of the goals of \MATITA{} is to use modern publishing techiques, and
+adopting a method for restricting tactics application domain that discourages 
+using heavy math notation, would definitively be a bad choice.
+
+\subsection{tatticali}
 \ASSIGNEDTO{gares}
 
-\subsection{named variable}
+\subsection{named variable e disambiguazione lazy}
 \ASSIGNEDTO{csc}
 
-\subsection{assenza di proof tree / resa in linguaggio naturale}
-\ASSIGNEDTO{andrea}
+\subsection{metavariabili}
+\label{sec:metavariables}
+\ASSIGNEDTO{csc}
 
-\subsection{selezione semantica, cut paste, hyperlink}
-\ASSIGNEDTO{zack}
+\begin{verbatim}
 
-\subsection{sostituzioni esplicite vs moduli}
-\ASSIGNEDTO{csc}
+\end{verbatim}
 
 \section{Drawbacks, missing, \dots}
 
@@ -804,14 +783,17 @@ that avoids backtracking is also presented.
 \subsection{localizzazione errori}
 \ASSIGNEDTO{}
 
-\textbf{Acknowledgements}
+\acknowledgements
 We would like to thank all the students that during the past
 five years collaborated in the \HELM{} project and contributed to 
 the development of Matita, and in particular
 A.Griggio, F.Guidi, P. Di Lena, L.Padovani, I.Schena, M.Selmi, 
 V.Tamburrelli.
 
+\theendnotes
+
 \bibliography{matita}
 
+
 \end{document}