summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:08:30 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:08:30 +0000
commit9c2380f55c4f48aeafffc091b5aee38295a12da4 (patch)
tree4758028c96fd928b7d557b7fd8ab194ae06e713a
parenta81f8bb58bc6bf52d25a58b67a4d1ccf5e58d9ea (diff)
t2
git-svn-id: svn://tug.org/texlive/trunk@1368 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/latex/t2/citehack.sty88
-rw-r--r--Master/texmf-dist/tex/latex/t2/mathtext.sty125
-rw-r--r--Master/texmf-dist/tex/latex/t2/misccorr.sty311
3 files changed, 524 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/t2/citehack.sty b/Master/texmf-dist/tex/latex/t2/citehack.sty
new file mode 100644
index 00000000000..4e44dc54170
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/t2/citehack.sty
@@ -0,0 +1,88 @@
+% This is the file citehack.sty of the T2 package.
+%
+% Allow inputenc-generated characters as references in \cite and \bibitem.
+% Also in \label and \ref.
+
+\ProvidesPackage{citehack}
+
+\let\org@IeC\IeC
+\def\tmp@IeC#1{\string\IeC\space{\string#1 }}
+
+% This is a modified \@bibitem command;
+% we added \let\protect\noexpand, like in \@lbibitem,
+% because the item may include, e.g., \IeC {...}
+% or some other protected commands.
+\def\@bibitem#1{\item\if@filesw {\let\protect\noexpand\immediate\write\@auxout
+ {\string\bibcite{#1}{\the\value{\@listctr}}}}\fi\ignorespaces}
+%\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw
+% {\let\protect\noexpand\let\IeC\tmp@IeC
+% \immediate
+% \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
+%\def\@bibitem#1{\item\if@filesw \let\IeC\tmp@IeC\immediate\write\@auxout
+% {\string\bibcite{#1}{\the\value{\@listctr}}}\let\IeC\org@IeC\fi\ignorespaces}
+
+\def\@citex[#1]#2{\let\IeC\tmp@IeC\edef\CH@temp{#2}\let\IeC\org@IeC
+ \let\@citea\@empty
+ \@cite{\@for\@citeb:=\CH@temp\do
+ {\@citea\def\@citea{,\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue
+ \@latex@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
+
+\def\nocite#1{\@bsphack
+ \let\IeC\tmp@IeC\edef\CH@temp{#1}\let\IeC\org@IeC
+ \@for\@citeb:=\CH@temp\do{%
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@\@citeb}{\G@refundefinedtrue
+ \@latex@warning{Citation `\@citeb' undefined}}{}}%
+ \@esphack}
+
+\def\@newl@bel#1#2#3{\let\IeC\tmp@IeC
+ \@ifundefined{#1@#2}%
+ \relax
+ {\gdef \@multiplelabels {%
+ \@latex@warning@no@line{There were multiply-defined labels}}%
+ \@latex@warning@no@line{Label `#2' multiply defined}}%
+ \global\@namedef{#1@#2}{#3}\let\IeC\org@IeC}
+
+% This is a modified \@testdef command taken from Babel:
+\def\@testdef #1#2#3{%
+ \let\IeC\tmp@IeC
+ \expandafter\let\expandafter\bbl@tempa\csname #1@#2\endcsname
+ \def\bbl@tempb{#3}%
+ \ifx\bbl@tempa\relax\else
+ \edef\bbl@tempa{\expandafter\strip@prefix\meaning\bbl@tempa}\fi
+ \edef\bbl@tempb{\expandafter\strip@prefix\meaning\bbl@tempb}%
+ \ifx \bbl@tempa \bbl@tempb
+ \else \@tempswatrue \fi\let\IeC\org@IeC}
+
+% \ref, \pageref and \label support:
+\DeclareRobustCommand\ref[1]{\let\IeC\tmp@IeC
+ \expandafter\let\expandafter\CH@temp\csname r@#1\endcsname
+ \let\IeC\org@IeC\@setref\CH@temp\@firstoftwo{#1}}
+\DeclareRobustCommand\pageref[1]{\let\IeC\tmp@IeC
+ \expandafter\let\expandafter\CH@temp\csname r@#1\endcsname
+ \let\IeC\org@IeC\@setref\CH@temp\@secondoftwo{#1}}
+\def\label#1{\let\IeC\tmp@IeC
+ \@bsphack\protected@write\@auxout{}{\string\newlabel{#1}{{\@currentlabel}{\thepage}}}\@esphack
+ \let\IeC\org@IeC}
+
+% varioref package support:
+\def\vref@pagenum#1#2{\let\IeC\tmp@IeC
+ \@ifundefined{r@#2}{\@namedef{r@#2}{{??}{??}}}{}%
+ \edef#1{\expandafter\expandafter\expandafter
+ \@cdr\csname r@#2\endcsname
+ \@nil}%
+ \let\IeC\org@IeC}
+\def\vrefpagenum#1#2{\let\IeC\tmp@IeC
+ \@ifundefined{r@#2}%
+ {\G@refundefinedtrue
+ \@latex@warning{Reference `#2' on page \thepage \space
+ undefined}}{}%
+ \let\IeC\org@IeC
+ \vref@pagenum{#1}{#2}}
diff --git a/Master/texmf-dist/tex/latex/t2/mathtext.sty b/Master/texmf-dist/tex/latex/t2/mathtext.sty
new file mode 100644
index 00000000000..a0aa308c312
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/t2/mathtext.sty
@@ -0,0 +1,125 @@
+%%
+%% This is file `mathtext.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mathtext.dtx (with options: `mathtext,warn')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from mathtext.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file mathtext.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\ProvidesPackage{mathtext}
+ [1999/01/28 v1.0 transparent text-and-math defs]
+\def\@@enc@update{%
+ \expandafter\let\csname\cf@encoding-cmd\endcsname\@changed@cmd
+ \expandafter\let\csname\cf@encoding-tmcmd\endcsname\@changed@tmcmd
+ \expandafter\let\csname\f@encoding-cmd\endcsname\@current@cmd
+ \expandafter\let\csname\f@encoding-tmcmd\endcsname\@current@tmcmd
+ \default@T
+ \csname T@\f@encoding\endcsname
+ \csname D@\f@encoding\endcsname
+ \let\enc@update\relax
+ \let\cf@encoding\f@encoding
+}
+\def\@current@tmcmd#1#2#3{%
+ \ifx\protect\@typeset@protect
+ \@tmchar#2#3%
+ \else
+ \noexpand#1%
+ \fi}
+\def\@tmchar#1#2{\if@mmode\math@warn#2\else#1\fi}
+\def\@changed@tmcmd#1#2#3{%
+ \ifx\protect\@typeset@protect
+ \@tmchar@#1%
+ \else
+ \noexpand#1%
+ \fi}
+\def\@tmchar@#1{%
+ \if@mmode
+ \expandafter\ifx\csname\cf@encoding math\string#1\endcsname\relax
+ \expandafter\ifx\csname ?math\string#1\endcsname\relax
+ \expandafter\def\csname ?math\string#1\endcsname{%
+ \TextSymbolUnavailable#1%
+ }%
+ \fi
+ \global\expandafter\let
+ \csname\cf@encoding math\string#1\expandafter\endcsname
+ \csname ?math\string#1\endcsname
+ \fi
+ \expandafter\math@warn\csname\cf@encoding math\string#1%
+ \expandafter\endcsname
+ \else
+ \expandafter\ifx\csname\cf@encoding\string#1\endcsname\relax
+ \expandafter\ifx\csname ?\string#1\endcsname\relax
+ \expandafter\def\csname ?\string#1\endcsname{%
+ \TextSymbolUnavailable#1%
+ }%
+ \fi
+ \global\expandafter\let
+ \csname\cf@encoding \string#1\expandafter\endcsname
+ \csname ?\string#1\endcsname
+ \fi
+ \csname\cf@encoding\string#1%
+ \expandafter\endcsname
+ \fi}
+\expandafter\let\csname?-tmcmd\endcsname\@changed@tmcmd
+\def\DeclareFontEncoding@#1#2#3{%
+ \expandafter
+ \ifx\csname T@#1\endcsname\relax
+ \def\cdp@elt{\noexpand\cdp@elt}%
+ \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
+ {\default@family}{\default@series}%
+ {\default@shape}}%
+ \expandafter\let\csname#1-cmd\endcsname\@changed@cmd
+ \expandafter\let\csname#1-tmcmd\endcsname\@changed@tmcmd
+ \else
+ \@font@info{Redeclaring font encoding #1}%
+ \fi
+ \global\@namedef{T@#1}{#2}%
+ \global\@namedef{M@#1}{\default@M#3}%
+ \xdef\LastDeclaredEncoding{#1}%
+ \DeclareSymbolFont{#1letters}{#1}\rmdefault\mddefault\updefault
+ }
+\def\DeclareTextMathSymbol#1#2#3#4#5{%
+ \expandafter\def\expandafter#1%
+ \expandafter{%
+ \csname#2-tmcmd\expandafter\endcsname
+ \expandafter#1%
+ \csname#2\string#1\expandafter\endcsname
+ \csname#2math\string#1\endcsname
+ }%
+ \expandafter\chardef\csname#2\string#1\endcsname#5\relax
+ \expandafter\DeclareMathSymbol\csname#2math\string#1\endcsname
+ {#3}{#4}{#5}}
+\@onlypreamble\DeclareTextMathSymbol
+\let\if@mmode\ifmmode
+\DeclareRobustCommand\reset@if@mmode{\let\if@mmode\ifmmode}
+\def\if@mmode@{\reset@if@mmode\ifmmode}
+\let\org@halign\halign
+\DeclareRobustCommand\halign{\let\if@mmode\if@mmode@\org@halign}
+\everymath\expandafter{\the\everymath\let\if@mmode\ifmmode}
+\def\DeclareTextSymbol#1#2#3{%
+ \DeclareTextMathSymbol#1{#2}\mathalpha{#2letters}{#3}}
+\DeclareOption{warn}{%
+\edef\reserved@a{\@backslashchar##1\expandafter\@gobble
+ \string\math\@backslashchar}%
+\expandafter\def\expandafter\gobble@math\reserved@a{}%
+\def\math@warn#1{#1\PackageWarning{mathtext}{letter
+ `\expandafter\gobble@math\string#1' used in math mode}}}
+\let\math@warn\@empty
+\ProcessOptions*
+\endinput
+%%
+%% End of file `mathtext.sty'.
diff --git a/Master/texmf-dist/tex/latex/t2/misccorr.sty b/Master/texmf-dist/tex/latex/t2/misccorr.sty
new file mode 100644
index 00000000000..e95f3c5c0f3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/t2/misccorr.sty
@@ -0,0 +1,311 @@
+% misccorr package
+% Based on `russcorr' by Serge Lvovski and other sources.
+% This package should be used IN ADDITION to BABEL's `russian' option.
+% Mail bug reports, questions, comments, suggestions to vvv@vsu.ru
+\ProvidesPackage{misccorr}[1999/09/23 v0.0a
+ misc corrections for russian typesetting]
+
+\newif\if@longtoc
+\DeclareOption{longtoc}{\@longtoctrue}
+\DeclareOption{shorttoc}{\@longtocfalse}
+\newif\if@indentheadings
+\DeclareOption{indentheadings}{\@indentheadingstrue}
+\DeclareOption{noindentheadings}{\@indentheadingsfalse}
+% Note that the default LaTeX behavior is \@longtocfalse
+\ExecuteOptions{longtoc,noindentheadings}
+\ProcessOptions
+
+% \varkappa, \leqslant, \geqslant, etc (in addition to \varepsilon, \varphi)
+\RequirePackage{amssymb}
+
+\RequirePackage{enumerate}[1999/03/05]
+\g@addto@macro\@enhook{%
+ \def\@tempb{\IeC{\CYRA}}%
+ \def\@tempc{\IeC{\cyra}}%
+ \ifx\@tempb\@entemp\def\@tempa{\@enLabel\Asbuk}\fi
+ \ifx\@tempc\@entemp\def\@tempa{\@enLabel\asbuk}\fi}
+
+% lists
+% Теперь "русифицируем" окружение enumerate
+\def\labelenumi{\theenumi)}
+\def\theenumii{\asbuk{enumii}}
+\def\labelenumii{\theenumii)}
+\def\p@enumii{\theenumi}
+\def\labelenumiii{{\bf--}}
+\let\theenumiii\relax
+\def\p@enumiii{\theenumi\theenumii}
+%
+% И еще запретим вкладывать четыре enumerate друг в друга ...
+%
+\def\enumerate{\ifnum \@enumdepth >2% было 3, а не 2
+\@toodeep\else
+ \advance\@enumdepth \@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
+ {\csname label\@enumctr\endcsname}{\usecounter
+ {\@enumctr}\def\makelabel##1{\hss\llap{##1}}}\fi}
+%
+% Теперь определим окружение rlist
+% для создания списков, в которых
+% \item'ы нумеруются русскими буквами
+% (строчными для rlist, прописными для rlist[u])
+%
+\@definecounter{rlistctr}
+\newif\if@rlistsnested\@rlistsnestedfalse
+\def\rlist{\@ifnextchar[{\@rlist}{\@rlist[l]}}
+\def\@rlist[#1]{\if u#1\def\@tempa{A}\else\def\@tempa{a}\fi
+ \if@rlistsnested\@toodeep\else
+ \@rlistsnestedtrue
+ \edef\therlistctr{\expandafter\noexpand\csname
+ @\@tempa sbuk\endcsname\noexpand\c@rlistctr}%
+ \list{\labelrlist}{\usecounter
+ {rlistctr}}\fi}
+\let\endrlist\endlist
+\def\labelrlist{\therlistctr)}
+
+% Unfortunately, \@seccntformat is not reflected in toc.
+% Hence, we had to hack up the definition of \@sect a little.
+% In the LaTeX definition of |\@sect| we changed in two places
+% |\numberline{\csname the#1\endcsname}| to
+% |\numberline{\@tocseccntformat{#1}\relax}|
+% and |#7| to |\if@longtoc#8\else#7\fi|.
+% We preferred not to change |\numberline| e.g.
+% |\def\numberline#1{\hb@xt@\@tempdima{#1.\hfil}}|
+\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
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M #8\@@par}%
+ \endgroup
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@tocseccntformat{#1}\relax}%
+ \fi
+ \if@longtoc#8\else#7\fi}%
+ \else
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec #8}%
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\@tocseccntformat{#1}\relax}%
+ \fi
+ \if@longtoc#8\else#7\fi}}%
+ \fi
+ \@xsect{#5}}
+\def\@seccntformat#1{\csname the#1\endcsname.\enskip}
+\def\@tocseccntformat#1{\csname the#1\endcsname.}
+
+\if@indentheadings
+\def\section{\@startsection {section}{1}{\parindent}%
+ {3.5ex \@plus 1ex \@minus .2ex}%
+ {2.3ex \@plus.2ex}%
+ {\reset@font\Large\bfseries}}
+\def\subsection{\@startsection{subsection}{2}{\parindent}%
+ {3.25ex\@plus 1ex \@minus .2ex}%
+ {1.5ex \@plus .2ex}%
+ {\reset@font\large\bfseries}}
+\def\subsubsection{\@startsection{subsubsection}{3}{\parindent}%
+ {3.25ex\@plus 1ex \@minus .2ex}%
+ {1.5ex \@plus .2ex}%
+ {\reset@font\normalsize\bfseries}}
+\fi
+
+\@ifundefined{chapter}{}{%
+\def\postchapter{.}
+\def\chapter{\if@openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ \global\@topnum\z@
+ \if@indentheadings\@afterindenttrue
+ \else\@afterindentfalse
+ \fi
+ \secdef\@chapter\@schapter}
+\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}%
+ {\protect\numberline{\thechapter
+ \postchapter}%
+ \if@longtoc#2\else#1\fi}%
+ \else
+ \addcontentsline{toc}{chapter}%
+ {\if@longtoc#2\else#1\fi}\fi
+ \else
+ \addcontentsline{toc}{chapter}{\if@longtoc#2\else#1\fi}
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \@afterheading
+ \fi}
+}% end of conditional
+\@ifundefined{chapter}{}{%
+\def\@makechapterhead#1{%
+ \vspace*{50\p@}%
+ {\reset@font \@tempdima\parindent \raggedright
+ \if@indentheadings\advance\leftskip\@tempdima\fi
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \huge\bfseries \@chapapp{} \thechapter\postchapter
+ \par\nobreak
+ \vskip 20\p@
+ \fi
+ \fi
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par
+ \nobreak
+ \vskip 40\p@
+ }}%
+\def\@schapter#1{\if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \@makeschapterhead{#1}%
+ \@afterheading
+ \fi}
+\def\@makeschapterhead#1{%
+ \vspace*{50\p@}%
+ {\reset@font \@tempdima\parindent \raggedright
+ \if@indentheadings\advance\leftskip\@tempdima\fi
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \nobreak
+ \vskip 40\p@
+ }}
+}% end of conditional
+
+% captions
+\long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1. #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1. #2\par
+% \unhbox\@tempboxa\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+
+\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
+ ext@#1\endcsname}{#1}{\protect\numberline{\csname
+ the#1\endcsname.}{\ignorespaces #2}}\begingroup
+ \@parboxrestore
+ \normalsize
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
+ \endgroup}
+
+% theorems
+\def\afterthmseparator{.}
+\expandafter\ifx\csname theoremstyle\endcsname\relax
+ \def\@begintheorem#1#2{\trivlist
+ \item[\hskip \labelsep{\bfseries #1\ #2\unskip\afterthmseparator
+ }]\itshape}
+ \def\@opargbegintheorem#1#2#3{\trivlist
+ \item[\hskip \labelsep{\bfseries #1\ #2\ (#3)\afterthmseparator
+ }]\itshape}
+\fi
+
+% class-dependent redefinitions: appendix and running heads
+\@ifundefined{chapter}{% article
+\renewcommand\appendix{\par
+ \setcounter{section}{0}%
+ \setcounter{subsection}{0}%
+ \gdef\thesection{\@Asbuk\c@section}}
+% вставлено ".\@aftersepkern" после номера
+\if@twoside
+ \def\ps@headings{%
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+ \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\sectionmark##1{%
+ \markboth {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\z@
+ \thesection\postsection\quad
+ \fi
+ ##1}}{}}%
+ \def\subsectionmark##1{%
+ \markright {%
+ \ifnum \c@secnumdepth >\@ne
+ \thesubsection\postsubsection\quad
+ \fi
+ ##1}}}
+\else
+ \def\ps@headings{%
+ \let\@oddfoot\@empty
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\sectionmark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \thesection\postsection\quad
+ \fi
+ ##1}}}}
+\fi
+}{% not article
+\renewcommand\appendix{\par
+ \setcounter{chapter}{0}%
+ \setcounter{section}{0}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@Asbuk\c@chapter}}
+% два пробела после точки заменены на один
+\if@twoside
+ \def\ps@headings{%
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
+ \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markboth {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \@chapapp\ \thechapter. %
+ \fi
+ \fi
+ ##1}}{}}%
+ \def\sectionmark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\z@
+ \thesection. %
+ \fi
+ ##1}}}}
+\else
+ \def\ps@headings{%
+ \let\@oddfoot\@empty
+ \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+ \let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markright {\MakeUppercase{%
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \@chapapp\ \thechapter. %
+ \fi
+ \fi
+ ##1}}}}
+\fi
+\@ifundefined{abstractname}{% book
+}{% report
+\let\if@mainmatter\iftrue
+}}
+
+% \cleardoublepage
+% добавил \ps@empty (и заодно заменил \hbox{} на \null)
+\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
+ {\null\ps@empty\newpage}\if@twocolumn{\null\ps@empty\newpage}\fi\fi\fi}
+
+\AtBeginDocument{\ifdim\hsize<\@cclv\p@\pretolerance\m@ne\fi}
+\endinput