% 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.
%
m4_ESKDX_INIT
m4_FILE_INIT
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{eskdspecii}[m4_dnl
m4_FILE_ID([[$Date:: 2010-01-14#$]]) Specification GOST 2.106.95 Form 2]

\RequirePackage{eskdlang}
\RequirePackage{eskdstamp}
\RequirePackage{rotating}
\RequirePackage{chngpage}
\RequirePackage{lscape}
\RequirePackage{array}
\RequirePackage{longtable}

\newcommand{\ESKDdrawSpecificationII}{
  \put(\ESKDltu{\ESKDframeX},\ESKDltu{\ESKDframeY}){%
    \begin{picture}(0,0)
    \ESKD@tmpdimb=\ESKDframeW
    \ESKD@tmpdimc=8mm
    \advance\ESKD@tmpdimb -70mm
    \divide\ESKD@tmpdimb by \ESKD@tmpdimc
    \ESKD@tmpcnta=\ESKD@tmpdimb
    \ESKD@tmpdimb=\ESKD@tmpdimc
    \multiply\ESKD@tmpdimb by \ESKD@tmpcnta
    \advance\ESKD@tmpdimb 15mm
    \linethickness{\ESKDlineThick}
    \put(0,6){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(0,12){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(0,20){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(0,90){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(0,162){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(0,172){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(0,182){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(0,257){\line(1,0){\ESKDltu{\ESKD@tmpdimb}}}
    \put(15,0){\line(0,1){\ESKDltu{\ESKDframeH}}}
    \linethickness{\ESKDlineThin}
    \multiput(23,0)(8, 0){\the\ESKD@tmpcnta}{%
      \line(0,1){\ESKDltu{\ESKDframeH}}}
    \end{picture}}}

\newcommand{\ESKDdrawSpecIIstampII}{%
  \setlength{\ESKD@tmpdima}{\ESKDframeX+\ESKDframeW}
  \setlength{\ESKD@tmpdimb}{\ESKDframeY+\ESKDframeH-185mm}
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}\usebox{\ESKD@stamp@ii@box}\end{sideways}}
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}\ESKD@stamp@ii@var\end{sideways}}}

\newcommand{\ESKDdrawSpecIIstampIIa}{%
  \setlength{\ESKD@tmpdima}{\ESKDframeX+\ESKDframeW}
  \setlength{\ESKD@tmpdimb}{\ESKDframeY+\ESKDframeH-185mm}
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}\usebox{\ESKD@stamp@ii@a@box}\end{sideways}}
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}\ESKD@stamp@ii@a@var\end{sideways}}}

\ifESKD@enable@columns@xxvii
\newcommand{\ESKDdrawSpecIIcolumnsXXVII}{%
  \setlength{\ESKD@tmpdima}{\ESKDframeX+\ESKDframeW-48mm}
  \setlength{\ESKD@tmpdimb}{\ESKDframeY+\ESKDframeH-120mm}
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}\usebox{\ESKD@columns@xxvii@ii@box}\end{sideways}}%
  \addtolength{\ESKD@tmpdima}{8mm}%
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}\usebox{\ESKD@column@xxx@box}\end{sideways}}}
\fi

\ifESKD@enable@column@xxxi
\newcommand{\ESKDdrawSpecIIcolumnXXXI}{%
  \setlength{\ESKD@tmpdima}{\ESKDframeX+\ESKDframeW+1.2mm}%
  \setlength{\ESKD@tmpdimb}{\ESKDframeY+\ESKDframeH-120mm}%
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}%
    \makebox[70mm][r]{\ESKDfontIII\ESKDcolumnXXXIname\hspace{4em}}%
    \end{sideways}}}
\fi

\ifESKD@enable@column@xxxii
\newcommand{\ESKDdrawSpecIIcolumnXXXII}{%
  \setlength{\ESKD@tmpdima}{\ESKDframeX+\ESKDframeW+1.2mm}%
  \setlength{\ESKD@tmpdimb}{\ESKDframeY+\ESKDframeH-50mm}%
  \put(\ESKDltu{\ESKD@tmpdima},\ESKDltu{\ESKD@tmpdimb}){%
    \begin{sideways}%
    \makebox[50mm][r]{\ESKDfontIII\ESKDtheColumnXXXII}%
    \end{sideways}}}
\fi

\ESKDnewStyle{specII}{0mm}
\ESKDputOnStyle{specII}{frame}{\ESKDdrawFrame}
\ESKDputOnStyle{specII}{stamp}{\ESKDdrawSpecIIstampII}
\ESKDputOnStyle{specII}{specification}{\ESKDdrawSpecificationII}
\ifESKD@enable@columns@xix
  \ESKDputOnStyle{specII}{columnsxix}{\ESKDdrawColumnsXIX}
\fi
\ifESKD@enable@columns@xxiv
  \ESKDputOnStyle{specII}{columnsxxiv}{\ESKDdrawColumnsXXIV}
\fi
\ifESKD@enable@columns@xxvii
  \ESKDputOnStyle{specII}{columnsxxvii}{\ESKDdrawSpecIIcolumnsXXVII}
\fi
\ifESKD@enable@column@xxxi
  \ESKDputOnStyle{specII}{columnxxxi}{\ESKDdrawSpecIIcolumnXXXI}
\fi
\ifESKD@enable@column@xxxii
  \ESKDputOnStyle{specII}{columnxxxii}{\ESKDdrawSpecIIcolumnXXXII}
\fi

\ESKDnewStyle{specIIa}{0mm}
\ESKDputOnStyle{specIIa}{frame}{\ESKDdrawFrame}
\ESKDputOnStyle{specIIa}{stamp}{\ESKDdrawSpecIIstampIIa}
\ESKDputOnStyle{specIIa}{specification}{\ESKDdrawSpecificationII}
\ifESKD@enable@columns@xix
  \ESKDputOnStyle{specIIa}{columnsxix}{\ESKDdrawColumnsXIX}
\fi
\ifESKD@enable@column@xxxi
  \ESKDputOnStyle{specIIa}{columnxxxi}{\ESKDdrawSpecIIcolumnXXXI}
\fi
\ifESKD@enable@column@xxxii
  \ESKDputOnStyle{specIIa}{columnxxxii}{\ESKDdrawSpecIIcolumnXXXII}
\fi

\ESKDdefaultFirstStyle{specII}
\ESKDdefaultStyle{specIIa}

m4_dnl ������������
\newenvironment{ESKDspecificationII}{%
\begin{ESKDzeroPadding}%
\changetext{}{-55mm}{}{}{}%
\begin{landscape}
\setlength{\tabcolsep}{0.5mm}%
\setlength{\LTpre}{0mm}%
\setlength{\LTpost}{0mm}%
\setlength{\LTleft}{0mm}%
\setlength{\LTright}{\fill}%
\newcolumntype{s}{>{\ESKDfontTabBody}c}%
\newcolumntype{n}{>{\parbox[c][8mm][c]{1mm}{%
  \rule{0mm}{0mm}}\ESKDfontTabBody}l}%
\noindent%
\begin{longtable}{ssssnssss}
\parbox[c][15mm][c]{5mm}{\centering\begin{sideways}\ESKDfontTabHead%
\ESKDspecIIcolumnIname\end{sideways}}&
\parbox[c][15mm][c]{5mm}{\centering\begin{sideways}\ESKDfontTabHead%
\ESKDspecIIcolumnIIname\end{sideways}}&
\parbox[c][15mm][c]{7mm}{\centering\begin{sideways}\ESKDfontTabHead%
\ESKDspecIIcolumnIIIname\end{sideways}}&
\parbox[c][15mm][c]{69mm}{\centering\ESKDfontTabHead%
\ESKDspecIIcolumnIVname}&
\parbox[c][15mm][c]{71mm}{\centering\ESKDfontTabHead%
\ESKDspecIIcolumnVname}&
\parbox[c][15mm][c]{9mm}{\centering\begin{sideways}\ESKDfontTabHead%
\ESKDspecIIcolumnVIname\end{sideways}}&
\parbox[c][15mm][c]{9mm}{\centering\begin{sideways}\ESKDfontTabHead%
\ESKDspecIIcolumnVIIname\end{sideways}}&
\parbox[c][15mm][c]{74mm}{\centering\ESKDfontTabHead%
\ESKDspecIIcolumnVIIIname}&
\parbox[c][15mm][c]{29mm}{\centering\ESKDfontTabHead%
\ESKDspecIIcolumnIXname}\endhead}{%
\end{longtable}%
\end{landscape}%
\changetext{}{55mm}{}{}{}%
\end{ESKDzeroPadding}}

m4_dnl vim:ft=tex:sw=2:ai
