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.

When the Wolfram Demonstrations were introduced and the Documentation-Center was redesigned, I remember it was the first time I thought someone had put some effort into creating a beautiful stylesheet. I don't like most of the other styles and in fact, I think PrimaryColor is so ugly that I cannot believe it is included in the standard templates.

On the other hand, I have seen some quite nice things when I spoke on a Mathematica-day and we used a common stylesheet for the slides. That's why I wonder whether there are other styles out there which are worth sharing.

Question: Does someone know resources where people shared their stylesheets? I'm especially interested in things one can use for talks.

share|improve this question
+1 I am interested in seeing answers for this one. In particular, I would like to know about alternative stylesheets for mathematical documents (i.e., documents containing lots of inline and display formulas). –  becko May 21 '12 at 2:26
I use a custom one with colors from the solarized palette (with the addition of black). This is how the recent answer I wrote looks like in my notebook. I'm actually happy that there aren't many stylesheets floating around, because it'll end up like a wordpress theme gallery. On the other hand, there isn't a single good one either... –  rm -rf May 21 '12 at 4:03
The style of @R.M looks nice and goes in the direction I like too: I hate stuff which is over-designed, over-colored, etc. Sections, text and code-cells have to work together which from my experience always means you have a very small set of colors coming from one palette. The colors in the palette need to express the same thing like coldness, warmth, autumn, ... Another important thing for me is, that text properties like bold, italic, underline or boxes are used as sparse as possible. –  halirutan May 21 '12 at 16:35
Since there weren't any good repositories around, I created a stackmma github account and a stylesheet repository that users of this site can contribute to. A lot of folks here use github for hosting their code so I went with that instead of bitbucket. Although a .nb file doesn't lend itself to being versioned easily, it could still serve as a host. Since you have familiarity with github for collaboration, do you have to approve every commit to the repo or can you "approve" collaborators who have the same rights as you do? –  rm -rf May 23 '12 at 2:51
Perhaps this should be CW. I think that seeing this question with an accepted answer discourages any further contribution. Although by now it is established that currently there are no repositories out there, eventually there could be, and we should encourage their addition here. –  becko Sep 1 '12 at 18:45
show 14 more comments

3 Answers

up vote 38 down vote accepted

Seeing as there are no good repositories for Mathematica stylesheets and packages, I created a github account for the community. The account resides at github/stackmma. I know there's library.wolfram.com, but we should be independent of WRI.

On the topic of this question, I created a public stylesheets repository and I've added halirutan and jmlopez as collaborators. If anyone wants to be added to this, please let me know (via chat/comment) and I'll gladly add you.

Long term goals of this project

I think the stackmma account can eventually be a place for us to

  • host community developed projects (if and when we do)
  • host notebooks and snippets for blogposts
  • host data files/notebooks, etc. for questions (only in the rare and non-localized cases when a minimum-working-example is not illustrative enough).

    I've created an Attachments repository to re-upload files hosted on dropbox or other filesharing services to github. As a start, I've edited this question and uploaded the attachment to this repository. You can find it here. I'll be searching and editing questions over the next few days to find such links and upload them here (if the OP hasn't removed it already).

among others. For now, I'll be handling the main account myself, as I don't see an easy way to add an account-wide admin (I'm still finding my way around it). But I can create repositories and add collaborators, just as I did for the above repository. So please let me know if new repos need to be created or you want to be added to anything.

We'll figure out a saner plan as we move forward. I'll periodically update this post with more info.

share|improve this answer
Very nice... :) –  jmlopez Jul 1 '12 at 18:29
Bookmarked. Thanks for the initiative! –  István Zachar Jul 1 '12 at 20:00
Very nice! Thanks! –  Sosi Apr 17 '13 at 11:52
@rm-rf It's a wonderful work! I found the style of DisplayFormula etc can't be altered in the stylesheet, I added some codes to specify the FontFamily or FontSize etc, it's not work for DisplayFormula but work for InlineFormula; Title;section etc. One only I can set to DisplayFormula is to assign a commandkey. How can I change the font in Displayformula? Thanks. –  Zoe Rowa Feb 8 at 3:12
Following above: My codes added in stylesheet: Cell[StyleData["DisplayFormula"], TextAlignment->Center, MenuCommandKey->"@", FontFamily->"MathJax_Main", FontSize->17, FontWeight->"Plain", FontSlant->"Plain", FontVariations->{"StrikeThrough"->False, "Underline"->False}] –  Zoe Rowa Feb 8 at 3:16
show 1 more comment

FWIW here are some styles I use when collaborating -- i.e. I am doing the programming but others are commenting on outcomes and providing feedback:

enter image description here

The basic cell style is:

Cell[StyleData["Mike", StyleDefinitions -> StyleData["Text"]],
 CellFrame->{{4, 0}, {0, 0}},
 CellMargins->{{66, 10}, {7, 7}},
     StyleBox["Mike", 12, FontFamily -> Arial, Bold], ImageSize -> 60, 
     Alignment -> {Center, Center}], Inherited}, {Inherited, Inherited}},
 FontColor->RGBColor[0.266667, 0.172549, 0.0823529],
 Background->RGBColor[0.94, 0.91, 0.88]]

This might be useful to some people -- you might want to add date and time stamps to discussions. Example usage

enter image description here

Edit - adding a date and time stamp

In reply to @rm -f question, adding a date and time was far more complicated than I expected. Firstly I don't think a cell label is the place for this because labels can easily be removed by clicking on them and pressing delete. Also these comment styles are based on text cells rather than input. So placing a date stamp as a cell frame labels seemed a better way to go.

For a few years I have been using a palette button for pasting a date and time into a notebook. I cannot remember the source of the code to give attribution -- it may have been Mathgroup or it may have been from someone at Wolfram. The problem was how to use that code in a stylesheet. Functions in stylesheets are associated with ButtonFunction, Counterfunction, InterpetationFunction etc. In other words they occur where a function is expected. So I decided to modify the code and use it in a button

The code below works by adding a button to the cell frame. This button contains a modified version of the palette button I have been using. The trick was to get it to work in a cell frame. After much trial and error it seemed that the best way to do this was to have a button that replaced itself with the date and time stamp. Note I have used Append in the code. SetOption and CurrentValue did not work for reasons I do not understand.

 Cell[StyleData["Mike", StyleDefinitions -> StyleData["Text"]],
 CellFrame->{{4, 0}, {0, 0}},
 CellMargins->{{66, 10}, {7, 7}},
     StyleBox["Mike", 12, FontFamily -> "Arial", Bold], ImageSize -> 60, Alignment -> {Center, Center}], Inherited}, {
        RowBox[{"date", " ", "stamp"}], FontFamily -> "Helvetica", FontColor -> GrayLevel[0]], Active -> True, Appearance -> {Automatic, "DialogBox"}, 
       ButtonFunction :> Module[{dy, hr, mn, tmp}, {dy, hr, mn} = Map[(LinkWrite[
                  FrontEnd`Value[#]]; LinkRead[
                  First[$FrontEnd]])& , {"DateLong", "Hour", "Minute"}]; SelectionMove[
           InputNotebook[], All, ButtonCell];
           Append[tmp, CellFrameLabels->{{PaneBox[
     StyleBox["Mike", 12, FontFamily -> "Arial", Bold], ImageSize -> 60, Alignment -> {Center, Center}],Inherited},{Cell[
          TextData[{ dy, " at ", hr, ":", mn}], 
          "Text", Background->None,FontFamily -> "Arial",FontSize->9],Inherited}}]]
           ], Evaluator -> Automatic]]], Inherited}},
 FontColor->RGBColor[0.266667, 0.172549, 0.0823529],
 Background->RGBColor[0.94, 0.91, 0.88]]

Here is a grab of a cell using "Mike" style.

enter image description here

Now a grab after pressing the "date stamp" button

enter image description here

share|improve this answer
Would it be possible to automatically add a time stamp to the CellLabel? –  rm -rf Nov 19 '12 at 2:08
@rm-rf let me think about that. –  Mike Honeychurch Nov 19 '12 at 3:53
@rm-rf see edit re: adding date and time. –  Mike Honeychurch Nov 19 '12 at 8:12
@MikeHoneychurch, when I copy/paste (and interpret) the "Mike" example with the "date stamp" it renders correctly but pressing "date stamp" does nothing - it does not get replaced by the date in my MMA9/OSX. –  alancalvitti Oct 9 '13 at 21:41
add comment

Check out the Mathematica Journal style-sheet. Just download an article and if you like what you see, you can just copy the style from the Style Description window that is brought up by choosing the "Format -> Edit Stylesheet" menu item.

share|improve this answer
I think this is a good idea, but I suggest that the style be installed on the user's system before working with it. This can be done by clicking on the Install Stylesheet ... button in Style Definitions window. –  m_goldberg Nov 9 '12 at 1:13
I would point out that the Mathematica Journal used several different style sheets over the course of its publication. I think it would be best to pick one the later issues as a source of styles for current versions of Mathematica. –  m_goldberg Nov 9 '12 at 1:16
In fact, the style sheet for TMJ has changed the last couple of times a new Mathematica version was released. –  murray Nov 9 '12 at 2:41
add comment

Your Answer


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.