Hot answers tagged

23 votes
Accepted

Shell Emulation inside Mathematica

First of all, I agree, as OP mentioned in his comment, ANTLR is one of the proper ways to go. Now for this specific task, it might be easier to just compose a parser in the "dirty" way, except we don'...
Silvia's user avatar
  • 27.1k
22 votes

What are "\<" and "\>" delimiters in box expressions?

This syntax was deprecated in the version 6.0 era. According to the legacy documentation, For example, in version 5.2, the following strings are interpreted differently ...
ilian's user avatar
  • 25.4k
21 votes
Accepted

What is FrontEnd`AttachCell?

##Intro One day I was playing with Developer` package and found DateSetter which uses some kind of floating elements that I ...
Kuba's user avatar
  • 135k
19 votes
Accepted

How do I get the timing of an evaluation after it has already finished?

The case when the evaluation is finished Some of my calculations take hours or even days, so I don't want to restart the entire evaluation just to add Timing[] to ...
Alexey Popkov's user avatar
17 votes
Accepted

How to change the font color of a variable in whole input cell

You can use this to create a functionality which will fit your need the best. Here's how you can preview your input cell with c highlighted ...
Kuba's user avatar
  • 135k
17 votes
Accepted

How can I clean up a notebook?

Update I have incorporated Kuba's improvement into the code. Here is how I would do it. In a working notebook (not the target notebook) put the following code. ...
m_goldberg's user avatar
  • 107k
16 votes
Accepted

ShowGroupOpener's behavior change in 11.3

TL;DR; To set ShowGroupOpener on a global level, previously done by CurrentValue[$FrontEnd, ShowGroupOpener] = True, now use: <...
Kuba's user avatar
  • 135k
15 votes

How do I get the timing of an evaluation after it has already finished?

Evaluate SetOptions[$FrontEnd, EvaluationCompletionAction -> "ShowTiming"] and then the evaluation time for the last evaluation will be shown in the ...
Jason B.'s user avatar
  • 66.3k
13 votes

How to copy and paste $n$ lines from a text editor to $n$ cells?

It is not straightforward to access the clipboard contents but one way, that doesn't involve writing and reading from temporary notebooks is to use the undocumented ...
MikeLimaOscar's user avatar
13 votes

How to decorate cells with widgets like jupyter and collab?

Here's a first attempt: ...
Lukas Lang's user avatar
  • 32.1k
12 votes

Set the style of a cell

I don't know if any of them can be callled documented but I know three ways to do this: mentioned above: FrontEndToken way: ...
Kuba's user avatar
  • 135k
12 votes

How can I clean up a notebook?

Another possibility is to modify the notebooks style sheet by defining a new "Screen Environment" that hides cell brackets and closes input cells: ...
Carl Woll's user avatar
  • 127k
12 votes
Accepted

How to open a Python interpreter input cell?

Type > at the start of a cell (or when between cells). This is documented in an example on ref/ExternalEvaluate (last Basic Example). I'm a bit suprised it's not in the details section. It probably ...
Itai Seggev's user avatar
  • 13.9k
11 votes
Accepted

How to programmatically mark and then select a subset of input cells?

There is a special cell attribute called CellID. I would suggest using this instead of cell tags to avoid the problem that you mentioned with cell tags being ...
C. E.'s user avatar
  • 69.5k
11 votes
Accepted

What are "\<" and "\>" delimiters in box expressions?

Thanks to andre's comment (where this link is provided), I now see the effect of those delimiters (I tested it in Mathematica 11 and also some earlier versions). When I add 2 newlines to the box ...
Vladimir Reshetnikov's user avatar
11 votes

Select Only Printed Out Cells

Here is a quick way of doing it: NotebookFind[nb = EvaluationNotebook[], "Print", All, CellStyle]; CreateDocument[NotebookRead[nb]]
Mike Honeychurch's user avatar
11 votes
Accepted

Delete all output in notebooks

Print and Message and so on are generated cells, like the output from evaluating input. This, from the docs for ...
Mike Honeychurch's user avatar
11 votes
Accepted

New input cell style with a custom evaluator

You can use StyleKeyMapping to easily switch back and forth from "Input" cells to your "CustomInput" cell. For example: ...
Carl Woll's user avatar
  • 127k
11 votes
Accepted

Stretching a mesh

...
kglr's user avatar
  • 363k
10 votes
Accepted

How to make a dynamic nested menu?

Here's beta version, basic functionality is delivered. I have to polish it but probably I won't have time for that this year. It has to be packed into self contained module and styling options have to ...
Kuba's user avatar
  • 135k
10 votes

What are "\<" and "\>" delimiters in box expressions?

Summary of the all available information In the hoarier days space-like characters (spaces, newlines, tabs) inside strings were interpreted on input in an odd way: for example single newlines ...
Alexey Popkov's user avatar
10 votes
Accepted

Run several input cells in parallel

You don't have to write all your code within ParallelSubmit. You can wrap your code in Module or ...
MarcoB's user avatar
  • 64.5k
10 votes
Accepted

Increasing notebook magnification pushes output onto a new line

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 ...
Carl Woll's user avatar
  • 127k
10 votes
Accepted

Is there a way to obtain the time when an input was executed in a notebook?

Update It turns out that there is a much simpler method than my previous answer. If you need the actual cell label value, than I think messing around with the ...
Carl Woll's user avatar
  • 127k
10 votes
Accepted

How insert into Text cell chevron symbols used for Inline GroupOpener icons?

Those symbols are in fact special characters: Row@{"\:f442", "\:f443"}
Lukas Lang's user avatar
  • 32.1k
10 votes
Accepted

A way to contract input in Mathematica

From comments, these are the two options Use cell/open/close Use Iconize, as suggested by Carl Lange, which I think is a better option, since you still see the LHS of the assignment and so know what ...
9 votes

Any way to make my equations look better, more Latex like?

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)}}}"] ...
Szabolcs's user avatar
  • 231k
9 votes
Accepted

Notebook cells space on disk profiler

Here is another try, this time more close to what you actually wanted: It generates a list of buttons for the largest cells (button is labeled with size in kB). If you press a button, the ...
Albert Retey's user avatar
  • 23.5k
9 votes

Syntax highlighting in text cells

According to this answer, there is a way to make an inline cell with automatic syntax highlighting. For example we can create a "Text" cell containing an inline <...
Alexey Popkov's user avatar

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