% \iffalse meta-comment
%
% gost732 -- GOST 7.32-2001 implementation.
%
% Copyright (c) Stanislav Kruchinin
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. This version of this license is in
%    http://www.latex-project.org/lppl/lppl-1-3c.txt
% and 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 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% Current Maintainer of this work is Stanislav Kruchinin.
%
% This work consists of the main source file gost705.dtx
% and the derived files
%    gost732.bst, gost732.pdf.
%
% Distribution:
%    CTAN:macros/latex/contrib/disser/src/gost732.dtx
%
% Unpacking:
%   (a) If disser.ins present:
%         latex disser.ins
%   (b) Without disser.ins:
%         tex gost732.dtx
%
% Documentation:
%    latex gost732.dtx; ...
%
%    Programm calls to get the documentation (example):
%       pdflatex gost732.dtx
%       makeindex -r -s dtx.ist gost732
%       pdflatex gost732.dtx
%       pdflatex gost732.dtx
%
% Installation:
%    TDS:tex/latex/disser/
%    TDS:doc/latex/disser/
%    TDS:source/latex/disser/
%
%<*ignore>
\begingroup
  \catcode123=1 %
  \catcode125=2 %
  \def\x{LaTeX2e}%
\expandafter\endgroup
\ifcase 0\ifx\install y1\fi\expandafter
         \ifx\csname processbatchFile\endcsname\relax\else1\fi
         \ifx\fmtname\x\else 1\fi\relax
\else\csname fi\endcsname
%</ignore>
%<*install>
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
\Msg{* gost732: GOST 7.32-2001 implementation}
\Msg{************************************************************************}

\keepsilent
\askforoverwritefalse

\let\MetaPrefix\relax
\preamble

This is a generated file.

This document class attempts to format LaTeX document according to
GOST 7.32-2001.

Copyright (C) 2004-2012 by
   Stanislav Kruchinin <stanislav.kruchinin at gmail.com>

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in
   http://www.latex-project.org/lppl/lppl-1-3c.txt
and 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 2005/12/01 or later.

This work has the LPPL maintenance status "maintained".

Current Maintainer of this work is Stanislav Kruchinin.

This work consists of the main source file gost705.dtx
and the derived files
   gost732.bst gost732.pdf.

\endpreamble
\let\MetaPrefix\DoubleperCent

\generate{%
  \usedir{tex/latex/disser}%
  \file{gost732.cls}{\from{gost732.dtx}{gost732}}%
}

\catcode32=13\relax% active space
\let =\space%
\Msg{************************************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
\Msg{*     gost732.cls}
\Msg{*}
\Msg{* To produce the documentation run the file `gost732.dtx'}
\Msg{* through LaTeX or pdfLaTeX.}
\Msg{*}
\Msg{* Happy TeXing!}
\Msg{*}
\Msg{************************************************************************}

\endbatchfile
%</install>
%<*ignore>
\fi
%</ignore>
%<*driver>
\ProvidesFile{gost732.drv}[2016/01/27 1.3.4 GOST 7.32-2001 implementation]

\documentclass{ltxdoc}
\usepackage[a4paper,includeheadfoot,nohead,mag=1000,
            left=5cm,right=1cm,top=1.5cm,bottom=1.5cm]{geometry}
\usepackage{ifpdf,indentfirst,color}

\definecolor{darkblue}{rgb}{0,0,.6}
\ifpdf
  \usepackage[pdftex,hyperindex,unicode]{hyperref}
  \usepackage{cmap}
\else
  \usepackage[hypertex]{hyperref}
\fi

\hypersetup{
  pdftitle           = {Documented source code of gost732 class},
  pdfauthor          = {Stanislav Kruchinin},
  pdfsubject         = {disser},
  pdfstartview       = {FitH},
  pdfborder          = {0 0 0},
  bookmarksopen      = true,
  bookmarksnumbered  = true,
  bookmarksopenlevel = 2,
  colorlinks = true,     linkcolor  = darkblue,
  citecolor  = darkblue, filecolor  = darkblue,
  menucolor  = darkblue, urlcolor   = darkblue
}

\IfFileExists{pscyr.sty}{%
  \usepackage{pscyr}
  \renewcommand\ttdefault{cmtt}
  \renewcommand\rmdefault{ftm}
}{
  \IfFileExists{cyrtimes.sty}{%
    \renewcommand\ttdefault{cmtt}
    \renewcommand\rmdefault{ftm}
  }{}
}
\IfFileExists{url.sty}{\RequirePackage{url}}{\newcommand\url{\texttt}}

\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[english,russian]{babel}

\MakeShortVerb{\|}

\def\file#1{\texttt{#1}}
\def\pkg#1{\textsf{#1}}
\def\cmd#1{\texttt{#1}}

\setlength\hfuzz{20pt}
\hbadness=10000

\GetFileInfo{gost732.drv}
\begin{document}
  \sloppy
  \DocInput{gost732.dtx}
\end{document}
%</driver>
% \fi
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \title{\pkg{gost732} --- класс для оформления документов в соответствии
% с ГОСТ 7.32-2001}
% \date{Версия \fileversion\\[6pt]\filedate}
% \author{Станислав Кручинин\\[6pt]
% \normalsize E-mail:
% \href{mailto:stanislav.kruchinin@gmail.com}
% {\texttt{stanislav.kruchinin@gmail.com}}}
%
% \maketitle
%
% \tableofcontents
%
%  \section{Исходный текст}\parindent=0pt
%
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{gost732}[2013/12/30 1.3.0 GOST 7.32-2001 implementation]

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{disser}}
\ProcessOptions\relax
\LoadClass[a4paper,14pt]{disser}

%    \end{macrocode}
%
% \subsection{Формат заголовков}
%
%    \begin{macrocode}
\renewcommand\tocprethechapter{}
\renewcommand\tocpostthechapter{\@postskip}
\renewcommand\chapteralign{\centering}
\renewcommand\thechapterfont{\Large\bfseries}
\renewcommand\prethechapter{}
\renewcommand\postthechapter{\@postskip}
\renewcommand\afterchapter{\vskip 16\p@}

\renewcommand\postthesection{\@postskip}
\renewcommand\tocpostthesection{\@postskip}
\renewcommand\sectionindent{1cm}

\renewcommand\postthesubsection{\@postskip}
\renewcommand\tocpostthesubsection{\@postskip}
\renewcommand\subsectionindent{1cm}

\renewcommand\postthesubsubsection{\@postskip}
\renewcommand\tocpostthesubsubsection{\@postskip}
\renewcommand\subsubsectionindent{1cm}

\renewcommand\posttheparagraph{\@postskip}
\renewcommand\tocposttheparagraph{\@postskip}

\renewcommand\postthesubparagraph{\@postskip}
\renewcommand\tocpostthesubparagraph{\@postskip}

%    \end{macrocode}
% Изменение стандартных заголовков.
%    \begin{macrocode}
\AtBeginDocument{\addto\captionsrussian{%
\def\bibname{\cyr\CYRS\CYRP\CYRI\CYRS\CYRO\CYRK\ %
\CYRI\CYRS\CYRP\CYRO\CYRL\CYRSFTSN\CYRZ\CYRO\CYRV\CYRA\CYRN\CYRN\CYRERY\CYRH\ %
\CYRI\CYRS\CYRT\CYRO\CYRCH\CYRN\CYRI\CYRK\CYRO\CYRV}
\def\figurename{\cyr\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}
\def\appendixname{\cyr\CYRP\CYRR\CYRI\CYRL\CYRO\CYRZH\CYRE\CYRN\CYRI\CYRE}
\def\contentsname{\cyr\CYRS\CYRO\CYRD\CYRE\CYRR\CYRZH\CYRA\CYRN\CYRI\CYRE}
\def\listfigurename{\cyr\CYRS\CYRP\CYRI\CYRS\CYRO\CYRK\ %
\CYRI\CYRL\CYRL\CYRYU\CYRS\CYRT\CYRR\CYRA\CYRC\CYRI\CYRISHRT}
\def\listtablename{\cyr\CYRS\CYRP\CYRI\CYRS\CYRO\CYRK\ %
\CYRT\CYRA\CYRB\CYRL\CYRI\CYRC}
}}

%    \end{macrocode}
% Обозначения и сокращения.
%    \begin{macrocode}
\renewcommand\defsname{%
\cyr\CYRO\CYRB\CYRO\CYRZ\CYRN\CYRA\CYRCH\CYRE\CYRN\CYRI\CYRYA\ %
\CYRI\ \CYRS\CYRO\CYRK\CYRR\CYRA\CYRSHCH\CYRE\CYRN\CYRI\CYRYA
}

\renewcommand\defs{%
  \nchapter{\defsname}
}
\renewcommand\bibsection{%
  \nchapter{\bibname}
}
\renewcommand\introname{%
\cyr\CYRV\CYRV\CYRE\CYRD\CYRE\CYRN\CYRI\CYRE
}
\renewcommand\reviewname{%
\cyr\CYRO\CYRB\CYRZ\CYRO\CYRR\ %
\CYRL\CYRI\CYRT\CYRE\CYRR\CYRA\CYRT\CYRU\CYRR\CYRERY
}
\renewcommand\conclusionname{%
\cyr\CYRZ\CYRA\CYRK\CYRL\CYRYU\CYRCH\CYRE\CYRN\CYRI\CYRE
}
%    \end{macrocode}
% \subsection{Списки}
% \subsubsection{Нумерованный список}
%
% Формат счетчиков.
%    \begin{macrocode}
\renewcommand\theenumi  {\asbuk{enumi}}
\renewcommand\theenumii {\arabic{enumii}}
\renewcommand\theenumiii{\roman{enumiii}}
\renewcommand\theenumiv {\Asbuk{enumiv}}

%    \end{macrocode}
%
% Формат меток.
%    \begin{macrocode}
\renewcommand\labelenumi  {\theenumi)}
\renewcommand\labelenumii {\theenumii)}
\renewcommand\labelenumiii{\theenumiii)}
\renewcommand\labelenumiv {\theenumiv)}

%    \end{macrocode}
% Ссылочные префиксы.
%    \begin{macrocode}
\renewcommand\p@enumii  {\theenumi}
\renewcommand\p@enumiii {\theenumi.\theenumii}
\renewcommand\p@enumiv  {\p@enumiii.\theenumiii}

%    \end{macrocode}
%
% \subsubsection{Маркированный список}
%
% Формат меток.
%    \begin{macrocode}
\renewcommand\labelitemi  {\normalfont\bfseries \textendash}
\renewcommand\labelitemii {\textbullet}
\renewcommand\labelitemiii{\textasteriskcentered}
\renewcommand\labelitemiv {\textperiodcentered}

%    \end{macrocode}
%
% \subsection{Подписи к плавающим объектам}
%    \begin{macrocode}
\captionsetup{format=plain,justification=centering,labelsep=endash}
\captionsetup[longtable]{justification=raggedright,singlelinecheck=false}
\captionsetup[table]{justification=raggedright,singlelinecheck=false}

%    \end{macrocode}
% \subsection{Цитирование}
% Точка с запятой в качестве разделителя номеров цитируемой литературы.
%    \begin{macrocode}
\setcitestyle{semicolon}

%    \end{macrocode}
%
% \subsection{Сноска}
%
%    \begin{macrocode}
\renewcommand\postthefootnote{$^)$}

%    \end{macrocode}
%
% \Finale
\endinput
