Hot answers tagged

42 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 ...
  • 710
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 ...
  • 124k
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: ...
  • 1,390
18 votes
Accepted

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

You can use SyntaxInformation: SyntaxInformation /@ {Sin, Replace} // Column
  • 354k
16 votes

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

Perhaps something like this?: DynamicModule[{key = ""}, EventHandler[ Dynamic[key], {"KeyDown" :> (key = CurrentValue["EventKey"])} ]]
  • 225k
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 ...
  • 29.9k
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 ...
  • 230k
12 votes
Accepted

Mixed fraction input

You can add an input alias to do this. For example: ...
  • 126k
10 votes
Accepted

Windows command line arguments, stdin & stdout

On Windows, MathKernel.exe launches the kernel running within a window. The standard output is redirected to that window. To avoid this redirection, we must run the kernel as a console application ...
  • 67.8k
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 ...
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 ...
  • 107k
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 ...
  • 126k
9 votes
Accepted

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

You can use InputAliases to define an alias, like ...
  • 12.7k
7 votes

How to plot an array of lines?

...
  • 135k
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 ...
  • 11.9k
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: ...
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: ...
  • 46k
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 ...
  • 9,153
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 ...
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 ...
  • 230k
6 votes
Accepted

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

Try CellEpilog: SetOptions[EvaluationNotebook[], CellEpilog :> (x = 0)]
  • 354k
6 votes
Accepted

Read sympy expression in .txt file as Mathematica input

I would use Latex to convert sympy to Mathematica: ...
  • 124k
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. ...
  • 58.5k
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 <...
  • 9,087
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: ...
5 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!
  • 25.8k
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 ...
  • 107k
5 votes
Accepted

Easy way to enter conventional forms of limit expression?

My approach is to use the Option Inspector (menu command Format > OptionInspector) to set the option for the relevant cells ...
  • 225k
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 ...
  • 27.3k
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 ...
  • 107k

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