aboutsummaryrefslogtreecommitdiff
path: root/doc/gost/gost-7-32-tables.sty
blob: c3954c3c771fe53f2969c861a972d3da8445faed (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
\ProvidesPackage{gost-7-32-tables}[2022/01/28 GOST 7.32-2017]

\RequirePackage{booktabs}
\RequirePackage{xltabular}
\renewcommand\tabularxcolumn[1]{m{#1}} % for vertical centering text

%
% Center-aligned column with automatic width
%
\newcolumntype{C}{>{\centering\arraybackslash}X}

%
% Right-aligned column with automatic width
%
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}

%
% Table with designations
%
\newenvironment{designations}{
    \noindent
    \tabularx{\textwidth}{@{}
        >{\raggedright \arraybackslash \hsize=0.25\hsize}X
        >{\centering \arraybackslash \hsize=0.05\hsize}X
        >{\arraybackslash \hsize=0.70\hsize}X
    }
}{
    \endtabularx
}

\newcommand{\designation}[2]{#1 &---& #2. \\}