-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error not reported #22
Comments
As the error message says, the error is from the So extending the error messages is imho against the main spirit of
( |
Ok, thank you, Ulrike, ciao!
Il giorno lun 8 ago 2022 alle ore 09:31 Ulrike Fischer <
***@***.***> ha scritto:
… As the error message says, the error is from the color package (or more
precisely from the driver in graphics-def) and not from xcolor. xcolor
itself tries in many cases to catch faulty arguments and to correct them.
So \definecolor{funny}{rgb}{3, 0.5,-0.6} works and is truncated to 1 0.5
0 . The color package would error with it.
So extending the error messages is imho against the main spirit of xcolor
but one could suppress rather easily the suppress it in this case:
\documentclass{article}
\usepackage{xcolor}
\begin{document}
\makeatletter
***@***.***@@***@***.***
{\dimen@***@***.***{#1}{100}{#1}\p@
\edef\@@***@***.***{#2}{white}{#2}}%
\ifdim\dimen@>100\p@ \dimen@=100\p@ \fi %new
\ifdim\dimen@=100\p@
***@***.***\@@mix]\relax
\else\ifdim\dimen@=\z@
\extractcolorspecs\@@mix\@@mod\@@clr
\else
***@***@***.***\@@***@***.***@\@@mod @\@@mix}%
\ifx\@@tmp\relax
\extractcolorspec\@@mix\@@tmp
\ifx\@@***@***@***.***
\edef\@@***@***.***\@@tmp}%
\edef\@@***@***.***\@@tmp}%
***@***@***.***\@@clr\@@mod\@@clr
\else
\expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
\fi
\else
\ifx\@@***@***.***@***@***@***.***\@@clr:\@@hue\fi
\fi
***@***.***\@@mod\@@clr\@@tmp\@@tmp
***@***.***\@@tmp,\@@clr
\fi\fi
***@***.***{#3}%
***@***.******@***.***@@***@***.***}}%
***@***.***@@***@***.***}}
\makeatother
\color{orange} orange
\color{orange!120} orange
\colorlet{orangething}{orange!120}
\color{orangething} orange
\end{document}
(\color[rgb]{3, 0.5,-0.6} blub would still error as this is passed more
or less unchanged to the driver).
—
Reply to this email directly, view it on GitHub
<#22 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHDP6GIXRV3RAXC3VL3ABPDVYCZTJANCNFSM553SUIQA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I would like to show you this MWE:
The first line does not give errors, whereas the second one correctly gives
! Package color Error: Argument '-0.3' not in range [0,1].
See also https://tex.stackexchange.com/questions/653210/how-do-you-go-over-the-0-1-range-for-colors.
Thank you, bye!
Carla
The text was updated successfully, but these errors were encountered: