Projekt

Allgemein

Profil

Accessibiliy Features » Historie » Version 7

Patrick Schulz, 16.09.2024 12:57

1 1 Patrick Schulz
h1. Accessibiliy Features
2
3 5 Patrick Schulz
h2. Activate Accessibility Features
4
5
Add @a11y@ to the documentclass options:
6
<pre><code>
7
\documentclass[…,a11y]{cocotex}
8
</code></pre>
9
10
11 6 Patrick Schulz
h2. Paragraph tagging
12
13
Until further notice, text paragraphs need to be tagged by the converter by adding @\ccaStructStart{Para}@ at the beginning of each paragraph (no whitespaces between the macro and subsequent text or other macros!) and @\ccaStructEnd{Para}@ at the end of each paragraph (no whitespaces before @\ccaStructEnd@!):
14
<pre>
15
\ccaStructStart{Para}Ipsum Lorem … finis.\ccaStructEnd{Para}
16
</pre>
17
18
This must also be done in broader contexts that may(!) contain multiple paragraphs of plain text, like footnotes, captions, list items, quotations, or abstracts. Which ones exactly varies from publisher style to publisher style, so if in doubt, ask your friendly neighborhood TeX developer.
19
20 7 Patrick Schulz
h2. Alternative Texts
21
22
Figures and Math both need alternative texts. 
23
24
h4. Figures
25
26
For figures, there are two ways to encode alt-text: the @alt@ Parameter in the optional argument of @\includegraphics@ (needs texlive > 2021), e.g.
27
<pre>\incudegraphics[...,alt={This is what the image file shows}]{image.png}</pre>
28
or as @\tpAltText@ inside the @tpFigure@ or @tpSubFloat@ environments:
29
<pre>\begin{tpFigure}
30
  \tpCaption{This is the caption}
31
  \tpAltText{This is the alt text. It MUST NOT be the same as the caption!}
32
  \tpFig{\includegraphics{image.png}}
33
\end{tpFigure}</pre> 
34
35
h4. Math
36
37
both inline and display style math needs alternative texts. This is done with the @\ccaAddAltText@ macro:
38
<pre>
39
\begin{equation*}\ccaAddAltText{Z equals x minus mu divided by sigma}%
40
  \mathbf{Z}=\,\frac{\boldsymbol{x}-\mathbf{\mu }}{\mathbf{\sigma }}
41
\end{equation*}
42
</pre>
43
or, for inline math:
44
<pre>The Variable $x\addAltText{x}$ means...</pre>
45
46 6 Patrick Schulz
47 1 Patrick Schulz
h2. XMP Meta Data
48
49 3 Patrick Schulz
PDF/UA requires meta data to be embedded into the PDF file. CoCoTeX provides two ways to do that: If the TeX run does not find a xmp file that has the same basename as the .tex document, it generates one from the data in the tpMeta environment. If there is a .xmp file (either because it was there from the beginning, or it was generated during a previous tex run), it includes that one. If the xmp file is to be generated by the converter, make sure to use the "attached template.xmp":https://redmine.le-tex.de/attachments/27865 (see below) and include the document specific meta data in line 24 instead of the comment.
50 1 Patrick Schulz
51
***Important: Don't remove anything in that template, especially not the PIs at the beginning and end, and the blank spaces at the bottom if the template!***
52
53
Also be cautious where to use @rdf:Bag@, @rdf:Alt@ and @rdf:Seq@!
54
55
Use the following XML tags for meta data:
56
57
58 4 Patrick Schulz
h4. Author
59 1 Patrick Schulz
60
is a list of the document's main authors or edtiors, one per line:
61
<pre><code class="xml">
62
<dc:creator>
63
  <rdf:Seq>
64
    <rdf:li>Firstname Lastname</rdf:li>
65
    <rdf:li>Firstname Lastname</rdf:li>
66
    ...
67
  </rdf:Seq>
68
</dc:creator>
69
</code></pre>
70
71 4 Patrick Schulz
h4. Document Title
72 1 Patrick Schulz
73
There can be more than one document title for various languages. The displayed title (e.g. in the pdf viewer window's top line) depends on the selected system language
74
75
<pre><code class="xml">
76
<dc:title>
77
  <rdf:Alt>
78
    <rdf:li xml:lang="x-default">Default title</rdf:li>
79
  </rdf:Alt>
80
</dc:title>
81
</code></pre>
82
83 4 Patrick Schulz
h4. Publisher
84 1 Patrick Schulz
85
<pre><code class="xml">
86
<dc:publisher>
87
  <rdf:Bag>
88
    <rdf:li>Publisher Name</rdf:li>
89
  </rdf:Bag>
90
</dc:publisher>
91
</code></pre>
92
93 4 Patrick Schulz
h4. Chapter authors/Contributors
94 1 Patrick Schulz
95
<pre><code class="xml">
96
<dc:contributor>
97
  <rdf:Bag>
98
    <rdf:li>Firstname Lastname</rdf:li>
99
    <rdf:li>Firstname Midname Lastname</rdf:li>
100
    ...
101
  </rdf:Bag>
102
</dc:contributor>
103
</code></pre>
104
105 4 Patrick Schulz
h4. Abstract
106 1 Patrick Schulz
107
Like @dc:title@, @dc:description@ allows multiple entries for different languages.
108
109
<pre><code class="xml">
110
<dc:description>
111
  <rdf:Alt>
112
    <rdf:li xml:lang="x-default">...</rdf:li>
113
  </rdf:Alt>
114
</dc:description>
115
</code></pre>
116
117 4 Patrick Schulz
h4. Keywords
118 1 Patrick Schulz
119
<pre><code class="xml">
120
<dc:subject>
121
  <rdf:Bag>
122
    <rdf:li>keyword 1</rdf:li>
123
    <rdf:li>keyword 2</rdf:li>
124
    ....
125
  </rdf:Bag>
126
</dc:subject>
127
</code></pre>
128
129
130 4 Patrick Schulz
h4. Copyright
131 1 Patrick Schulz
132
<pre><code class="xml">
133
<dc:rights>
134
  <rdf:Alt>
135
    <rdf:li xml:lang="x-default">Unless otherwise indicated, this work is licensed under a Creative Commons License Attribution 4.0 International. This does not apply to quoted content and works based on other permissions.</rdf:li>
136
  </rdf:Alt>
137
</dc:rights>
138
</code></pre>
139 4 Patrick Schulz
140
h4. Other
141
142
If you must, you can _alter_ the values of @<pdf:Producer>@ and @<xmp:CreatorTool>@, where @pdf:Producer@ is the tool that generated the PDF, and @xmp:CreatorTool@ is the Tool with which the original manuscript was created prior to any conversions or transformations.
143
144
The values of @xmp:ModifyDate@ and @xmp:CreateDate@ are generated and overwritten during the tex run by the ltpdfa package, so you can leave those fields as they are.