# Conflict between tufte-book, adforn, and pdfx

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[x-1a]{pdfx}

\begin{document}
\end{document}


Generates:

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:

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.

• 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
• 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

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[x-1a]{pdfx}

\begin{document}

\end{document}


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

\hypersetup{
pdfborder = {0 0 0},
bookmarksdepth = section,
citecolor = DarkGreen,
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}
\fontencoding{T1}\selectfont % work around the adforn bug

\usepackage[x-1a]{pdfx}

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

\begin{document}