latex3 / tagpdf

Tagging support code for LaTeX
60 stars 7 forks source link

tagunmarked code shouldn't mark literals ... #27

Open u-fischer opened 4 years ago

u-fischer commented 4 years ago
\documentclass[12pt]{article}
\usepackage{tagpdf,accsupp}
\tagpdfsetup{activate-all,uncompress,tagunmarked}
\usepackage{l3pdf}
\ExplSyntaxOn
\pdf_uncompress:
\ExplSyntaxOff

\begin{document}
\tagstructbegin{tag=Document}
\BeginAccSupp{method=hex,unicode,ActualText=1e0c}
\tagmcbegin{tag=P}D\EndAccSupp{}
\tagmcbegin{tag=P}
abc
\par\tagmcend\tagstructend\newpage
\end{document}

gives

/Artifact BMC
/Span<</ActualText<FEFF1e0c>>>BDC
EMC
/P<</MCID 0>> BDC

which is wrong. Something similar can happen if luaotfload add BDC-markers for glyphs/ligatures. See exp-bdc-problem-harfmode.tex.