16

Define a new type of symbol (context) called highlight, SetOptions[$FrontEndSession, AutoStyleOptions -> {"SymbolContextStyles" -> {"highlight`" -> Green}}] AppendTo[$ContextPath, "highlight`"]; and before those important variables (symbols) appear for the first time, tell Mathematica to add them to the highlight context (e.g. var1 and ...


11

You can wrap Animate and Manipulate with Style and set the DefaultOptions for Panel: Style[#, DefaultOptions -> {Panel -> {Background -> LightBlue}}] & @ Animate[ArrayPlot[CellularAutomaton[n, {{1}, 0}, {40, All}]], {n, 0, 255, 1}, AnimationRunning -> False] Style[#, DefaultOptions -> {Panel -> {Background -> LightBlue}}]...


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

Beside Mathematica built-in Palettes which are basically floating window, you can access with Palettes option in Menu Bar, there are also some built-in toolbar in Window > Toolbar which will be shown below menu bar just like the picture you mentioned. If you want to create your own floating Palette, follow this Tutorial on Wolfram. If you want to create ...


4

Using ResourceFunction["CombinePlots"], you can combine arbitrary plots into two-axes plots, without the need to create a new version for every type of plot: ResourceFunction["CombinePlots"][ ListLinePlot[ Accumulate[RandomReal[{0, 1}, {100}]], PlotStyle -> Blue, Frame -> True, FrameStyle -> Blue ], Plot[ x^2, {x, 10, ...


4

The Default.nb styles define them up to "Subsubsubsubsection" so you have two more levels to go. They are not included in the Format>Style menu but you can use shortcuts. Hit Tab/Backspace to navigate down/up in section level. (coursor needs to be a the beginning of the cell). If you need more you can define/edit a custom stylesheet and add ...


4

I figured out the answer myself. The problem can be solved by editing the stylesheet with a text editor. To be specific: Backup the original WolframAlphaNotebook.nb. Open the WolframAlphaNotebook.nb with any text editor you like, search for TraditionalForm, and you'll see the following segment: DefaultNewCellStyle->"NaturalLanguageInput", ...


4

To add to what Kuba said: you can avoid the infinite loop by creating a button that starts the evaluation: Button["Evaluate notebook", NotebookEvaluate[EvaluationNotebook[], InsertResults -> True], Method -> "Queued" ] Note the Method option. Without it, the FE will freeze up completely.


4

Expanding my comment into a concrete answer: Using GeneralUtilities`PrintDefinitions to look at the functions responsible for the "MathML" export1, it looks like the core function is System`Convert`MathMLDump`BoxesToSMML: (* remove limit on number of definitions *) DownValues@GeneralUtilities`PrintDefinitions = DownValues@GeneralUtilities`...


3

Assuming they are consecutive cells you can do: (*make sure this cell does not produce output because then NextCell is the output cell*) newwords = {...}; selectCell = NextCell[]; SelectionMove[selectCell, Before, CellContents]; NotebookFind[EvaluationNotebook[], "\"", Next, CellContents]; SelectionMove[EvaluationNotebook[], After, Character]; ...


3

The following seems to do what you want. (You might wanna remove the Print line at some point.) Clear[MyNIntegrate]; Options[MyNIntegrate] = Options[NIntegrate]; MyNIntegrate[int_, args___] := Block[{ranges, opts}, opts = Cases[{args}, _Rule]; ranges = Complement[{args}, opts]; If[FreeQ[opts, AccuracyGoal -> _], opts = Append[opts, ...


3

On a Mac you can change the icon for Mathematica the same way you change any icon. Select the application, and choose get info (command I). This opens up a window that has the icon in the upper left hand corner. Now go to a folder (or file) with the icon you want to use and choose get info. Copy the icon you want and paste onto the icon you want to change. ...


3

You may e.g. use $Line: f[x_, y_] := (If[x < y && tmp =!= $Line, Print["Warning: negative result."]]; tmp = $Line; x - y ) With this : {f[3, 7], f[4, 6], f[5, 7]}


3

Since Abs cannot be differentiated and you are dealing with real x, either change Abs[x] to Sqrt[x^2] Clear["Global`*"] f[x_] = Piecewise[{{x*Abs[x], x <= 0}, {x*Log[x], x > 0}}] /. Abs[real_] :> Sqrt[real^2]; f'[x] // FullSimplify Or, alternatively use RealAbs f2[x_] = Piecewise[{{x*RealAbs[x], x <= 0}, {x*Log[x], x > 0}}]; ...


2

Not giving any guarantees but try with: SetOptions[ EvaluationNotebook[] , InputAutoReplacements -> { "test" -> ToBoxes @ Dynamic[DateString[], DestroyAfterEvaluation -> True] } ]


2

Wolfram documentation for setting the default cell type for Mathematica, this also works with Wolfram Notebook Edition.


2

Rotate ArrayPlot instead of Animate: Animate[Rotate[#, 180 Degree] & @ ArrayPlot[CellularAutomaton[n, {{1}, 0}, {40, All}]], {{n, 89}, 0, 255, 1}, AnimationRunning -> False] or use the option DataReversed -> {True, True} in ArrayPlot: Animate[ArrayPlot[CellularAutomaton[n, {{1}, 0}, {40, All}], DataReversed -> {True, True}], {{n, 89}, ...


2

Thanks to Kuba for telling me about DevTools`. It is a very neat package. But I did not want to use Ctrl + ' and then Backspace. But the KernelExecute hint helped me find 16165 which showed how to add a command to a shortcut. The jist is, put your function/command in a .m file (no formatting, exactly how it appears in a notebook) then use this syntax in an ...


2

there is an environment variable which you can set to do this: MATHEMATICA_USERBASE more details can be found in the tutorial about wolfram system sessions: tutorial/GlobalAspectsOfWolframSystemSessions#122753064


1

I think you would prefer to use Lukas Lang's CombinePlots if you tried. In case you need to play with variations on TwoAxisPlot, you can add an optional argument for styles and options as follows: ClearAll[TwoAxisPlot2] TwoAxisPlot2[{f_, g_}, {x_, x1_, x2_}, styles : {_, _} : (ColorData[97] /@ {1, 2}), o : OptionsPattern[]] := Module[{fgraph, ggraph, ...


1

On Windows you can use an application like Resource Hacker to modify resources within Windows executables. After loading the .exe you can change the icon with Actions -> Replace Icon …. You'll probably want to create a copy before trying anything like that.


1

Style[#, DefaultOptions -> {Panel -> {Background -> LightBlue}}] &@ Manipulate[ArrayPlot[CellularAutomaton[n, {{1}, 0}, {40, All}] /. 0 -> LightBlue], {n, 0, 255, 1}, Method -> {"ContentAreaBackground" -> LightBlue}] Style[#, DefaultOptions -> {Panel -> {Background -> LightBlue}}] &@ Manipulate[Plot[Sin[n x],...


1

Some supplement to PureLine's answer. (works for Mathematica 12.0 on Ubuntu 20.04 LTS) To make it work permanently, I mainly follow the official tutorial https://support.wolfram.com/29974?src=mathematica. 1.open a new notebook, click "Format->Edit Stylesheet" and edit the private stylesheet as mentioned by PureLine 2.click "File->Save ...


1

I am interested in learning "vim-like" hotkeys for better mathematica programming. I haven't learned VIM extensively yet, but here is a good direction to go in: You can start by using this Auto-Hotkey script which allows the user to incorporate vim-like hotkeys to any application. Also there might be some issues with using auto-hotkey. The script is ...


1

ClearAll[TwoAxisDateListPlotV12] Needs["Calendar`"]; TwoAxisDateListPlotV12[dat1__, dat2__, opts : OptionsPattern[]] := Block[{data1 = dat1, data2 = dat2, plot1, plot2, userOptions, defaultOptions, minx, maxx, temp}, (*display two datelist-graphs on one diagram*) (*span x*) If[DateQ[First@data1["Dates"]] (*find ...


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