[NTG-context] Obscure math/color "bug" (namespace clash)
Hans Hagen
pragma at wxs.nl
Sat Feb 22 13:33:54 CET 2014
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
-----------------------------------------------------------------
More information about the ntg-context
mailing list