summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eskdx/eskdsect.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-07-22 23:32:04 +0000
committerKarl Berry <karl@freefriends.org>2006-07-22 23:32:04 +0000
commit8c0d217270186626f5b82a7e018a5e215af4e172 (patch)
tree79fde11e06867d39659e8617b25e484d864ab269 /Master/texmf-dist/tex/latex/eskdx/eskdsect.sty
parentd41d86cee76a19ef68f05d300f78881d3f81dbd8 (diff)
new package eskdx for Russian documents (2mar06)
git-svn-id: svn://tug.org/texlive/trunk@1895 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/eskdx/eskdsect.sty')
-rw-r--r--Master/texmf-dist/tex/latex/eskdx/eskdsect.sty173
1 files changed, 173 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/eskdx/eskdsect.sty b/Master/texmf-dist/tex/latex/eskdx/eskdsect.sty
new file mode 100644
index 00000000000..449955f21fb
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/eskdx/eskdsect.sty
@@ -0,0 +1,173 @@
+% Copyright 2006 Konstantin Korikov <lostclus@ua.fm>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% 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.3 or later is part of all distributions of LaTeX
+% version 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Konstantin Korikov.
+%
+% This work consists of all files listed in manifest.txt.
+%
+
+%
+% This is automaticaly generated file, do not edit it.
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{eskdsect}[2006/02/25 v0.94 Sectioning]
+
+\newcommand{\ESKD@point@style}{single}
+
+\DeclareOption{pointsingle}{\renewcommand{\ESKD@point@style}{single}}
+\DeclareOption{pointsection}{\renewcommand{\ESKD@point@style}{section}}
+\DeclareOption{pointsubsection}{\renewcommand{\ESKD@point@style}{subsection}}
+
+\ProcessOptions\relax
+
+\def\@startsection#1#2#3#4#5#6{%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \@tempskipa #4\relax
+ \@afterindenttrue
+ \ifdim \@tempskipa <\z@
+ \@tempskipa -\@tempskipa \@afterindentfalse
+ \fi
+ \if@nobreak
+ \everypar{}%
+ \divide \@tempskipa by 2
+ \vskip -\@tempskipa
+ \vskip\z@skip
+ \else
+ \addpenalty\@secpenalty\addvspace\@tempskipa
+ \fi
+ \@ifstar
+ {\@ssect{#3}{#4}{#5}{#6}}%
+ {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
+
+\newcommand{\ESKDsectAlignLeft}{%
+ \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip%
+ \leftskip\z@skip}
+\newcommand{\ESKDsectAlignRight}{%
+ \let\\\@centercr\rightskip\z@skip\leftskip\@flushglue
+ \parindent\z@\parfillskip\z@skip}
+\newcommand{\ESKDsectAlignCenter}{%
+ \let\\\@centercr
+ \rightskip\@flushglue\leftskip\@flushglue
+ \parindent\z@\parfillskip\z@skip}
+
+\newcommand{\ESKDsectionAlign}{\ESKDsectAlignLeft}
+\newcommand{\ESKDsubsectionAlign}{\ESKDsectAlignLeft}
+\newcommand{\ESKDsubsubsectionAlign}{\ESKDsectAlignLeft}
+
+\newcommand{\ESKDsectAlign}[2]{%
+ \expandafter\renewcommand\csname\string ESKD#1Align\endcsname{%
+ \@nameuse{ESKDsectAlign#2}}}
+
+\newcommand{\ESKDsectionStyle}{\normalfont\Large\bfseries\MakeUppercase}
+\newcommand{\ESKDsubsectionStyle}{\normalfont\large\bfseries}
+\newcommand{\ESKDsubsubsectionStyle}{\normalfont\normalsize\bfseries}
+
+\newcommand{\ESKDsectStyle}[2]{%
+ \expandafter\renewcommand\csname\string ESKD#1Style\endcsname{#2}}
+
+\newlength{\ESKDsectionSkipBefore}
+\newlength{\ESKDsectionSkipAfter}
+\setlength{\ESKDsectionSkipBefore}{-15mm \@plus -3mm \@minus -2mm}
+\setlength{\ESKDsectionSkipAfter}{15mm \@plus 1mm \@minus 2mm}
+\newlength{\ESKDsubsectionSkipBefore}
+\newlength{\ESKDsubsectionSkipAfter}
+\setlength{\ESKDsubsectionSkipBefore}{-15mm \@plus -3mm \@minus -2mm}
+\setlength{\ESKDsubsectionSkipAfter}{15mm \@plus 1mm \@minus 2mm}
+\newlength{\ESKDsubsubsectionSkipBefore}
+\newlength{\ESKDsubsubsectionSkipAfter}
+\setlength{\ESKDsubsubsectionSkipBefore}{-15mm \@plus -3mm \@minus -2mm}
+\setlength{\ESKDsubsubsectionSkipAfter}{15mm \@plus 1mm \@minus 2mm}
+
+\providecommand{\plus}{\@plus}
+\providecommand{\minus}{\@minus}
+
+\newcommand{\ESKDsectSkip}[3]{%
+ \expandafter\setlength\csname\string ESKD#1SkipBefore\endcsname{#2}%
+ \expandafter\setlength\csname\string ESKD#1SkipAfter\endcsname{#3}}
+
+\renewcommand\section{\@startsection {section}{1}{\parindent}%
+ {\ESKDsectionSkipBefore}%
+ {\ESKDsectionSkipAfter}%
+ {\ESKDsectionAlign\ESKDsectionStyle}}
+\renewcommand\subsection{\@startsection{subsection}{2}{\parindent}%
+ {\ESKDsubsectionSkipBefore}%
+ {\ESKDsubsectionSkipAfter}%
+ {\ESKDsubsectionAlign\ESKDsubsectionStyle}}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\parindent}%
+ {\ESKDsubsubsectionSkipBefore}%
+ {\ESKDsubsubsectionSkipAfter}%
+ {\ESKDsubsubsectionAlign\ESKDsubsubsectionStyle}}
+
+\renewcommand{\thesection}{\arabic{section}}
+\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
+\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
+
+\newcommand{\ESKD@point@style@single}{
+ \newcounter{point}
+ \renewcommand{\thepoint}{\arabic{point}}}
+
+\newcommand{\ESKD@point@style@section}{
+ \newcounter{point}[section]
+ \renewcommand{\thepoint}{\thesection.\arabic{point}}}
+
+\newcommand{\ESKD@point@style@subsection}{
+ \newcounter{point}[subsection]
+ \renewcommand{\thepoint}{\thesubsection.\arabic{point}}}
+
+\@nameuse{ESKD@point@style@\ESKD@point@style}
+\newcounter{subpoint}[point]
+\newcounter{subsubpoint}[subpoint]
+\renewcommand{\thesubpoint}{\thepoint.\arabic{subpoint}}
+\renewcommand{\thesubsubpoint}{\thesubpoint.\arabic{subsubpoint}}
+
+\newcommand{\point}{%
+ \par\refstepcounter{point}\thepoint\quad}
+\newcommand{\subpoint}{%
+ \par\refstepcounter{subpoint}\thesubpoint\quad}
+\newcommand{\subsubpoint}{%
+ \par\refstepcounter{subsubpoint}\thesubsubpoint\quad}
+
+\newcounter{appendix}
+\renewcommand{\theappendix}{\Asbuk{appendix}}
+\newlength{\ESKDappendixSkip}
+\setlength{\ESKDappendixSkip}{15mm \@plus 3mm \@minus 10mm}
+
+\newcommand{\ESKDappendix}[2]{%
+ \ESKDclearDoublePage%
+ \refstepcounter{appendix}%
+ \setcounter{section}{0}%
+ \renewcommand{\thesection}{\theappendix.\arabic{section}}%
+ \setcounter{equation}{0}%
+ \renewcommand{\theequation}{\theappendix.\arabic{equation}}%
+ \setcounter{figure}{0}%
+ \renewcommand{\thefigure}{\theappendix.\arabic{figure}}%
+ \setcounter{table}{0}%
+ \renewcommand{\thetable}{\theappendix.\arabic{table}}%
+ \addcontentsline{toc}{section}{\appendixname\ \theappendix\ #2}%
+ \begin{list}{}{%
+ \setlength{\itemindent}{0mm}%
+ \setlength{\labelwidth}{0mm}%
+ \setlength{\labelsep}{0mm}%
+ \setlength{\leftmargin}{0mm}%
+ \setlength{\topsep}{0mm}%
+ \setlength{\parskip}{0mm}%
+ \setlength{\partopsep}{0mm}%
+ \setlength{\itemsep}{0mm}%
+ \setlength{\parsep}{0mm}}
+ \item\raggedleft\appendixname\ \theappendix
+ \ifx#1\@empty\else\\(#1)\fi\\
+ \item\centering\bf #2
+ \end{list}%
+ \par\nobreak\addvspace{\ESKDappendixSkip}}
+