Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm trying to use this technique to keep variables separated between different notebooks. It seems to be working fine, except that variables turn black as soon as they are evaluated — any ideas why this would be happening? Here are some examples:

And with a variable that hasn't been used at all:

enter image description here

Suddenly it's black, even though it has no value:

share|improve this question
I don't have time to tinker with this, but I think it could be addressed by setting one of the different styling options in Options[$FrontEnd, AutoStyleOptions] (also see in the options inspector) –  rm -rf Oct 26 '12 at 20:13
So this is a different solution to the problem of different notebooks/different contexts. What about using different kernels? You can add more kernels by going to the Evaluation menu and selecting Kernel Configuration Options. I have multiple local kernels that I'll use for just this reason. –  user4368 Oct 26 '12 at 21:08
Behavior confirmed in version 7 on Windows 7. –  Mr.Wizard May 23 '13 at 14:27
I'm reasonably certain this is designed behavior - the variable coloring is only supposed to apply to the Global context. As an indication, in Preferences>Appearance>Syntax Coloring>Other the typical blue color is assigned to "Global symbols that have no value assigned". I'm not aware of any way of getting the syntax coloring to look at symbols in other contexts here, but maybe there is some trick. –  KAI May 23 '13 at 17:49
@KAI please consider submitting that as an answer. –  Mr.Wizard May 29 '13 at 6:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.