4

My question may not be far away from this one here: pdfx problem with embedding the pigpen font (?) but I didn't really find an answer to mine so here it comes:

I want to produce a PDF/A compliant pdf-file out of my thesis using LaTeX for the sake of publishing. It seems that LaTeX has problems with the pdfx-package and double tildes. Here is my MWE:

\documentclass{article}

\usepackage{amsmath,amssymb}

\usepackage[a-1b]{pdfx}


\begin{document}
Here is a math symbol with double tilde: $\tilde{\tilde{h}}$.
\end{document}

When I compile this with pdfLaTeX, I get the error message

! Undefined control sequence.
\macc@adjust ->\dimen@ \macc@kerna 
                                   \advance \dimen@ \macc@kernb \kern -\dimen@ 
l.9 ...ymbol with double tilde: $\tilde{\tilde{h}}
                                                  $.

Note that I have to use the double \tilde's here since for publishing, the printed version must be identical to the pdf-version.

Now I tried to solve the problem by replacing \tilde by \widetilde and it worked, but I would feel much more comfortable if I have a solution that also works with \tilde. Can somebody help?

Thanks,

Martin

3
  • Welcome back to TeX.SE! When I run your example I get different errors, ** pdfx: No file (filename).xmpdata . Metadata will be incomplete! ! No color profile found to use for RGB screen colors.. \reserved@a ...ound to use for RGB screen colors.}. I'm not sure if the color thing has something to do with the missing .xmpdata file or not, or if it is a problem with my setup or not, but could you verify that your example indeed produces your error?
    – Marijn
    Oct 16, 2019 at 21:05
  • @Marijn I don't know how to verify else than copy and paste the error message which is what I did above. I compiled my MWE on my home computer and now on my work computer and I get the very same error message (I hope you believe me). In the meanwhile, I sort of solved the problem by searching if somebody else had the same error message which I could have done in the first place... sorry for the circumstances. One has to add the accents package, but only after the amsmath package. HOWEVER, it is only partially solved because the output pdf is still not pdf/a compliant. Oct 17, 2019 at 12:34
  • I believe you :) it is a strange situation overall, I just tried the MWE on my work computer, without the accents package, and there I don't get any error, and the double tilde looks fine on the pdf. Not sure if it is actually compliant though (my pdf viewer reports the format as PDF/A - 1b but that may not be accurate).
    – Marijn
    Oct 17, 2019 at 15:27

1 Answer 1

10

pdfx patches an amsmath command, but as amsmath has changed it now breaks. You should report this. As a work-around you can undo the patch:

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[a-1b]{pdfx}

\makeatletter
\AtBeginDocument{\let\mathaccentV\AMS@mathaccentV}
\makeatother
\begin{document} 
Here is a math symbol with double tilde:  $\tilde{\tilde{h}}$.
\end{document}
5
  • that basically looks like what I have found, too. What I did was to add the accents package AFTER the amsmath package (probably that has the same effect as your work-around, namely "reparing" the patch. Of course, your answer is much more specific because you understand what's going on, I found the accents-package-thing just by chance. Moreover, I also found out why my document was not pdf/a-1b compliant: that was because of the hyperref package. Similarly to the accents package, it has to occur only after the pdfx package and, moreover, you have to specify the options... Oct 18, 2019 at 8:48
  • ... in the hypersetup in order to avoid an option clash. Do you think I should report this, too? Also, do you think it's worth writing this in an answer to my own question (to make it more visible to others)? Finally, to whom should I report this by the way? Oct 18, 2019 at 8:52
  • 1
    This also solves problem with other double math accents like \dot{\tilde{x}} in my case. Dec 22, 2020 at 9:59
  • @MartinMonath I have sent a message to the emails listed in the pdfx documentation.
    – mforbes
    Jan 28 at 9:12
  • @mforbes Thank you^^. Jan 30 at 15:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .