mathematica-frontend

Is it possible to invoke Mathematica's diff functionality from the command line?

狂风中的少年 提交于 2019-12-04 23:32:16
问题 TortoiseSVN (as well as other Tortoise clients) include a script to diff notebook files in Mathematica. Diff functionality for Mathematica is implemented in the AuthorTools package (perhaps there is something better?) The script currently works by creating a small notebook file in the temp directory, and opening it in the front end. The notebook has a big button that will do the diff and has the file names to be diffed hard coded. A disadvantage is that the notebook with the diff code will be

Is it possible to invoke Mathematica's diff functionality from the command line?

烂漫一生 提交于 2019-12-03 14:53:59
TortoiseSVN (as well as other Tortoise clients ) include a script to diff notebook files in Mathematica. Diff functionality for Mathematica is implemented in the AuthorTools package (perhaps there is something better?) The script currently works by creating a small notebook file in the temp directory, and opening it in the front end. The notebook has a big button that will do the diff and has the file names to be diffed hard coded. A disadvantage is that the notebook with the diff code will be left in the temp directory, and won't be cleaned up. It also seems unnecessary to have an auxiliary

Remap Caps lock key to Esc in Mma 7

微笑、不失礼 提交于 2019-12-03 05:56:05
TLDR : How do I get CapsLock to translate to "ShortNameDelimiter" in Mma 7? I like pretty text in my mma notebooks, and often define functions as f[\[Alpha]_] =... so as to match the exact equation that I'm working with. As such, it involves a lot of Esc - letter - Esc sequences, and reaching for Esc every other stroke breaks my flow of typing. Now, the CapsLock key is seldom used (I can't remember the last time I needed it), but conveniently placed (your pinky is right there!). Remapping it to Esc on vim worked wonders for me and I was wondering if there was a way to do the same in mma ,

Self-restarting MathKernel - is it possible in Mathematica?

纵然是瞬间 提交于 2019-12-03 05:16:05
问题 This question comes from the recent question "Correct way to cap Mathematica memory use?" I wonder, is it possible to programmatically restart MathKernel keeping the current FrontEnd process connected to new MathKernel process and evaluating some code in new MathKernel session? I mean a "transparent" restart which allows a user to continue working with the FrontEnd while having new fresh MathKernel process with some code from the previous kernel evaluated/evaluating in it? The motivation for

Controlling the Rasterize[] width for notebook-related expressions

喜夏-厌秋 提交于 2019-12-01 07:41:32
Update Mr Wizard's answer gives pixel-perfect results, but it is Windows-only and destroys the clipboard contents. My answer should work on any platform, but it's less precise: e.g. it omits In/Out labels. It does allow setting the rasterization width though. This problem came up when I was trying to make a preview window for an image uploader (see the end of that answer). I would like to create a palette button that will upload the current notebook selection as an image. Before uploading, I would like to show a preview of the image, to reduce the chance of something going awry before

Controlling the Rasterize[] width for notebook-related expressions

a 夏天 提交于 2019-12-01 04:20:09
问题 Update Mr Wizard's answer gives pixel-perfect results, but it is Windows-only and destroys the clipboard contents. My answer should work on any platform, but it's less precise: e.g. it omits In/Out labels. It does allow setting the rasterization width though. This problem came up when I was trying to make a preview window for an image uploader (see the end of that answer). I would like to create a palette button that will upload the current notebook selection as an image. Before uploading, I

How to Autonumber Cell Tags in Mathematica Notebooks?

大城市里の小女人 提交于 2019-11-30 22:02:34
I tried to follow the directions on autonumbering cells in a Mathematica-8 notebook, here http://reference.wolfram.com/mathematica/tutorial/AutomaticNumbering.html I created a tiny notebook with four text cells foo qux blancmange bar Placing the cursor just before foo , I then used the Insert menu, Automatic numbering item, giving me the Create Automatic Numbering Object dialog box. I chose in the Counter dropdown then item Text , clicked This counter object radio button, and Huzzah! got the number 1 just before foo , presumably referring to the first cell of type Text in the notebook. I now

Convenient way to add inline formatting to usage Messages

与世无争的帅哥 提交于 2019-11-30 20:40:29
Usage Messages of built-in functions have embedded in-line formatting. For example: In[1]:= ActionMenu::usage // FullForm Out[1]//FullForm= "\!\(\*RowBox[{\"ActionMenu\", \"[\", RowBox[{StyleBox[\"name\", \"TI\ \"], \",\", RowBox[{\"{\", \ RowBox[{RowBox[{SubscriptBox[StyleBox[\"lbl\", \"TI\"], \ StyleBox[\"1\", \"TR\"]], \":>\", SubscriptBox[StyleBox[\"act\", \"TI\ \"], StyleBox[\"1\", \"TR\"]]}], \",\", \ RowBox[{SubscriptBox[StyleBox[\"lbl\", \"TI\"], StyleBox[\"2\", \ \"TR\"]], \":>\", SubscriptBox[StyleBox[\"act\", \"TI\"], \ StyleBox[\"2\", \"TR\"]]}], \",\", StyleBox[\"\[Ellipsis]\", \

Context unique to each group at a specified level

血红的双手。 提交于 2019-11-30 15:25:34
问题 Recent versions of Mathematica provide the option of having a unique $Context for each cell group, via: Evaluation > Notebook's Default Context > Unique to Each Cell Group This is an appealing concept, but I find it unusable, as my code spans multiple cell groups. I would like a way to specify a unique context for cell groups of a certain level such as every Section , but not a separate context for every Subsection or Subsubsection . A solution will need to affect new cell groups as they are

Paste Mathematica code so that's it's broken into separate input cells

扶醉桌前 提交于 2019-11-30 15:25:09
问题 I often copy Mathematica code from websites (such as SO) to a notebook. The code usually gets pasted as a single input cell. I'm looking for a simple way to paste it as several input cells for convenient step-by-step evaluation. For example, a = 2; f[x_] := x^a Plot[f[x], {x,0,2}] would ideally paste as two input cells. Manual formatting (i.e. the original newlines) should preferably also be preserved (this is not the case with default pasting). Generally, if one selects all input cells (ALT