summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/eskdx/source/eskdtitle.sty.in
blob: 9ac32d0d299fd149c63fca558279b992e0f2692c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
% 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{eskdtitle}[m4_dnl
m4_FILE_ID([[$Date:: 2010-01-14#$]]) Title GOST 2.105]

\RequirePackage{eskdstamp}
\RequirePackage{eskdlang}
\RequirePackage{eskdinfo}
\RequirePackage{eskdtitlebase}

\newcommand{\ESKD@title@split@field}[2]{%
  \parbox[t]{.4\hsize}{\raggedright#1}\hfill
  \parbox[t]{.4\hsize}{\raggedright#2}}

\renewcommand{\ESKDtheTitleFieldI}{%
  \ESKDtheDepartment\par\ESKDtheCompany}

\def\ESKDtheTitleFieldIIl{}
\renewcommand{\ESKDtheTitleFieldIIl}{%
  \ESKDtheClassCode}
\def\ESKDtheTitleFieldIIr{}
\renewcommand{\ESKDtheTitleFieldIIr}{}
\renewcommand{\ESKDtheTitleFieldII}{%
  \ESKD@title@split@field{\ESKDtheTitleFieldIIl}{\ESKDtheTitleFieldIIr}}

\def\ESKDtheTitleFieldIIIl{}
\renewcommand{\ESKDtheTitleFieldIIIl}{%
  \ifx\ESKD@title@approving@sheet\@undefined
    \expandafter\ifx\csname ESKD@title@agreed@name@1\endcsname\relax\else
      \textbf{\MakeUppercase{\ESKDagreedName}}\\
      \ESKD@title@make@stamp{agreed}{1}
    \fi
  \else
    \textbf{\MakeUppercase{\ESKDapprovedName}}\\
    \ESKD@title@approving@sheet
  \fi}
\def\ESKDtheTitleFieldIIIr{}
\renewcommand{\ESKDtheTitleFieldIIIr}{%
  \ifx\ESKD@title@approving@sheet\@undefined
    \expandafter\ifx\csname ESKD@title@approved@name@1\endcsname\relax\else
      \textbf{\MakeUppercase{\ESKDapprovingName}}\\
      \ESKD@title@make@stamp{approved}{1}
    \fi
  \fi}
\renewcommand{\ESKDtheTitleFieldIII}{%
  \ESKD@title@split@field{\ESKDtheTitleFieldIIIl}{\ESKDtheTitleFieldIIIr}}

\renewcommand{\ESKDtheTitleFieldIV}{%
  \MakeUppercase{\ESKDtheTitle}\par\ESKDtheDocName}

\renewcommand{\ESKDtheTitleFieldV}{}

\renewcommand{\ESKDtheTitleFieldVI}{%
  \MakeUppercase{\ESKDtheSignature}}

\renewcommand{\ESKDtheTitleFieldVII}{}

\def\ESKDtheTitleFieldVIIIl{}
\renewcommand{\ESKDtheTitleFieldVIIIl}{%
  \ifx\ESKD@title@approving@sheet\@undefined
    \ESKD@tmpcnta = 1
    \loop
    \ifnum \ESKD@tmpcnta < \ESKD@title@agreed@cnt
      \advance \ESKD@tmpcnta 1
      \ESKD@title@make@stamp{agreed}{\number\ESKD@tmpcnta}
      \par\vspace{5mm}
    \repeat
  \fi}
\def\ESKDtheTitleFieldVIIIr{}
\renewcommand{\ESKDtheTitleFieldVIIIr}{%
  \ifx\ESKD@title@approving@sheet\@undefined
    \ESKD@tmpcnta = 0
    \loop
    \ifnum \ESKD@tmpcnta < \ESKD@title@designed@cnt
      \advance \ESKD@tmpcnta 1
      \ESKD@title@make@stamp{designed}{\number\ESKD@tmpcnta}
      \par\vspace{5mm}
    \repeat
  \fi}
\renewcommand{\ESKDtheTitleFieldVIII}{%
  \ESKD@title@split@field{\ESKDtheTitleFieldVIIIl}{\ESKDtheTitleFieldVIIIr}}

\renewcommand{\ESKDtheTitleFieldX}{\ESKDtheYear}

\renewcommand{\ESKDtitleFontI}{\ESKDfontV}
\renewcommand{\ESKDtitleFontII}{\ESKDfontIII}
\renewcommand{\ESKDtitleFontIII}{%
  \ESKDfontIII\renewcommand{\baselinestretch}{1.50}\selectfont}
\renewcommand{\ESKDtitleFontIV}{\ESKDfontV}
\renewcommand{\ESKDtitleFontV}{\ESKDfontV}
\renewcommand{\ESKDtitleFontVI}{\ESKDfontV}
\renewcommand{\ESKDtitleFontVII}{\ESKDfontIII}
\renewcommand{\ESKDtitleFontVIII}{%
  \ESKDfontIII\renewcommand{\baselinestretch}{1.25}\selectfont}
\renewcommand{\ESKDtitleFontX}{\ESKDfontV}

\renewcommand{\maketitle}{%
  \begin{ESKDtitlePage}
  \setlength{\topsep}{0mm}
  \noindent
  \parbox[c][.28\vsize][t]{\hsize}{%
    \begin{center}\ESKDtitleFontI\bfseries\ESKDtheTitleFieldI\end{center}
    \vspace{5mm \@plus 15mm \@minus 3mm}
    \begin{center}\ESKDtitleFontII\ESKDtheTitleFieldII\end{center}
    \vspace{10mm \@plus 20mm \@minus 6mm}
    \begin{center}\ESKDtitleFontIII\ESKDtheTitleFieldIII\end{center}}
  \par\vspace{10mm \@plus 2mm \@minus 4mm}\noindent
  \parbox[c][.30\vsize][t]{\hsize}{%
    \begin{center}\ESKDtitleFontIV\bfseries\ESKDtheTitleFieldIV\end{center}
    \begin{center}\ESKDtitleFontV\ESKDtheTitleFieldV\end{center}
    \begin{center}\ESKDtitleFontVI\ESKDtheTitleFieldVI\end{center}
    \begin{center}\ESKDtitleFontVII\ESKDtheTitleFieldVII\end{center}}
  \par\vspace{4mm \@plus 2mm \@minus 2mm}\noindent
  \begin{center}\ESKDtitleFontVIII\ESKDtheTitleFieldVIII\end{center}
  \vfill
  \begin{center}\ESKDtitleFontX\ESKDtheTitleFieldX\end{center}
  \end{ESKDtitlePage}}

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