9

I was inspired by this post so I've made a Solarized stylesheet after mucking around with the text options and asking stupid questions on here. I know you can change the syntax highlighting by running option-setting commands [1][2][3], but I'd rather have a stylesheet that takes care of all that stuff.

Here is the link to a notebook with the solarized stylesheet. After you open the notebook, you can access the stylesheet by going to Format > Edit Stylesheet and follow my instructions on there on how to modify the stylesheet to fit your needs, while observing the changes in the notebook as you change the stylesheet. One way to learn how to edit stylesheet is to look inside a style cell (select the cell and press Ctrl+Shift+E) and modify the parameters in there--such as color paramters in RGBColor[x,y,z]--and see what your notebook looks like after you exit the cell view (Ctrl+Shift+E again).

You can switch between light and dark theme by going to File > Screen Environments and choose between Working (light) and Dark (dark) themes. When you're happy with the way it looks just install/add the stylesheet by clicking on the "Install Stylesheet..." button and choose the Source as the "NotebookObject", then choose a name and if you'd like to install it for just you or for all users of your computer. After that, you can apply the stylesheet to any notebook you'd like by going to Format > Stylesheet, and choose the name of the stylesheet you saved it as.

I know the steps are pretty obvious but as a newbie to MMA I really appreciated the people who gives out step-by-step instructions, and I'd like to do the same here. Please let me know if you have any trouble testing and installing the stylesheet and I could help you if I'm able to. I do appreciate any feedback you guys might have. Do you find the color scheme too much? What do you think could be improved upon it?

Enough talk: some examples of the theme, and there's also more examples in the notebook in the link.

Reference (you can download the journal notebook reformatted in solarized theme here). Kobai Light

Reference Miydera Dark

Miyadera Dark 2

seismatica
  • 5,101
  • 1
  • 22
  • 33
  • 2
    Thanks for posting this! However, to keep with the QA format of the site, this should probably be an answer to the post you're linking to (since it's not a question). – Szabolcs Jun 05 '14 at 18:10
  • Should I edit my question and make it more clear that I'm asking for feedback about it? Thanks for reminding me of this. – seismatica Jun 05 '14 at 18:19
  • I did edit my post to make it more like a question. I was just too excited to share my work with you guys on here. You guys have helped me so much so I'd like to give back something to the community. – seismatica Jun 05 '14 at 18:28
  • oh sorry I finally got what you really meant by your comment. Should I post an answer to that post and link it to my post here? Not quite sure what to do. I'm just on a high from finishing the stylesheet lol. – seismatica Jun 05 '14 at 18:39
  • If your aim is to share the stylesheet and maybe get some non-specific (possibly subjective) feedback, it would be best to move all content to an answer here. Many people would appreciate it there :-) SE sites are unfortunately not really suitable for sharing work like this, though there's clearly a need from the community, which prompts threads like this. However SE is designed strictly for QA and the strict rules are ... – Szabolcs Jun 05 '14 at 19:07
  • ... an important part of what makes it works. Alternatively you can try to re-cast this as a code-review type question (post code as plain text) and ask about how it could be improved (in an objective, technical way). Questions should really be phrased so that they're specific and could theoretically be answered by more than one person (or get more than one answer). Self-answered questions will also often get additional answers. – Szabolcs Jun 05 '14 at 19:09
  • So could I just copy paste my post on to that thread? I'm not sure what to do. – seismatica Jun 05 '14 at 19:10
  • Yes, that would be great. Please don't get discouraged by this. The site was created for a specific purpose. Then a community has gathered around it and the community started to have needs that the site couldn't fulfil, in particular collaboration. There's no good solution for this yet though (other than discussion in the chatroom and some meta threads). – Szabolcs Jun 05 '14 at 19:13
  • I have posted an answer on over there. Thank you for the encouragement; I will be more careful next time. – seismatica Jun 05 '14 at 19:20
  • Since you have an answer there which is almost exactly the same, you can perhaps delete this post... that way, you'll only have one place to maintain and people need to leave feedback only once (and it won't get split). – rm -rf Jun 05 '14 at 21:29
  • I tried to but can't :( Something about answered questions that only mods can delete. – seismatica Jun 06 '14 at 04:48
  • The Dark environment part of your style sheet needs some update for M10 I think. In some cases, the background and foreground use dark colors that don't differentiate. – user13253 Oct 23 '14 at 20:14
  • it is now 5-6 years I am using your solarized style package. Really gratefull for it! I think my Mathematica will "die" on this peferct them I wanted just to ask, do you have, or are you aware if it does exist you exact same theme, this time for python Jupyter lab? Cheers – Nicola Feb 21 '19 at 11:29
  • @Nicola aww thanks! I don't know about Jupyter lab but for Jupyter notebook you can install jupyter-themes and configure it to use the solarized theme. – seismatica Mar 14 '19 at 05:33
  • @Nicola the download link isn't working anymore; do you happen to still have the files and could you upload it? – chris97ong Dec 13 '19 at 05:50

1 Answers1

3

Aside from the solarized theme, I have reassigned the hotkeys to the way I thought would maximize efficiency. You have Alt-1 as the title, then to go to Subtitle, just put your cursor at the start of the cell and press Tab, and press Tab again to go to Subsubtitle. Similarly, Alt-2 inserts a Section, which I have added automatic numbering in front. Press Tab when the cursor is positioned in front of the cell will bring it down to Subsection, and then Tab again to Subsubsection.

Alt-3 represents the lower-level headings without numbering, with Alt-3 as Subsubsubsection, and if followed by a tab will bring you down once more to Subsubsubsubsection (a lot of Subs right there). Alt-4 represents normal text, with SmallText followed after a Tab. Alt-5 is one level lower than text, with bulleted item first, then Tab numbered item, and Tab paragraph item. Alt-6 and Alt-7 follow the same pattern for even lower levels of text.

Alt-8 inserts an input (or convert a cell into an input). Now in this case I have set up a hotkey system in which if you put your cursor in front of an input cell and press Tab, your input cell is instantly converted into a numbered formula like the ones you see in math textbooks, which you could then display in TraditionalForm (Ctrl+Shift+T). This is an incredibly easy way to convert between codes and formulas. From numbered formula, you can Tab your way down further to DisplayFormula and InlineFormula, though I'm not sure what InlineFormula even does as you can just press Ctrl+9 to insert an inline formula that looks nothing like the the InlineFormula style.

Alternatively, if you put your cursor at the start of the input cell, and--instead of pressing Tab to convert it to a numbered formula--press Shift-Tab instead, you just converted it into a block of initializing code (the "Code" style). Another Shift-Tab brings you to the Program style, which is another style I find useless because it doesn't even display any syntax highlighting.

Another neat thing is that you can Tab all the way from Title to the lowest level of text, and from an Input cell to other code and formula styles. What's more, you can easily go back up a level by pressing the Backspace. This means that if you made a mistake in assigning a style, just Tab or Backspace your way to the correct style. A minor hiccup to this is going from some code or formula style back to the input style because the cursor would jump to the back of the cell and you have to go to the front of the cell to go back up. Therefore, I will ask you to press Shift-Backspace instead of just Backspace so that if you accidentally deleted something by pressing backspace, you can undo it since you haven't jumped up to another level. This sounds convoluted but just try it and you'll see what I mean; you may like it (or hate it).

Please refer to the comments in the stylesheet to help you modify and test it. I plan to fine-tune it and share it with more people so I'd really appreciate any of your feedback to help me make it better. Thank you.

Solarized levels

seismatica
  • 5,101
  • 1
  • 22
  • 33