AndyClifton / accessibility

A CTAN-compliant version of the LaTeX `accessibility` package
37 stars 6 forks source link

Using the package does not create a PDF that shows Tagged in Adobe Acrobat or contains actual tags #41

Open TobiBS opened 4 years ago

TobiBS commented 4 years ago

As asked at https://tex.stackexchange.com/questions/550778/how-can-i-check-the-tagging-and-accessiblity-of-a-pdf-file?noredirect=1#comment1391644_550778 I am using the following code:

\documentclass{scrreprt}

\title{My title}
\author{My author}

\usepackage{hyperref}
\usepackage{accessibility}

\begin{document}
    \maketitle
    \tableofcontents
    \chapter{This shall be a h1 heading}
    \section{This shall be a h2 heading}
    This shall be a p section
    \section{This shall be a h3 heading}
\end{document}

And other than expected, Adobe Acrobat does not show that the PDF is tagged and there are also no tags in stream visible: grafik

This is true on two different machines, they run with:

AndyClifton commented 4 years ago

Thanks, @TobiBS. That’s not good.

You should try adding the option tagged and either flatstructure or highstructure to the call to accessibility, i.e.,

\usepackage[tagged, flatstructure]{accessibility}

and see if that changes anything?

TobiBS commented 4 years ago

Thank you @AndyClifton. I added \usepackage[tagged,highstructure]{accessibility} to my code and indeed, now Adobe Reader shows: Tagged PDF: Yes. But I cannot check if this is really creating a tagged PDF now through a validator or similar.

However this is contradictory to the German documentation (https://github.com/AndyClifton/accessibility/blob/master/source/v2x/accessibility-Anleitung-DE.pdf): Gibt man keine Optionen an, so wird ein PDF mit den Standardoptionen erzeugt. D. h. es wird Tagged PDF mit einer geschachtelten Struktur erzeugt. This means: If you are not selecting any option, the PDF will be created with standard options, which are a tagged pdf with the cascading structure.

If I can support you with updating the German documentation, please let me know, but I couldn't find it in the repository.

AndyClifton commented 4 years ago

Thanks @TobiBS - that's good to know. It'll be interesting to see if the PDF doc passes something like PAC3.

I'd noticed that contradiction as well. Thank you for offering to update the documentation; that would be very welcome! (I think the documentation should reflect how the code works now, rather than updating the code to fix this bug).

The documentation is actually built from the accessibility.dtx file in source/v2. This .dtx file is also what creates the .sty file. The files need to be processed using latex accessibility.ins. It's all a bit annoying until one realises that keeping the documentation and style together in one file is great from a maintenance perspective! This whole process is described in HOWTO.md.

I suggest:

  1. If the PDF doc passes the PAC3 test then please go ahead and change the documentation.
  2. If the PDF doesn't pass, let's create a new issue, e.g. "default options not correct" or similar, and work on it as a clearly-defined issue there.
viktoriasee commented 4 years ago

Duplicate of #12