Text Formatting ⇒ Possible bug in xcolor package
Possible bug in xcolor package
I noticed a possible bug in the xcolor package. Line 5824 in xcolor.dtx reads \ifnum\XC@tracing>2, it should be \ifnum\XC@tracing>3. Do you agree? If that is a bug, I could tell the author of the package.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Possible bug in xcolor package
I would also assume that that kind of questions might be better posted on comp.text.tex, as the xcolor author is more likely to read that newsgroup than this forum
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Possible bug in xcolor package
Code: Select all
\ifnum\XC@tracing>2Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Possible bug in xcolor package
Code: Select all
\documentclass{article}
\usepackage{xcolor}
\makeatletter
\newcommand*\ApplyPatch{%
\CheckCommand*\XC@display{%
\XC@bcolor\XC@let@cN{\string\color@.}\XC@current@color
\ifnum\XC@type{.}=1
\PackageWarning{xcolor}{Incompatible color definition}%
\else
\ifnum\XC@tracing>2
\begingroup
\let\xcolor@\@empty
\def\@nil{\string\@nil}%
\PackageInfo{xcolor}{Setting color `\XC@current@color'}%
\endgroup
\fi
\fi
\XC@mcolor\set@color\XC@ecolor\ignorespaces
}%
\renewcommand*\XC@display{%
\XC@bcolor\XC@let@cN{\string\color@.}\XC@current@color
\ifnum\XC@type{.}=1
\PackageWarning{xcolor}{Incompatible color definition}%
\else
\ifnum\XC@tracing>3
\begingroup
\let\xcolor@\@empty
\def\@nil{\string\@nil}%
\PackageInfo{xcolor}{Setting color `\XC@current@color'}%
\endgroup
\fi
\fi
\XC@mcolor\set@color\XC@ecolor\ignorespaces
}%
}
\makeatother
%\ApplyPatch
\begin{document}
\tracingcolors=3
\textcolor{red}{foo}
\tracingcolors=4
\textcolor{blue}{foo}
\end{document}