# Tag Info

37

I created own dark theme for Mathematica. It looks like All stylesheets needed for that you can found here [repo]=https://github.com/dmarienko/Matlab/tree/master/.Mathematica You need to copy .nb files from repo [repo]/SystemFiles/FrontEnd/StyleSheets/ to your local Mathematica StyleSheets folder. After that you can choose stylesheet named as Dimad.nb (You ...

31

Built-in Format -> Stylesheet -> ReverseColor: I don't know how about you but I missed the fact it is built-in since V 10. Custom one I didn't like to coloring in ReverseColor much so I patched it a little and added to my https://github.com/kubaPod/DevTools I was focusing on making it neat for .m files rather than .nb so it may look weird in place ...

29

I've come up with a stylesheet to do this, given below. Some of the issues that I needed to address were: Prevent cell labels from showing up. Indent both input and output cells so that they are code. Automatically comment the output. Produce output that works correctly with Copy. That is, no need to use Copy As | Plain Text. Allow one to copy multiple Code/...

28

If you are skilled in particular code or packages then the switching costs (in time, possibly also money) to adopt a new software/package are usually prohibitive. In the context of typesetting, if you already are well versed in a typesetting software, e.g. LaTeX then I don't see any reason to attempt publication quality documents with Mathematica. So the ...

23

Mathematica still works with Courier by default. Nothing is broken about your copy of Mathematica. It is the case, however, that if you use any sans serif font (or at least any font that properly advertises itself as sans serif...many amateur font designers don't bother setting font metadata bits correctly), you'll see the new MathematicaSans font in use ...

20

2021 Edit Upon request, a(n old) version of solarised file can be found here: https://ufile.io/bffds84j Edit: my Dropbox account expired, deleting the stylesheet file (linked below) along with it. Since I'm no longer using Mathematica on a regular basis, it might take a while for me to recreate it. Perhaps someone could help to create a Solarized stylesheet ...

19

No need to modify a stylesheet, it is sufficient to evaluate SetOptions[$FrontEnd, StyleHints -> {"CodeFont" -> "Courier"}] or equivalently CurrentValue[$FrontEnd, {StyleHints, "CodeFont"}] = "Courier"; for permanently setting the default font to "Courier New" system-wide in Mathematica 11. Note that the undocumented StyleHints option is new in ...

16

Typesetting in Text cells Cell[TextData[Cell[BoxData[ FormBox[ RowBox[{ FractionBox["1", "N"], RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "N"], FractionBox[ RowBox[{ SubsuperscriptBox[ OverscriptBox["x","~"], "j", "i"], "(", RowBox[{"k", "|", "k"}], ")"}], SqrtBox[ ...

14

Wolfram Repository Function (WFR) entries: DraculaTheme DarkMode (DarkMode is hard to find using WFR's search interface...)

14

I believe what you are asking for is solved by use of the All style. Adding this to the private style sheet: Cell[StyleData[All], FontFamily->"Trajan Pro" ] Results in: (Trajan Pro is a distinctive small caps font I had available.) As you can see the Input and Code styles are not affected, but those are affected by the "StandardForm" style, as you ...

13

One has to be extremely careful with Cell options that are not released in System context. It seems that your problem is caused by additional CellContext given to KeyEvent Modifiers and Shift. I've faced it with earlier: NotebookWrite a Cell with WholeCellGroupOpener option With FrontEndKeyEvent["Tab", FrontEndModifiers -> {FrontEndShift}] -> "... 13 You can control the fonts that are used through a stylesheet. First, note the style definition used by the DefaultBaseStyle GraphicsBox option: Options[GraphicsBox, DefaultBaseStyle] {DefaultBaseStyle -> "Graphics"} This means that the following options are used unless overridden: CurrentValue[{StyleDefinitions, "Graphics"}] {CellMargins -> {{4, ... 12 Here are step-by-step instructions for making such a stylesheet. Make a notebook containing placeholder cells for each cell style that will be defined or modfied in new stylesheet. The exact contents the cells is unimportant. Here is the one I made. This notebook, which I named CustomStyles.nb, has a title and two section heading cells but these are more ... 12 Preview Notebooks / Extra Paclet Features I decided it was worth it to add some extra features to this thing as it's a good example of what paclets can do for you. First off, I added a little CreateStylesheetPreview function that'll take stylesheets and rasterize them to make a preview. e.g.: CreateStylesheetPreview[ {"Default.nb", "ReverseColor.nb" -&... 11 Following the lead from J.M., and then some comments therein from User18 and QuantumDot, the following is working: In the common StyleSheet, under Notebook options, I added the option: StyleHints->{"CodeFont" -> "Courier"} So, for example, the options now read: Cell[StyleData["Notebook"], Saveable->False, ShowAutoSpellCheck->False, ... 10 You can increase the CellMargins for the styles "Input" and "Output" in your style sheet to accommodate the increased size of the cell labels. For example, the following setting: CellMargins -> {{80, 10}, {10, 5}} fixes the issue for me with a Magnification of 2. If you don't want to mess around with editing the style sheet, you could evaluate the ... 10 They work, but you need to a) write stylesheet notebook expression or b) edit in desktop > upload and then set StyleDefinitions programmatically. Additionally SetOptions[EvaluationNotebook[], StyleDefinitions -> ...] may not refresh styles automatically but if you reopen the notebook it should be ok. Try it on a saved cloud notebook and reopen it: ... 9 Quick fix for a specific file: Ok, let's open new package File -> New -> Package. It was second on my list of Notebooks[]. So: package = Notebooks[][[2]] This is a notebook as any other, it just has different stylesheet ("Package.nb") and we can modify it as any other: SetOptions[ package, { StyleDefinitions -> Notebook[{ Cell[StyleData[... 9 The purpose can be achieved with CellFrameLabels. Cell-expressions and Boxes can be used directly here, so styling can be done with StyleBox, alignment can be done with PanelBox etc. The counter mechanics is exact as Simon demonstrated in the linked Q/A in OP. Here is an example: cellFrameLabelFunc uses PanelBox with Alignment to align label lbl from left (... 9 Cell[TextData["string"]] is completely equivalent to Cell["string"]. There's no reason to expect the two to behave differently. TextData is a required wrapper when the contents are more complex than a string, but when it's a string, it changes nothing. And TextData cells have only a single way of determining the format type...from the FormatType option. ... 9 Here's a solution. The inspiration for much of the code came from Eric Schulz's lecture on "Wisdom Gained from Publishing a CDF ebook" as well as as some code from this post. Below are the components for creating automatic cell tags for FigureCaption cells, but the idea can be extended to more than one type. The following are the components ... 9 One can get these information using CurrentValue[{StyleDefinitions, "TimeObject", "TemplateBoxOptionsDisplayFunction"}] and CurrentValue[{StyleDefinitions, "DateObject", "TemplateBoxOptionsDisplayFunction"}] The icons are FrontEndResource["FEExpressions", "TimeObjectIcon"] // ToExpression and FrontEndResource["FEExpressions", "DateObjectIcon"] // ... 9 Wolfram has an article discussing precisely this: http://support.wolfram.com/kb/29974 9 SetOptions[Dataset, HeaderBackground -> Black, HeaderStyle -> White, ItemStyle -> Red]; ds = Dataset[{<|"a" -> 1, "b" -> 3|>, <|"a" -> 2, "b" -> 4|>}] ds[1] A cumbersome way to inject the options is to wrap dataset objects with Dataset[#, Options[Dataset]]&: {Dataset[#,Options[... 8 You can use MaTeX to get\LaTeX$formatting directly: MaTeX["\\frac{1}{N}{\\sum _{i=1}^N \\frac{\\tilde{x}_j^i(k|k)}{\\sqrt{P_{\\text{jj}} (k|k)}}}"] MaTeX can also be applied directly to Mathematica expressions, but then you'll get the non-ideal translation to$\LaTeX\$ code you mention yourself because MaTeX uses Mathematica's builtin TeXForm for this.

8

I think what you need is to set WholeCellGroupOpener->True for the parts of your notebook that you want to open and close by clicking. This is the option that controls that behaviour in the docs. For what you are wanting you probably should make this an option in a custom stylesheet for sections and subsections etc. You can also make buttons and use ...

8

I think when it's done each time you save the notebook it should be nice enough :) SetOptions[ EvaluationNotebook[], NotebookEventActions -> { {"MenuCommand", "Save"} :> (Scan[ Module[{nr}, SelectionMove[#, All, CellGroup, AutoScroll -> False]; nr = Length @ Select[ SelectedCells[], Experimental...

8

Download the article as notebook and open it Go to menu item Format > Edit Stylesheet In the style sheet choose File > Save as and save the stylesheet Open a new notebook and Go to menu item Format > Edit Stylesheet again Push the Install Stylesheet... button The name you enter here will be the name listed in the stylesheet list: The stylesheet ...

8

Simple Answer So I mentioned in a comment that your method will work. The only issue is that there is a style specification with higher precedence that gets applied after your styles. If you look at "Package.nb" they use "InitializationCell" to specify the CellFrameColor and whatnot. If you override that style instead you're golden. Since 11.0 (I believe) ...

8

Printing uses the "Printout" screen environment. So, you can control this behavior automatically with a stylesheet. Something like: SetOptions[ EvaluationNotebook[], StyleDefinitions -> Notebook[ { Cell[StyleData[StyleDefinitions->"Default.nb"]], Cell @ CellGroupData[ { Cell[StyleData["Notebook"],...

Only top voted, non community-wiki answers of a minimum length are eligible