ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Obscure math/color "bug" (namespace clash)
@ 2014-02-19  8:53 Alan BRASLAU
  2014-02-22 12:33 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Alan BRASLAU @ 2014-02-19  8:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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]

Alan
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-22 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19  8:53 Obscure math/color "bug" (namespace clash) Alan BRASLAU
2014-02-22 12:33 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).