summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpdf/ex-attribute.tex
blob: fb1eb963e423f322de532b9a47d5e27b839b041c (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
% !Mode:: "TeX:DE:UTF-8:Main"
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{uncompress,lang=de_DE}
\documentclass{scrartcl}
\usepackage[english]{babel}
\usepackage{tagpdf}
\tagpdfsetup{activate}

\ExplSyntaxOn
\pdfmanagement_add:nnn{Info}{Title}{(Title)}
\ExplSyntaxOff


\tagpdfsetup
{
 newattribute = {TH-col} { <</O /Table /Scope /Column>> },
 newattribute = {TH-row} { <</O /Table /Scope /Row>>    },
 newattribute = {TH-both}{ <</O /Table /Scope /Both>>   },
 newattribute = {Lay-borderdotted}{ <</O /Layout /Borderstyle /Dotted >>   },
}
\begin{document}
\pagestyle{empty} %


\tagstructbegin{tag=Table}
\begin{center}
\begin{tabular}{ l | c | }
\hline
\tagstructbegin{tag=THead}
 \tagstructbegin{tag=TR}
  \tagstructbegin{tag=TH,attribute= {TH-both,Lay-borderdotted}}
   \tagmcbegin{tag=TH}
   h1
   \tagmcend
   \tagstructend &
  \tagstructbegin{tag=TH,attribute-class= {TH-col,Lay-borderdotted}}
    \tagmcbegin{tag=TH}
    h2
    \tagmcend
  \tagstructend
 \tagstructend %TR
 \tagstructend %Thead
  \\ \hline
 \tagstructbegin{tag=TBody}
   \tagstructbegin{tag=TR}
    \tagstructbegin{tag=TD}
    \tagmcbegin{tag=TD}
    r1
    \tagmcend
    \tagstructend %TD
&
    \tagstructbegin{tag=TD}
    \tagmcbegin{tag=TD}
    h2
    \tagmcend
    \tagstructend
  \tagstructend %TR
 \tagstructend %TBody
    \\ \hline
  \end{tabular}
\end{center}
\tagstructend


\end{document}