% \iffalse meta-comment -*- doctex -*- 
%
% Copyright 2000-2002 by Marcin Woli\'nski
% 
% 
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX 
% version 1999/12/01 or later.
% 
% \fi
% \CheckSum{3386}
%
% \iffalse
% \section{Identification}
%
%    These document classes can only be used with \LaTeXe, so we make
%    sure that an appropriate message is displayed when another \TeX{}
%    format is used.
%    \begin{macrocode}
%<article|report|book>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%    \end{macrocode}
%
%    Announce the Class name and its version:
%    \begin{macrocode}
%<article>\ProvidesClass{mwart}
%<report>\ProvidesClass{mwrep}
%<book>\ProvidesClass{mwbk}
%<10pt&!bk>\ProvidesFile{mw10.clo}
%<11pt&!bk>\ProvidesFile{mw11.clo}
%<12pt&!bk>\ProvidesFile{mw12.clo}
%<10pt&bk>\ProvidesFile{mwbk10.clo}
%<11pt&bk>\ProvidesFile{mwbk11.clo}
%<12pt&bk>\ProvidesFile{mwbk12.clo}
%<*driver>
\ProvidesFile{mwcls.drv}
%</driver>
              [2002/05/12 v0.55
%<article|report|book> A LaTeX document class (MW)]
%<10pt|11pt|12pt>      A document class size option (MW)]
%<article|report|book>\typeout{*** Beta version.  Formatting may change}
%<article|report|book>\typeout{*** in future versions of this class.} 
%    \end{macrocode}
%
% \section{A driver for this document}
%
% The next bit of code contains the documentation driver file for
% \TeX{}, i.e., the file that will produce the documentation you are
% currently reading. It will be extracted from this file by the 
% {\sc docstrip} program.
%
%    \begin{macrocode}
%<*driver>
]
\documentclass[sfheadings]{mwart}
\usepackage{doc}
\usepackage{polski}
\usepackage[latin2]{inputenc}
%    \end{macrocode}
%
%    We don't want everything to appear in the index
%    \begin{macrocode}
\DoNotIndex{\',\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic}
\DoNotIndex{\@badmath,\@centercr,\@cite}
\DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
\DoNotIndex{\@input,\@ixpt,\@m,\@minus,\@mkboth}
\DoNotIndex{\@ne,\@nil,\@nomath,\@plus,\roman,\@set@topoint}
\DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
\DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
\DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
\DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
\DoNotIndex{\advance,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
\DoNotIndex{\bullet}
\DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
\DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
\DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
\DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
\DoNotIndex{\fbox}
\DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
\DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
\DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
\DoNotIndex{\input}
\DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
\DoNotIndex{\NeedsTeXFormat,\newdimen}
\DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
\DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
\DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
\DoNotIndex{\refstepcounter,\relax,\renewcommand}
\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily}
\DoNotIndex{\secdef,\selectfont,\setbox,\setcounter,\setlength}
\DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
\DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
\DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
\DoNotIndex{\viipt,\vipt,\vskip,\vspace}
\DoNotIndex{\wd,\xiipt,\year,\z@}
%    \end{macrocode}
%    We do want an index, using linenumbers
%    \begin{macrocode}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
%    \end{macrocode}
%    We use so many \file{docstrip} modules that we set the
%    \texttt{StandardModuleDepth} counter to 1.
%    \begin{macrocode}
\setcounter{StandardModuleDepth}{1}
%    \end{macrocode}
%    The following command retrieves the date and version information
%    from the file.
%    \begin{macrocode}
\GetFileInfo{mwcls.drv}
%    \end{macrocode}
%    Some commonly used abbreviations
% \changes{v1.2w}{1994/12/01}{Use \cs{newcommand*}}
%    \begin{macrocode}
\newcommand*{\Lopt}[1]{\textsf {#1}}
\newcommand*{\file}[1]{\texttt {#1}}
\newcommand*{\Lcount}[1]{\textsl {\small#1}}
\newcommand*{\pstyle}[1]{\textsl {#1}}
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\newcommand*\env{\texttt}
%    \end{macrocode}
%    We also want the full details.
%    \begin{macrocode}
\begin{document}
\MakeShortVerb{\|} \catcode`\^^A=14  
^^A inputenc makes ^^A active!!!??!!???
\DocInput{mwcls.dtx}
\PrintIndex
\PrintChanges
\end{document}
%</driver>
%    \end{macrocode}
%
% \fi ^^A End of meta-comment.
%
%
% \title{\texttt{mwcls.dtx}\\
% \textbf{M}y O\textbf{w}n Document \textbf{Cl}a\textbf{s}ses
% for \LaTeX{}\\
% \textbf{M}oje \textbf{w}łasne \textbf{kl}a\textbf{s}y dokumentów}
% \date{version/wersja \fileversion\ (\filedate)}
% \author{\textbf{M}arcin \textbf{W}oliński}
% \maketitle
%
% \textbf{METAUWAGA:} Ten plik jest dziełem w~trakcie powstawania.
% Zacząłem od najświeższego pliku classes.dtx i stopniowo go
% modyfikuję.  Miejsca, które już odwiedziłem są znamienne pojawieniem
% się fragmentów dokumentacji po polsku. [Koniec metauwagi]
%
% \tableofcontents
%
%
% \StopEventually{} ^^A
%
%
%
% Niniejsze klasy powstały poprzez stopniową modyfikację standardowych
% klas \LaTeX a.  Ponieważ nigdy nie istniały dla \LaTeX a 2.09,
% zacząłem od wyrzucenia wszystkich fragmentów zwązanych z~trybem
% kompatybilności.
%
% Podobnie jak w~przypadku klas standardowych, właściwe pliki klas
% (\texttt{mwart.cls}, texttt{mwrep.cls}, texttt{mwbk.cls},
% \texttt{mw10.clo}, \texttt{mw11.clo} i~\texttt{mw12.clo}) są
% generowane z~niniejszego dokumentu przy pomocy programu DOCSTRIP.
% Pozwala to nie tylko opatrzyć program obfitymi komentarzami (nie,
% żebym miał taki zamiar \texttt{:-)}), ale i~wygenerować powtarzające
% się fragmenty definicji z~jednego źródła.  Fragmenty te są
% oznakowane dla DOCSTRIPa następującymi flagami:
% \begin{center}
% \begin{tabular}{ll}
%   article & klasa `artykuł'\\
%   report  & klasa `raport'\\
%   book    & klasa `książka'\\
%   size10  & kod obsługujący opcję \texttt{10pt}\\
%   size11  & kod obsługujący opcję \texttt{11pt}\\
%   size12  & kod obsługujący opcję \texttt{12pt}\\
%   bk10    & produce the book class option for 10pt\\
%   bk11    & produce the book class option for 11pt\\
%   bk12    & produce the book class option for 12pt\\
%   driver  & kod pozwalający przetworzyć plik \texttt{mwcls.dtx} jako
%             dokument \LaTeX a\\
% \end{tabular}
% \end{center}
%
% \section{Initial Code}
%
%    In this part we define a few commands that are used later on.
%
% \begin{macro}{\@ptsize}
%    To makro w klasach standardowych przechowuje drugą cyfrę
%    podstawowego stopnia pisma dokumentu.  Autorzy \LaTeX a sądzą, że
%    istnieją pakiety, którym zależy na tej informacji.  Dlatego też
%    (bez przekonania) zachowujemy to makro.
%    \begin{macrocode}
%<*article|report|book>
\newcommand\@ptsize{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\if@restonecol}
%    To jest przełącznik wskazujący konieczność przywrócenia układu
%    dwułamowego (po jakiejś wstawce wymagającej jednego łamu).
%    \begin{macrocode}
\newif\if@restonecol
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\if@titlepage}
%    A switch to indicate if a titlepage has to be produced.  For the
%    article document class the default is not to make a separate
%    titlepage.
%    \begin{macrocode}
\newif\if@titlepage
%<article>\@titlepagefalse
%<!article>\@titlepagetrue
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\if@openright}
%    A switch to indicate if chapters must start on a right-hand page.
%    The default for the report class is no; for the book class it's
%    yes.
%    \begin{macrocode}
%<!article>\newif\if@openright
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\if@mainmatter}
%    Przełącznik |\if@mainmatter|, używany w~klasie book, wskazuje czy
%    jesteśmy w~głownej części książki.
%    \begin{macrocode}
%<book>\newif\if@mainmatter \@mainmattertrue
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\ifHeadingNumbered}
%    Ten przełącznik służy do sygnalizowania, czy dany nagłówek ma być
%    poprzedzony numerem.
%    \begin{macrocode}
\newif\ifHeadingNumbered
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\l@nohyphenation}
%    Tutaj upewniamy się, że jest zdefiniowany ,,język'' bez wzorców
%    przenoszenia.  Taki ,,język'' jest bardzo użyteczny do lokalnego
%    wyłączania przenoszenia wyrazów.
%    \begin{macrocode}
\ifx\l@nohyphenation\@undefined
        \newlanguage\l@nohyphenation
\fi
%    \end{macrocode}
%  \end{macro}
%
% \section{Opcje klasy}
%
%
% \subsection*{Formaty papieru}
%
%    [Przydało by się tu coś dodać]
%    The variables |\paperwidth| and |\paperheight| should reflect the
%    physical paper size after trimming. For desk printer output this
%    is usually the real paper size since there is no post-processing.
%    Classes for real book production will probably add other paper
%    sizes and additionally the production of crop marks for trimming.
%    \begin{macrocode}
\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}}
%    \end{macrocode}
%
%    The option \Lopt{landscape} switches the values of |\paperheight|
%    and |\paperwidth|, assuming the dimensions were given for portrait
%    paper.
%    \begin{macrocode}
\DeclareOption{landscape}
   {\setlength\@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {\@tempdima}}
%    \end{macrocode}
%    Opcja \Lopt{wide} powoduje stosowanie minimalnych marginesów.
%    \begin{macrocode}
\newif\if@wide
\DeclareOption{wide}
    {\@widetrue}
%    \end{macrocode}
%    Opcje \Lopt{withmarginpar} i~\Lopt{withoutmarginpar} decydują, czy
%    zostawiamy na stronie miejsce na marginalia.
%    \begin{macrocode}
\newif\if@marginparsused
\DeclareOption{withmarginpar}
    {\@marginparsusedtrue}
\DeclareOption{withoutmarginpar}
    {\@marginparsusedfalse}
%    \end{macrocode}
%
% \subsection*{Wybór podstawowego stopnia pisma}
%
%    \begin{macrocode}
\newcommand\mw@usedd{\p@=1dd
 \def\@vpt{5dd}%
 \def\@vipt{6dd}%
 \def\@viipt{7dd}%
 \def\@viiipt{8dd}%
 \def\@ixpt{9dd}%
 \def\@xpt{10dd}%
 \def\@xipt{11dd}%
 \def\@xiipt{12dd}%
 \def\@xivpt{14dd}%
 \def\@xviipt{16dd}%
 \def\@xxpt{18dd}%
 \def\@xxvpt{24dd}%
}
\DeclareOption{10pt}{\renewcommand\@ptsize{0}\def\@basesize{10}}
\DeclareOption{10dd}{\renewcommand\@ptsize{0}\def\@basesize{10}\@usedd}
\DeclareOption{11pt}{\renewcommand\@ptsize{1}\def\@basesize{11}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}\def\@basesize{12}}
%    \end{macrocode}
%
%
%  \subsection*{Two-side or one-side printing}
%
%    For two-sided printing we use the switch |\if@twoside|. In
%    addition we have to set the |\if@mparswitch| to get any margin
%    paragraphs into the outside margin.
%    \begin{macrocode}
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
%    \end{macrocode}
%
%
%  \subsection*{Draft option}
%
%    If the user requests \Lopt{draft} we show any overfull boxes.
%    We could probably add some more interesting stuff to this option.
%    \begin{macrocode}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
%    \end{macrocode}
%
%  \subsection*{Titlepage option}
%    An article usually has no separate titlepage, but the user can
%    request one.
%    \begin{macrocode}
\DeclareOption{titlepage}{\@titlepagetrue}
\DeclareOption{notitlepage}{\@titlepagefalse}
%    \end{macrocode}
%
%  \subsection*{openright option}
%    This option determines whether or not a chapter must start on
%    a right-hand page.
%    \begin{macrocode}
%<book>\@openrighttrue
%<!article>\DeclareOption{openright}{\@openrighttrue}
%<!article>\DeclareOption{openany}{\@openrightfalse}
%    \end{macrocode}
%
%  \subsection*{Twocolumn printing}
%
%    Two-column and one-column printing is again realized via a switch.
%    \begin{macrocode}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
%    \end{macrocode}
%
%  \subsection*{Equation numbering on the left}
%
%    The option \Lopt{leqno} can be used to get the equation numbers
%    on the left side of the equation. It loads code which is generated
%    automatically from the kernel files when the format is built.
%    If the equation number does get a special formatting then instead
%    of using the kernel file the class would need to provide the code
%    explicitly.
%    \begin{macrocode}
\DeclareOption{leqno}{\input{leqno.clo}}
%    \end{macrocode}
%
%  \subsection*{Flush left displays}
%
%    The option \Lopt{fleqn} redefines the displayed math environments
%    in such a way that they come out flush left, with an indentation
%    of |\mathindent| from the prevailing left margin. It loads
%    code which is generated
%    automatically from the kernel files when the format is built.
%    \begin{macrocode}
\DeclareOption{fleqn}{\input{fleqn.clo}}
%    \end{macrocode}
%
% \subsection*{Open bibliography}
%
%    The option \Lopt{openbib} produces the ``open'' bibliography
%    style, in which each block starts on a new line, and succeeding
%    lines in a block are indented by |\bibindent|.
%    \begin{macrocode}
\DeclareOption{openbib}{%
%    \end{macrocode}
%    First some hook into the bibliography environment is filled.
%    \begin{macrocode}
  \AtEndOfPackage{%
   \renewcommand\@openbib@code{%
      \advance\leftmargin\bibindent
      \itemindent -\bibindent
      \listparindent \itemindent
      \parsep \z@
      }%
%    \end{macrocode}
%    In addition the definition of |\newblock| is overwritten.
%    \begin{macrocode}
   \renewcommand\newblock{\par}}%
}
%    \end{macrocode}
%
% \subsection*{Krój pisma tytulariów}
%    Następne opcje służą do wyboru kroju (rodziny fontów), którym
%    składane będą nagłówki rozdziałów.
%    \begin{macrocode}
\newcommand*\sectfont{\bfseries}
\newcommand*\titlefont{}
\DeclareOption{rmheadings}{%
  \def\sectfont{\rmfamily\bfseries}%
  \def\titlefont{\rmfamily}%
  }
\DeclareOption{sfheadings}{%
  \def\sectfont{\sffamily\bfseries}%
  \def\titlefont{\sffamily}%
  }
%    \end{macrocode}
%
% \subsection*{Stopień pisma w~środowiskach przemieszczalnych}
%    
%    \begin{macrocode}
\newcommand*\captionfont{\small}
\DeclareOption{floatssmall}{%
  \def\figurefont{\small}%
  \def\tablefont{\small}%
  }
\DeclareOption{floatsnormalsize}{%
  \def\figurefont{\normalsize}%
  \def\tablefont{\normalsize}%
  }
%    \end{macrocode}
%
% 
% \subsection*{Kolejność informacji w tytule}
%    Te opcje sterują kolejnością umieszczenia na karcie tytułowej
%    autora i tytułu publikacji.
%    \begin{macrocode}
\newif\if@authorfirst
\DeclareOption{authortitle}{\@authorfirsttrue}
\DeclareOption{titleauthor}{\@authorfirstfalse}
%    \end{macrocode}
% 
% \subsection*{Wciecia po tytułach}
%    \begin{macrocode}
\DeclareOption{indentfirst}{\@afterindenttrue}
\DeclareOption{noindentfirst}{\@afterindentfalse}
%    \end{macrocode}
%
% \subsection*{Opcje domyślne}
%
%    Dla wszystkich klas domyślny jest skład jednołamowy pismem
%    10-punktowym na papierze formatu A4.  Dla książki domyślny jest
%    druk dwustronny.
%    \begin{macrocode}
%<*article>
\ExecuteOptions{a4paper,10pt,oneside,onecolumn,%
        final,authortitle,withoutmarginpar,indentfirst,floatsnormalsize}
%</article>
%<*report>
\ExecuteOptions{a4paper,10pt,oneside,onecolumn,%
        final,openany,authortitle,withoutmarginpar,indentfirst,floatsnormalsize}
%</report>
%<*book>
\ExecuteOptions{a4paper,10pt,twoside,onecolumn,%
        final,openright,authortitle,withoutmarginpar,indentfirst,floatsnormalsize}
%</book>
%    \end{macrocode}
%
%    \begin{macrocode}
\ProcessOptions
%    \end{macrocode}
%    Now that all the options have been executed we can load the
%    chosen class option file that contains all size dependent code.
%    \begin{macrocode}
%<!book>\input{mw\@basesize.clo}
%<book>\input{mwbk\@basesize.clo}
%</article|report|book>
%    \end{macrocode}
%
% \section{Przeróbki w~kernelu \LaTeX a}
% 
%  \begin{macro}{\markboth}
%    Dla naszych celów konieczne jest aby w~makrze \cs{@themark}
%    przechowywana była rozwinięta postać argumentów (chcemy bowiem
%    pewne wartości wprowadzać przez chwilowo definiowane nazwy
%    symboliczne).  Nie narusza to kompatybilności, bo argumenty i~tak były
%    rozwijane w~momencie wykonania \cs{mark}'a.
%
%    W~jądrze \LaTeX a z~datą 2000/06/01 nastąpiły pożądane przez nas
%    zmiany.  Można by więc wyrzucić nasze definicje.  Aby jednak
%    umożliwić używanie zarówno starszego formatu jak i~nowego
%    zapożyczamy definicje z~nowego kernela.  (Wyrzucimy je za rok).
% \changes{v0.52}{2001/10/04}{Definicje markright/both pobrane
%    z~nowego kernela}
%    \begin{macrocode}
%<*article|report|book>
\def\markboth#1#2{%
  \begingroup
    \let\label\relax \let\index\relax \let\glossary\relax
    \unrestored@protected@xdef\@themark {{#1}{#2}}%
    \@temptokena \expandafter{\@themark}%
    \mark{\the\@temptokena}%
  \endgroup
  \if@nobreak\ifvmode\nobreak\fi\fi}
\def\markright#1{%
  \begingroup
    \let\label\relax \let\index\relax \let\glossary\relax
    \expandafter\@markright\@themark {#1}%
    \@temptokena \expandafter{\@themark}%
    \mark{\the\@temptokena}%
  \endgroup
  \if@nobreak\ifvmode\nobreak\fi\fi}
\def\@markright#1#2#3{\@temptokena {#1}%
  \unrestored@protected@xdef\@themark{{\the\@temptokena}{#3}}}
% \def\markboth#1#2{{%
%      \let\protect\@unexpandable@protect
%      \let\label\relax \let\index\relax \let\glossary\relax
%      \xdef\@themark{{#1}{#2}}%
%      \mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
% \def\markright#1{{\let\protect\@unexpandable@protect
%      \let\label\relax \let\index\relax \let\glossary\relax
%      \expandafter\@markright\@themark
%      {#1}\mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
% \def\@markright#1#2#3{\xdef\@themark{{#1}{#3}}}
%</article|report|book>
%    \end{macrocode}
%  \end{macro}
%
% \section{Projekt typograficzny dokumentu}
% \label{sec:maincode}
%
%  In this section we are finally dealing with the nasty typographical
%  details.
%
% \subsection{Stopnie pisma}
%
%    \LaTeX\ offers the user commands to change the size of the font,
%    relative to the `main' size. Each relative size changing command
%    |\size| executes the command
%    |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} where:
%
%    \begin{description}
%    \item[\meta{font-size}] The absolute size of the font to use from
%        now on.
%
%    \item[\meta{baselineskip}] The normal value of |\baselineskip|
%        for the size of the font selected. (The actual value will be
%        |\baselinestretch| * \meta{baselineskip}.)
%    \end{description}
%
%    A number of commands, defined in the \LaTeX{} kernel, shorten the
%    following  definitions and are used throughout. They are:
% \begin{center}
% \begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
%  \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\
%  \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\
%  \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\
%  ...
%  \end{tabular}
%  \end{center}
%
% \begin{macro}{\normalsize}
% \begin{macro}{\@normalsize}
%    The user level command for the main size is |\normalsize|.
%    Internally \LaTeX{} uses |\@normalsize| when it refers to the
%    main size. |\@normalsize| will be defined to work like
%    |\normalsize| if the latter is redefined from its default
%    definition (that just issues an error message). Otherwise
%    |\@normalsize| simply selects a 10pt/12pt size.
%
%    The |\normalsize| macro also sets new values for\\
%    |\abovedisplayskip|, |\abovedisplayshortskip| and
%    |\belowdisplayshortskip|.
%
%    \begin{macrocode}
%<*10pt|11pt|12pt>
\renewcommand\normalsize{%
%<*10pt>
   \@setfontsize\normalsize\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
%</10pt>
%<*11pt>
   \@setfontsize\normalsize\@xipt{13.6}%
   \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
%</11pt>
%<*12pt>
   \@setfontsize\normalsize\@xiipt{14.5}%
   \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
%</12pt>
%    \end{macrocode}
%    The |\belowdisplayskip| is always equal to the
%    |\abovedisplayskip|. 
%    \begin{macrocode}
   \belowdisplayskip \abovedisplayskip
   }
%    \end{macrocode}
%
%    Teraz wywołamy właśnie zdefiniowane polecenie \cs{normalsize},
%    aby móc się dalej odwoływać do wartości rejestru
%    \cs{baselineskip}, oraz by jednostka \texttt{em} uzyskała
%    właściwą interpretację.
%    \begin{macrocode}
\normalsize
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\small}
%    This is similar to |\normalsize|.
%    \begin{macrocode}
\newcommand\small{%
%<*10pt>
   \@setfontsize\small\@ixpt{11}%
   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
%</10pt>
%<*11pt>
   \@setfontsize\small\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
%</11pt>
%<*12pt>
   \@setfontsize\small\@xipt{13.6}%
   \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
%</12pt>
   \belowdisplayskip \abovedisplayskip
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\footnotesize}
%    This is similar to |\normalsize|.
%    \begin{macrocode}
\newcommand\footnotesize{%
%<*10pt>
   \@setfontsize\footnotesize\@viiipt{9.5}%
   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus\p@
   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
%</10pt>
%<*11pt>
   \@setfontsize\footnotesize\@ixpt{11}%
   \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
%</11pt>
%<*12pt>
   \@setfontsize\footnotesize\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
%</12pt>
   \belowdisplayskip \abovedisplayskip
}
%</10pt|11pt|12pt>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\scriptsize}
% \begin{macro}{\tiny}
% \begin{macro}{\large}
% \begin{macro}{\Large}
% \begin{macro}{\LARGE}
% \begin{macro}{\huge}
% \begin{macro}{\Huge}
%    These are all much simpler than the previous macros, they just
%    select a new fontsize, but leave the parameters for displays and
%    lists alone.
%    \begin{macrocode}
%<*10pt>
\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
\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}}
%</10pt>
%<*11pt>
\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
\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}}
%</11pt>
%<*12pt>
\newcommand\scriptsize{\@setfontsize\scriptsize\@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}}
\let\Huge=\huge
%</12pt>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%  \begin{macro}{\secondarysize}
%    Wedle polskich zwyczajów nie tylko przypisy (notki) ale i
%    wszystkie poboczne części tekstu jak bibliografia, spisy treści,
%    tabel, rysunków, skorowidz itp. są składane pismem o jeden lub
%    dwa stopnie mniejszym od podstwowego.  Ten stopień pisma włącza
%    polecenie \cs{secondarysize}.  Domyślnie ustawiamy je na jeden
%    stopień mniejsze.
%    \begin{macrocode}
\def\secondarysize{\small}
%    \end{macrocode}
%  \end{macro}
%
% \subsection{Parametry akapitów}
%
% \begin{macro}{\lineskip}
% \begin{macro}{\normallineskip}
%    Wartości \cs{lineskip} i \cs{lineskiplimit} ustawiamy jak zwykle:
%    \begin{macrocode}
%<*article|report|book>
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\baselinestretch}
%    Makro \cs{baselinestretch} służy jako mnożnik \cs{baselineskip}
%    do uzyskiwania ,,podwójnego odstępu''.  Domyślnie jest puste.
%    \begin{macrocode}
\renewcommand\baselinestretch{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\parskip}
% \begin{macro}{\parindent}
%    W naszych klasach stosujemy klasyczny układ akapitów z~wcięciem
%    pierwszego wiersza i bez odstępów między akapitami.  Zgodnie
%    z~polskimi zaleceniami wcięcie akapitowe powinno wynosić 1 do 1,5
%    fireta.  Zatem w~układzie dwułamowym stosujemy 1em, w
%    jednołamowym 1,5em wcięcia (być może lepiej byłoby uzależnić
%    wcięcie bezpośrednio od szerokości łamu).
%    \begin{macrocode}
\setlength\parskip{\z@}
\if@twocolumn
  \setlength\parindent{1em}
\else
  \setlength\parindent{1.5em}
\fi
\newdimen\@parindent
%%\parindent32pt % wartość testowa.  Wyrzucić!
\@parindent\parindent
%</article|report|book>
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%  \begin{macro}{\smallskipamount}
%  \begin{macro}{\medskipamount}
%  \begin{macro}{\bigskipamount}
%    Te wartości ustawiamy odpowiednio na ćwierć, pół i całą
%    podstawową interlinię (zatem wartość zależy od podstawowego
%    stopnia pisma dokumentu).
%    \begin{macrocode}
%<*10pt|11pt|12pt>
\setlength\smallskipamount{.25\baselineskip \@plus.125\baselineskip 
        \@minus.0625\baselineskip}
\setlength\medskipamount{.5\baselineskip \@plus.25\baselineskip 
        \@minus.125\baselineskip}
\setlength\bigskipamount{1\baselineskip \@plus.5\baselineskip 
        \@minus.25\baselineskip}
%</10pt|11pt|12pt>
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
% \begin{macro}{\@lowpenalty}
% \begin{macro}{\@medpenalty}
% \begin{macro}{\@highpenalty}%
%    The commands |\nopagebreak| and |\nolinebreak| put in penalties
%    to discourage these breaks at the point they are put in.
%    They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
%    dependent on their argument.
%    \begin{macrocode}
%<*article|report|book>
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%  \begin{macro}{\hyphenpenalty}
%  \begin{macro}{\exhyphenpenalty}
%    Wartość \cs{hyphenpenalty} ustawiamy na 100 --- nieco więcej niż
%    w~klasach standardowych.  Natomiast \cs{exhyphenpenalty} na
%    10000.  Uzasadnienie tej ostatniej wartości jest takie:
%    łamanie wiersza na dywizie wymaga powtórzenia go na początku
%    następnego wiersza.  Takiego zachowania nie da się w~sensowny
%    sposób uzyskać przy pomocy znaku \texttt{-}.  Dlatego blokujemy
%    łamanie na takim dywizie, jak również na myślniku --- po polsku
%    myślnik ma po sobie łamliwą spację.
%    \begin{macrocode}
\hyphenpenalty=100
\exhyphenpenalty=10000
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
% \begin{macro}{\clubpenalty}
% \begin{macro}{\widowpenalty}
%    Bękarty są wedle polskich zwyczajów błędem składu.  Dlatego
%    stosujemy wartość \cs{widowpenalty} zabraniającą takiego łamania
%    strony.  Szewce formalnie nie są błędem, ale też staramy się ich
%    unikać.
%    \begin{macrocode}
\widowpenalty 10000
\clubpenalty  5000
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\displaywidowpenalty}
% \begin{macro}{\predisplaypenalty}
% \begin{macro}{\postdisplaypenalty}
%    Discourage (but not so much) widows in front of a math display
%    and forbid breaking directly in front of a display. Allow break
%    after a display without a penalty. 
%    \begin{macrocode}
 \displaywidowpenalty 5000
% \predisplaypenalty   10000
% \postdisplaypenalty  0
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\interlinepenalty}
%    Nie stosujemy dodatkowych grzywien pomiędzy zwykłymi liniami
%    akapitu.
%    \begin{macrocode}
% \interlinepenalty 0
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\brokenpenalty}
%    We allow the breaking of a page after a hyphenated line.
%    \begin{macrocode}
% \brokenpenalty 100
%    \end{macrocode}
% \end{macro}
%
% \subsection{Różne drobiazgi}
%
%  \begin{macro}{\@fnsymbol}
%    Znaki produkowane przez liczniki w~stylu \texttt{fnsymbol} nikomu
%    w~Polsce nie kojarzą się z~niczym (prócz śmierci).  Dlatego
%    zamieniamy je 
%    na jedną, dwie i trzy gwiazdki (zatem w~tym stylu można liczyć do
%    trzech!).
%    \begin{macrocode}
\def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or **\or *{*}*
  \else\@ctrerr\fi}}
%</article|report|book>
%    \end{macrocode}
%  \end{macro}
%
% \subsection{Układ strony}
%
% \subsubsection{Wymiary pionowe}
%
% \begin{macro}{\headheight}
% \begin{macro}{\headsep}
% \begin{macro}{\topskip}
%    Wartość \cs{headheight} --- wysokość paska przeznaczonego na
%    główkę strony --- ustalamy na jeden wiersz tekstu.  Między główką
%    i łamem stosujemy jeden wiersz odstępu (!!!mało?).  \cs{topskip}
%    tradycyjnie ustawiamy równy stopniowi pisma.
%    \begin{macrocode}
%<*10pt|11pt|12pt>
\setlength\headheight{\baselineskip}
\setlength\headsep{\baselineskip}
\addtolength\headsep{2pt}
\setlength\topskip{\@basesize\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\footskip}
%    Wartość \cs{footskip} określa odległość linii bazowej stopki
%    strony od dołu łamu.  Rozmiar ten ma zatem zmieścić w~sobie
%    wysokość stopki i światło.  Ustawiamy ją na podwojoną wartość
%    interlinii.
%    \begin{macrocode}
\setlength\footskip{2\baselineskip}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\maxdepth}
%    The \TeX\ primitive register |\maxdepth| has a function that is
%    similar to that of |\topskip|. The register |\@maxdepth| should
%    always contain a copy of |\maxdepth|. This is achieved by setting
%    it internally at |\begin{document}|. In both plain \TeX\ and
%    \LaTeX~2.09 |\maxdepth| had a fixed value of \texttt{4pt}; in
%    native \LaTeX2e\ mode we let the value depend on the typesize. We
%    set it so that |\maxdepth| $+$ |\topskip| $=$ typesize $\times
%    1.5$. As it happens, in these classes |\topskip| is equal to the
%    typesize, therefore we set |\maxdepth| to half the value of
%    |\topskip|.
%    \begin{macrocode}
\setlength\maxdepth{.5\topskip}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Wymiary poziome}
%
%  \begin{macro}{\marginparwidth}
%    
%    \begin{macrocode}
\if@marginparsused
\setlength\marginparsep{1cc}
\setlength\marginparwidth{4cc}
\setlength\marginparpush{.5\baselineskip}
\else
\setlength\marginparsep{0cc}
\setlength\marginparwidth{0cc}
\def\marginpar{\ClassError{mwcls}{Marginpars are disabled by
    default in this class.\MessageBreak  Use `withmarginpar'
    option to enable}{}\global\let\marginpar\@gobble}
\fi
%    \end{macrocode}
%  \end{macro}
%
% \begin{macro}{\columnsep}
%    This gives the distance between two columns in two column mode.
%    \begin{macrocode}
\setlength\columnsep{2cc}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\columnseprule}
%    This gives the width of the rule between two columns in two
%    column mode. We have no visible rule.
%    \begin{macrocode}
\setlength\columnseprule{0\p@}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Rozmiary kolumny}
% \begin{macro}{\textwidth}
%    Szerokość kolumny wyznaczamy w~następujący pokrętny sposób.
%    Najpierw obliczamy ile miejsca pozostaje po pomniejszeniu
%    szerokości papieru o~minimalne marginesy (2cm) i~ewentualną
%    przestrzeń na marginalia.
%    \begin{macrocode}
  \setlength\@tempdima{\paperwidth}
  \addtolength\@tempdima{-4cm}
  \addtolength\@tempdima{-\marginparsep}
  \addtolength\@tempdima{-\marginparwidth}
%    \end{macrocode}
%    Następnie w~rejestrze \cs{@tempdimb} umieszczamy największą
%    szerokość łamu dopuszczalną ze względu na czytelność
%    (zapożyczyliśmy te wartości z~klas standardowych --- być może są
%    one zbyt małe).
%    \begin{macrocode}
%<10pt>  \setlength\@tempdimb{345\p@}
%<11pt>  \setlength\@tempdimb{360\p@}
%<12pt>  \setlength\@tempdimb{390\p@}
%    \end{macrocode}
%    Następnie uwzględniamy, że powyższy limit w~układzie dwułamowym
%    powinien dotyczyć pojedynczego łamu.
%    \begin{macrocode}
\if@twocolumn
  \addtolength\@tempdimb{\@tempdimb}
  \addtolength\@tempdimb{\columnsep}
\fi
%    \end{macrocode}
%    Teraz możemy wreszcie ustalić szerokość kolumny.  Przy obecności
%    opcji \Lopt{wide} ustalamy ją na maksymalną dopuszczalną
%    wielkość, czyli \cs{@tempdima}.  Bez tej opcji --- na mniejszą
%    z~wartości \cs{@tempdima} i~\cs{@tempdimb}.
%    \begin{macrocode}
\if@wide
  \setlength\textwidth{\@tempdima}
\else
  \ifdim\@tempdima>\@tempdimb
     \setlength\textwidth{\@tempdimb}
  \else
     \setlength\textwidth{\@tempdima}
  \fi
\fi
%    \end{macrocode}
%
%    Here we modify the width of the text a little to be a whole
%    number of points. (Po co to???)
%    \begin{macrocode}
  \@settopoint\textwidth
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\textheight}
%    Teraz wyznaczymy wysokość kolumny.  W~tym celu wysokość strony
%    zmniejszamy o~4cm na marginesy i~o~wysokość główki strony
%    (zakładamy, że stopka zawiera co najwyżej paginę zwykłą, która
%    nie wlicza się do wysokości kolumny).
%    \begin{macrocode}
  \setlength\@tempdima{\paperheight}
  \addtolength\@tempdima{-4cm}
  \addtolength\@tempdima{-\headheight}
  \addtolength\@tempdima{-\headsep}
%  \addtolength\@tempdima{-\footskip}
%    \end{macrocode}
%    Teraz zechcemy wyznaczyć, jaka liczba pełnych wierszy tekstu
%    zmieści się na stronie (w~zaokrągleniu).
%    \begin{macrocode}
  \advance\@tempdima-.5\baselineskip
  \divide\@tempdima\baselineskip
  \@tempcnta=\@tempdima
%    \end{macrocode}
%    Na tej podstawie wyznaczamy \cs{textheight}, dodając \cs{topskip}
%    dla pierwszej linii, którą obcięliśmy w~zaokrągleniu powyżej.
%    \begin{macrocode}
  \setlength\textheight{\@tempcnta\baselineskip}
  \addtolength\textheight{\topskip}
%    \end{macrocode}
% \end{macro}
%
%
% \subsubsection{Marginesy}
%
%    Marginesy obliczamy na podstawie wartości wyznaczonych
%    uprzednio. 
%
% \begin{macro}{\oddsidemargin}
% \begin{macro}{\evensidemargin}
%    Szerokość strony pomniejszamy o~szerokość kolumny, szerokość łamu
%    na marginalia i~odstęp od łamu głównego.  Wynik rozdzielamy równo
%    na lewy i~prawy margines.
%    \begin{macrocode}
\setlength\@tempdima{\paperwidth}
\addtolength\@tempdima{-\textwidth}
\addtolength\@tempdima{-\marginparwidth}
\addtolength\@tempdima{-\marginparsep}
\divide\@tempdima by2
%    \end{macrocode}
%    Przy druku jednostronnym centrujemy kolumnę (prawy margines równy
%    lewemu).  Przy druku dwustronnym stosujemy proporcję wewnętrznego
%    marginesu do zewnętrznego jak 2:3 (czy to ,,ładna'' wartość?).
%    \begin{macrocode}
\setlength\oddsidemargin{\@tempdima}
\setlength\evensidemargin{\@tempdima}
\if@twoside
  \addtolength\oddsidemargin{-.1\@tempdima}
  \addtolength\evensidemargin{.1\@tempdima}
\fi
%    \end{macrocode}
%    Wreszcie zmniejszamy obliczone marginesy o~1~cal, ponieważ dla
%    \TeX a strona zaczyna się o~cal w~prawo w~dół.
%    \begin{macrocode}
  \addtolength\oddsidemargin{-1in}
  \addtolength\evensidemargin{-1in}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\topmargin}
%    Margines górny obliczamy tak, aby kolumnę wraz z~miejscem na
%    główkę i~stopkę 
%    scentrować na stronie.  Jest to chyba najlepsze, co możemy zrobić
%    nie wiedząc nic o~obecności główki i~stopki.  Dla żywej paginy na
%    górze da to dolny margines nieco więksy od górnego (i dobrze).
%    Gorzej będzie z~paginacją na dole.
%    \begin{macrocode}
  \setlength\topmargin{\paperheight}
  \addtolength\topmargin{-\headheight}
  \addtolength\topmargin{-\headsep}
  \addtolength\topmargin{-\textheight}
  \addtolength\topmargin{-\footskip}
  \divide\topmargin by2
%    \end{macrocode}
%    Przesunięcie o~cal podobnie jak dla marginesu lewego.
%    \begin{macrocode}
  \addtolength\topmargin{-1in}
%  \@settopoint\topmargin
%    \end{macrocode}
% \end{macro}
%
%
% \subsubsection{Przypisy}
%
% \begin{macro}{\footnotesep}
%    |\footnotesep| is the height of the strut placed at the beginning
%    of every footnote. It equals the  height of a normal
%    |\footnotesize| strut in this
%    class, thus no extra space occurs between footnotes.
%    \begin{macrocode}
%<10pt>\setlength\footnotesep{6.65\p@}
%<11pt>\setlength\footnotesep{7.7\p@}
%<12pt>\setlength\footnotesep{8.4\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\footins}
%    |\skip\footins| is the space between the last line of the main
%    text and the top of the first footnote.
%    \begin{macrocode}
%<10pt>\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
%<11pt>\setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@}
%<12pt>\setlength{\skip\footins}{10.8\p@ \@plus 4\p@ \@minus 2\p@}
%</10pt|11pt|12pt>
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Float placement parameters}
%
% All float parameters are given default values in the \LaTeXe{}
% kernel. For this reason parameters that are not counters
% need to be set with |\renewcommand|.
%
% \paragraph{Limits for the placement of floating objects}
%
% \begin{macro}{\c@topnumber}
%    The \Lcount{topnumber} counter holds the maximum number of
%    floats that can appear on the top of a text page.
%    \begin{macrocode}
%<*article|report|book>
\setcounter{topnumber}{2}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\topfraction}
%    This indicates the maximum part of a text page that can be
%    occupied by floats at the top.
%    \begin{macrocode}
\renewcommand\topfraction{.7}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@bottomnumber}
%    The \Lcount{bottomnumber} counter holds the maximum number of
%    floats that can appear on the bottom of a text page.
%    \begin{macrocode}
\setcounter{bottomnumber}{1}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\bottomfraction}
%    This indicates the maximum part of a text page that can be
%    occupied by floats at the bottom.
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
%    \cs{renewcommand}.  ASAJ.}
%    \begin{macrocode}
\renewcommand\bottomfraction{.3}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@totalnumber}
%    This indicates the maximum number of floats that can appear on
%    any text page.
%    \begin{macrocode}
\setcounter{totalnumber}{3}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\textfraction}
%    This indicates the minimum part of a text page that has to be
%    occupied by text.
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
%    \cs{renewcommand}.  ASAJ.}
%    \begin{macrocode}
\renewcommand\textfraction{.2}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\floatpagefraction}
%    This indicates the minimum part of a page that has to be
%    occupied by floating objects before a `float page' is produced.
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
%    \cs{renewcommand}.  ASAJ.}
%    \begin{macrocode}
\renewcommand\floatpagefraction{.5}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@dbltopnumber}
%    The \Lcount{dbltopnumber} counter holds the maximum number of
%    two column floats that can appear on the top of a two column text
%    page.
%    \begin{macrocode}
\setcounter{dbltopnumber}{2}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dbltopfraction}
%    This indicates the maximum part of a two column text page that
%    can be occupied by two column floats at the top.
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
%    \cs{renewcommand}.  ASAJ.}
%    \begin{macrocode}
\renewcommand\dbltopfraction{.7}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dblfloatpagefraction}
%    This indicates the minimum part of a page that has to be
%    occupied by two column wide floating objects before a `float
%    page' is produced.
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with
%    \cs{renewcommand}.  ASAJ.}
%    \begin{macrocode}
\renewcommand\dblfloatpagefraction{.5}
%</article|report|book>
%    \end{macrocode}
% \end{macro}
%
% \paragraph{Floats on a text page}
%
% \begin{macro}{\floatsep}
% \begin{macro}{\textfloatsep}
% \begin{macro}{\intextsep}
%    When a floating object is placed on a page with text, these
%    parameters control the separation between the float and the other
%    objects on the page. These parameters are used for both
%    one-column mode and single-column floats in two-column mode.
%
%    |\floatsep| is the space between adjacent floats that are moved
%    to the top or bottom of the text page.
%
%    |\textfloatsep| is the space between the main text and floats
%    at the top or bottom of the page.
%
%    |\intextsep| is the space between in-text floats and the text.
%    \begin{macrocode}
%<*10pt>
\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@}
%</10pt>
%<*11pt>
\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@}
%</11pt>
%<*12pt>
\setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\intextsep   {14\p@ \@plus 4\p@ \@minus 4\p@}
%</12pt>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\dblfloatsep}
% \begin{macro}{\dbltextfloatsep}
%    When floating objects that span the whole |\textwidth| are placed
%    on a text page when we are in twocolumn mode the separation
%    between the float and the text is controlled by |\dblfloatsep|
%    and |\dbltextfloatsep|.
%
%    |\dblfloatsep| is the space between adjacent floats that are moved
%    to the top or bottom of the text page.
%
%    |\dbltextfloatsep| is the space between the main text and floats
%    at the top or bottom of the page.
%
%    \begin{macrocode}
%<*10pt>
\setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
%</10pt>
%<*11pt>
\setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
%</11pt>
%<*12pt>
\setlength\dblfloatsep    {14\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
%</12pt>
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \paragraph{Floats on their own page or column}
%
% \begin{macro}{\@fptop}
% \begin{macro}{\@fpsep}
% \begin{macro}{\@fpbot}
%    When floating objects are placed on separate pages the layout of
%    such pages is controlled by these parameters. At the top of the
%    page |\@fptop| amount of stretchable whitespace is inserted, at
%    the bottom of the page we get an |\@fpbot| amount of stretchable
%    whitespace. Between adjacent floats the |\@fpsep| is inserted.
%
%    These parameters are used for the placement of floating objects
%    in one column mode, or in single column floats in two column
%    mode.
%
%    Note that at least one of the two parameters |\@fptop| and
%    |\@fpbot| should contain a |plus ...fil| to allow filling the
%    remaining empty space.
%    \begin{macrocode}
%<*10pt>
\setlength\@fptop{0\p@ \@plus 1fil}
\setlength\@fpsep{8\p@ \@plus 2fil}
\setlength\@fpbot{0\p@ \@plus 1fil}
%</10pt>
%<*11pt>
\setlength\@fptop{0\p@ \@plus 1fil}
\setlength\@fpsep{8\p@ \@plus 2fil}
\setlength\@fpbot{0\p@ \@plus 1fil}
%</11pt>
%<*12pt>
\setlength\@fptop{0\p@ \@plus 1fil}
\setlength\@fpsep{10\p@ \@plus 2fil}
\setlength\@fpbot{0\p@ \@plus 1fil}
%</12pt>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@dblfptop}
% \begin{macro}{\@dblfpsep}
% \begin{macro}{\@dblfpbot}
%    Double column floats in two column mode are handled with similar
%    parameters.
%    \begin{macrocode}
%<*10pt>
\setlength\@dblfptop{0\p@ \@plus 1fil}
\setlength\@dblfpsep{8\p@ \@plus 2fil}
\setlength\@dblfpbot{0\p@ \@plus 1fil}
%</10pt>
%<*11pt>
\setlength\@dblfptop{0\p@ \@plus 1fil}
\setlength\@dblfpsep{8\p@ \@plus 2fil}
\setlength\@dblfpbot{0\p@ \@plus 1fil}
%</11pt>
%<*12pt>
\setlength\@dblfptop{0\p@ \@plus 1fil}
\setlength\@dblfpsep{10\p@ \@plus 2fil}
\setlength\@dblfpbot{0\p@ \@plus 1fil}
%</12pt>
%<*article|report|book>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Predefiniowane style nagłówków i stopek}
%
%    Style nagłówków i stopek (\cs{pagestyle}) zostały zdefiniowane
%    w~sposób bardziej skomplikowany, niż ma to miejsce
%    w~standardowych klasach \LaTeX a.
%
%    Standardowe klasy zawsze używają stylu \pstyle{plain} na
%    początkowych stronach rozdziałów.  To uproszczone rozwiązanie nie
%    da się zastosować w~naszym przypadku, ponieważ np. w~stylu
%    \pstyle{outer} pierwsze strony rozdziałów zachowują ten styl.
%    Dlatego zastosowałem rozwiązanie bardziej ogólne, wprowadzając
%    trzy rodzaje stylów.  Gdyby projektować system stylów od początku,
%    należałoby go tak zrealizować, aby nie nakładały się pojęcia.
%    Tutaj jednak aby uniknąć zbytnich ingerencji w kernel \LaTeX a
%    stosuję rozwiązanie ździebko pokrętne.
%
%    Wprowadzone zostają następujące style funkcjonalne, których
%    definicja zmienia się w~zależności od wybranego stylu
%    ,,prawdziwego'': 
%    \begin{description}
%    \item[normal] używany na większości kolumn tekstowych,
%    \item[opening] używany na kolumnach spuszczonych (pusty nagłówek),
%    \item[closing] stosowany na kolumnach niepełnych (pusta stopka),
%    \item[blank] dla strony tytułowej i stron rozpoczynających części
%      (\cs{part}s) dokumentu (pusty zarówno nagłówek jak i stopka).
%    \end{description}
%
%    Kolejny poziom definicji stylów stanowią makra o nazwach typu
%    \cs{hf@empty}.  Stanowią one podstawowe cegiełki zmieniające
%    zawartość nagłówka i stopki.
%
%    Wreszcie zasadnicze definicje stylów wymienionych w~dokumentacji
%    użytkowej wiążą z~poszczególnymi stylami funkcjonalnymi cegiełki
%    wspomniane wyżej oraz definiują odpowiednio polecenia
%    \cs{...mark}. 
%
% \subsubsection{Style składowe}
%
%    Zestaw stylów\dywiz cegiełek odpowiada (z~grubsza) zestwowi
%    stylów stron.
%  \begin{macro}{\hf@empty}
%    Najprostszy jest styl pusty:
%    \begin{macrocode}
\newcommand\hf@empty{%
  \let\@oddhead\@empty \let\@oddfoot\@empty
  \let\@evenhead\@empty \let\@evenfoot\@empty}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\hf@plain}
%    Styl \pstyle{plain} zawiera numer strony wycentrowany w~stopce:
%    \begin{macrocode}
\newcommand\hf@plain{%
  \let\@oddhead\@empty
  \def\@oddfoot{\reset@font\hfil\thepage\hfil}%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\hf@outer}
%    W stylu \pstyle{outer} paginacja znajduje się w~stopce po stronie
%    zewnętrznego marginesu:
%    \begin{macrocode}
\newcommand\hf@outer{%
  \let\@oddhead\@empty
  \def\@oddfoot{\reset@font\hfil\thepage}%
  \let\@evenhead\@empty
  \def\@evenfoot{\reset@font\thepage\hfil}}
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\hf@headings}
%    Teraz przechodzimy do stylów zawierających żywą paginę w~główce
%    strony: 
%    \begin{macrocode}
\newcommand\heading@font{\small\itshape}
\newcommand\hf@headings{%
  \def\@oddhead{\reset@font{\heading@font\rightmark}\hfil\thepage}%
  \let\@oddfoot\@empty
  \def\@evenhead{\reset@font\thepage\hfil\heading@font\leftmark}%
  \let\@evenfoot\@empty
  }
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\hf@uheadings}
%    Wariant poprzedniego z~linią podkreślającą główkę.  Linia jest
%    zaprogramowana tak, aby nie zajmować miejsca --- lokuje się
%    wewnątrz odstępu \cs{headsep}.
%    \begin{macrocode}
\newcommand\hf@uheadings{%
  \def\@oddhead{\vtop{%
      \hb@xt@\textwidth{%
        \reset@font{\heading@font\rightmark}\hfil\thepage\strut}%
      \vskip2pt\hrule\vskip-2.4pt}}%
  \let\@oddfoot\@empty
  \def\@evenhead{\vtop{%
      \hb@xt@\textwidth{%
        \reset@font\strut\thepage\hfil\heading@font\leftmark}%
      \vskip2pt\hrule\vskip-2.4pt}}%
  \let\@evenfoot\@empty
  }
%    \end{macrocode}
%  \end{macro}
%
% \subsubsection{Style stron}
%
%    Przyszła pora zdefiniować prawdziwe style stron (czyli makra
%    \cs{ps@}\pstyle{nazwa stylu}.  Makra te zajmują się również
%    problemem generowania żywej paginy.  Dokładniejszy opis
%    filozoficzny można znaleźć w~dokumentacji angielskich klas
%    dokumentów. 
%
%  \begin{macro}{\ps@empty}
%    Styl pusty w każdej funkcji używa pustych nagłówków i stopek.
%    Polecenia \cs{...mark} sa ignorowane.
%    \begin{macrocode}
\def\ps@empty{%
  \let\@mkboth\@gobbletwo
  \let\ps@normal\hf@empty
  \let\ps@opening\hf@empty
  \let\ps@closing\hf@empty
  \let\ps@blank\hf@empty
  \ps@normal}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\ps@plain}
%    Styl \pstyle{plain} nie ma paginacji na stronach tytułowych i
%    niepełnych kolumnach(??).
%    \begin{macrocode}
\def\ps@plain{%
  \let\@mkboth\@gobbletwo
  \let\ps@normal\hf@plain
  \let\ps@opening\hf@plain
  \let\ps@closing\hf@empty
  \let\ps@blank\hf@empty
  \ps@normal}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\ps@outer}
%    Styl \pstyle{outer} jest zdefiniowany analogicznie.
%    \begin{macrocode}
\def\ps@outer{%
  \let\@mkboth\@gobbletwo
  \let\ps@normal\hf@outer
  \let\ps@opening\hf@outer
  \let\ps@closing\hf@empty
  \let\ps@blank\hf@empty
  \ps@normal}
%    \end{macrocode}
%  \end{macro}
%
% \begin{macro}{\ps@headings}
%    Definicja stylu \pstyle{headings} zależy od tego, czy stosujemy
%    druk dwustronny oraz od klasy dokumentu.  Żywa pagina jest
%    generowana automatycznie (\cs{@mkboth}).
%    \begin{macrocode}
\if@twoside
  \def\ps@headings{%
    \let\@mkboth\markboth
    \let\ps@normal\hf@headings
    \let\ps@opening\hf@empty
    \let\ps@closing\hf@headings
    \let\ps@blank\hf@empty
    \ps@normal
%    \end{macrocode}
%
%    For the article document class we define |\sectionmark| to clear
%    the right mark and put the number of the section (when it is
%    numbered) and its title in the left mark. The rightmark is set by
%    |\subsectionmark| to contain the subsection titles.
%
%    Note the use of |##1| for the parameter of the |\sectionmark|
%    command, which will be defined when |\ps@headings| is executed.
%
%    \begin{macrocode}
%<*article>
    \def\sectionmark##1{%
      \markboth{%
        \ifHeadingNumbered \thesection.\enspace \fi
        ##1}{}}%
    \def\subsectionmark##1{%
      \markright{%
        \ifHeadingNumbered \thesubsection.\enspace \fi
        ##1}}}
%</article>
%    \end{macrocode}
%
%    In the report and book document classes we use the |\chaptermark|
%    and |\sectionmark| macros to fill the running heads.
%
%    \begin{macrocode}
%<*report|book>
    \def\chaptermark##1{%
      \markboth{%
        \ifHeadingNumbered
%<book>     \if@mainmatter
%<book>     \@chapapp\ 
            \thechapter.\enspace
%<book>          \fi
        \fi
        ##1}{}}%
    \def\sectionmark##1{%
      \markright{%
        \ifHeadingNumbered \thesection.\enspace \fi
        ##1}}}
%</report|book>
%    \end{macrocode}
%
%    The definition of |\ps@headings| for one sided printing can be
%    much simpler, because we treat even and odd pages the same.
%    \begin{macrocode}
\else
  \def\ps@headings{%
    \let\@mkboth\markboth
    \let\ps@normal\hf@headings
    \let\ps@opening\hf@empty
    \let\ps@closing\hf@headings
    \let\ps@blank\hf@empty
    \ps@normal
%    \end{macrocode}
%    We use |\markright| now instead of |\markboth| as we did for two
%    sided printing.
%    \begin{macrocode}
%<*article>
    \def\sectionmark##1{%
      \markright{%
        \ifHeadingNumbered \thesection.\enspace \fi
        ##1}}}
%</article>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*report|book>
    \def\chaptermark##1{%
      \markright{%
        \ifHeadingNumbered
%<book>   \if@mainmatter
%<book>     \@chapapp\ 
            \thechapter.\enspace
%<book>   \fi
        \fi
        ##1}}}
%</report|book>
\fi
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ps@myheadings}
%    Początek definicji jest taki, jak dla stylu \pstyle{headings},
%    \begin{macrocode}
\def\ps@myheadings{%
    \let\ps@normal\hf@headings
    \let\ps@opening\hf@empty
    \let\ps@closing\hf@headings
    \let\ps@blank\hf@empty
    \ps@normal
%    \end{macrocode}
%    ale komendy \cs{...mark} w~nagłówkach rozdziałów są ignorowane.
%    \begin{macrocode}
    \let\@mkboth\@gobbletwo
%<!article>    \let\chaptermark\@gobble
    \let\sectionmark\@gobble
%<article>    \let\subsectionmark\@gobble
    }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ps@uheadings}
%    Definicja stylu \pstyle{uheadings} różni się od \pstyle{headings}
%    tylko innym stylem bazowym.
%    \begin{macrocode}
\if@twoside
  \def\ps@uheadings{%
    \let\@mkboth\markboth
    \let\ps@normal\hf@uheadings
    \let\ps@opening\hf@empty
    \let\ps@closing\hf@uheadings
    \let\ps@blank\hf@empty
    \ps@normal
%<*article>
    \def\sectionmark##1{%
      \markboth{%
        \ifHeadingNumbered \thesection.\enspace \fi
        ##1}{}}%
    \def\subsectionmark##1{%
      \markright{%
        \ifHeadingNumbered \thesubsection.\enspace \fi
        ##1}}}
%</article>
%<*report|book>
    \def\chaptermark##1{%
      \markboth{%
        \ifHeadingNumbered
%<book>   \if@mainmatter
%<book>     \@chapapp\ 
            \thechapter.\enspace
%<book>   \fi
        \fi
        ##1}{}}%
    \def\sectionmark##1{%
      \markright{%
        \ifHeadingNumbered \thesection.\enspace \fi
        ##1}}}
%</report|book>
%    \end{macrocode}
%    I dla druku jednostronnego:
%    \begin{macrocode}
\else
  \def\ps@uheadings{%
    \let\@mkboth\markboth
    \let\ps@normal\hf@uheadings
    \let\ps@opening\hf@empty
    \let\ps@closing\hf@uheadings
    \let\ps@blank\hf@empty
    \ps@normal
%<*article>
    \def\sectionmark##1{%
      \markright{%
        \ifHeadingNumbered \thesection.\enspace \fi
        ##1}}}
%</article>
%<*report|book>
    \def\chaptermark##1{%
      \markright{%
        \ifHeadingNumbered
%<book>   \if@mainmatter
%<book>     \@chapapp\ 
            \thechapter.\enspace
%<book>   \fi
        \fi
        ##1}}}
%</report|book>
\fi
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ps@myuheadings}
%    Podobnie ma się \pstyle{myuheadings} do \pstyle{uheadings}.
%    \begin{macrocode}
\def\ps@myuheadings{%
    \let\ps@normal\hf@uheadings
    \let\ps@opening\hf@empty
    \let\ps@closing\hf@uheadings
    \let\ps@blank\hf@empty
    \ps@normal
    \let\@mkboth\@gobbletwo
%<!article>    \let\chaptermark\@gobble
    \let\sectionmark\@gobble
%<article>    \let\subsectionmark\@gobble
    }
%    \end{macrocode}
% \end{macro}
%
% \section{Document Markup}
%
% \subsection{Karta tytułowa}
%
% \begin{macro}{\title}
% \begin{macro}{\author}
% \begin{macro}{\date}
%    These three macros are provided by \file{latex.dtx} to provide
%    information about the title, author(s) and date of the document.
%    The information is stored away in internal control sequences.
%    It is the task of the |\maketitle| command to use the
%    information provided. The definitions of these macros are shown
%    here for information.
%    \begin{macrocode}
% \newcommand*{\title}[1]{\gdef\@title{#1}}
% \newcommand*{\author}[1]{\gdef\@author{#1}}
% \newcommand*{\date}[1]{\gdef\@date{#1}}
%    \end{macrocode}
%    Umieszczanie daty w tytule dokumentu po polsku nie wydaje się być
%    zbyt rozpowszechnione, więc domyślnie \cs{date} jest puste.
%    \begin{macrocode}
\let\@date\@empty
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\maketitle}
%    Definicja \cs{maketitle} jest zależna od tego, czy tytuł ma być
%    umieszczony na oddzielnej stronie.
%
%    When we are making a title page, we locally redefine
%    |\footnotesize| and |footnoterule| to change the appearance of
%    the footnotes that are produced by the |\thanks| command;
%    these changes affect all footnotes.
%    \begin{macrocode}
  \if@titlepage
  \newcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
%    \end{macrocode}
%
%    \begin{macrocode}
  \null\vfill
%    \end{macrocode}
%    Kolejność umieszczenia autora i tytułu zależy od przełącznika
%    \cs{if@authorfirst}.
%    \begin{macrocode}
  \begin{center}%
  \titlefont
  {\large
    \if@authorfirst\else
    {\LARGE \@title \par}%
    \vskip6ex \fi
      {\normalsize  
      \begin{tabular}[t]{c}%
        \Large\strut\@author
      \end{tabular}\par}%
    \if@authorfirst
        \vskip6ex
    {\LARGE \@title \par}}\fi
  \end{center}\par
%    \end{macrocode}
%    Then we call |\@thanks| to print the information that goes into
%    the footnote and finish the page.
%    \begin{macrocode}
  \vfill\vfill
  {\centering\normalsize \@date \par}
  \@thanks
  \end{titlepage}%
%    \end{macrocode}
%    We reset the \Lcount{footnote} counter, disable |\thanks| and
%    |\maketitle| and save some storage space by emptying the internal
%    information macros.
%    \begin{macrocode}
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
%    \end{macrocode}
%    After the title is set the declaration commands |\title|, etc.\
%    can vanish.
%    The definition of |\and| makes only sense within the argument of
%    |\author| so this can go as well.
%    \begin{macrocode}
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
%    \end{macrocode}
%    Gdy tytuł zajmuje oddzielną stronę nazwiska autorów umieszczamy
%    jedno pod drugim: 
%    \begin{macrocode}
\def\and{\\\Large\strut}
%    \end{macrocode}
%    When the title is not on a page of its own, the layout of the
%    title is a little different. We use symbols to mark the footnotes
%    and we have to deal with two column documents.
%
%    Therefore we first start a new group to keep changes local. Then
%    we redefine |\thefootnote| to use |\fnsymbol|.
%    \begin{macrocode}
\else
\newcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \long\def\@makefntext##1{
        \parindent\@parindent
        \@textsuperscript{\normalfont\@thefnmark}\enspace##1}%
%    \end{macrocode}
%    If this is a twocolumn document we start a new page in twocolumn
%    mode, with the title set to the full width of the text. The
%    actual printing of the title information is left to
%    |\@maketitle|.
%    \begin{macrocode}
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
%    \end{macrocode}
%    When this is not a twocolumn document we just start a new page,
%    prevent floating objects from appearing on the top of this page
%    and print the title information.
%    \begin{macrocode}
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
%    \end{macrocode}
%    This page gets a \pstyle{plain} layout. We call |\@thanks| to
%    produce the footnotes.
%    \begin{macrocode}
    \thispagestyle{opening}\@thanks
%    \end{macrocode}
%    Now we can close the group, reset the \Lcount{footnote} counter,
%    disable |\thanks|, |\maketitle| and |\@maketitle| and save some
%    storage space by emptying the internal information macros.
%    \begin{macrocode}
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@maketitle}
%    This macro takes care of formatting the title information when we
%    have no separate title page.
%
%    \begin{macrocode}
\def\@maketitle{%
  \newpage
  \null
  \vskip 2\baselineskip
  \begin{center}%
  \let \footnote \thanks
    \titlefont\large
    \if@authorfirst\else
    {\LARGE \@title \par}%
    \vskip\baselineskip \fi
    {\normalsize
      \begin{tabular}[t]{c}%
        \large\strut\@author
      \end{tabular}\par}%
    \if@authorfirst
      \vskip\baselineskip
    {\LARGE \@title \par}\fi
    \ifx\@date\@empty\else
    \vskip \baselineskip
    {\normalsize\@date}\fi
  \end{center}%
  \par
  \vskip 2\baselineskip
  }
%    \end{macrocode}
%    W tym przypadku umieszczamy nazwiska autorów obok siebie
%    oddzielone firetem.
%    \begin{macrocode}
\def\and{%                  % \begin{tabular}
  \end{tabular}%
  \quad
  \begin{tabular}[t]{c}%
  \large\strut}%   % \end{tabular}
\fi
%    \end{macrocode}
% \end{macro}
%
% \subsection{Chapters and Sections}
%
% \subsubsection{Building blocks} 
%    Następujące dalej definicje używają makra \cs{@startsection}
%    zdefiniowanego w~kernelu \LaTeX a.  Niestety musimy wprowadzić do
%    niego niejakie modyfikacje.
%
%  \begin{macro}{\@sect}
%    To jest część \cs{@startsection} odpowiedzialna za formatowanie
%    numerowanych tytułów podrozdziałów.
%    \begin{macrocode}
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
  \else
    \refstepcounter{#1}%
    \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  \fi
  \@tempskipa #5\relax
  \ifdim \@tempskipa>\z@
    \begingroup
      \normalfont\sectfont#6{%
        \language\l@nohyphenation \raggedright
        \interlinepenalty \@M 
        \leftskip #3\noindent
        \@svsec\ignorespaces
        #8\@@par}%
    \endgroup
    \csname #1mark\endcsname{#7}%
    \addcontentsline{toc}{#1}{%
      \ifnum #2>\c@secnumdepth \else
        \protect\numberline{\csname the#1\endcsname.}%
      \fi
      #8}%
  \else
    \def\@svsechd{%
      \normalfont\sectfont#6{\hskip #3\relax
      \@svsec\ignorespaces #8}%
      \csname #1mark\endcsname{#7}%
      \addcontentsline{toc}{#1}{%
        \ifnum #2>\c@secnumdepth \else
          \protect\numberline{\csname the#1\endcsname.}%
        \fi
        #8}}%
  \fi
  \@xsect{#5}}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\@ssect}
%    A to dla podrozdziałów nienumerowanych.
%    \begin{macrocode}
\def\@ssect#1#2#3#4#5{%
  \@tempskipa #3\relax
  \ifdim \@tempskipa>\z@
    \begingroup
      \normalfont\sectfont#4{%
        \language\l@nohyphenation \raggedright
        \interlinepenalty \@M 
        \leftskip #1\noindent\ignorespaces
        #5\@@par}%
    \endgroup
  \else
    \def\@svsechd{\normalfont\sectfont#4{\hskip #1\relax #5}}%
  \fi
  \@xsect{#3}}
%    \end{macrocode}
%  \end{macro}
%
%    Wedle polskich zwyczajów po tytułach stosuje się normalne wcięcie
%    akapitowe.  Następujące hakerstwo wyłącza mechanizm wyłączający
%    wcięcia po tytułach.
%    \begin{macrocode}
% \let\@afterindentfalse\@afterindenttrue
% \@afterindenttrue
%    \end{macrocode}
%
% \subsubsection{Polecenia \cs{...mark}}
%
% \begin{macro}{\chaptermark}
% \begin{macro}{\sectionmark}
% \begin{macro}{\subsectionmark}
% \begin{macro}{\subsubsectionmark}
% \begin{macro}{\paragraphmark}
% \begin{macro}{\subparagraphmark}
%    Default initializations of |\...mark| commands.  These commands
%    are used in the definition of the page styles. Most of them are
%    already defined by \file{latex.ltx}, so they are only shown here.
%
%    \begin{macrocode}
\newcommand*\partmark[1]{\markboth{}{}}
%<!article>\newcommand*\chaptermark[1]{}
% \newcommand*\sectionmark[1]{}
% \newcommand*\subsectionmark[1]{}
% \newcommand*\subsubsectionmark[1]{}
% \newcommand*\paragraphmark[1]{}
% \newcommand*\subparagraphmark[1]{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Define Counters}
%
% \begin{macro}{\c@secnumdepth}
%    The value of the counter \Lcount{secnumdepth} gives the depth of
%    the highest-level sectioning command that is to produce section
%    numbers.
%    \begin{macrocode}
%<article>\setcounter{secnumdepth}{3}
%<!article>\setcounter{secnumdepth}{2}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@part}
% \begin{macro}{\c@chapter}
% \begin{macro}{\c@section}
% \begin{macro}{\c@subsection}
% \begin{macro}{\c@subsubsection}
% \begin{macro}{\c@paragraph}
% \begin{macro}{\c@subparagraph}
%    These counters are used for the section numbers. The macro\\
%    |\newcounter{|\meta{newctr}|}[|\meta{oldctr}|]|\\
%     defines\meta{newctr} to be a counter, which is reset to zero when
%    counter \meta{oldctr} is stepped. Counter \meta{oldctr} must
%    already be defined.
%
%    \begin{macrocode}
\newcounter {part}
%<article>\newcounter {section}
%<*report|book>
\newcounter {chapter}
\newcounter {section}[chapter]
%</report|book>
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\thepart}
% \begin{macro}{\thechapter}
% \begin{macro}{\thesection}
% \begin{macro}{\thesubsection}
% \begin{macro}{\thesubsubsection}
% \begin{macro}{\theparagraph}
% \begin{macro}{\thesubparagraph}
%    For any counter \Lcount{CTR}, |\theCTR| is a macro that defines
%    the printed version of counter \Lcount{CTR}.  It is defined in
%    terms of the following macros:
%
%    |\arabic{|\Lcount{COUNTER}|}| prints the value of
%    \Lcount{COUNTER} as an arabic numeral.
%
%    |\roman{|\Lcount{COUNTER}|}| prints the value of
%    \Lcount{COUNTER} as a lowercase roman numberal.
%
%    |\Roman{|\Lcount{COUNTER}|}| prints the value of
%    \Lcount{COUNTER} as an uppercase roman numberal.
%
%    |\alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER}
%    as a lowercase letter: $1 =$~a, $2 =$~ b, etc.
%
%    |\Alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER}
%    as an uppercase letter: $1 =$~A, $2 =$~B, etc.
%
%    Actually to save space the internal counter repesentations
%    and the commands operating on those are used.
%    \begin{macrocode}
\renewcommand \thepart {\@Roman\c@part}
%<article>\renewcommand \thesection {\@arabic\c@section}
%<*report|book>
\renewcommand \thechapter {\@arabic\c@chapter}
\renewcommand \thesection {\thechapter.\@arabic\c@section}
%</report|book>
\renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}
\renewcommand\theparagraph    {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@chapapp}
%    |\@chapapp| is initially defined to be `|\chaptername|'. The
%    |\appendix| command redefines it to be `|\appendixname|'.
%
%    \begin{macrocode}
%<report|book>\newcommand\@chapapp{\chaptername}
%    \end{macrocode}
% \end{macro}
%
%  \begin{macro}{\@seccntformat}
%    Na potrzeby polskości zmieniamy zdefiniowane przez jądro makro
%    \cs{@seccntformat}: dodajemy kropkę i zmieniamy odstęp na pół
%    fireta. 
%    \begin{macrocode}
\renewcommand*\@seccntformat[1]{\csname the#1\endcsname.\enspace}
%    \end{macrocode}
%  \end{macro}
%
%  \subsubsection{Front Matter, Main Matter, and Back Matter}
%
%  \begin{macro}{\cleardoublepage}
%    Przedefiniowujemy zdefiniowane w~kernelu makro
%    \cs{cleardoublepage} tak, aby ewentualna pusta strona nie miała
%    paginacji. 
%    \begin{macrocode}
\def\cleardoublepage{\clearpage
  \if@twoside 
    \ifodd\c@page\else
      \hbox{}\thispagestyle{blank}\newpage
      \if@twocolumn\hbox{}\newpage\fi
    \fi
  \fi}
%    \end{macrocode}
%  \end{macro}
%
%    A book contains these three (logical) sections. The switch
%    |\@mainmatter| is true iff we are processing Main Matter.  When
%    this switch is false, the |\chapter| command does not print
%    chapter numbers.
%
%    Here we define the commands that start these sections.
%  \begin{macro}{\frontmatter}
%    This command starts Roman page numbering and turns off chapter
%    numbering.  Since this restarts the page numbering from 1, it
%    should also ensure that a recto page is used.
%    \begin{macrocode}
%<*book>
\newcommand\frontmatter{%
  \cleardoublepage
  \@mainmatterfalse
  \pagenumbering{Roman}}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\mainmatter}
%    This command clears the page, starts arabic page numbering and 
%    turns on chapter numbering.  Since this restarts the page numbering
%    from 1, it should also ensure that a recto page is used.
%    \begin{macrocode}
\newcommand\mainmatter{%
  \cleardoublepage
  \@mainmattertrue
  \pagenumbering{arabic}}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\backmatter}
%    This clears the page, turns off chapter numbering and leaves page 
%    numbering unchanged.
%    \begin{macrocode}
\newcommand\backmatter{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \@mainmatterfalse}
%</book>
%    \end{macrocode}
%  \end{macro}
%
% \subsubsection{Cegiełki składowe}
% 
%  \begin{macro}{\if@HeadingRunIn}
%    Reprezentacja flag, które mogą pojawić się w~tytulariach.
%    Odpowiadają one za a)~nagłówki rozpoczynające akapit
%    (\emph{run-in}) (r/v), b)~wymuszenie łamania strony przed (jak
%    w~\cs{chapter}) (b/n), c)~wymuszenie łamania strony po (jak
%    w~\cs{part}) (b/n), d)~czy tytuł zajmuje wszystkie łamy, czy tylko
%    bieżący (w/c). 
%    \begin{macrocode}
%\newif\if@HeadingRunIn
%\newif\if@HeadingBreakBefore
%\newif\if@HeadingBreakAfter
%\newif\if@HeadingWholeWidth
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\mw@getflags}
%    Powyższe flagi dla poszczególnych poziomów tytulariów są
%    przechowywane w~postaci czterech znaków stanowiących treść makra
%    \cs{...@flags}.  Poniższe makro ustawia flagi na podstawie tej
%    upakowanej postaci.
%    \begin{macrocode}
\newcommand*\mw@getflags[1]{%
  \expandafter\expandafter\expandafter
  \mw@getflagsx\csname#1@flags\endcsname}
\newcommand*\mw@getflagsx[4]{%
  \def\mw@HeadingRunIn{1#1}%
  \def\mw@HeadingBreakBefore{1#2}%
  \def\mw@HeadingBreakAfter{1#3}%
  \def\mw@HeadingWholeWidth{1#4}%
}
\newcommand*\mw@setflags[1]{%
  \expandafter\edef\csname#1@flags\endcsname{%
    \if\mw@HeadingRunIn 1\else 0\fi
    \if\mw@HeadingBreakBefore 1\else 0\fi
    \if\mw@HeadingBreakAfter 1\else 0\fi
    \if\mw@HeadingWholeWidth 1\else 0\fi
  }
 }
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\mw@section}
%    Argumenty: 1 --- nazwa, 2 --- poziom
%    \begin{macrocode}
\newcommand*\mw@section[2]{%
  \mw@getflags{#1}%
%    \end{macrocode}
%    \cs{@noskipsec} jest prawdziwe jeśli w~dokumencie przed danym
%    nagłówkiem wystąpił bezodstępowy
%    nagłówek (\cs{paragraph}) sekcji bez treści.  \cs{leavevmode}
%    wprowadza nowy pusty akapit, żeby się wypróżniło \cs{everypar}.
%    \begin{macrocode}
  \if@noskipsec \leavevmode \fi
  \par
  \if@nobreak \everypar{}\fi
  \@ifstar
    {\HeadingNumberedfalse\@dblarg{\mw@sectionx{#1}{#2}}}%
    {\HeadingNumberedtrue\@dblarg{\mw@sectionx{#1}{#2}}}}
%    \end{macrocode}
%  \end{macro}
%
% 
%  \begin{macro}{\mw@sectionx}
%    
%    \begin{macrocode}
\def\mw@sectionx#1#2[#3]{%
  \@dblarg{\mw@sectionxx{#1}{#2}{#3}}}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\mw@sectionxx}
%    
%    \begin{macrocode}
\def\mw@sectionxx#1#2#3[#4]#5{%
  \ifHeadingNumbered
      \ifnum #2>\c@secnumdepth \HeadingNumberedfalse \fi
%<book> \if@mainmatter\else \HeadingNumberedfalse \fi
  \fi
  \ifHeadingNumbered
    \refstepcounter{#1}%
    \protected@edef\HeadingNumber{\csname the#1\endcsname\relax}%
  \else
    \let\HeadingNumber\@empty
  \fi
  \def\HeadingRHeadText{#3}%
  \def\HeadingTOCText{#4}%
  \def\HeadingText{#5}%
  \def\mw@HeadingLevel{#2 }% space delimits level number!
  \def\mw@HeadingType{#1}%
  \if\mw@HeadingBreakBefore
    \if@specialpage\else\thispagestyle{closing}\fi
%<!article> \if@openright\cleardoublepage\else
            \clearpage
%<!article> \fi
    \if\mw@HeadingBreakAfter
      \thispagestyle{blank}\else
      \thispagestyle{opening}\fi
%    \end{macrocode}
%    Then we prevent floats from appearing at the top of this page
%    because it looks weird to see a floating object above a chapter
%    title. ???
%    \begin{macrocode}
       \global\@topnum\z@
    \fi
%%
  \if\mw@HeadingRunIn 
    \mw@runinheading
  \else
    \if\mw@HeadingWholeWidth
      \if@twocolumn
%    \end{macrocode}
%    When we are making a two column document, this will be a one
%    column page. We use |@tempswa| to remember to switch back to two
%    columns.
%    \begin{macrocode}
        \if\mw@HeadingBreakAfter
        \onecolumn
        \mw@normalheading
        \pagebreak\relax
%    \end{macrocode}
%    Then, when we are in twosided mode, we produce a completely blank
%    page.
%    \begin{macrocode}
              \if@twoside
                \null
                \thispagestyle{blank}%
                \newpage
              \fi
        \twocolumn
        \else
          \@topnewpage[\mw@normalheading]%
        \fi
      \else
        \mw@normalheading
      \fi
    \else
      \mw@normalheading
    \fi
  \fi  
  }
%    \end{macrocode}
%  \end{macro}
% 
%  \begin{macro}{\mw@markandtoc}
%    
%    \begin{macrocode}
\newcommand*\mw@markandtoc{%
%  \ifHeadingNumbered
     \csname \mw@HeadingType mark\endcsname{\HeadingRHeadText}%
     \ifnum \mw@HeadingLevel>\c@tocdepth \else
       \expandafter\ifx\csname \mw@HeadingType @toc\endcsname\relax
         \addcontentsline{toc}{\mw@HeadingType }{\ifHeadingNumbered
           \protect\numberline{\mw@seccntformat{\HeadingNumber}}\fi
           \HeadingTOCText}%
       \else
         \csname \mw@HeadingType @toc\endcsname
       \fi
     \fi
%  \fi
  }%
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\mw@seccntformat}
%    
%    \begin{macrocode}
\def\mw@seccntformat#1{#1.\enspace}
%    \end{macrocode}
%  \end{macro}
% 
%  \begin{macro}{\mw@normalheading}
%    
%    \begin{macrocode}
\newcommand*\mw@normalheading{%
  \if\mw@HeadingBreakBefore \null \else \addpenalty\@secpenalty \fi
  \addvspace{\csname \mw@HeadingType @preskip\endcsname}%
  \bgroup\language\l@nohyphenation
   \raggedright
   \interlinepenalty\@M
   \normalfont\sectfont
   \csname \mw@HeadingType @head\endcsname
   \@@par
  \egroup
  \mw@markandtoc
  \nobreak
  \vskip\csname\mw@HeadingType @postskip\endcsname
  \@afterheading
 }
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\mw@runinheading}
%    To ma służyć do składu \cs{paragraph}ów
%    i~\cs{subparagraph}ów. 
%    \begin{macrocode}
\newcommand*\mw@runinheading{%
    \addvspace{\csname \mw@HeadingType @preskip\endcsname}%
    \@nobreakfalse
    \global\@noskipsectrue
    \everypar{%
      \if@noskipsec
        \global\@noskipsecfalse
       {\setbox\z@\lastbox}%
        \clubpenalty\@M
        \bgroup\language\l@nohyphenation
           \normalfont\sectfont
           \csname \mw@HeadingType @head\endcsname
        \egroup
        \mw@markandtoc
        \hspace{\csname\mw@HeadingType @postskip\endcsname}%
      \else
        \clubpenalty \@clubpenalty
        \everypar{}%
      \fi}
}
%    \end{macrocode}
%  \end{macro}
%
%  \subsubsection{Szablony nagłówków} 
%
%  \begin{macro}{\FormatBlockHeading}
%    
%    \begin{macrocode}
\let\@titleindent\z@
%\let\@titleindent\@parindent

\newcommand*\FormatBlockHeading[1]{%
  \leftskip\@titleindent
  #1{\noindent
  \ifHeadingNumbered\mw@seccntformat\HeadingNumber\fi
  \ignorespaces\HeadingText\@@par}
  }
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\FormatHangHeading}
%    
%    \begin{macrocode}
\newcommand*\FormatHangHeading[1]{%
  #1{%
    \@hangfrom{\hskip\@titleindent
        \ifHeadingNumbered\mw@seccntformat\HeadingNumber\fi}%
    \ignorespaces\HeadingText\@@par}%
  }
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\FormatChapterHeading}
%    
%    \begin{macrocode}
\newcommand*\FormatChapterHeading[3]{%
  \ifHeadingNumbered
   #2\HeadingNumber\par\nobreak
   \vspace{#1}%
  \fi
  #3\HeadingText\par\nobreak
  }
%    \end{macrocode}
%  \end{macro}
% 
%  \begin{macro}{\FormatRunInHeading}
%    
%    \begin{macrocode}
\newcommand*\FormatRunInHeading[1]{%
  \hskip\@titleindent
  #1{%
  \ifHeadingNumbered\mw@seccntformat\HeadingNumber\fi
  \ignorespaces\HeadingText\unskip}%
}
%    \end{macrocode}
%  \end{macro}
%
% \subsubsection{The bright new sectioning API}
%
%
%  \begin{macro}{\DeclareSectioningCommand}
%    
%    \begin{macrocode}
\newcommand*\DeclareSectioningCommand[6][default]{%
 \def\mw@HeadingRunIn{10}\def\mw@HeadingBreakBefore{10}%
 \def\mw@HeadingBreakAfter{10}\def\mw@HeadingWholeWidth{10}%
 \mw@processflags#1,\relax
 \expandafter\def\csname #2\endcsname{\mw@section{#2}{#3}}%
 \expandafter\def\csname #2@preskip\endcsname{#4}%
 \expandafter\def\csname #2@head\endcsname{#5}%
 \expandafter\def\csname #2@postskip\endcsname{#6}%
 \mw@setflags{#2}%
 }
%    \end{macrocode}
%  \end{macro}
% 
%  \begin{macro}{\mw@processflags}
%    
%    \begin{macrocode}
\def\mw@processflags#1,#2\relax{%
  \expandafter\ifx\csname sec@@flag@#1\endcsname\relax
        \ClassError{mwcls}{Unknown sectioning flag `#1'}{}\else
  \csname sec@@flag@#1\endcsname\fi
  \if,#2,\else \mw@processflags#2\relax \fi
  }
\def\sec@@flag@default{}
\def\sec@@flag@runin{\def\mw@HeadingRunIn{11}}
\def\sec@@flag@breakbefore{\def\mw@HeadingBreakBefore{11}}
\def\sec@@flag@breakafter{\def\mw@HeadingBreakAfter{11}}
\def\sec@@flag@wholewidth{\def\mw@HeadingWholeWidth{11}}
%    \end{macrocode}
%  \end{macro}
%
% 
% \subsubsection{Cz\k{e}\'sci}
%
% 
%  \begin{macro}{\part}
%    
%    \begin{macrocode}
%<*article>
\DeclareSectioningCommand{part}{-1}
        {3\baselineskip plus \baselineskip}
        {\FormatChapterHeading{12\p@}%
                {\large\partname\space}{\LARGE}}
        {3ex}
%</article>
%<*report|book>
\DeclareSectioningCommand[breakbefore,breakafter,wholewidth]{part}{-1}
        {0\p@ plus1fil}
        {\FormatChapterHeading{20\p@}%
                {\centering\large\partname\space}%
                {\centering\LARGE}}
        {0\p@ plus1fil}
%</report|book>
%    \end{macrocode}
%  \end{macro}
%
% \subsubsection{Rozdziały}
% 
%  \begin{macro}{\chapter}
%    Właściwy układ tytułów rozdziałów łatwo uzyskujemy przy pomocy
%    wcześniej przygotowanych szablonów:
%    \begin{macrocode}
%<*book>
\DeclareSectioningCommand[breakbefore,wholewidth]{chapter}{0}
        {56\p@}
        {\FormatChapterHeading{12\p@}{\large\@chapapp\space}{\LARGE}}
        {24\p@}
%</book>
%<*report>
\DeclareSectioningCommand[breakbefore,wholewidth]{chapter}{0}
        {56\p@}
        {\FormatBlockHeading{\LARGE}}
        {24\p@}
%</report>
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\chapter@prehead}
%    Ponieważ rozdział zawsze zaczyna się od nowej strony,
%    wykorzystujemy makro \cs{chapter@prehead} do dodania stosownych
%    poleceń przed nagłówkiem.  Zaczynamy od ustawienia stylu dla
%    ostatniej strony poprzedniego rozdziału na \pstyle{closing} (ale
%    tylko jeśli na tej stronie nie użyto jeszcze polecenia
%    \cs{thispagestyle} --- w~szczególności jednostronicowe rozdziały
%    mają jednak styl \pstyle{opening}).  Następnie kończymy stronę,
%    ewentualnie wypuszczamy jedną pustą, wreszcie ustawiamy styl
%    pierwszej strony nowego rozdziału na \pstyle{opening}.
%    \begin{macrocode}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\chapter@toc}
%    
%    \begin{macrocode}
\newcommand*\chapter@toc{%
  \ifHeadingNumbered\typeout{\@chapapp\space\thechapter.}\fi
  \addcontentsline{toc}{chapter}{%
        \ifHeadingNumbered
%<report> \protect\numberline{\mw@seccntformat{\HeadingNumber}}%
%<book> \mw@seccntformat{\@chapapp\ \HeadingNumber}%
        \fi
        \HeadingTOCText}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  }
%    \end{macrocode}
%  \end{macro}
%
%    \begin{macrocode}
%                         
%                         \addcontentsline{toc}{chapter}{%
% %<report>                          \protect\numberline{%
% %<book>                              \@chapapp\
%                                      \thechapter
% <report>                            }%
% <book>                              .\enspace
%    \end{macrocode}
%
%
% \subsubsection{Nagłówki niższych rzędów}
%
% \begin{macro}{\section}
%    
%    \begin{macrocode}
\DeclareSectioningCommand{section}{1}
        {24\p@\@plus5\p@\@minus2\p@}
        {\FormatHangHeading{\large}}
        {10\p@\@plus3\p@}
%
\DeclareSectioningCommand{subsection}{2}
        {16\p@\@plus4\p@\@minus1\p@}
        {\FormatHangHeading{}}
        {6\p@\@plus2\p@}
%
\DeclareSectioningCommand{subsubsection}{3}
        {10\p@\@plus2\p@\@minus1\p@}
        {\FormatHangHeading{}}
        {4\p@\@plus1\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\paragraph}
%    This gives a run-in heading with white space above and to the
%    right of the heading, the title set in |\normalsize\bfseries|.
%    \begin{macrocode}
\DeclareSectioningCommand[runin]{paragraph}{4}
        {\bigskipamount}
        {\FormatRunInHeading{}}
        {.5em}
%
\DeclareSectioningCommand[runin]{subparagraph}{5}
        {\medskipamount}
        {\FormatRunInHeading{}}
        {.5em}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Środowiska listowe}
%
% \subsubsection{Parametry dotyczące wszystkich list}
%
% The following commands are used to set the default values for the list
% environment's parameters. See the \LaTeX{} manual for an explanation
% of the meanings of the parameters.  Defaults for the list
% environment are set as follows.  First, |\rightmargin|,
% |\listparindent| and |\itemindent| are set to 0pt.  Then, for a Kth
% level list, the command |\@listK| is called, where `K' denotes `i',
% '`i', ... , `vi'.  (I.e., |\@listiii| is called for a third-level
% list.)  By convention, |\@listK| should set |\leftmargin| to
% |\leftmarginK|.
%
% \begin{macro}{\leftmargin}
% \begin{macro}{\leftmargini}
% \begin{macro}{\leftmarginii}
% \begin{macro}{\leftmarginiii}
% \begin{macro}{\leftmarginiv}
% \begin{macro}{\leftmarginv}
% \begin{macro}{\leftmarginvi}
% When we are in two column mode some of the margins are set somewhat
% smaller.
%    \begin{macrocode}
%<*article|report|book>
\setlength\leftmargini{1\parindent}
%    \end{macrocode}
%    Until the whole of the parameter setting in these files is
%    rationalised, we need to set the value of |\leftmargin| at this
%    outer level.
%    \begin{macrocode}
\leftmargin  \leftmargini
%    \end{macrocode}
%    The following three are calculated so  that they are larger than
%    the sum of |\labelsep| and the width of the default labels (which
%    are `(m)', `vii.' and `M.').
%    \begin{macrocode}
\setlength\leftmarginii  {\parindent}
\setlength\leftmarginiii {\parindent}
\setlength\leftmarginiv  {\parindent}
\if@twocolumn
  \setlength\leftmarginv  {.5em}
  \setlength\leftmarginvi {.5em}
\else
  \setlength\leftmarginv  {1em}
  \setlength\leftmarginvi {1em}
\fi
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\labelsep}
% \begin{macro}{\labelwidth}
%    |\labelsep| is the distance between the label and the text of an
%    item; |\labelwidth| is the width of the label.
%    \begin{macrocode}
\setlength  \labelsep  {.5em}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\partopsep}
%    When the user leaves a blank line before the environment an extra
%    vertical space of |\partopsep| is inserted, in addition to
%    |\parskip| and |\topsep|.
%    \begin{macrocode}
\setlength\partopsep{0\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@beginparpenalty}
% \begin{macro}{\@endparpenalty}
%    These penalties are inserted before and after a list or paragraph
%    environment. They are set to a bonus value to encourage page
%    breaking at these points.
% \begin{macro}{\@itempenalty}
%    This penalty is inserted between list items.
%    \begin{macrocode}
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@listi}
%    Parametry dla pierwszego poziomu środowisk listowych, to znaczy
%    list, które nie są zagnieżdżone wewnątrz innych list.
%
% W naszej tradycji typograficznej unika się pionowych świateł
% w~środowiskach listowych.  Dlatego wszystkie parametry
% odpowiedzialne za odstępy pionowe zostały wyzerowane z~wyjątkiem
% małych odstępów wokół listy jako całości.
%
%    \begin{macrocode}
\def\@listi{\leftmargin\leftmargini
  \parsep  \z@
  \topsep  .5\baselineskip plus .25\baselineskip minus
           .125\baselineskip 
% \partopsep .5\baselineskip
  \itemsep \z@}
%    \end{macrocode}
%    We initialise the parameters although strictly speaking that
%    is not necessary.
%    \begin{macrocode}
\@listi
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@listii}
% \begin{macro}{\@listiii}
% \begin{macro}{\@listiv}
% \begin{macro}{\@listv}
% \begin{macro}{\@listvi}
%    Parametry dla zagnieżdżonych list.  Tutaj wszystkie odstępy
%    pionowe wyzerowane.
%    \begin{macrocode}
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \topsep  \z@
              \parsep  \z@
              \itemsep \z@}
\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
              \itemsep   \z@}
\def\@listiv {\leftmargin\leftmarginiv
              \labelwidth\leftmarginiv
              \advance\labelwidth-\labelsep}
\def\@listv  {\leftmargin\leftmarginv
              \labelwidth\leftmarginv
              \advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
              \labelwidth\leftmarginvi
              \advance\labelwidth-\labelsep}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Środowisko \env{enumerate}}
%
%  \begin{macro}{\enumerate}
%    Dokonujemy drobnej zmiany w~definicji środowiska.  Pomysł jest
%    mianowicie taki: odstęp zadany przez \cs{topsep} będzie stosowany
%    dla \env{enumerate} tylko, jeśli przed jego początkiem jest pusta
%    linia, czyli jeśli środowisko zaczyna nowy akapit.  W~przeciwnym
%    przypadku uznajemy, że tekst wewnątrz \env{enumerate} jest
%    częścią zdania rozpoczętego przed nim i odstęp jest
%    niepotrzebny.
%    \begin{macrocode}
\def\enumerate{%
  \ifnum \@enumdepth >\thr@@\@toodeep\else
    \advance\@enumdepth\@ne
    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
      \expandafter
      \list
        \csname label\@enumctr\endcsname
        {\partopsep\topsep \topsep\z@ %MW
        \usecounter\@enumctr\def\makelabel##1{##1\hfil}}%
  \fi}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\enumerate*}
%    Długa wersja \env{enumerate} --- zwykłe ponumerowane akapity.
%    \begin{macrocode}
\newenvironment*{enumerate*}{%
  \ifnum \@enumdepth >\thr@@\@toodeep\else
    \advance\@enumdepth\@ne
    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
      \expandafter
      \list
        \csname label\@enumctr\endcsname
        {\partopsep\topsep \topsep\z@ %MW
        \leftmargin\z@ \labelwidth\z@
        \itemindent\@parindent \advance\itemindent\labelsep
        \usecounter\@enumctr\def\makelabel##1{##1\hfil}}%
  \fi}
  {\endlist}
%    \end{macrocode}
%  \end{macro}
%
%    The enumerate environment uses  four counters: \Lcount{enumi},
%    \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where
%    \Lcount{enumN} controls the numbering of the Nth level
%    enumeration.
%
% \begin{macro}{\theenumi}
% \begin{macro}{\theenumii}
% \begin{macro}{\theenumiii}
% \begin{macro}{\theenumiv}
%    The counters are already defined in \file{latex.dtx}, but their
%    representation is changed here.
%
%    \begin{macrocode}
\renewcommand\theenumi{\@arabic\c@enumi}
\renewcommand\theenumii{\@alph\c@enumii}
\renewcommand\theenumiii{\@roman\c@enumiii}
\renewcommand\theenumiv{\@Alph\c@enumiv}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\labelenumi}
% \begin{macro}{\labelenumii}
% \begin{macro}{\labelenumiii}
% \begin{macro}{\labelenumiv}
%    Wydaje się rozsądne numerowanie pierwszego poziomu wyliczeń
%    1., 2., 3., \dots a drugiego a), b), c), \dots.  [Ale co dalej?]
%    \begin{macrocode}
\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{\theenumii)}
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\p@enumii}
% \begin{macro}{\p@enumiii}
% \begin{macro}{\p@enumiv}
%    The expansion of |\p@enumN||\theenumN| defines the output of a
%    |\ref| command when referencing an item of the Nth level of an
%    enumerated list.
%    \begin{macrocode}
\renewcommand\p@enumii{\theenumi}
\renewcommand\p@enumiii{\theenumi\theenumii)}
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Środowisko \env{itemize}}
%
%  \begin{macro}{\itemize}
%    Zmiana podobna jak dla \env{enumerate}.
%    \begin{macrocode}
\def\itemize{%
  \ifnum \@itemdepth >\thr@@\@toodeep\else
    \advance\@itemdepth\@ne
    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
    \expandafter
    \list
      \csname\@itemitem\endcsname
      {\partopsep\topsep \topsep\z@ %MW
      \def\makelabel##1{##1\hfil}}%
  \fi}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\itemize*}
%    
%    \begin{macrocode}
\newenvironment*{itemize*}{%
  \ifnum \@itemdepth >\thr@@\@toodeep\else
    \advance\@itemdepth\@ne
    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
    \expandafter
    \list
      \csname\@itemitem\endcsname
      {\partopsep\topsep \topsep\z@ %MW
      \leftmargin\z@ \labelwidth\z@
      \itemindent\@parindent \advance\itemindent\labelsep
      \def\makelabel##1{##1\hfil}}%
  \fi}
  {\endlist}
%    \end{macrocode}
%  \end{macro}
%
% \begin{macro}{\labelitemi}
% \begin{macro}{\labelitemii}
% \begin{macro}{\labelitemiii}
% \begin{macro}{\labelitemiv}
%    Itemization is controlled by four commands: |\labelitemi|,
%    |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which define
%    the labels of the various itemization levels.
%    \begin{macrocode}
\newcommand\labelitemi{\textemdash}
\newcommand\labelitemii{\textemdash}
\newcommand\labelitemiii{\textemdash}
\newcommand\labelitemiv{\textemdash}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Description}
%
% \begin{environment}{description}
%    The description environment is defined here -- while the itemize
%    and enumerate environments are defined in \file{latex.dtx}.
%
%    \begin{macrocode}
\newenvironment{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\descriptionlabel}
%    To change the formatting of the label, you must redefine
%    |\descriptionlabel|.
%
% \changes{v1.2k}{1994/05/06}{Inserted \cs{normalfont}}
% \changes{v1.2y}{1995/01/31}{made command short}
%    \begin{macrocode}
\newcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}
%</article|report|book>
%    \end{macrocode}
% \end{macro}
%
% \subsection{Defining new environments}
%
% \subsubsection{Abstract}
%
% \begin{environment}{abstract}
%    When we are producing a separate titlepage we also put the
%    abstract on a page of its own. It will be centred vertically on
%    the page.
%
%    Note that this environment is not defined for books.
% \changes{v1.3e}{1995/06/19}{Added setting of \cs{@endparpenalty}
%         to avoid page break after abstract heading.}
%    \begin{macrocode}
% \changes{v1.3m}{1995/10/23}{Added setting of \cs{beginparpenalty} to
%    discourage page break before abstract heading.}
%<*article|report>
\if@titlepage
  \newenvironment{abstract}{%
      \titlepage
      \null\vfil
      \@beginparpenalty\@lowpenalty
      \begin{center}%
        \bfseries \abstractname
        \@endparpenalty\@M
      \end{center}}%
     {\par\vfil\null\endtitlepage}
%    \end{macrocode}
%    When we are not making a separate titlepage --the default for the
%    article document class-- we have to check if we are in twocolumn
%    mode. In that case the abstract is as a |\section*|, otherwise
%    the quotation environment is used to typeset the abstract.
%    \begin{macrocode}
\else
  \newenvironment{abstract}{%
      \if@twocolumn
        \section*{\abstractname}%
      \else
        \small
        \begin{center}%
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
        \end{center}%
        \quotation
      \fi}
      {\if@twocolumn\else\endquotation\fi}
\fi
%</article|report>
%    \end{macrocode}
% \end{environment}
%
% \subsubsection{Verse}
%
% \begin{environment}{verse}
%   The verse environment is defined by making clever use of the
%   list environment's parameters.  The user types |\\| to end a line.
%   This is implemented by |\let|'ing |\\| equal |\@centercr|.
%
% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with
%    \cs{relax}}
%    \begin{macrocode}
\newenvironment{verse}
               {\let\\\@centercr
                \list{}{\itemsep      \z@
                        \parsep \medskipamount
                        \itemindent   -1.5em%
                        \listparindent\itemindent
                        \rightmargin  \leftmargin
                        \advance\leftmargin 1.5em}%
                \item\relax}
               {\endlist}
%    \end{macrocode}
% \end{environment}
%
% \subsubsection{Quotation}
%
% \begin{environment}{quotation}
%   The quotation environment is also defined by making clever use of
%   the list environment's parameters. The lines in the environment
%   are set smaller than |\textwidth|. The first line of a paragraph
%   inside this environment is indented.
%
% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with
%    \cs{relax}}
%    \begin{macrocode}
\newenvironment{quotation}
               {\list{}{\listparindent 1.5em%
                        \itemindent    \listparindent
                        \rightmargin   \leftmargin
                        \parsep        \z@ \@plus\p@}%
                \item\relax}
               {\endlist}
%    \end{macrocode}
% \end{environment}
%
% \subsubsection{Quote}
%
% \begin{environment}{quote}
%   The quote environment is like the quotation environment except
%   that paragraphs are not indented.
%
% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with
%    \cs{relax}}
%    \begin{macrocode}
\newenvironment{quote}
               {\list{}{\rightmargin\leftmargin}%
                \item\relax}
               {\endlist}
%    \end{macrocode}
% \end{environment}
%
% \subsubsection{Titlepage}
%
% \begin{environment}{titlepage}
%  In the normal environments, the titlepage environment does nothing
%  but start and end a page, and inhibit page numbers.  In the report
%  style, it also resets the page number to one, and then sets it
%  back to one at the end.  
%  In two-column style, it still makes a 
%  one-column page.
%    \begin{macrocode}
\newenvironment{titlepage}
    {%
%<book>      \cleardoublepage
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse\newpage
      \fi
      \thispagestyle{blank}%
      \setcounter{page}\@ne
    }%
    {\if@restonecol\twocolumn \else \newpage \fi
%    \end{macrocode}
%    If we are not in two-side mode the first page after the title page
%    should also get page number 1.
%    \begin{macrocode}
     \if@twoside\else
        \setcounter{page}\@ne
     \fi
    }
%    \end{macrocode}
% \end{environment}
%
% \subsubsection{Appendix}
%
% \begin{macro}{\appendix}
%
%    The |\appendix| command is not really an environment, it is a
%    macro that makes some changes in the way things are done.
%
%    In the article document class the |\appendix| command must do the
%    following:
%    \begin{itemize}
%    \item reset the section and subsection counters to zero,
%    \item redefine |\thesection| to produce alphabetic appendix
%        numbers. This redefinition is done globally to ensure that it 
%        survives even if |\appendix| is issued within an environment such
%        as \texttt{multicols}.
%    \end{itemize}
%
% \changes{1.3z}{1998/09/19}{Redefine \cs{thesection} globally (pr/2862)}
%    \begin{macrocode}
%<*article>
\newcommand\appendix{\par
  \setcounter{section}{0}%
  \setcounter{subsection}{0}%
  \gdef\thesection{\@Alph\c@section}}
%</article>
%    \end{macrocode}
%
%    In the report and book document classes the |\appendix| command
%    must do the following:
%    \begin{itemize}
%    \item reset the chapter and section counters to zero,
%    \item set |\@chapapp| to |\appendixname| (for messages),
%    \item redefine the chapter counter to produce appendix numbers,
%    \item possibly redefine the |\chapter| command if appendix titles
%        and headings are to look different from chapter titles and
%        headings. This redefinition is done globally to ensure that it 
%        survives even if |\appendix| is issued within an environment such
%        as \texttt{multicols}.
%    \end{itemize}
%
%    \begin{macrocode}
%<*report|book>
\newcommand\appendix{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{\@Alph\c@chapter}}
%</report|book>
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting parameters for existing environments}
%
% \subsubsection{Array and tabular}
%
% \begin{macro}{\arraycolsep}
%    The columns in an array environment are separated by
%    2|\arraycolsep|.
%    \begin{macrocode}
\setlength\arraycolsep{5\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tabcolsep}
%    The columns in an tabular environment are separated by
%    2|\tabcolsep|.
%    \begin{macrocode}
\setlength\tabcolsep{6\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\arrayrulewidth}
%    The width of rules in the array and tabular environments is given
%    by\\ |\arrayrulewidth|.
%    \begin{macrocode}
\setlength\arrayrulewidth{.4\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\doublerulesep}
%    The space between adjacent rules in the array and tabular
%    environments is given by |\doublerulesep|.
%    \begin{macrocode}
\setlength\doublerulesep{2\p@}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Tabbing}
%
% \begin{macro}{\tabbingsep}
%    This controls the space that the |\'| command puts in. (See
%    \LaTeX{} manual for an explanation.)
%    \begin{macrocode}
\setlength\tabbingsep{\labelsep}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Minipage}
%
% \begin{macro}{\@minipagerestore}
%    The macro |\@minipagerestore| is called upon entry to a minipage
%    environment to set up things that are to be handled differently
%    inside a minipage environment. In the current styles, it does
%    nothing.
% \end{macro}
%
% \begin{macro}{\@mpfootins}
%    Minipages have their own footnotes; |\skip||\@mpfootins| plays
%    same r\^ole for footnotes in a minipage as |\skip||\footins| does
%    for ordinary footnotes.
%
%    \begin{macrocode}
\skip\@mpfootins = \skip\footins
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Framed boxes}
%
% \begin{macro}{\fboxsep}
%    The space left by |\fbox| and |\framebox| between the box and the
%    text in it.
% \begin{macro}{\fboxrule}
%    The width of the rules in the box made by |\fbox| and |\framebox|.
%    \begin{macrocode}
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Equation and eqnarray}
%
% \begin{macro}{\theequation}
%    When within chapters, the equation counter will be reset at
%    the beginning of a new chapter and the equation number will
%    be prefixed by the chapter number.
% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number}
%
%    This code  must follow the |\chapter| definition or, more exactly,
%    the definition of the chapter counter.
%    \begin{macrocode}
%<article>\renewcommand \theequation {\@arabic\c@equation}
%<*report|book>
\@addtoreset {equation}{chapter}
\renewcommand\theequation
  {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
%</report|book>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\jot}
%    |\jot| is the extra space added between lines of an eqnarray
%    environment. The default value is used.
%    \begin{macrocode}
% \setlength\jot{3pt}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@eqnnum}
%    The macro |\@eqnnum| defines how equation numbers are to appear in
%    equations. Again the default is used.
%
%    \begin{macrocode}
% \def\@eqnnum{(\theequation)}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Floating objects}
%
%    The file \file{latex.dtx} only defines a number of tools with
%    which floating objects can be defined. This is done in the
%    document class. It needs to define the following macros for each
%    floating object of type \texttt{TYPE} (e.g., \texttt{TYPE} =
%    figure).
%
%    \begin{description}
%    \item[\texttt{\bslash fps@TYPE}]
%        The default placement specifier for floats of type
%        \texttt{TYPE}.
%
%    \item[\texttt{\bslash ftype@TYPE}]
%        The type number for floats of type \texttt{TYPE}.  Each
%        \texttt{TYPE} has associated a unique positive \texttt
%        {TYPE} number, which is a power of two.  E.g., figures might
%        have type number 1, tables type number 2, programs type
%        number 4, etc.
%
%    \item[\texttt{\bslash ext@TYPE}]
%        The file extension indicating the file on which the contents
%        list for float type \texttt{TYPE} is stored.  For example,
%        |\ext@figure| = `lof'.
%
%    \item[\texttt{\bslash fnum@TYPE}]
%        A macro to generate the figure number for a caption. For
%        example, |\fnum@TYPE| == `Figure |\thefigure|'.
%
%    \item[\texttt{\bslash @makecaption}{\meta{num}}{\meta{text}}]
%        A macro to make a caption, with \meta{num} the value produced
%        by |\fnum@...| and \meta{text} the text of the caption. It
%        can assume it's in a |\parbox| of the appropriate width.
%        This will be used for \emph{all} floating objects.
%
%    \end{description}
%
%    The actual environment that implements a floating object such as
%    a figure is defined using the macros |\@float| and |\end@float|,
%    which are defined in \file{latex.dtx}.
%
%    An environment that implements a single column floating object is
%    started with |\@float{|\texttt{TYPE}|}[|\meta{placement}|]| of type
%    \texttt{TYPE} with \meta{placement} as the placement specifier.
%    The default value of \meta{PLACEMENT} is defined by |\fps@TYPE|.
%
%    The environment is ended by |\end@float|.  E.g., |\figure| ==
%    |\@float|{figure}, |\endfigure| == |\end@float|.
%
%  \begin{macro}{\@floatboxreset}
%    Przedefiniowujemy standardowe makro \cs{@floatboxreset} aby
%    zmienić stopień (a~może i~inne atrybuty) pisma w~środowiskach
%    przemieszczalnych.
%    \begin{macrocode}
\def\@floatboxreset{%
  \reset@font
  \normalsize
  \@setminipage
  \csname\@captype font\endcsname
}
%    \end{macrocode}
%  \end{macro}
%
% \subsubsection{Figure}
%
%    Here is the implementation of the figure environment.
%
% \begin{macro}{\c@figure}
%    First we have to allocate a counter to number the figures.
%
%    In the report and book document classes figures within chapters are
%    numbered per chapter.
% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number}
%    \begin{macrocode}
%<*article>
\newcounter{figure}
\renewcommand \thefigure {\@arabic\c@figure}
%</article>
%<*report|book>
\newcounter{figure}[chapter]
\renewcommand \thefigure
     {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure}
%</report|book>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fps@figure}
% \begin{macro}{\ftype@figure}
% \begin{macro}{\ext@figure}
% \begin{macro}{\num@figure}
%    Here are the parameters for the floating objects of type `figure'.
%    \begin{macrocode}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{environment}{figure}
% \begin{environment}{figure*}
%    And the definition of the actual environment. The form with the
%    |*| is used for double column figures.
%    \begin{macrocode}
\newenvironment{figure}
               {\@float{figure}}
               {\end@float}
\newenvironment{figure*}
               {\@dblfloat{figure}}
               {\end@dblfloat}
%    \end{macrocode}
% \end{environment}
% \end{environment}
%
% \subsubsection{Table}
%
%    Here is the implementation of the table environment. It is very
%    much the same as the figure environment.
%
% \begin{macro}{\c@table}
%    First we have to allocate a counter to number the tables.
%    
%    In the report and book document classes tables within chapters are
%    numbered per chapter.
% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number}
%    \begin{macrocode}
%<*article>
\newcounter{table}
\renewcommand\thetable{\@arabic\c@table}
%</article>
%<*report|book>
\newcounter{table}[chapter]
\renewcommand \thetable
     {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table}
%</report|book>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fps@table}
% \begin{macro}{\ftype@table}
% \begin{macro}{\ext@table}
% \begin{macro}{\num@table}
%    Here are the parameters for the floating objects of type `table'.
%    \begin{macrocode}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{environment}{table}
% \begin{environment}{table*}
%    And the definition of the actual environment. The form with the
%    |*| is used for double column tables.
%    \begin{macrocode}
\newenvironment{table}
               {\@float{table}}
               {\end@float}
\newenvironment{table*}
               {\@dblfloat{table}}
               {\end@dblfloat}
%    \end{macrocode}
% \end{environment}
% \end{environment}
%
% \subsubsection{Polecenie \sc{caption}}
%
%    The |\caption| command calls |\@makecaption| to format the
%    caption of floating objects. It gets two arguments,
%    \meta{number}, the number of the floating object and \meta{text},
%    the text of the caption. Usually \meta{number} contains a string
%    such as `Figure 3.2'. The macro can assume it is called inside a
%    |\parbox| of right width, with |\normalsize|.
%
%  \begin{macro}{\centeredlast}
%    Przy składzie podpisów będziemy stosować następujące makro
%    składające akapit tak, że jego ostatnia linia jest scentrowana.
%    \begin{macrocode}
\def\centeredlast{%
  \let\\\@centercr
  \rightskip\z@\@plus-.5fil
  \leftskip\z@\@plus.5fil
  \parindent\z@
  \parfillskip\@flushglue
  }
%    \end{macrocode}
%  \end{macro}
%
% \begin{macro}{\abovecaptionskip}
% \begin{macro}{\belowcaptionskip}
%    These lengths contain the amount of white space to leave above
%    and below the caption.
%    \begin{macrocode}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
\setlength\abovecaptionskip{.5\baselineskip}
\setlength\belowcaptionskip{.5\baselineskip}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%  \begin{macro}{\@caption}
%    Modyfikujemy standardowe makro \cs{@caption} tak, aby w~spisach
%    rysunków i~tabel pojawiała się kropka po numerze obiektu.
%    Zmieniamy też stopień pisma.
%    \begin{macrocode}
\long\def\@caption#1[#2]#3{%
  \par
  \addcontentsline{\csname ext@#1\endcsname}{#1}%
    {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}%
  \begingroup
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \captionfont
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}
%    \end{macrocode}
%  \end{macro}
%
% \begin{macro}{\@makecaption}
%    The definition of this macro is |\long| in order to allow more
%    then one paragraph in a caption.
%    \begin{macrocode}
\long\def\@makecaption#1#2{%
  \addvspace\abovecaptionskip
%    \end{macrocode}
%    Formujemy podpis odmiennie niż w~klasach standardowych:  jako
%    akapit ze scentrowaną ostatnią (w~szczególności jedyną) linią.
%    \begin{macrocode}
  \bgroup\centeredlast
    #1.\enspace#2\par
  \egroup
  \vskip\belowcaptionskip}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Font changing}
%
%    Here we supply the declarative font changing commands that were
%    common in \LaTeX\ version 2.09 and earlier. These commands work
%    in text mode \emph{and} in math mode. They are provided for
%    compatibility, but one should start using the |\text...| and
%    |\math...| commands instead. These commands are defined using
%    |\DeclareTextFontCommand|, a command with three arguments: the
%    user command to be defined; \LaTeX\ commands to execute in text
%    mode and \LaTeX\ commands to execute in math mode.
%
%  \begin{macro}{\rm}
% \changes{v1.0f}{1993/12/08}{Macro added}
%  \begin{macro}{\tt}
% \changes{v1.0f}{1993/12/08}{Macro added}
%  \begin{macro}{\sf}
% \changes{v1.0f}{1993/12/08}{Macro added}
%
%    The commands to change the family. When in compatibility mode we
%    select the `default' font first, to get \LaTeX2.09 behviour.
%    \begin{macrocode}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
%  \begin{macro}{\bf}
%    The command to change to the bold series. One should use
%    |\mdseries| to explicitly switch back to medium series.
%    \begin{macrocode}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\sl}
%  \begin{macro}{\it}
%  \begin{macro}{\sc}
%
%    And the commands to change the shape of the font. The slanted and
%    small caps shapes are not available by default as math alphabets,
%    so those changes do nothing in math mode. However, we do warn the
%    user that the selection will not have any effect.One should use
%    |\upshape| to explicitly change back to the upright shape.
%    \begin{macrocode}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
% \begin{macro}{\cal}
% \begin{macro}{\mit}
%
%    The commands |\cal| and |\mit| should only be used in math mode,
%    outside math mode they have no effect. Currently the New Font
%    Selection Scheme defines these commands to generate warning
%    messages. Therefore we have to define them `by hand'.
%    \begin{macrocode}
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
% \section{Cross Referencing}
% \subsection{Table of Contents, etc.}
%
%     A |\section| command writes a
%     |\contentsline{section}{|\meta{title}|}{|\meta{page}|}| command
%     on the \file{.toc} file, where \meta{title} contains the
%     contents of the entry and \meta{page} is the page number. If
%     sections are being numbered, then \meta{title} will be of the
%     form |\numberline{|\meta{num}|}{|\meta{heading}|}| where
%     \meta{num} is the number produced by |\thesection|.  Other
%     sectioning commands work similarly.
%
%     A |\caption| command in a `figure' environment writes
%
%     |\contentsline{figure}{\numberline{|\meta{num}|}{|%
%                    \meta{caption}|}}{|\meta{page}|}|
%
%     on the .\file{lof} file, where \meta{num} is the number produced
%     by |\thefigure| and \meta{caption} is the figure caption.  It
%     works similarly for a `table' environment.
%
%    The command |\contentsline{|\meta{name}|}| expands to
%    |\l@|\meta{name}.  So, to specify the table of contents, we must
%    define |\l@chapter|, |\l@section|, |\l@subsection|, ... ; to
%    specify the list of figures, we must define |\l@figure|; and so
%    on.  Most of these can be defined with the |\@dottedtocline|
%    command, which works as follows.
%
%    |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|^^A
%                      \meta{numwidth}|}{|^^A
%                      \meta{title}|}{|\meta{page}|}|
%
%    \begin{description}
%    \item[\meta{level}] An entry is produced only if\meta{ level}
%        $<=$ value of the \Lcount{tocdepth} counter.  Note,
%        |\chapter| is level 0, |\section| is level 1, etc.
%    \item[\meta{indent}] The indentation from the outer left margin
%        of the start   of the contents line.
%    \item[\meta{numwidth}] The width of a box in which the section
%        number is to go, if \meta{title} includes a |\numberline|
%        command.
%    \end{description}
%
% \begin{macro}{\@pnumwidth}
% \begin{macro}{\@tocrmarg}
% \begin{macro}{\@dotsep}
%    This command uses the following three parameters, which are set
%    with a |\newcommand| (so em's can be used to make them depend upon
%    the font).
%    \begin{description}
%    \item[\texttt{\bslash @pnumwidth}] The width of a box in which the
%        page number is put.
%    \item[\texttt{\bslash @tocrmarg}] The right margin for multiple
%        line entries.  One wants |\@tocrmarg| $\ge$ |\@pnumwidth|
%    \item[\texttt{\bslash @dotsep}] Separation between dots, in mu
%        units. Should be defined as a number like 2 or 1.7
%    \end{description}
%
%    \begin{macrocode}
\newcommand\@pnumwidth{1.55em}
\newcommand\@tocrmarg{2.55em plus 2cm}
\newcommand\@dotsep{4.5}
%<article>\setcounter{tocdepth}{3}
%<!article>\setcounter{tocdepth}{2}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Spis treści}
%
% \begin{macro}{\tableofcontents}
%    Spis treści w wersji report i book jest zawsze składany jednołamowo.
%
%    \begin{macrocode}
\newcommand\tableofcontents{%
%<*report|book>
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
%</report|book>
%    \end{macrocode}
%    The title is set using the |\chapter*| command, making sure that
%    the running head --if one is required-- contains the right
%    information.
%    \begin{macrocode}
  {\@tempcnta=\c@tocdepth
   \c@tocdepth=-1
%<report|book>\chapter*%
%<article>    \section*%
        {\contentsname
% %%        \protect\@mkboth{\contentsname}{\contentsname}
        }%
     \c@tocdepth=\@tempcnta
%    \end{macrocode}
%    The the actual table of contents is made by calling
%    |\@starttoc{toc}|. After that we restore twocolumn mode if
%    necessary.
%    \begin{macrocode}
    \secondarysize
    \gdef\previous@toc@level{-1000}%
    \@starttoc{toc}}%
%<!article>    \if@restonecol\twocolumn\fi
    }
%    \end{macrocode}
% \end{macro}
%
%  \begin{macro}{\mw@tocskip}
%    Do dodawania odstępu w~spisie treści.  Korzysta z~zapamiętanego
%    poziomu poprzedniej pozycji, aby stosownie dobrać grzywnę za
%    złamanie przed danym elementem.  W~szczególności zabrania
%    łamania, jeżeli poprzedni element był z~wyższego poziomu.\\
%    1 -- poziom, 2 -- odstęp pionowy
%    \begin{macrocode}
\def\mw@tocskip#1#2{%
     \ifnum#1>\previous@toc@level
        \nobreak
     \else\ifnum#1<\previous@toc@level
        \addpenalty\@secpenalty % czy to dobra wartość?
     \fi\fi
    \gdef\previous@toc@level{#1}%
    \vskip #2\relax
}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\mw@tocline}
%    Trochę podrasowane \cs{@dottedtocline}.
%    \begin{macrocode}
\def\mw@tocline#1#2#3#4#5{%
  \ifnum #1>\c@tocdepth \else
    \mw@tocskip{#1}{\z@ \@plus.2\p@}%
    {\leftskip #2\relax
     \@tempdima #3\relax
     \advance\leftskip \@tempdima
     \rightskip \@tocrmarg \parfillskip -\rightskip
     \interlinepenalty\@M
     \noindent\kern-\@tempdima{\ignorespaces#4}\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
     \par}%
  \fi}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\numberline}
%    
%    \begin{macrocode}
\def\numberline#1{\hb@xt@\@tempdima{#1\hfil}\ignorespaces}
%    \end{macrocode}
%  \end{macro}
%
% \begin{macro}{\l@part}
%    Each sectioning command needs an additional macro  to format its
%    entry in the table of contents, as described above. The macro for
%    the entry for parts is defined in a special way.
%
%    First we make sure that if a pagebreak should occur, it occurs
%    \emph{before} this entry. Also a little whitespace is added and a
%    group begun to keep changes local.
%    \begin{macrocode}
\newcommand*\l@part[2]{%
  \ifnum \c@tocdepth >-2\relax
    \mw@tocskip{-1}{.6\baselineskip}%
    \begingroup
%    \end{macrocode}
%    We set |\parindent| to 0pt and use |\rightskip| to leave
%    enough room for the pagenumbers.\footnote{^^A
%        We should really set \cs{rightskip} to \cs{@tocrmarg} instead 
%        of \cs{@pnumwidth} (no version of {\LaTeX} ever did this), 
%        otherwise the \cs{rightskip} is too small.
%        Unfortunately this can't be changed in {\LaTeXe} as we don't 
%        want to create different versions of {\LaTeXe} which produce 
%        different typset output unless this is absolutely necessary;
%        instead we suspend it for \LaTeX3.}
%    To prevent overfull box messages the |\parfillskip| is set to a 
%    negative value.
%    \begin{macrocode}
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
%    \end{macrocode}
%    Now we can set the entry, in a large bold font. We make sure to
%    leave vertical mode, set the part title and add the pagenumber,
%    set flush right.
%    \begin{macrocode}
      {\leavevmode\normalsize
        \def\numberline##1{##1\enspace}%
        \hfil\bfseries #1\hfil\null %\hb@xt@\@pnumwidth{\hss #2}%
        }\par
%    \end{macrocode}
%    Prevent a pagebreak immediately after this entry, but use
%    |\everypar| to reset the |\if@nobreak| switch. Finally we close
%    the group.
%    \begin{macrocode}
       \nobreak
         \global\@nobreaktrue
         \everypar{\global\@nobreakfalse\everypar{}}%
    \endgroup
  \addvspace{.4\baselineskip}%
  \fi}
%    \end{macrocode}
% \end{macro}
%    
%    \begin{macrocode}
%<*report|book>
\newcommand*\l@chapter[2]{\addvspace{.3\baselineskip}%
        \mw@tocline{0}{0pt}{1.5em}{\textbf{#1}}{#2}%
        \addvspace{.2\baselineskip}}
\newcommand*\l@section{\mw@tocline{1}{1.5em}{2.3em}}
%</report|book>
%    \end{macrocode}
%
% \begin{macro}{\l@subsection}
% \begin{macro}{\l@subsubsection}
% \begin{macro}{\l@paragraph}
% \begin{macro}{\l@subparagraph}
%    All lower level entries are defined using the macro
%    |\mw@tocline| (see above).
%    \begin{macrocode}
%<*article>
\newcommand*\l@section[2]{\addvspace{.3\baselineskip}%
        \mw@tocline{1}{0pt}{1.5em}{#1}{#2}%
        }
\newcommand*\l@subsection{\mw@tocline{2}{1.5em}{2.3em}}
\newcommand*\l@subsubsection{\mw@tocline{3}{3.8em}{3.2em}}
\newcommand*\l@paragraph{\mw@tocline{4}{7.0em}{4.1em}}
\newcommand*\l@subparagraph{\mw@tocline{5}{10em}{5em}}
%</article>
%<*report|book>
\newcommand*\l@subsection{\mw@tocline{2}{3.8em}{3.2em}}
\newcommand*\l@subsubsection{\mw@tocline{3}{7.0em}{4.1em}}
\newcommand*\l@paragraph{\mw@tocline{4}{10em}{5em}}
\newcommand*\l@subparagraph{\mw@tocline{5}{12em}{6em}}
%</report|book>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{List of figures}
%
% \begin{macro}{\listoffigures}
%    This macro is used to request that \LaTeX{} produces a list of
%    figures. It is very similar to |\tableofcontents|.
%
%    \begin{macrocode}
\newcommand\listoffigures{%
%<*report|book>
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listfigurename}
%</report|book>
%<article>    \section*{\listfigurename}
    {\secondarysize
    \gdef\previous@toc@level{-1000}%
    \@starttoc{lof}}%
%<report|book>    \if@restonecol\twocolumn\fi
    }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\l@figure}
%    This macro produces an entry in the list of figures.
%    W~klasie report i~book rysunki są numerowane w~obrębie
%    rozdziałów, więc numery zajmują więcej miejsca.  [Czy to są
%    rozsądne wartości???]
%    \begin{macrocode}
%<article>\newcommand*\l@figure{\mw@tocline{1}{0pt}{1.5em}}
%<report|book>\newcommand*\l@figure{\mw@tocline{1}{0pt}{2.5em}}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{List of tables}
%
% \begin{macro}{\listoftables}
%    This macro is used to request that \LaTeX{} produces a list of
%    tables. It is very similar to |\tableofcontents|.
%
%    \begin{macrocode}
\newcommand\listoftables{%
%<*report|book>
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listtablename}
%</report|book>
%<article>    \section*{\listtablename}
    {\secondarysize
    \gdef\previous@toc@level{-1000}%
    \@starttoc{lot}}%
%<report|book>    \if@restonecol\twocolumn\fi
    }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\l@table}
%    This macro produces an entry in the list of tables.
%    \begin{macrocode}
\let\l@table\l@figure
%    \end{macrocode}
% \end{macro}
%
% \subsection{Bibliography}
%
% \begin{macro}{\bibindent}
%    The ``open'' bibliography format uses an indentation of
%    |\bibindent|.
%    \begin{macrocode}
\newdimen\bibindent
\setlength\bibindent{1.5em}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{thebibliography}
%    The `thebibliography' environment executes the following
%    commands:
%
%    |\renewcommand{\newblock}{\hskip.11em \@plus.33em \@minus.07em}|\\
%      --- Defines the ``closed'' format, where the blocks (major units
%      of information) of an entry run together.
%
%    |\sloppy|  --- Used because it's rather hard to do line breaks in
%      bibliographies,
%
%    |\sfcode`\.=1000\relax| ---
%      Causes a `.' (period) not to produce an end-of-sentence space.
%
%    The implementation of this environment is based on the generic
%    list environment. It uses the \Lcount{enumiv} counter internally
%    to generate the labels of the list.
%
%    When an empty `thebibliography' environment is found, a warning
%    is issued.
%    \begin{macrocode}
\newenvironment{thebibliography}[1]{%
        \def
%<article> \sectionmark
%<!article> \chaptermark
        ##1{\@mkboth{##1}{##1}}%
%<article> \section*{\refname}% 
%<!article> \chapter*{\bibname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}%
            \secondarysize}%
      \sloppy
%    \end{macrocode}
%    This is setting the normal (non-infinite) value of
%    |\clubpenalty| for the whole of this environment,
%    so we must reset its stored value also.
%    \begin{macrocode}
%      \clubpenalty4000
%      \@clubpenalty \clubpenalty
%      \widowpenalty4000
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\newblock}
%    The default definition for |\newblock| is to produce a small space.
%    \begin{macrocode}
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@openbib@code}
%    The default definition for |\@openbib@code| is to do nothing.
%    It will be changed by the \Lopt{openbib} option.
%    \begin{macrocode}
\let\@openbib@code\@empty
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@biblabel}
%    The label for a |\bibitem[...]| command is produced by this
%    macro. The default from \file{latex.dtx} is used.
%    \begin{macrocode}
% \renewcommand*{\@biblabel}[1]{[#1]\hfill}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@cite}
%    The output of the |\cite| command is produced by this macro. The
%    default from \file{latex.dtx} is used.
%    \begin{macrocode}
% \renewcommand*{\@cite}[1]{[#1]}
%    \end{macrocode}
% \end{macro}
%
%  \subsection{The index}
%
% \begin{environment}{theindex}
%    The environment `theindex' can be used for indices. It makes an
%    index with two columns, with each entry a separate paragraph. At
%    the user level the commands |\item|, |\subitem| and |\subsubitem|
%    are used to produce index entries of various levels. When a new
%    letter of the alphabet is encountered an amount of |\indexspace|
%    white space can be added.
%
%
% \changes{v1.0g}{1993/12/09}{Moved the setting of
%    \cs{@restonecoltrue}}
%    \begin{macrocode}
\newenvironment{theindex}
               {\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \columnseprule \z@
                \columnsep 35\p@
%<article>      \if@twocolumn\section*{\indexname}\else
                \twocolumn
%<article>      [\section*{\indexname}]\fi       
%<!article>               \chapter*{\indexname}%
%<article>                \@mkboth{\indexname}{\indexname}%
                \thispagestyle{opening}\parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item\@idxitem
        \secondarysize}
%    \end{macrocode}
%    When the document continues after the index and it was a one
%    column document we have to switch back to one column after the
%    index.
%    \begin{macrocode}
               {\if@restonecol\onecolumn\else
%<!article>        \clearpage
                \fi}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\@idxitem}
% \begin{macro}{\subitem}
% \begin{macro}{\subsubitem}
%    These macros are used to format the entries in the index. ^^AA ???
%    \begin{macrocode}
\newcommand\@idxitem{\par\hangindent 40\p@}
\newcommand\subitem{\@idxitem \hspace*{20\p@}}
\newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\indexspace}
%    The amount of white space that is inserted between `letter
%    blocks' in the index.
%    \begin{macrocode}
\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Footnotes}
%
% \begin{macro}{\footnoterule}
%    Polscy redaktorzy techniczni uwielbiają kreskę odzdzielającą
%    przypisy o długości 4 cycer:
%    \begin{macrocode}
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width4pc
  \kern2.6\p@}
%    \end{macrocode}
%    (Zgodnie z~\LaTeX ową konwencją makro \cs{footnoterule} ma
%    produkować materiał w~sumie o zerowej wysokości).
% \end{macro}
%
% \begin{macro}{\c@footnote}
%    Footnotes are numbered within chapters in the report and book
%    document styles.
%    \begin{macrocode}
%<!article>\@addtoreset{footnote}{chapter}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@makefntext}
%    The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
%    to produce the actual footnote. The macro gets the text of the
%    footnote as its argument and should use |\@thefnmark| as the mark
%    of the footnote. The macro |\@makefntext|is called when
%    effectively inside a |\parbox| of width |\columnwidth| (i.e.,
%    with |\hsize| = |\columnwidth|).
%
%   An example of what can be achieved is given by the following piece
%   of \TeX\ code.
% \begin{verbatim}
%          \newcommand\@makefntext[1]{%
%             \@setpar{\@@par
%                      \@tempdima = \hsize
%                      \advance\@tempdima-10pt
%                      \parshape \@ne 10pt \@tempdima}%
%             \par
%             \parindent 1em\noindent
%             \hbox to \z@{\hss\@makefnmark}#1}
% \end{verbatim}
%    The effect of this definition is that all lines of the footnote
%    are indented by 10pt, while the first line of a new paragraph is
%    indented by 1em. To change these dimensions, just substitute the
%    desired value for `10pt' (in both places) or `1em'.  The mark is
%    flushright against the footnote.
%
%    In these document classes we use a simpler macro, in which the
%    footnote text is set like an ordinary text paragraph, with no
%    indentation except on the first line of a paragraph, and the
%    first line of the footnote. Thus, all the macro must do is set
%    |\parindent| to the appropriate value for succeeding paragraphs
%    and put the proper indentation before the mark.
%
%    \begin{macrocode}
\newcommand\@makefntext[1]{%
    \parindent\@parindent
    \indent\@makefnmark\enspace#1}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@makefnmark}
%    The footnote markers that are printed in the text to point to the
%    footnotes should be produced by the macro |\@makefnmark|. We use
%    the default definition for it.
%    \begin{macrocode}
%\renewcommand\@makefnmark{\hbox{\@textsuperscript
%                                  {\normalfont\@thefnmark}}}
%    \end{macrocode}
% \end{macro}
%
% \section{Initialization}
%
% \subsection{Words}
%
% This document class is for documents prepared in the English language.
% To prepare a version for another language, various English words must
% be replaced.  All the English words that require replacement are
% defined below in command names. These commands may be redefined in
% any class or package that is customising \LaTeX\ for use with
% non-English languages.
% \changes{v1.3h}{1995/07/20}{Split up to save save stack /1742}
%
% \begin{macro}{\contentsname}
% \begin{macro}{\listfigurename}
% \begin{macro}{\listtablename}
%    \begin{macrocode}
\newcommand\contentsname{Contents}
\newcommand\listfigurename{List of Figures}
\newcommand\listtablename{List of Tables}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\refname}
% \begin{macro}{\bibname}
% \begin{macro}{\indexname}
%    \begin{macrocode}
%<article>\newcommand\refname{References}
%<report|book>\newcommand\bibname{Bibliography}
\newcommand\indexname{Index}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\figurename}
% \begin{macro}{\tablename}
%    \begin{macrocode}
\newcommand\figurename{Figure}
\newcommand\tablename{Table}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\partname}
% \begin{macro}{\chaptername}
% \begin{macro}{\appendixname}
% \begin{macro}{\abstractname}
%    \begin{macrocode}
\newcommand\partname{Part}
%<report|book>\newcommand\chaptername{Chapter}
\newcommand\appendixname{Appendix}
%<!book>\newcommand\abstractname{Abstract}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Date}
%
% \begin{macro}{\today}
%    This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
%    to provide the date of the \LaTeX-run.
%
%    At |\begin{document}| this definition will be optimised
%    so that the names of all the `wrong' months are not stored.
%    This optimisation is not done here as that would `freeze'
%    |\today| in any special purpose format made by loading the class
%    file into the format file.
% \changes{v1.3j}{1995/08/16}{use \cs{edef} to save a lot of space}
% \changes{v1.3w}{1997/10/06}{use \cs{def} again, latex/2620}
%    \begin{macrocode}
\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}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Two column mode}
%
%    We have \pstyle{plain} pages in the document classes article and
%    report unless the user specified otherwise. In the `book'
%    document class we use the page style \pstyle{headings} by
%    default. We use arabic pagenumbers.
%    \begin{macrocode}
%<!book>\pagestyle{plain}
%<book>\pagestyle{headings}
\pagenumbering{arabic}
%    \end{macrocode}
%
%    Wszystkie kolumny muszą być tej samej długości.
%    \begin{macrocode}
\flushbottom
%    \end{macrocode}
%    When the \Lopt{twocolumn} option was specified we call
%    |\twocolumn| to activate this mode. We try to make each column as
%    long as the others, but call |sloppy| to make our life easier.
%    \begin{macrocode}
\if@twocolumn
  \twocolumn
  \sloppy
%    \end{macrocode}
%    Normally we call |\onecolumn| to initiate typesetting in one
%    column.
%    \begin{macrocode}
\else
  \onecolumn
\fi
%</article|report|book>
%    \end{macrocode}
%
% \Finale
%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\endinput

