texlive[48178] Master/texmf-dist: tagpdf (10jul18)

commits+karl at tug.org commits+karl at tug.org
Tue Jul 10 23:05:50 CEST 2018


Revision: 48178
          http://tug.org/svn/texlive?view=revision&revision=48178
Author:   karl
Date:     2018-07-10 23:05:49 +0200 (Tue, 10 Jul 2018)
Log Message:
-----------
tagpdf (10jul18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-checks-code.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-pdftex.def
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-roles-code.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-struct-code.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
    trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list-luatex.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.tex
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf
    trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/README.md	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,28 +1,35 @@
-# tagpdf
+#tagpdf — A package to create tagged pdf
+Packageversion: 0.2 
+Packagedate: 2018/07/09
+Author: Ulrike Fischer
 
-A package to experiment with tagging and other requirements of accessible pdfs with pdflatex and lualatex
+## License
+The tagpdf package may be modified and distributed under the terms and conditions of the 
+[LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3c or greater.
 
 
-##  Structure
+## Contents
 
-- source
-    - examples
-    - texmf (the code of the package)
-     
-    - tagpdf.tex, pdf, bib (the documentation)
-    
-- testfiles contains tests for the l3build system. 
-      
-## Rules for contribuations
+- Readme (this file)
+- tagpdf.sty (the sty)
+- tagpdf-roles-code.sty  (internal code)
+- tagpdf-mc-code-shared.sty  (internal code)
+- tagpdf-mc-code-generic.sty  (internal code)
+- tagpdf-mc-code-lua.sty  (internal code)
+- tagpdf-stuct-code.sty  (internal code)
+- tagpdf-tree-code.sty   (internal code)
+- tagpdf-user.sty        (user commands) 
+- tagpdf-pdftex.def      (pdftex specific code)
+- tagpdf-luatex.def      (luatex specific code)
+- tagpdf.lua             (lua code for luatex)
+- tagpdf.tex, tagpdf.pdf, tagpdf.bib (the docu)
+- various examples       (part of the documentation)   
 
-Comments, feedback, examples are welcome. 
+## Installation
 
-Use the issue tracker, sent me a mail or make a pull-request.
+Put the styles, the .def and the lua-files where it can be found.
 
-## Licence
 
-The tagpdf package may be modified and distributed under the terms and conditions of the 
-[LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3c or greater.
- 
+## Issues, comments, etc
 
-
+https://github.com/u-fischer/tagpdf

Added: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list-luatex.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list-luatex.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list-luatex.pdf	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list-luatex.pdf	2018-07-10 21:05:49 UTC (rev 48178)

Property changes on: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list-luatex.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.pdf	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.pdf	2018-07-10 21:05:49 UTC (rev 48178)

Property changes on: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.tex	2018-07-10 21:05:49 UTC (rev 48178)
@@ -0,0 +1,95 @@
+% !Mode:: "TeX:DE:UTF-8:Main"
+
+%This example shows how one can patch lists command
+%it is based on enumitem
+
+%It uses a command to end \item (\meti). It is perhaps possible to hide this command
+% inside \item/end{list}, but with nested list it is not so easy.
+
+% Pay attention to casing. Li/LI, Lbody/Lbody are different. 
+%no page break involved. So the example works in lua and generic mode
+
+\documentclass{scrbook}
+\usepackage[english]{babel}
+\usepackage{tagpdf}
+
+\tagpdfifpdftexT
+ {
+  \usepackage[T1]{fontenc}
+ }
+
+\tagpdfifluatexT
+ {
+  \usepackage{fontspec}
+  \usepackage{luacode}
+ }
+
+
+\tagpdfsetup{tabsorder=structure,
+             activate-all,
+             uncompress
+             }
+
+\usepackage{lipsum}%\textheight3cm
+
+\usepackage{enumitem,xpatch}
+
+\makeatletter
+
+\newcommand\uftag at enit@format at preset[1]{%
+  \tagstructbegin{tag=LI}%
+  \tagstructbegin{tag=Lbl}%
+  \tagmcbegin{tag=Lbl}%
+  #1%
+  \tagmcend
+  \tagstructend %end Lbl
+  \tagstructbegin{tag=LBody}}
+
+\newcommand\meti{% end of \item
+ \tagstructend %end of LBody
+ \tagstructend %end of LI
+}  
+
+\xpatchcmd\enit at preset{\@firstofone}{\uftag at enit@format at preset}{}{\fail}
+
+\setlist{
+    before*=\tagstructbegin{tag=L},
+    after*={\tagstructend}}
+
+% keys that overwrite \enit at format must be patched, eg like the follow
+% the font key should be patched in a similar way
+\enitkv at key{enumitem}{format}{%
+  \def\enit at format{%
+   \tagstructbegin{tag=LI}%
+   \tagstructbegin{tag=Lbl}%
+   \tagmcbegin{tag=Lbl}%
+   #1\tagmcend}}
+\makeatother   
+% marking of the text inside the list can not be handled automatically -- one doesn't know the type
+% we use simple P here
+\newcommand\TAGP{\tagstructbegin{tag=P}\tagmcbegin{tag=P}}
+\newcommand\PGAT{\tagmcend\tagstructend}   
+   
+\begin{document}
+%I don't want to handle pagestyles, so set everything to empty:
+\pagestyle{empty}\renewcommand\chapterpagestyle{empty}
+
+\tagstructbegin{tag=Document}
+
+\begin{itemize}
+\item \TAGP Ducks say quack\PGAT\meti
+\item \TAGP Marmots say something Parmotlike\PGAT\meti
+\end{itemize}
+
+\begin{enumerate}
+\item \TAGP The highest pass is the Col de l'Iseran.\PGAT\meti
+\item \TAGP The second highest pass is the Passo dello Stelvio.\PGAT\meti
+\end{enumerate}
+
+\begin{description}
+\item[ducks] \TAGP yellow\PGAT\meti
+\item[marmots] \TAGP brown\PGAT\meti
+\end{description}
+
+\tagstructend   %Document
+\end{document} 
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-list.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf	2018-07-10 21:05:49 UTC (rev 48178)

Property changes on: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf	2018-07-10 21:05:49 UTC (rev 48178)

Property changes on: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex	2018-07-10 21:05:49 UTC (rev 48178)
@@ -0,0 +1,168 @@
+% !Mode:: "TeX:DE:UTF-8:Main"
+
+%This example shows how one can patch sectioning command and toc entries
+%to add tags.
+%The patches are layout/option dependant
+%With other document options (e.g. chapterprefix) or
+%if the sectioning commands are redefined more/different patches are perhaps needed
+
+%no page break involved. So the example works in lua and generic mode
+
+\documentclass{scrbook}
+\usepackage[english]{babel}
+
+%set language / can also be done with hyperref
+\pdfcatalog{/Lang (en-US)}
+
+\usepackage{tagpdf}
+
+\tagpdfifpdftexT
+ {
+  \usepackage[T1]{fontenc}
+ }
+
+\tagpdfifluatexT
+ {
+  \usepackage{fontspec}
+  \usepackage{luacode}
+ }
+
+
+\tagpdfsetup{tabsorder=structure,
+             activate-all,
+             uncompress
+             }
+
+\usepackage{lipsum}%\textheight3cm
+
+%%%%%%%%%%%%%%%
+%Marking the toc entries
+%around the whole entry so only structure:
+\newcommand\tagscrtocentry[1]{\tagstructbegin{tag=TOCI}#1\tagstructend}
+
+%leaf so structure and mc:
+\newcommand\tagscrtocpagenumber[1]{%
+ \tagstructbegin{tag=Reference}%
+ \tagmcbegin{tag=Reference}%
+ #1%
+ \tagmcend
+ \tagstructend}
+
+\DeclareTOCStyleEntry[
+   entryformat=\tagscrtocentry,
+   pagenumberformat=\tagscrtocpagenumber]{tocline}{chapter}
+\DeclareTOCStyleEntry[
+   entryformat=\tagscrtocentry,
+   pagenumberformat=\tagscrtocpagenumber]{tocline}{section}
+\DeclareTOCStyleEntry[
+   entryformat=\tagscrtocentry,
+   pagenumberformat=\tagscrtocpagenumber]{tocline}{subsection}
+\DeclareTOCStyleEntry[
+   entryformat=\tagscrtocentry,
+   pagenumberformat=\tagscrtocpagenumber]{tocline}{subsubsection}
+\DeclareTOCStyleEntry[
+   entryformat=\tagscrtocentry,
+   pagenumberformat=\tagscrtocpagenumber]{tocline}{paragraph}
+
+
+
+\renewcommand{\addtocentrydefault}[3]{%
+ \ifstr{#3}{}{}
+   {%\
+   \ifstr{#2}{}
+    {%
+     \addcontentsline{toc}{#1}
+      {%
+       \protect\nonumberline
+       \tagstructbegin{tag=P}%
+       \tagmcbegin{tag=P}%
+        #3%
+       \tagmcend
+       \tagstructend
+      }%
+    }%
+    {%
+    \addcontentsline{toc}{#1}{%
+     \tagstructbegin{tag=Lbl}%
+     \tagmcbegin{tag=Lbl}%
+     \protect\numberline{#2}%
+     \tagmcend\tagstructend
+     \tagstructbegin{tag=P}%
+     \tagmcbegin{tag=P}%
+      #3%
+     \tagmcend
+     \tagstructend
+     }%
+    }%
+   }}%
+
+% the dots must be marked too
+\makeatletter
+\renewcommand*{\TOCLineLeaderFill}[1][.]{%
+  \leaders\hbox{$\m at th
+    \mkern \@dotsep mu\hbox{\tagmcbegin{artifact}#1\tagmcend}\mkern \@dotsep
+    mu$}\hfill
+}
+
+%%%%%%%%%
+% Sectioning commands
+%%%%%%%%
+
+\ExplSyntaxOn
+\prop_new:N   \g_tag_section_level_prop
+\prop_put:Nnn \g_tag_section_level_prop {chapter}{H1}
+\prop_put:Nnn \g_tag_section_level_prop {section}{H2}
+\prop_put:Nnn \g_tag_section_level_prop {subsection}{H3}
+\prop_put:Nnn \g_tag_section_level_prop {subsubsection}{H4}
+\prop_put:Nnn \g_tag_section_level_prop {paragraph}{H5}
+
+\renewcommand{\chapterlinesformat}[3]
+ {
+  \@hangfrom
+   {
+    \tagstructbegin{tag=\prop_item:Nn\g_tag_section_level_prop{chapter}}
+    \tagmcbegin    {tag=\prop_item:Nn\g_tag_section_level_prop{chapter}}
+    #2
+   }
+   {#3\tagmcend\tagstructend}%
+ }
+
+
+\renewcommand{\sectionlinesformat}[4]
+ {
+  \@hangfrom
+   {\hskip #2
+    \tagstructbegin{tag=\prop_item:Nn\g_tag_section_level_prop{#1}}
+    \tagmcbegin    {tag=\prop_item:Nn\g_tag_section_level_prop{#1}}
+    #3
+   }
+   {#4\tagmcend\tagstructend}%
+ }
+
+\ExplSyntaxOff
+\AfterTOCHead{\tagstructbegin{tag=TOC}}
+\AfterStartingTOC{\tagstructend} %end TOC
+
+
+\begin{document}
+%I don't want to handle pagestyles, so set everything to empty:
+\pagestyle{empty}\renewcommand\chapterpagestyle{empty}
+
+\tagstructbegin{tag=Document}
+
+\tableofcontents
+
+\chapter{chapter}
+\addchap{chapter}
+\section{section}
+\subsection{subsection}
+\subsubsection{subsubsection}
+
+ \tagstructbegin{tag=P}
+   \tagmcbegin{tag=P}
+    a paragraph\par x
+   \tagmcend
+ \tagstructend
+
+\tagstructend   %Document
+\end{document} 
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,7 +1,6 @@
 % !Mode:: "TeX:DE:UTF-8:Main"
-% $UFDate: 2017-12-03 18:32:01 +0100 -- Commit: 77304d9 (HEAD, tag: v1.4, master) -- master$
 \makeatletter
-\def\UlrikeFischer at package@version{0.1}
+\def\UlrikeFischer at package@version{0.2}
 \makeatother
 \documentclass[DIV=12,parskip=half-,bibliography=totoc]{scrartcl}
 \usepackage[utf8]{inputenc}
@@ -66,7 +65,7 @@
 
 Since many year the creation of accessible pdf-files with \LaTeX\ which conform to the PDF/UA standard has been on the agenda of \TeX-meetings. Many people agree that this is important and Ross Moore has done quite some work on it. There is also a TUG-mailing list and a webpage \parencite{tugaccess} dedicated to this theme.
 
-But in my opinion missing are means to \emph{experiment} with tagging and accessibility. Means to try out, how difficult it is to tag some structures, means to try out, how much tagging is really needed (standards and validators don't need to be right \ldots), means to test what else is needed so that a pdf works e.g. with a screen reader. Without such experiments it is imho quite difficult to get a feeling about what has to be done, which kernel changes are needed, how packages should be adapted. 
+But in my opinion missing are means to \emph{experiment} with tagging and accessibility. Means to try out, how difficult it is to tag some structures, means to try out, how much tagging is really needed (standards and validators don't need to be right \ldots), means to test what else is needed so that a pdf works e.g. with a screen reader. Without such experiments it is imho quite difficult to get a feeling about what has to be done, which kernel changes are needed, how packages should be adapted.
 
 This package tries to close this gap by offering \emph{core} commands to tag a pdf.\footnote{In case you don't know what this means: there will be some explanations later on.}
 
@@ -76,9 +75,9 @@
 
 So this package deliberately concentrates on the basics -- and this already quite a lot, there are much more details involved as I expected when I started.
 
-I'm sure that it has bugs. Bugs reports, suggestions and comments can be added to the issue tracker on github. \url{https://github.com/u-fischer/tagpdf}. 
+I'm sure that it has bugs. Bugs reports, suggestions and comments can be added to the issue tracker on github. \url{https://github.com/u-fischer/tagpdf}.
 
-Please also check the github site for new examples and improvements. 
+Please also check the github site for new examples and improvements.
 
 
 \subsection{Tagging and accessibility}
@@ -90,7 +89,7 @@
 
 \subsection{Engines and modes}
 
-The package works currently with pdflatex and lualatex. 
+The package works currently with pdflatex and lualatex.
 
 The package has two modes: the \emph{generic mode} which should work in theory with every engine and the \emph{lua mode} which works only with lualatex.
 
@@ -112,7 +111,7 @@
 pdf's created with the commands of this package must be validated:
 
 \begin{itemize}
-\item One must check that the pdf is \emph{syntactically} correct. It is rather easy to create broken pdf: e.g. if a chunk is opened on one page but closed on the next page. 
+\item One must check that the pdf is \emph{syntactically} correct. It is rather easy to create broken pdf: e.g. if a chunk is opened on one page but closed on the next page.
 \item One must check how good the requirements of the PDF/UA standard are followed \emph{formally}.
 \item One must check how good the accessibility is \emph{practically}.
 \end{itemize}
@@ -119,7 +118,7 @@
 
 Syntax validation and formal standard validation can be done with preflight of the (non-free) adobe acrobat.
 It can also be done also with the free PDF Accessibility Checker (PAC~3) \parencite{pac3}.
-There is also the validator veraPDF \parencite{verapdf}. But I didn't try it yet and have no idea if it is useful here. 
+There is also the validator veraPDF \parencite{verapdf}. But I didn't try it yet and have no idea if it is useful here.
 
 Practical validation is naturally the more complicated part. It needs screen reader, users which actually knows how to handle them, can test documents and can report where a pdf has real accessibility problems.
 
@@ -170,13 +169,13 @@
 \item[\PrintKeyName{activate-tree}] Boolean, initially false. Activates the code related to trees. Should be used only if the two other keys has been used too.
 \item[\PrintKeyName{activate-all}] Boolean, initially false. Activates everything, that normally the sensible thing to do.
 \item[\PrintKeyName{add-new-tag}] See section \ref{sec:new-tag} for a description.
-\item[\PrintKeyName{check-tags}] Boolean, initially true. Activates some safety checks.
-\item[\PrintKeyName{compresslevel}] Value is an integer between 0 and 9. It sets both the pdfcompresslevel and the pdfobjcompresslevel. 
+\item[\PrintKeyName{check-tags}] Boolean, initially true. Activates some safety checks (but doesn't very much currently. It will perhaps be merged with the log-level key).
+\item[\PrintKeyName{compresslevel}] Value is an integer between 0 and 9. It sets both the pdfcompresslevel and the pdfobjcompresslevel.
 \item[\PrintKeyName{log}] Choice key, possible values \PrintKeyName{none}, \PrintKeyName{v}, \PrintKeyName{vv}, \PrintKeyName{vvv},  \PrintKeyName{all}.  Setups the log level.  Changing the value affects currently mostly the luamode: \enquote{higher} values gives more messages in the log. The current levels and messages have been setup in a quite ad-hoc manner and will need improvement.
 \item[\PrintKeyName{tabsorder}] Choice key, possible values are \PrintKeyName{row}, \PrintKeyName{column}, \PrintKeyName{structure}, \PrintKeyName{none}.  This decides if a \verb+/Tabs+ value is written to the dictionary of the page objects. Not really needed for tagging itself, but one of the things you probably need for accessibility checks. So I added it. Currently the tabsorder is the same for all pages. Perhaps this should be changed \ldots.
 \item[\PrintKeyName{tagunmarked}] Boolean,\marginnote{luamode} initially true. When this boolean is true, the lua code will try to mark everything that has not been marked yet as an artifact. The benefit is that one doesn't have to mark up every deco rule oneself. The danger is that it perhaps marks things that shouldn't be marked -- it hasn't been tested yet with complicated documents containing annotations etc.
 \item[\PrintKeyName{uncompress}] Equivalent to using \texttt{compresslevel=0}.
-   
+
 \end{description}
 
 \section{Tagging}
@@ -357,7 +356,7 @@
 \DescribeMacro\uftag_mc_begin:n{<key-val-list>}
 \ExplSyntaxOff
 
-These commands insert the begin of the marked content code in the pdf. They don't start a paragraph. The user command additionally issues an \verb+\ignorespaces+ to suppress spaces after itself.
+These commands insert the begin of the marked content code in the pdf. They don't start a paragraph. \emph{They don't start a group}. The user command additionally issues an \verb+\ignorespaces+ to suppress spaces after itself.
 Such markers should not be nested. The command will warn you if this happens.
 
 The key-val list understands the following keys:
@@ -383,7 +382,7 @@
 \DescribeMacro\uftag_mc_end:
 \ExplSyntaxOff
 
-These commands insert the end code of the marked content. The user command also issues at first an \verb+\unskip+. Both commands check if there has been a begin marker and issue a warning if not.
+These commands insert the end code of the marked content. They don't end a group and it doesn't matter if they are in another group as the starting commands. The user command also issues at first an \verb+\unskip+. Both commands check if there has been a begin marker and issue a warning if not.
 
 \ExplSyntaxOn
 \DescribeMacro\tagmcuse{<label name>}
@@ -497,11 +496,11 @@
 \DescribeMacro\uftag_struct_begin:n {key-val-list}
 \ExplSyntaxOff
 
-These commands start a new structure.
+These commands start a new structure. They don't start a group. They set all their values globally.
 
 The key-val list understands the following keys:
 \begin{description}
-  \item[\PrintKeyName{tag}] This is required. The value of the key is normally one of the standard type listed in section \ref{sec:standard-types}. It is possible to setup new tags/types, see section \ref{sec:new-tags}.
+  \item[\PrintKeyName{tag}] This is required. The value of the key is normally one of the standard type listed in section \ref{sec:new-tag}. It is possible to setup new tags/types, see the same section.
   \item[\PrintKeyName{stash}] Normally a new structure inserts itself as a kid into the currently active structure. This key prohibits this. The structure is nevertheless from now on \enquote{the current active structure} and parent for following  marked content and structures.
   \item[\PrintKeyName{label}] This key sets a label by which you can use the structure later in another structure. Internally the label name will start with \texttt{tagpdfstruct-}.
   \item[\PrintKeyName{title},\PrintKeyName{alttext},\PrintKeyName{actualtext}] These keys allow to set the dictionary entries \texttt{/Title}, \texttt{/Alt} and \texttt{/Actualtext}. But I haven't yet decided which is the suitable format for the values, so currently you must ensure yourself that the values lead to valid pdf content.
@@ -513,7 +512,7 @@
 \DescribeMacro\uftag_struct_end:
 \ExplSyntaxOff
 
-This ends a structure.
+This ends a structure. They don't end a group and it doesn't matter if they are in another group as the starting commands.
 
 \ExplSyntaxOn
 \DescribeMacro\tagstructuse{<label>}
@@ -615,7 +614,7 @@
 
  A tagged pdf is needed for accessibility but this is not enough. As already mentioned there are more requirements:
  \begin{itemize}
- \item The language must be declared by adding a \texttt{/Lang xx-XX} to the pdf catalog or -- if the language changes for a part of the text to the structure or the marked content -- this can be rather easily done with existing packages. %%UF mention some code
+ \item The language must be declared by adding a \texttt{/Lang xx-XX} to the pdf catalog or -- if the language changes for a part of the text to the structure or the marked content. Setting the document language can be rather easily done with existing packages or even directly with \verb+\pdfcatalog{/Lang (en-US)}+. For settings in marked content and structure I will have to add keys.
  \item All characters must have an unicode representation or a suitable alternative text.
       With lualatex and open type (unicode) fonts this is normally not a problem. With pdflatex it could need
       \begin{verbatim}
@@ -625,9 +624,8 @@
  and perhaps some\verb+\pdfglyphtounicode+ commands.
  \item Hard and soft hyphen must be distinct.
  \item Spaces between words should be space glyphs and not only a horizontal movement.
- \item Various small infos must be present in the catalog dictionary, info dictionary and the page dictionaries.
- \end{itemize}
-
+ \item Various small infos must be present in the catalog dictionary, info dictionary and the page dictionaries, e.g. metadata like title. 
+\end{itemize}
  If suitable I will add code for this tasks to this packages. But some of them can also be done already with existing packages like hyperref, hyperxmp, pdfx.
 
 

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-checks-code.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-checks-code.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-checks-code.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplPackage {tagpdf-checks-code} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-checks-code} {2018/07/09} {0.2}
  {part of tagpdf - code related to checks and messages}
 
 
@@ -46,6 +46,14 @@
    }
  }
 
+\cs_new:Nn \__uftag_check_structure_tag:N
+ {
+  \prop_if_in:NoF \g__uftag_role_tags_prop { #1 }
+   {
+    \msg_warning:nnx {tagpdf}{role-unknown-tag} { #1 }
+   }
+ }
+
 \cs_new:Nn \__uftag_check_info_closing_struct:n %#1 struct num
  {
   \msg_info:nnn {tagpdf}{struct-show-closing}{#1}

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplFile {tagpdf-luatex.def} {2018/07/04} {0.1}
+\ProvidesExplFile {tagpdf-luatex.def} {2018/07/09} {0.2}
   {tagpdf driver for luatex}
 
 \newattribute \g__uftag_mc_type_attr     %the value represent the type

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2018/07/09} {0.2}
  {part of tagpdf - code related to marking chunks - generic mode}
 
 % for the label system

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplFile {tagpdf-mc-code-lua.sty} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2018/07/09} {0.2}
   {tagpdf - mc code only for the luamode }
 
 %the two attibutes are defined in the driver file.

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2018/07/09} {0.2}
  {part of tagpdf - code related to marking chunks - code shared by generic and luamode }
 
 % I use a latex counter for the absolute count, so that it is added to

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-pdftex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-pdftex.def	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-pdftex.def	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplFile {tagpdf-pdftex.def} {2018/07/04} {0.1}
+\ProvidesExplFile {tagpdf-pdftex.def} {2018/07/09} {0.2}
   {tagpdf driver for pdftex}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-roles-code.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-roles-code.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-roles-code.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplPackage {tagpdf-roles-code} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-roles-code} {2018/07/09} {0.2}
  {part of tagpdf - code related to roles and structure names}
 
 \__uftag_seq_new:N     \g__uftag_role_tags_seq  %to get names from numbers
@@ -35,7 +35,7 @@
   L,           %list
   LI,          %list item (around label and list item body)
   Lbl,         %list label
-  Lbody,       %list item body
+  LBody,       %list item body
   Table,
   TR,          %table row
   TH,          %table header cell

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-struct-code.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-struct-code.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-struct-code.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplPackage {tagpdf-struct-code} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-struct-code} {2018/07/09} {0.2}
  {part of tagpdf - code related to storing structure}
 
 % I will use a latex counter for the structure count
@@ -256,6 +256,10 @@
   tag   .code:n        = % S property
    {
     \__uftag_pdf_escape_name:Nn \l__uftag_tmpa_tl { #1 }
+    \bool_if:NT \g__uftag_check_tags_bool
+     {
+      \__uftag_check_structure_tag:N \l__uftag_tmpa_tl
+     }
     \__uftag_prop_gput:cnx
      { g__uftag_struct_\int_eval:n {\c at g__uftag_struct_abs_int}_prop }
      { S }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplPackage {tagpdf-tree-code} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-tree-code} {2018/07/09} {0.2}
  {part of tagpdf - code related to writing trees and dictionaries to the pdf}
 
 %this does the actual finishing:

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,4 +1,4 @@
-\ProvidesExplFile {tagpdf-user.sty} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf-user} {2018/07/09} {0.2}
   {tagpdf - user commands}
 
 \NewDocumentCommand \tagpdfsetup { m }

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,5 +1,5 @@
--- Packageversion: 0.1 
--- Packagedate: 2018/07/04
+-- Packageversion: 0.2 
+-- Packagedate: 2018/07/09
 -- tagpdf.lua
 -- Ulrike Fischer
 
@@ -435,7 +435,7 @@
 function uftag.func.fill_parent_tree_line (page)
      -- we need to get page-> i=kid -> mcnum -> structnum 
      -- pay attention: the kid numbers and the page number in the parent tree start with 0!
-    local numsentry 
+    local numsentry =""
     local pdfpage = page-1
     if uftag.page[page] and uftag.page[page][0] then
      mcchunks=#uftag.page[page] 
@@ -465,9 +465,9 @@
       uftag.trace.log("PAGETREE PAGE" .. page.. " NUM ENTRY = ".. numsentry,3)
      end  
     else
-      uftag.trace.log ("PAGETREE: NO DATA FOR PAGE "..i,3)
+      uftag.trace.log ("PAGETREE: NO DATA FOR PAGE "..page,3)
     end
-    return numsentry
+    return numsentry 
 end
 
 function uftag.func.output_parenttree (abspage)

Modified: trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2018-07-10 21:05:23 UTC (rev 48177)
+++ trunk/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty	2018-07-10 21:05:49 UTC (rev 48178)
@@ -1,6 +1,6 @@
 \RequirePackage{expl3}[2018/06/14]
 
-\ProvidesExplPackage {tagpdf} {2018/07/04} {0.1}
+\ProvidesExplPackage {tagpdf} {2018/07/09} {0.2}
  {A package to experiment with pdf tagging}
 
 % storing internal names to my name space:



More information about the tex-live-commits mailing list