Is it possible to make Mathematica notebooks as stylish as this below with custom backgrounds and predictive text coloring? As shown in the snippet below? And possibly have the option to save the preferred setting and choose it on each start up, or possibly have it automatically loaded when the notebook is launched.

enter image description here


1 Answer 1


Re: appearance, you can do this with a style sheet. Below are some cells with my styles for a) running the terminal in Mma and b) sending stuff to a word document.

enter image description here

If that is what you are looking for I'll post a more detailed example.

Re: "predictive text coloring"

I presume you mean syntax styling of Mathematica code? If so this can be configured from the preferences menu, the options inspector, or a stylesheet.

If you can confirm that is what you require I'll post something more detailed. In the meantime these links may be useful:

Quickly editing the stylesheet and saving it

How to replace the style of the inline cell in a StyleSheet


 Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], 
     StyleDefinitions -> StyleData["Input"]],
    AutoStyleOptions -> {
      "CommentStyle" -> {FontColor -> RGBColor[0.501961, 0, 0.25098], 
        FontSize -> 11, FontFamily -> "Comic Sans MS", 
        ShowAutoStyles -> False, ShowSyntaxStyles -> False, 
        AutoNumberFormatting -> False},
      "FunctionLocalVariableStyle" -> {FontColor -> 
         RGBColor[1, 0.5, 0]}, 
      "LocalVariableStyle" -> {FontColor -> RGBColor[0., 0.502, 0.], 
        ShowAutoStyles -> False, ShowSyntaxStyles -> False, 
        AutoNumberFormatting -> False}, 
      "PatternVariableStyle" -> {FontColor -> 
         RGBColor[0.502, 0, 0.251], FontSlant -> "Italic", 
        ShowAutoStyles -> False, ShowSyntaxStyles -> False, 
        AutoNumberFormatting -> False}, 
      "StringStyle" -> {FontColor -> RGBColor[0.7, 0.35, 0.], 
        FontSize -> 11, FontFamily -> "Century Gothic", 
        ShowAutoStyles -> False, ShowSyntaxStyles -> False, 
        AutoNumberFormatting -> False}},
    Background -> GrayLevel[0],
    FontColor -> RGBColor[1, 1, 0],
    MenuSortingValue -> 1500
    ]}, StyleDefinitions -> "PrivateStylesheetFormatting.nb"]

Save this document as a stylesheet and then to use it change you input cells to myInputStyle:

enter image description here

You may also want to set your own colours of course. I just pasted one of my color schemes and set the font to yellow and the background to black. It looks pretty bad but the framework is there for you to modify it.

enter image description here

  • $\begingroup$ Yes. That is what I am looking for. Something along the lines of the text inside the shell. $\endgroup$
    – night owl
    Commented Jun 23, 2012 at 23:01
  • $\begingroup$ ok. Try the code I posted in the edit and let me know if that is what you want. $\endgroup$ Commented Jun 23, 2012 at 23:52
  • $\begingroup$ Thanks a ton! I sure am learning to do neat nifty things like this with Mathematica instead of only using it to compute things. It is so much more powerful than that. I am going to read up on programming in Mathematica pretty soon :). One thing, I did not see how to save it as a stylesheet? Can I Export it as one, & what's the extension for stylesheets if there is one? $\endgroup$
    – night owl
    Commented Jun 24, 2012 at 0:19
  • $\begingroup$ @nightowl If you open a stylesheet you will see an "Install Stylesheet" button with an input field to give the stylesheet a name. $\endgroup$ Commented Jun 24, 2012 at 9:11
  • $\begingroup$ I ran the code and it prompted me to "install stylesheet" but i do not see where I can choose it under Format > Style > MyInputStyle $\endgroup$
    – night owl
    Commented Jun 24, 2012 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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