2

When I try to use the tufte-book class with the adforn and pdfx packages, I am getting a problem with symbol substitutions. For example:

\documentclass{tufte-book}
\usepackage{adforn} 
\usepackage[x-1a]{pdfx}

\begin{document}
\textcopyright
\end{document}

Generates:

Failure

If I do any one of (a) use the article class instead (b) leave out adforn (c) leave out pdfx, I get the proper symbol:

Success

I haven't a clue how to start diagnosing this. I could probably work around by creating my own copyright symbol, but I worry that other symbols in my large document might also be wrong. Any suggestions? Can others duplicate this?

I am using pdflatex with MiKtex on Windows.

Edit: this compiles for me without errors. Here is my logfile, I didn't see anything relevant.

  • 2
    Do you need the call of pdfx? Without it the compiles without error messages. With pdfx I gert error messages. Do you get some? Add them to your question please. BTW: Welcome to TeX.SE! – Mensch Dec 2 '18 at 20:08
  • I don't get any errors, no. I can try to attach my log file though. I didn't see any relevant warnings. Thanks for the welcome, I have gotten much use previous answers on the site! – Cass Sackett Dec 2 '18 at 21:03
  • The printer I am preparing this for requires pdf/X compliance. If there is a better way to achieve that I would be happy to hear. – Cass Sackett Dec 2 '18 at 21:11
  • 2
    Well, you are using an older version pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6300 64-bit) (preloaded format=pdflatex 2017.5.9), the current version is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6880 64-bit) (preloaded format=pdflatex 2018.12.1). to get the code compiled i have to change the order of pdfx and adforn and still receives an error message ! LaTeX Error: Option clash for package xcolor. – Mensch Dec 2 '18 at 21:30
3

The problem is common with tufte classes: they load hyperref too early. With pdfx, it is this package that should load it.

There is another small problem about tufte-book loading xcolor with options and pdfx doing the same with different options.

\PassOptionsToPackage{cmyk,hyperref}{xcolor}
\documentclass[nohyper]{tufte-book}
\usepackage{adforn}
\usepackage[x-1a]{pdfx}

\begin{document}

\textcopyright

\end{document}

If you want to use the same hyperref setup as tufte-book, add

\hypersetup{
  pdfborder = {0 0 0},
  bookmarksdepth = section,
  citecolor = DarkGreen,
  linkcolor = DarkBlue,
  urlcolor = DarkGreen,
}

before \begin{document}.

Why does the issue show when adforn is loaded? It's a bug of adforn explained in https://tex.stackexchange.com/a/394388/4427. It causes the U fontencoding to be current when pdfx is loaded, so for reasons too long to be explained, L8U ends up being assigned as the default encoding for \textcopyright and many other commands, which is wrong because this encoding is only for internal use.

The fix I add below might be sufficient, but it's best to use nohyper anyways.

\PassOptionsToPackage{cmyk,hyperref}{xcolor}
\documentclass[nohyper]{tufte-book}
\usepackage{adforn}
\fontencoding{T1}\selectfont % work around the adforn bug

\usepackage[x-1a]{pdfx}

\hypersetup{
  pdfborder = {0 0 0},
  bookmarksdepth = section,
  citecolor = DarkGreen,
  linkcolor = DarkBlue,
  urlcolor = DarkGreen,
}

\begin{document}

\textcopyright

\end{document}
| improve this answer | |
  • Or maybe not. I don't know how I generated it. – cfr Dec 3 '18 at 1:36
  • Thank you, this seemed to work! Though now there are other problems from pdfx, but perhaps I can sort them out. – Cass Sackett Dec 3 '18 at 1:47
  • When I try to compile the example in the question, I get an error, which is fine, and then it hangs on loading the MPS to PDF converter. – cfr Dec 3 '18 at 1:52
  • Sounds like I should be thankful this thing compiles for me at all! – Cass Sackett Dec 3 '18 at 1:54
  • For future reference: the nohyper option seemed to cause a lot of trouble (on my real doc, not the test), but just including your adforn fix resolved the character problem – Cass Sackett Dec 3 '18 at 1:56

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.