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.

Lately, my installation of Mathematica has decided not to highlight any symbols loaded from packages. The picture below is a good representation of this:

enter image description here

where after loading both PhysicalConstants` and Units` BohrRadius, Meter, and Angstrom should all be black. Yet, they retain their "unknown symbol" color. This occurs for all packages and is persistent across restarting the front-end and rebooting the entire system. Any suggestions for correcting this?

I am running the student version of 8.0.4 on MacOS 10.6.8.

share|improve this question
    
What happens when you deselect highlighting of "Global symbols that have no value assigned" in the Preferences dialog? Does my suggestion below function then? –  Mr.Wizard Apr 29 '12 at 14:49
    
@Mr.Wizard no it doesn't. –  rcollyer Apr 29 '12 at 15:12
    
I just want to add this happens constantly to me, especially if I have aborted a calculation using Command + period. The only remedy is to restart Mathematica entirely (restarting the kernel alone does not work). I'm pretty sure this is just a bug in Mathematica. –  Guillochon Apr 29 '12 at 21:10
    
@Guillochon yes, I have that happen, also. But, this was persisting beyond restarting mathematica. –  rcollyer Apr 30 '12 at 0:58
    
Was this ever resolved? –  Mr.Wizard Oct 14 '12 at 10:38
show 1 more comment

1 Answer

up vote 9 down vote accepted

I don't know what is causing your problem, but presumably you can still specially color the symbols in those contexts as I do. For example:

SetOptions[$FrontEnd, 
  AutoStyleOptions -> {"SymbolContextStyles" ->
     {"Units`" -> Brown, "PhysicalConstants`" -> Orange}
   }
]

Since the above suggestion doesn't have effect on your machine even when you deselect highlighting of "Global symbols that have no value assigned" in the Preferences dialog, it sounds like something is really broken. Obviously backing things up first, try deleting the user configuration files.

share|improve this answer
    
No dice. I think the highlighter is viewing them as not having any values assigned to them, so it is not moving off of the blue. –  rcollyer Apr 29 '12 at 14:37
    
@rcollyer I'm doing it directly in the Options Inspector (or perhaps I should say the settings reside in the FrontEnd/init.m file), but really it's just a matter of preference, isn't it? –  Mr.Wizard Apr 29 '12 at 14:39
    
Which files in particular? The $UserBaseDirectory/FrontEnd/8.0 Caches? –  rcollyer Apr 29 '12 at 15:13
1  
I moved both $UserBaseDirectory/FrontEnd/8.0 Caches and init.m from $UserBaseDirectory/FrontEnd, restarted, and it appears to have worked. I'm wondering what got fubared ... Any way, edit you comment in to your answer, and I'll accept it. –  rcollyer Apr 29 '12 at 15:18
    
No real customizations to speak of. –  rcollyer Apr 29 '12 at 15:58
show 6 more comments

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.