% \iffalse meta-comment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% gost732 -- GOST 7.32-2001 implementation.
%%
%% Copyright (c) 2004-2009 Stanislav Kruchinin
%%
%% It 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 program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%<*driver>
\ProvidesFile{gost732.drv}[2009/06/19 1.1.2 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[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{ifpdf,indentfirst,color}
\definecolor{darkblue}{rgb}{0,0,.6}
\ifpdf
  \usepackage[%
    pdftex,
    colorlinks,
    plainpages=false,
    pdftitle     = {User manual for disser},
    pdfauthor    = {Stanislav Kruchinin},
    pdfsubject   = {disser},
    pdfstartview = {FitH},
    pdfborder    = {0 0 0},
    bookmarksopen,
    bookmarksnumbered,
    bookmarksopenlevel = 2,
    pdfusetitle,
    unicode]{hyperref}
  \usepackage{cmap}
\else
  \usepackage[hypertex]{hyperref}
\fi

\hypersetup{
  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}
  }{}
}

\MakeShortVerb{\|}

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

\GetFileInfo{gost732.drv}
\begin{document}
  \sloppy
  \DocInput{gost732.dtx}
\end{document}
%</driver>
% \fi
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \title{\texttt{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{Введение}
%
% Насколько известно автору, на данный момент отсутствуют ГОСТы,
% регламентирующие структуру и правила оформления диссертаций.
% Диссертационные советы, как правило, не предъявляют каких-либо требований
% к форматированию, за исключением тех, что реализованы в классе |disser|.
% Однако, если возникнет вопрос о соответствии верстки диссертации каким-либо
% ГОСТам, то следует воспользоваться наиболее подходящим среди существующих 
% стандартов --- ГОСТ~7.32-2001 <<Отчет о научно-исследовательской работе>>,
% который реализован в данном классе.
%
%  \section{Исходный текст}\parindent=0pt
%
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{gost732}[2009/06/19 1.1.2 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}
}}

%    \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\c@enumi}
\renewcommand\theenumii {\@arabic\c@enumii}
\renewcommand\theenumiii{\@roman\c@enumiii}
\renewcommand\theenumiv {\@Asbuk\c@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}
\renewcommand\postthefootnote{)}

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