On 2/19/2014 9:53 AM, Alan BRASLAU wrote:
Hello,

I came across the following obscure math/color namespace clash:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor [tan] [h=d2b48c] % Taken from \setupcolor [x11]

\starttext
$\tan θ$
\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

One solution would be to give precedence in math mode to the standard 
mathematical tokens (here \tan).

Another solution would be simply to avoid the use of "tan" (as a color). In colo-imp-x11.mkiv it 
could be renamed "tan0" (there is already tan1, tan2, tan3). This is somewhat unfortunate as 
"tan" is a standard X11 color name. On the other hand, one would like to be able to use colors in 
math mode as well...

So I propose the following patch:

121c121
< \definecolor [tan0]                 [h=d2b48c] % ! namespace clash with $\tan$
---
\definecolor [tan]                  [h=d2b48c]

\definecolor [tan] [h=d2b48c] % Taken from \setupcolor [x11]

\starttext
$\mathcommand{tan} θ$

\let\tan\relax

\color[tan]{Alan}
\stoptext


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to