Hot answers tagged

50 votes
Accepted

How to convert the $\LaTeX$ format to Mathematica input?

You can use ToExpression. ToExpression["string", TeXForm, HoldForm] Paste your content inside quotes and click the ...
materia-nigra's user avatar
30 votes
Accepted

How do I remove the little × that shows up in the frontend when typing?

Thanks to the hint by Jason. It is called AutoMultiplicationSymbol. It can be turned off in the Option Inspector: It worked. Now ...
Nasser's user avatar
  • 142k
27 votes

Why does removing a function and defining it on the same line not work?

Executing Trace on an expression reveals what is actually happening: ...
dan7geo's user avatar
  • 1,410
18 votes
Accepted

How can I view the minimal required arguments of a Wolfram Language function?

You can use SyntaxInformation: SyntaxInformation /@ {Sin, Replace} // Column
kglr's user avatar
  • 392k
16 votes
Accepted

Input automatic replacement not working in 12.3 or 12.3.1

The functionality of InputAutoReplacements has been replaced by the (much nicer in my opinion) AutoOperatorRenderings ...
Lukas Lang's user avatar
  • 33.6k
15 votes

How can I get 'KeyDown' without writing 26 commands?

Perhaps something like this?: DynamicModule[{key = ""}, EventHandler[ Dynamic[key], {"KeyDown" :> (key = CurrentValue["EventKey"])} ]]
Michael E2's user avatar
  • 234k
12 votes

How use Iconize object assigned to a variable (Mathematica 11.3)?

Iconize is not meant to be used this way. Do not assign the result to a variable. Above, you are assigning the output to a variable, i.e. storing it in kernel memory. The purpose of Iconize is to ...
Szabolcs's user avatar
  • 234k
12 votes
Accepted

Mixed fraction input

You can add an input alias to do this. For example: ...
Carl Woll's user avatar
  • 130k
10 votes
Accepted

Why does removing a function and defining it on the same line not work?

I use the word internal symbol rather than just symbol, to make it easier to distinguish between the name of a symbol and the internal representation of the symbol inside the kernel. I felt I should ...
Jacob Akkerboom's user avatar
9 votes
Accepted

How to paste formatted Mathematica code *verbatim* from external text editor to notebook?

Here is some Mathematica code as it appears after writing it my text editor. In a Mathematica note book I create a new Code cell with Cmd+8 (in OS X), and paste the code from the text editor into the ...
m_goldberg's user avatar
  • 108k
9 votes
Accepted

Sub-subscripts in strings cause different spacings than subscripts

The subscript is interpreted as Times[Subscript[H, 2], O], and Mathematica uses spaces to denote multiplication. You can work around this by using the ...
Carl Woll's user avatar
  • 130k
9 votes
Accepted

How can I self-define a keyboard entry for 3-dot "Because"?

You can use InputAliases to define an alias, like ...
Carl Lange's user avatar
  • 13.1k
8 votes
Accepted

Get tab key to indent a block of code

Later is better then never. 8 years after my original question, now in version 13.1 we have tab and shift + tab indentation in a native way, with no gambiarra needed. Cool!
Murta's user avatar
  • 26.2k
7 votes

How to plot an array of lines?

...
Bob Hanlon's user avatar
  • 155k
6 votes
Accepted

Performance-driven approach to using Big Data without killing the hard-drive

So, a large part of this question seems to be concerned with whether or not BinaryReadList can cause meaningful damage to an underlying drive (SSD or HDD). From ...
eyorble's user avatar
  • 9,373
6 votes
Accepted

How can I enter commands in plain text in Mathematica11?

When we open a new notebook in the front end, we get that gray line with the plus sign in the upper left corner, as you show. We click the plus sign and get the drop-down menu, as you show. Now we ...
LouisB's user avatar
  • 12.3k
6 votes

Why does removing a function and defining it on the same line not work?

First of all, consider the following two successive inputs: ...
Alexey Popkov's user avatar
6 votes

Get tab key to indent a block of code

I do much the same as Leonid, except I generally first convert the \[IndentingNewLine] structure into the appropriate tabified block: ...
b3m2a1's user avatar
  • 46.8k
6 votes

Mixed fraction input

\[ImplicitPlus] can be entered as ESC+ESC: 5\[ImplicitPlus](1/2) (* 11/2 *) It works for entering in the Front End, but it ...
Michael E2's user avatar
  • 234k
6 votes
Accepted

What's the proper way to do percent multiplication in Mathematica?

The percent symbol % in Mathematica represents the last output Out[-1], see the Documentation for ...
Alexey Popkov's user avatar
6 votes

Code not working when I'm breaking it up into different lines

This happens because the expression For is complete at the location of the newline. Mathematica will not attempt to read further. Instead, it will try to ...
Szabolcs's user avatar
  • 234k
6 votes
Accepted

Automatically set x=0, after each input/output ? ($AfterEachInputOutput)

Try CellEpilog: SetOptions[EvaluationNotebook[], CellEpilog :> (x = 0)]
kglr's user avatar
  • 392k
6 votes
Accepted

Read sympy expression in .txt file as Mathematica input

I would use Latex to convert sympy to Mathematica: ...
Nasser's user avatar
  • 142k
6 votes

Read sympy expression in .txt file as Mathematica input

I believe the easiest and most robust solution is to make use of sexpr of python, which is amount to FullForm of Mathematica. ...
xzczd's user avatar
  • 65.4k
6 votes
Accepted

How to construct this Matrix

The command you want is ArrayFlatten You also have to be careful with your indices. Check the difference between this -took it directly from the OP and applied <...
bmf's user avatar
  • 14.9k
6 votes

How to generate input cells whose code is determined dynamically?

You should just use With instead of Module, as Carl Woll suggests in the comments: ...
Alexey Popkov's user avatar
5 votes

Why does the asterisk go up when you switch from input to another mode?

The theory you propose in your comment to the question puts you on the right path. But there is a little more to it than that. In an input mode (and there is more than one) when you type in an ...
m_goldberg's user avatar
  • 108k
5 votes
Accepted

Read / Write of files which may be in use by other software

Checking that a file is in use by another application is very operating system dependent. As far as I know, Mahtematica doesn't support testing for this in user code. Reading in a file that is in use ...
m_goldberg's user avatar
  • 108k
5 votes

Ctrl+= does not open a box

This problem is typical for all keyboard layouts where = is typed in by using Shift, for example, as Shift+0 on a German keyboard. On such a keyboard Ctrl+= is ...
Karsten7's user avatar
  • 27.4k
5 votes
Accepted

How do I accept user input through keyboard?

One way to do this is to use an event handler to manage the keystrokes. The images, the current rating and the image's index (in the list of images presented to the user, are all inserted in a ...
m_goldberg's user avatar
  • 108k

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