cgnieder/fnpct

xelatex compatibility

cgnieder opened this issue · 7 comments

Original report by Panteleimon Korolev (Bitbucket: pantlmn, GitHub: pantlmn).


An attempt to use both fnpct and xespotcolor (for documents using PANTONE colors) gives an error:
! LaTeX Error: Option clash for package color.
or:
! Package xcolor Error: Undefined color model `spotcolor'.

Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).


This MWE:

#!latex

\documentclass{article}
\usepackage{fnpct}
\usepackage{xespotcolor}
\begin{document}

foo

\end{document}

runs without any errors.

Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).


This is not an issue with fnpct:

#!latex

\documentclass{article}
\usepackage{tikz}
\usepackage{xespotcolor}
\begin{document}

foo

\end{document}

or

#!latex

\documentclass{article}
\usepackage{xcolor}
\usepackage{xespotcolor}
\begin{document}

foo

\end{document}

give the same error. The reason is that xespotcolor loads

#!latex

\RequirePackage[xetex]{color}

when compiled with XeLaTeX. The solution is the same as always in such cases: first try reversing the order of the package loading. If this doesn't help, pass the option explicitly:

#!latex


\documentclass{article}
\PassOptionsToPackage{xetex}{color}
\usepackage{fnpct}
\usepackage{xespotcolor}
\begin{document}

foo

\end{document}

Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).


This is not a bug of fnpct.

Original comment by Panteleimon Korolev (Bitbucket: pantlmn, GitHub: pantlmn).


Sorry for blaming you and the beautiful fnpct package.

But \PassOptionsToPackage actually does not help :-(

M(non)WE (an attempt to actually use xespotcolor fails):

#!latex

\documentclass{article}
\PassOptionsToPackage{xetex}{color}
\usepackage{fnpct}
\usepackage{xespotcolor}

\NewSpotColorSpace{Pantone}
\AddSpotColor{Pantone} {KINOVAR} {PANTONE\SpotSpace 200\SpotSpace U} {.09 .86 .5 .1}
\definecolor{kinovarPantone}{spotcolor}{KINOVAR,1.0}
\SetPageColorSpace{Pantone}

\begin{document}

foo

\end{document}

Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).


This is not a fnpct issue:

#!latex

\documentclass{article}
\PassOptionsToPackage{xetex}{color}
\usepackage{xcolor}
\usepackage{xespotcolor}

\NewSpotColorSpace{Pantone}
\AddSpotColor{Pantone} {KINOVAR} {PANTONE\SpotSpace 200\SpotSpace U} {.09 .86 .5 .1}
\definecolor{kinovarPantone}{spotcolor}{KINOVAR,1.0}
\SetPageColorSpace{Pantone}

\begin{document}

foo

\end{document}

Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).


You should maybe ask a question on a help platform like tex.stackexchange.com

Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).


Removing version: 0.4 (automated comment)