0

How might I get the following source, using the MathTime 2 Lite fonts, to pass PDF/A-2u validation? The error is: "The Font dictionary of all fonts shall define the map of all used character codes to Unicode values, either via a To Unicode entry …"

\documentclass{article}

\usepackage{amsmath}% load now to avoid \dddot, \ddddot clash with mtpro2

\usepackage{newtxtext}
\usepackage{mtp2lite}

\usepackage{blindtext}

\usepackage[a-2u]{pdfx}

\begin{document}
\blindmathpaper
\end{document}

Note that the mtp2lite.sty file used is the same as the file mtpro2.sty, included in the "mtplite" files from CTAN, with one necessary change made so as to avoid a "no room for new count" error. Namely, the line

\alloc@0\count\countdef\insc@unt\pointcount@

is replaced with:

\newcount\pointcount@

The PDF validator app veraPDF gives a validation failure report including the following:

 <validationReport profileName="PDF/A-2U validation profile" statement="PDF file is not compliant with Validation Profile requirements." isCompliant="false">
    <details passedRules="123" failedRules="1" passedChecks="8111" failedChecks="3">
      <rule specification="ISO 19005-2:2011" clause="6.2.11.7" testNumber="1" status="failed" passedChecks="0" failedChecks="3">
        <description>The Font dictionary of all fonts shall define the map of all used character codes to Unicode values, either via a ToUnicode entry,
        or other mechanisms as defined in ISO 19005-2, 6.2.11.7.2.</description>
        <object>Glyph</object>
        <test>toUnicode != null</test>
        <check status="failed">
          <context>root/document[0]/pages[1](20 0 obj PDPage)/contentStream[0](21 0 obj PDContentStream)/operators[104]/usedGlyphs[0](FFYPYY+MT2SYT 0 0  0)</context>
        </check>
        <check status="failed">
          <context>root/document[0]/pages[0](6 0 obj PDPage)/contentStream[0](8 0 obj PDContentStream)/operators[299]/usedGlyphs[0](OVWIGM+MT2MIT 25 0  0)</context>
        </check>
        <check status="failed">
          <context>root/document[0]/pages[0](6 0 obj PDPage)/contentStream[0](8 0 obj PDContentStream)/operators[248]/usedGlyphs[0](XIQLHG+MT2SYS 0 0  0)</context>
        </check>
      </rule>
    </details>
  </validationReport>
  • By far the most elegant solution is to cut the Gordian knot and use unicode-math. However, the mmap package has Unicode mappings for T1, TS1, OML, OMX and so on. I believe newtxmath and newpxmath also put some effort into making Unicode mappings work. – Davislor Jun 25 at 21:10
  • @Davislor: alas, I'm using MathTime 2 fonts - actually, MathTime Professional II fonts, not the "lite" version. Is it possible to use unicode-math and still do that? – murray Jun 26 at 19:26
1

You can add the two following instructions:

\documentclass{article}

\usepackage{amsmath}% load now to avoid \dddot, \ddddot clash with mtpro2

\usepackage{newtxtext}
\usepackage[lite]{mtpro2}
\pdfmapfile{=mtpro2.map}

\usepackage{blindtext}

\usepackage[a-2u]{pdfx}

\pdfglyphtounicode{EM}{0058 0058 0058 0058 0058 0058 0058 0058}
\pdfglyphtounicode{NUL}{0060 0060 0060 0060 0060 0060 0060 0060}

\begin{document}

\blindmathpaper
\end{document}

The numbers are made up, basically the one is a lot of X and the other of Z. But as math doesn't copy&paste anyway as most of the tounicode values are wrong, it should matter much what one use here.

| improve this answer | |
  • I tried that, but still get error: "For all Type 1 font subsets referenced within a conforming file, the font descriptor dictionary shall include a CharSet string listing the character names defined in the font subset, as described in PDF Reference Table 5.18". The specific errors relate to TeXGyreHeros and TeXGyreTermsX. – murray Jun 22 at 21:13
  • the example validates for me. – Ulrike Fischer Jun 22 at 21:15
  • valiadates with what app or site? – murray Jun 23 at 0:42
  • I used like you verapdf. – Ulrike Fischer Jun 23 at 7:22
  • I missed the \pdfmapfile{=mtpro2.map} command; with that included, the pdf validates for me, too. It validates even with the full MathTime Professional II math fonts and just \usepackage{mtpro2}. But my actual, book-length, document, which uses newtxtext with mtpro2 still won't validate against the same font descriptor dictionary criterion; I still get some errors regarding TeXGyreTermsX and TeXGyreHeros, even after I include \pdfmapfile{=pdftex.map}. I'll have to manufacture a new example shorter than my actual one. – murray Jun 23 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.