diff options
author | Karl Berry <karl@freefriends.org> | 2021-08-29 20:26:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-08-29 20:26:17 +0000 |
commit | e83c955532d6bf7a44ee1702489dbf3cd74cf7c1 (patch) | |
tree | 228648882873c58e36eaade4d747adbec6cb3598 /Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex | |
parent | e16bd0149bf77bb72427f1421046aa7ccdf1a9c5 (diff) |
tagpdf (29aug21)
git-svn-id: svn://tug.org/texlive/trunk@60366 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex | 222 |
1 files changed, 143 insertions, 79 deletions
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex index fe9f243d387..e1d690fc954 100644 --- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex +++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex @@ -5,8 +5,8 @@ \makeatletter -\def\UlrikeFischer@package@version{0.91} -\def\UlrikeFischer@package@date{2021-07-03} +\def\UlrikeFischer@package@version{0.92} +\def\UlrikeFischer@package@date{2021-08-27} \makeatother \documentclass[DIV=12,parskip=half-,bibliography=totoc]{scrartcl} @@ -150,29 +150,22 @@ Issues, comments, suggestions should be added as issues to the github tracker: \tableofcontents -\section{Preface to version 0.9} +\section{Preface to version 0.92} -In this version lots of things have changed, but most of them are internal: the code has been reviewed and cleaned up, -a number of errors corrected, the code has been properly documented (and the code documentation can now be compiled and -printed). +In this version support for page breaks in pdftex has been added. As described in section~\ref{sec:splitpara}, +tagging markers must be added by \emph{page}. That means that a paragraph that goes over two pages must get an end +marker at the end on the first page and a new begin marker on the next page. -There are nevertheless also a number of changes for the public interface, including some breaking changes. Check the change section below for -details. +With lualatex that is rather easy to ensure, with pdflatex it requires quite sophisticated code. +The method is described in Frank Mittelbach's talk at TUG~2021 +\enquote{Taming the beast — Advances in paragraph tagging with pdfTeX and XeTeX} +\url{https://youtu.be/SZHIeevyo3U?t=19551}. The new code requires a new version of the pdfmanagement-testphase package. +Please check also section~\ref{sec:splitpara} for possible pitfalls. +Also new in this version is the handling of header and footer: they will now be tagged as artifacts automatically. +See section~\ref{sec:header-footer}. -\section{Preface to version 0.8 and newer} - -Starting with version 0.8 one major step towards integration of the code into the \LaTeX{} kernel has been done: -The code now relies on the new \LaTeX{} PDF management. This management, which is for a testphase provided -as an external package, \texttt{pdfmanagement-testphase}, -prepares the ground for better support for tagged PDF in \LaTeX{}. -It is part of a larger project to automatically generate tagged PDF \url{https://www.latex-project.org/news/2020/11/30/tagged-pdf-FS-study/} - -While this is a major improvement---it will for example allow to use tagpdf with more engines as the new PDF management supports all major engines and allowed to add support for associated files---it also means that this version requires a special setup of the document and is incompatible with a number of packages, -see the documentation of \texttt{pdfmanagement-testphase} for details. - -Another important step is the new hook management in \LaTeX: the newest development version has hooks for paragraphs which should at the end allow to tag many paragraphs automatically. The small red numbers around paragraphs in the documentation show them in action. The main problem here is not to tag a paragraph, but to avoid to tag too many: paragraphs pop up in many places. \section{Introduction} @@ -273,7 +266,7 @@ Feedback, contribuations and corrections are welcome! All examples should use the \cs{tagpdfsetup} key \PrintKeyName{uncompress} described in the next section so that uncompressed \PDF{} are created and the internal objects and structures can be inspected and -- hopefully soon -- be compared by the l3build checks.% - +\section{Changes} \subsection{Changes in 0.3} @@ -282,8 +275,6 @@ In this version I improved the handling of alternative and actual text. See sect I no longer try to (pdf-)escape the tag names: it is a bit unclear how to do it at best with luatex. This will perhaps later change again. - - \subsection{Changes in 0.5} @@ -296,55 +287,54 @@ I added code to add \enquote{real} space glyphs to the \PDF{}, see section \ref{ \subsection{Changes in 0.6} - \textbf{Breaking change!} The attributes used in luamode to mark the MC-chunks are no longer set globally. I thought that global attribute would make it easier to tag, but it only leads to problem when e.g. header and footer are inserted. So from this version on the attributes are set locally and the effect of a \verb+\tagmcbegin+ ends with the current group. This means that in some cases more \verb+\tagmcbegin+ are needed and this affected some of the examples, e.g. the patching commands for sections with KOMA. On the other side it means that quite often one can omit the \verb+\tagmcend+ command. - - \subsection{Changes in version 0.61} - - \begin{itemize} \item internal code adaptions to expl3 changes. \item dropped the compresslevel key -- probably not needed. \end{itemize} - - \subsection{Changes in version 0.8} +\begin{itemize} +\item As a first step to include the code proper in the \LaTeX\ kernel the module name has changed from \texttt{uftag} to \texttt{tag}. The commands starting with |\uftag| will stay valid for some time but then be deprecated. - -As a first step to include the code proper in the \LaTeX\ kernel the module name has changed from \texttt{uftag} to \texttt{tag}. The commands starting with |\uftag| will stay valid for some time but then be deprecated. - -\textbf{Breaking change!} The argument of \texttt{newattribute} option should no longer add the dictionary bracket \verb+<<..>>+, they are added by the code. +\item \textbf{Breaking change!} The argument of \texttt{newattribute} option should no longer add the dictionary bracket \verb+<<..>>+, they are added by the code. -\textbf{Breaking change!} The package now requires the new PDF management as provided for now by the package \texttt{pdfmanagement-testphase} +\item \textbf{Breaking change!} The package now requires the new PDF management as provided for now by the package \texttt{pdfmanagement-testphase}. \texttt{pdfmanagement-testphase}, +prepares the ground for better support for tagged PDF in \LaTeX{}. +It is part of a larger project to automatically generate tagged PDF \url{https://www.latex-project.org/news/2020/11/30/tagged-pdf-FS-study/} -Support to add associated files to structures has been added with new keys \texttt{AF}, \texttt{AFinline} and \texttt{AFinline-o}. +\item Support to add associated files to structures has been added with new keys \texttt{AF}, \texttt{AFinline} and \texttt{AFinline-o}. -\textbf{Breaking change!} The support for other 8-bit input encodings has been removed. +\item \textbf{Breaking change!} The support for other 8-bit input encodings has been removed. utf8 is now the required encoding. -The keys |lang|, |ref| and |E| have been added for structures. +\item The keys |lang|, |ref| and |E| have been added for structures. + +\item The new hooks of LaTeX are used to tagged many paragraphs automatically. The small red numbers around paragraphs in the documentation show them in action. The main problem here is not to tag a paragraph, but to avoid to tag too many: paragraphs pop up in many places. +\end{itemize} \subsection{Changes in version 0.81} -Hook code to tag links (URI and GoTo type) have been added. So normally they should simply work if tagging +\begin{itemize} +\item Hook code to tag links (URI and GoTo type) have been added. So normally they should simply work if tagging is activated. -Commands and keys to allow automatic paragraph tagging have been added. See section~\ref{sec:paratagging}. +\item Commands and keys to allow automatic paragraph tagging have been added. See section~\ref{sec:paratagging}. As can be seen in this documentation the code works quite good already, but one should be aware that \enquote{paragraphs} can appear in many places and sometimes there are even more paragraph begin than ends. -A key to test if local or global setting of the mc-attributes in luamode is more sensible, see \ref{sec:global-local} for more details. +\item A key to test if local or global setting of the mc-attributes in luamode is more sensible, see \ref{sec:global-local} for more details. -New commands to store and reset mc-tags. +\item New commands to store and reset mc-tags. -PDF 2.0 namespace are now supported. +\item PDF 2.0 namespaces are now supported. +\end{itemize} \subsection{Changes in version 0.82} @@ -358,7 +348,7 @@ add annotations to the structure. |\tag_finish_structure:| has been removed, it is no longer a public command. -\subsection{Changes in version 0.9} +\subsection{Changes in version 0.90} \begin{itemize} \item Code has been cleaned up and better documented. @@ -380,13 +370,25 @@ users. See section~\ref{sec:global-local} for more details. \item The show commands |\showtagpdfmcdata|, |\showtagpdfattributes|, |\showtagstack| have been removed and replaced by a more flexible command |\ShowTagging|. \item The commands |\tagmcbegin| and |\tagmcend| no longer ignore following spaces or remove earlier one. While this -is nice in some places, it also ate spaces in places where this wanted expected. From now on both commands behave exactly +is nice in some places, it also ate spaces in places where this wasn't expected. From now on both commands behave exactly like the expl3 versions. \item The lua-code to add real space glyphs has been separated from the tagging code. This means that |interwordspace| now works also if tagging is not active. \item The key |activate| has been added, it open the first structure, see below. \end{itemize} +\subsection{Changes in version 0.92} + +\begin{itemize} +\item support for page breaks in pdftex has been added, see section~\ref{sec:splitpara}, +This requires a new version of the pdfmanagement-testphase package. + +\item header and footer are tagged as artifacts automatically, see section~\ref{sec:header-footer}. + +\item keys \texttt{alttext-o} and \texttt{actualtext-o} has been removed. \texttt{alttext} and \texttt{actualtext} +will now expand once. + +\end{itemize} \subsection{Proof of concept: the tagging of the documentation itself} @@ -410,11 +412,27 @@ Be aware that to create the tagged version a current lualatex-dev and a current \section{Setup} +The package requires the new PDF management. With a current version of \pkg{pdfmanagement-testphase} it can be loaded and +activated like this: + +\begin{lstlisting} +\RequirePackage{pdfmanagement-testphase} +\DeclareDocumentMetadata + { + testphase = tagpdf, % load + activate = tagging % activate and create the document structure + } +\documentclass{article} +\begin{document} +some text +\end{document} +\end{lstlisting} + \minisec{Activation needed!} -When the package is loaded it will -- apart from loading more packages and defining a lot of things -- not do much. You will have to activate it with \verb+\tagpdfsetup+, see below. (At least that's the theory, I'm not quite sure, if really the tests are done always as planed\ldots.) +When the package is loaded it will -- apart from loading more packages and defining a lot of things -- not do much. You will have to activate it with \verb+\tagpdfsetup+ or as shown above in \verb+\DeclareDocumentMetadata+. Most commands do nothing if tagging is not activated, but in case a test is needed a command (with the usual p,T,F variants) is provided: @@ -645,7 +663,7 @@ They are marked with of a pair of keywords, \texttt{BDC} and \texttt{EMC} which \item[Content] Content is marked also with of a pair of keywords, \texttt{BDC} and \texttt{EMC}. The first argument of \texttt{BDC} is a tag name which describes the structural type of the text\tagpdfparaOff\footnote{There is quite some redundancy in the specification here. The structural type is also set in the structure tree. One wonders if it isn't enough to use always \texttt{/SPAN} here.}\tagpdfparaOn - Examples are \texttt{/P} (paragraph), \texttt{/H2} (header), \texttt{/TD} (table cell). The reference mentions a number of standard types but it is possible to add more or to use different names. + Examples are \texttt{/P} (paragraph), \texttt{/H2} (heading), \texttt{/TD} (table cell). The reference mentions a number of standard types but it is possible to add more or to use different names. In the second argument of \texttt{BDC} -- in the property dictionary -- more data can be stored. \emph{Required} is an \texttt{/MCID}-key which takes an integer as a value: @@ -760,7 +778,8 @@ The key-val list understands the following keys: This is required, unless you use the \PrintKeyName{artifact} key. The value of the key is normally one of the standard type listed in section \ref{sec:new-tag} (without a slash at the begin, this is added by the code). It is possible to setup new tags, see the same section. The value of the key is expanded, so it can be a command. The expansion is passed unchanged to the \PDF{}, so it should with a starting slash give a valid \PDF{} name (some ascii with numbers like \texttt{H4} is fine). \item[\PrintKeyName{artifact}] - This will setup the marked content as an artifact. The key should be used for content that should be ignored. The key can take one of the values \PrintKeyName{pagination}, \PrintKeyName{layout}, \PrintKeyName{page}, \PrintKeyName{background} and \PrintKeyName{notype} (this is the default). Text in the header and footer should be marked with \PrintKeyName{artifact=pagination}. + This will setup the marked content as an artifact. The key should be used for content that should be ignored. The key can take one of the values \PrintKeyName{pagination}, \PrintKeyName{pagination/header}, \PrintKeyName{pagination/footer}, \PrintKeyName{layout}, \PrintKeyName{page}, \PrintKeyName{background} and \PrintKeyName{notype} (this is the default). Text in the header and footer should normally be marked with \PrintKeyName{artifact=pagination} or \PrintKeyName{pagination/header}, \PrintKeyName{pagination/footer} but + simply artifact (as it is now done automatically) should be ok too. It is not quite clear if rules and other decorative graphical objects needs to be marked up as artifacts. Acrobat seems not to mind if not, but PAC~3 complained. @@ -775,32 +794,27 @@ The key-val list understands the following keys: This key sets a label by which you can call the marked content later in another structure (if it has been stashed with the previous key). Internally the label name will start with \texttt{tagpdf-}. \item[\PrintKeyName{alttext}] - This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded. - - \item[\PrintKeyName{alttext-o}] - This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName{alttext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). + This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded but the value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed). That means that you can do something like in the following listing and it will insert \verb+\frac{a}{b}+ (hex encoded) in the \PDF{}. \begin{lstlisting} \newcommand\myalttext{\frac{a}{b}} - \tagmcbegin{tag=P,alttext-o=\myalttext} + \tagmcbegin{tag=P,alttext=\myalttext} \end{lstlisting} \item[\PrintKeyName{actualtext}] - This key inserts an \texttt{/ActualText} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded. - + This key inserts an \texttt{/ActualText} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded but the value will be expanded first once (so works like the key \texttt{actualtext-o} in previous versions which has been removed). - \item[\PrintKeyName{actualtext-o}] - This key inserts an \texttt{/ActualText} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName{actualtext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). That means that you can do something like in the following listing and and it will insert \verb+X+ (hex encoded) in the \PDF{}. + That means that you can do something like in the following listing and and it will insert \verb+X+ (hex encoded) in the \PDF{}. \begin{lstlisting} \newcommand\myactualtext{X} - \tagmcbegin{tag=P,alttext-o=\myactualtext} + \tagmcbegin{tag=P,actualtext=\myactualtext} \end{lstlisting} \item[\PrintKeyName{raw}] @@ -926,12 +940,16 @@ like. \tagstructbegin{tag=Figure,alttext=Show tags of examples,attribute=bbox}\tagmcbegin{tag=Figure} \includegraphics{global-ex} \tagmcend\tagstructend + \tagpdfparaOn It is therefore from now on important to correctly markup such code. Header and footer typically should be artifacts. The LaTeX kernel hasn't yet suitable hooks around header and footer to allow to automate -this, but they will be added. With packages like \pkg{fancyhdr} or \pkg{scrlayer-scrpage} it is quite easy to add -the needed code too. +this, but a first draft has been added with \pkg{pdfmanagement-testphase}. Starting with version 0.92 +header and footer are marked as (simple) artifacts. +If they contain code which needs a different markup it still must be added explicitly. +With packages like \pkg{fancyhdr} or \pkg{scrlayer-scrpage} it is quite easy to add +the needed code. \subsubsection{Tips} @@ -966,6 +984,42 @@ the needed code too. \end{figure} +\subsubsection{Header and Footer}\label{sec:header-footer} + +Tagging header and footer is not trivial. At first on the technical side header and footer are +typeset and attached to the page during the output routine and the exact timing is not really under +control of the user. That means that when adding tagging there one has to be careful not to disturb +the tagging of the main text---this is mostly important in luamode where the attributes are global +and can easily spill over. + +At second one has to decide about how to tag: in many cases header and footer can simply be ignored, +they only contain information which are meant to visually guide the reader and so are not relevant for +the structure. This means that normally they should be tagged as artifacts. The PDF reference offers +here a rather large number of options here to describe different versions of \enquote{ignore this}. +Typically the header and footer should get the type \texttt{Pagination} and this types has a number of subtypes like +Header, Footer, PageNum. It is not yet known if any technology actually make use of this info. + +But they can also contain meaningful content, for example an address. In such cases the content +should be added to the structure (where?) but even if this address is +repeated on every page at best only once. All this need some thoughts both from the users and the packages and code +providing support for header and footers. + +For now tagpdf added some first support for automatically tagging: +Starting with version 0.92 header and footer are automatically marked up as (simple) artifacts. + +If some additional markup (or even a structure) is wanted, something like this should be used (here with +the syntax of the \pkg{fancyhdr} package) to close the open mc-chunk and restart if after the content: + +\begin{lstlisting} +\ExplSyntaxOn +\cfoot{\leavevmode + \tag_mc_end_push: + \tagmcbegin{artifact=pagination/footer} + \thepage + \tagmcend + \tag_mc_begin_pop:n{artifact}} +\ExplSyntaxOff +\end{lstlisting} \subsubsection{Links and other annotations}\label{sec:link+annot} @@ -1055,9 +1109,9 @@ See also section~\ref{sec:alttext} for some more remarks and tests. A\sidenote{Generic mode only} problem in generic mode are paragraphs with page breaks. As already mentioned the end marker \texttt{EMC} must be added on the same page as the begin marker. But it is in pdflatex \emph{very} difficult to inject something at the page break automatically. One can manipulate the shipout box to some extend in the output routine, but this is not easy and it gets even more difficult if inserts like footnotes and floats are involved: the end of the paragraph is then somewhere in the middle of the box. -So with pdflatex in generic mode one currently has to do the splitting manually. +So with pdflatex in generic mode one until now had to do the splitting manually. -The example \texttt{mc-manual-para-split} demonstrates how this can be done. The general idea is to use \verb+\vadjust+ in the right place: +The example \texttt{mc-manual-para-split} demonstrates how this can be done. The general idea was to use \verb+\vadjust+ in the right place: \begin{lstlisting} @@ -1071,6 +1125,19 @@ Pellentesque scelerisque sit amet, lacus.\tagmcend \end{lstlisting} +Starting with version 0.91 there is code which tries to resolve this problem. Basically it works like this: every mc-command +issues a mark command (actually two slightly different). When the page is built in the output routine this mark commands are inspected +and from them \LaTeX{} can deduce if there is a mc-chunk which must be closed or reopened. + +Please note + +\begin{itemize} +\item The code requires the pdfmanagement-testphase version v0.95i. +\item Typically you will need more compilations than previously, don't rely on the rerun messages, but if something looks wrong +rerun. +\item The code relies on that related |\tagmcbegin| and |\tagmcend| are in the same boxing level. If one is in a box (which hides the marks) and the other in the main galley, things will go wrong. +\end{itemize} + \subsubsection{Automatic tagging of paragraphs}\label{sec:paratagging} \begin{docCommand}{tagpdfparaOn}{}\end{docCommand} @@ -1125,17 +1192,17 @@ The flat version creates a structure like this: \end{lstlisting} -So here the headers are marked according their level with \texttt{H1}, \texttt{H2}, etc. +So here the headings are marked according their level with \texttt{H1}, \texttt{H2}, etc. -In the xml-like tree the complete text of a sectioning unit is surrounded with the \texttt{Sect} tag, and all headers with the tag \texttt{H}. Here the nesting defines the level of a sectioning header. +In the xml-like tree the complete text of a sectioning unit is surrounded with the \texttt{Sect} tag, and all headers with the tag \texttt{H}. Here the nesting defines the level of a sectioning heading. \begin{lstlisting} <Sect> - <H>section header</H> + <H>section heading</H> <P> text</p> <Sect> - <H>subsection header</H> + <H>subsection heading</H> ... </Sect> </Sect> @@ -1172,37 +1239,32 @@ The key-val list understands the following keys: \item[\PrintKeyName{alttext}] - This key inserts an \texttt{/Alt} value in the dictionary of structure object, see section~\ref{sec:alttext}. The value is handled as verbatim string and hex encoded. - - \item[\PrintKeyName{alttext-o}] - This key inserts an \texttt{/Alt} value in the dictionary of a structure object, see section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName{alttext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). That means that you can do something like this: + This key inserts an \texttt{/Alt} value in the dictionary of structure object, see section~\ref{sec:alttext}. The value is handled as verbatim string and hex encoded. The value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed). That means that you can do something like this: \begin{lstlisting} \newcommand\myalttext{\frac{a}{b}} - \tagstructbegin{tag=P,alttext-o=\myalttext} + \tagstructbegin{tag=P,alttext=\myalttext} \end{lstlisting} - and it will insert \verb+\frac{a}{b}+ (hex encoded) in the \PDF{}. + and it will insert \verb+\frac{a}{b}+ (hex encoded) in the \PDF{}. In case that the text begins with a command that should not be + expanded protect it e.g. with a \verb+\empty+. \item[\PrintKeyName{actualtext}] - This key inserts an \texttt{/ActualText} value in the dictionary of structure object, see section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded. - - \item[\PrintKeyName{actualtext-o}] - This key inserts an \texttt{/ActualText} value in the dictionary of structure object, see section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName{actualtext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). That means that you can do something like this: - + This key inserts an \texttt{/ActualText} value in the dictionary of structure object, see section~\ref{sec:alttext}. The value is handled as verbatim string, The value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed). That means that you can do something like this: \begin{lstlisting} \newcommand\myactualtext{X} - \tagstructbegin{tag=P,alttext-o=\myactualtext} + \tagstructbegin{tag=P,actualtext=\myactualtext} \end{lstlisting} - and it will insert \verb+X+ (hex encoded) in the \PDF{}. + and it will insert \verb+X+ (hex encoded) in the \PDF{}. In case that the text begins with a command that should not be + expanded protect it e.g. with a \verb+\empty+ \item[\PrintKeyName{attribute}] This key takes as argument a comma list of attribute names (use braces to protect the commas from the external key-val parser) and allows to add one or more attribute dictionary entries in the structure object. As an example @@ -1527,10 +1589,12 @@ syntax |section/H1| should in most cases do the right thing. \item[\PrintKeyName{role}] This is type the tag should be mapped too. In a PDF 1.7 or earlier this is normally a type from the |pdf| set, in PDF 2.0 from the |pdf|, |pdf2| and |mathml| set. It can also be a user type, or a still unknown type. The PDF format allows mapping to be done transitively. But you should be aware that tagpdf can't (or more precisely won't) check such unusual role mapping. It lies in the responsability of the author to ensure here that every type is correctly role mapped. \item[\PrintKeyName{role-namespace}] If the role is a known type the default value is the default namespace: |pdf2| for all types in this set, |pdf| for the type which exist only in PDF 1.7, |mathml| for the MathML types, and for previously defined user types whatever namespace has been set there. If the role is unknown, |user| is used and the code hopes that the type will be defined later. \item[unknown key] An unknown key is interpreted as a |tag/role|, this preserves the old syntax. So this two calls are equivalent: + \begin{lstlisting} \tagpdfsetup{add-new-tag = section/H1} \tagpdfsetup{add-new-tag = {tag=section,role=H1}} \end{lstlisting} + \end{description} The exact effects of the key depends on the PDF version. With PDF 1.7 or older the namespace keys are ignored, with PDF 2.0 the namespace keys are use to setup the correct rolemaps. The |namespace| key is also used to define the default namespace if the type is used as a role or as tag in a structure. |