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.

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

share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

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

Edit

CreateDocument@
 Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], 
   Cell[StyleData["MyInputStyle", 
     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

share|improve this answer
    
Yes. That is what I am looking for. Something along the lines of the text inside the shell. –  night owl Jun 23 '12 at 23:01
    
ok. Try the code I posted in the edit and let me know if that is what you want. –  Mike Honeychurch Jun 23 '12 at 23:52
    
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? –  night owl Jun 24 '12 at 0:19
    
@nightowl If you open a stylesheet you will see an "Install Stylesheet" button with an input field to give the stylesheet a name. –  Mike Honeychurch Jun 24 '12 at 9:11
    
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 –  night owl Jun 24 '12 at 9:47
show 1 more comment

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.