Skip to content

Incompatibility with TeX Live >= 2023 / xcolor #28

@FG-TUM

Description

@FG-TUM

Problem Description

On distributions with TeX Live >= 2023 building locally make pdf-local fails. This is an issue if one wants to use new-ish LaTeX packages.

Error Message

$ make pdf-local
# some output omitted ...
(./inc/tumcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg)

! LaTeX Error: Unknown option 'pgfplots' for package xcolor.

For immediate help type H <return>.
 ...

l.266 \edef
           \Gin@driver{\Gin@driver}
? H

LaTeX has been asked to set an option called 'pgfplots' but the package
"xcolor" has not created an option with this name.

It appears something in the xcolor package has changed so it doesn't accept the pdfplots option anymore? However, I don't see anything about that specifically in their changelog so I'm not sure if this was ever a valid option?

Affected Distributions

  • Any rolling release Distro like Archlinux
  • Ubuntu >= 24.04. (22.04 is fine)

Workaround

The offending lines are here:

\newif\ifpgfplots\pgfplotsfalse
\DeclareOption{pgfplots}{\pgfplotstrue}%
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{xcolor}}%
\ProcessOptions\relax%
\RequirePackageWithOptions{xcolor}%

My knowledge about sty files is very limited. Both of the following workarounds seem to work but I guess they have undesired side effects:

  • add \usepackag{xcolor} before \RequirePackageWithOptions{xcolor}
  • replace \RequirePackageWithOptions{xcolor} with \RequirePackage{xcolor}

So please someone who understands this better stand up and provide a good solution :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions