0
$\begingroup$

This question already has an answer here:

For some reason my N function showed up in red even though I haven't noticed it in that color before. The color actually makes the code much more readable but I just don't know if I should be alarmed or not.

Red N function

I applied a different stylesheet to my notebook (as you can tell by the color of the input I've been modding my own stylesheet) but the color is still there. I also checked on the Appearance tab of Edit > Preference and the only red syntax are the errors. I doubt "N" falls into any of these and I also can't tell which shade of red it is to match it to.

Preference syntax error

Update: this is getting weirder:

After restarting MMA, the N is no longer red :'( Also, I can't seem to File > Save Selection As without setting the window size to 100%. If the size is not 100%, I got the error that "The specified setting for the option WindowSize cannot be used."

Window size error

This was reported to be a bug so I suspect my red "N" is also a bug (because previously, with the red N, I could save my selections at sizes that were not 100%). It was nice while it lasted I guess, though I really hope WRI adds better syntax highlighting in their future releases.

$\endgroup$

marked as duplicate by rm -rf May 30 '14 at 14:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Hello, this is not a bug. You probably had another symbol named N that was on your path and Mathematica was warning you about potential name collisions or shadowing. Please see my answer in the linked duplicate for an explanation and a reproducible example. $\endgroup$ – rm -rf May 30 '14 at 14:33
  • 1
    $\begingroup$ If you liked the red coloring because it helped you identify built-in symbols easily, you can do it the following way: Evaluate SetOptions[$FrontEndSession, "AutoStyleOptions" -> {"SymbolContextStyles" -> {"System`" -> Magenta}}] (change to your favourite color) and use it for a while. If you like how it works, change $FrontEndSession to $FrontEnd and this will persist across sessions. $\endgroup$ – rm -rf May 30 '14 at 14:37
  • $\begingroup$ I can't seem to evaluate your expression. I got the error that "Syntax::tsntxi: "[$FrontEndSession,AutoStyleOptions->{SymbolContextStyles->{System`->Magenta}}]" is incomplete; more input is needed." $\endgroup$ – seismatica May 31 '14 at 2:24
  • $\begingroup$ Update: I forgot to include the SetOptions in front. Oops! I got it now. This trick is so awesome! Where can I go to find out more of this hack? $\endgroup$ – seismatica May 31 '14 at 2:32
  • $\begingroup$ Another update: I tried to change the color to a more pleasing magenta by using the code with the RGBColor values: SetOptions[$FrontEndSession, "AutoStyleOptions" -> {"SymbolContextStyles" -> {"System`" -> RGBColor[211, 54, 130]}}]. However, the highlighting became white. I'm not really sure why it turned out that way :/ $\endgroup$ – seismatica May 31 '14 at 2:41