Projekt

Allgemein

Profil

Accessibiliy Features » Historie » Revision 18

Revision 17 (Patrick Schulz, 10.10.2024 12:42) → Revision 18/21 (Patrick Schulz, 10.10.2024 13:18)

h1. Accessibiliy Features 

 h2. Activate Accessibility Features 

 Add @a11y@ to the documentclass options: 
 <pre><code> 
 \documentclass[…,a11y]{cocotex} 
 </code></pre> 

 h2. Paragraph tagging 

 Until further notice, text paragraphs need to be tagged by the converter by adding @\ccaStructStart{P}@ at the beginning of each paragraph (no whitespaces between the macro and subsequent text or other macros!) and @\ccaStructEnd{P}@ at the end of each paragraph (no whitespaces before @\ccaStructEnd@!): 
 <pre> 
 \ccaStructStart{P}Ipsum Lorem … finis.\ccaStructEnd{P} 
 </pre> 

 This must also be done in broader contexts that may(!) contain multiple paragraphs of plain text, like footnotes, captions, list items, quotations, table cells or abstracts. Which ones exactly varies from publisher style to publisher style, so if in doubt, ask your friendly neighborhood TeX developer. 

 h2. Alternative Texts 

 Figures and Math both need alternative texts. 

 h4. Figures 

 For figures, there are two ways to encode alt-text: the @alt@ Parameter in the optional argument of @\includegraphics@ (needs texlive > 2021), e.g. 
 <pre>\incudegraphics[...,alt={This is what the image file shows}]{image.png}</pre> 
 or as @\tpAltText@ inside the @tpFigure@ or @tpSubFloat@ environments: 
 <pre>\begin{tpFigure} 
   \tpCaption{This is the caption} 
   \tpAltText{This is the alt text. It MUST NOT be the same as the caption!} 
   \tpFig{\includegraphics{image.png}} 
 \end{tpFigure}</pre>If both exist, the @alt@ in @\includegraphics@ takes precedence over the @\tpAltText@. 

 h4. Math 

 both inline and display style math needs alternative texts. This is done with the @\ccaAddAltText@ macro: 
 <pre> 
 \begin{equation*}\ccaAddAltText{Z equals x minus mu divided by sigma}% 
   \mathbf{Z}=\,\frac{\boldsymbol{x}-\mathbf{\mu }}{\mathbf{\sigma }} 
 \end{equation*} 
 </pre> 
 or, for inline math: 
 <pre>The Variable $x\addAltText{x}$ means...</pre> 

 h2. XMP Meta Data 

 * ***"Template.xmp":https://redmine.le-tex.de/attachments/27865*** 

 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. 

 ***Important: Don't remove anything in that template, especially not the PIs at the beginning and end, and the blank spaces at the bottom of the template!*** 

 Also be cautious where to use @rdf:Bag@, @rdf:Alt@ and @rdf:Seq@! 

 Use the following XML tags for meta data: 


 h4. Author 

 is a list of the document's main authors or edtiors, one per line: 
 <pre><code class="xml"> 
 <dc:creator> 
   <rdf:Seq> 
     <rdf:li>Firstname Lastname</rdf:li> 
     <rdf:li>Firstname Lastname</rdf:li> 
     ... 
   </rdf:Seq> 
 </dc:creator> 
 </code></pre> 

 h4. Document Title 

 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 

 <pre><code class="xml"> 
 <dc:title> 
   <rdf:Alt> 
     <rdf:li xml:lang="x-default">Default title</rdf:li> 
   </rdf:Alt> 
 </dc:title> 
 </code></pre> 

 h4. Publisher 

 <pre><code class="xml"> 
 <dc:publisher> 
   <rdf:Bag> 
     <rdf:li>Publisher Name</rdf:li> 
   </rdf:Bag> 
 </dc:publisher> 
 </code></pre> 

 h4. Chapter authors/Contributors 

 <pre><code class="xml"> 
 <dc:contributor> 
   <rdf:Bag> 
     <rdf:li>Firstname Lastname</rdf:li> 
     <rdf:li>Firstname Midname Lastname</rdf:li> 
     ... 
   </rdf:Bag> 
 </dc:contributor> 
 </code></pre> 

 h4. Abstract 

 Like @dc:title@, @dc:description@ allows multiple entries for different languages. 

 <pre><code class="xml"> 
 <dc:description> 
   <rdf:Alt> 
     <rdf:li xml:lang="x-default">...</rdf:li> 
   </rdf:Alt> 
 </dc:description> 
 </code></pre> 

 h4. Keywords 

 <pre><code class="xml"> 
 <dc:subject> 
   <rdf:Bag> 
     <rdf:li>keyword 1</rdf:li> 
     <rdf:li>keyword 2</rdf:li> 
     .... 
   </rdf:Bag> 
 </dc:subject> 
 </code></pre> 


 h4. Copyright 

 <pre><code class="xml"> 
 <dc:rights> 
   <rdf:Alt> 
     <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> 
   </rdf:Alt> 
 </dc:rights> 
 </code></pre> 

 h4. Other 

 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. 

 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. 

 

 h2. Colours and Embedded Images 

 h3. Output Intent and Embedded ICC Colour Profiles 

 By default, CoCoTeX puts **CMYK** as output intent, but this can be overridden with the @color-env@ class option: 
 <pre><code class="latex">\documentclass[…,color-env=<space>,…]{cocotex}</code></pre>The Value @<space>@ should be one of the values in the left column of the following table: 

 |_. @<space>@ |_. icc profile| 
 | @srgb@, @rgb@ |    IEC 61966-2.1 Default RGB colour space - sRGB | 
 | @cmy@, @cmyk@ | Coated FOGRA39 | 
 | @grey@, @gray@ | ISO Coated v2 - GREY 1c - (basICColor) | 
 | @natural@, @none@ | (gray) | 

 Publisher-wide colour profile can be set with the @profile@ Property of the @titlepage@ Container:<pre><code class="latex">\ccAddToType{Properties}{titlepage}{% 
     \ccSetProperty{output-intent}{% 
       profile=<path to .icc file>;% 
       components=<number of colour components>;% 
       identifier=<name of colour profile>% 
   }}</code></pre>with the following values: 
 * @<path to .icc file>@ is the path to the icc colour profile relative to the .tex file, including the file extension. 
 * @<number of colour components>@ is the number of colour components, e.g., @3@ for RGB, @4@ for CMYK, etc. 
 * @<name of colour profile>@ is the name of the colour profile (default values correspond to the right column in above's table) 

 A custom .icc profile valid only for the current document can be embedded with the following Components inside the @tpMeta@ environment:<pre><code class="latex">\begin{tpMeta} 
   … 
   \tpIccProfileFile{<path to .icc file>} 
   \tpIccComponents{<number of colour components>} 
   \tpIccIdentifier{<name of colour profile>} 
   … 
 \end{tpMeta}</code></pre> 


 h3. Image files 

 The colour spaces of embedded images must match the Output Indent of the PDF file for the latter to be PDF/A2-a compatible.  

 A quick-and-dirty conversion By default, CoCoTeX puts CMYK as output intent, but this can be done overridden with imagemagick:<pre><code class="bash">magick <input>    -colorspace <color_space> -profile <path_to_icc> <output></code></pre>with 
 * @<input>@ the path to the input image @color-env@ class option. 
 * @<color_space>@ the color space the image should be converted to (cmyk, rgb, etc) 
 * @<path_to_icc>@ the path to the icc profile that gets embedded into the image 
 * @<output>@ the name <pre><code class="latex">\documentclass[…,color-env=<space>,…]{cocotex}</code></pre>with @<space>@ either @srgb@, @rgb@, @gray@, @cmy@, @cmyk@ (default when @a11y@), @natural@ (no automatic conversion of the output image 


 h3. Custom Text Colours custom colours, see below), or @none@ (@xcolor@ package is **not** loaded). 

 Custom document colours get automatically converted to the Output Intent color space by LaTeX, so they may be defined with any color model. The following colour definitions are roughly equivalent:<pre><code class="latex">\definecolor{myblue}{HTML}{3527FF} 
 \definecolor{myblue}{RGB}{53,39,255} 
 \definecolor{myblue}{rgb}{0.21,0.15,1} 
 \definecolor{myblue}{cmyk}{0.79,0.85,0,0}</code></pre>