10
$\begingroup$

I noticed if I type sin[x] cos[x] and hit Shift+Return to run it in the Mathematica 12 frontend notebook, a grey '×' character is printed between the functions.

But, if I type Sin[x] Cos[x]and hit Shift+Return, no such character appears

enter image description here

What are the rules that govern whether or not the '×' is printed? And can they be modified for user-defined symbols?

$\endgroup$
7
$\begingroup$

Rough answer: things which are "mathy functions" don't show the the implict times, all others do. Numbers times function or symbols times function don't show the symbol. Two NumberQ things in a row do show the symbol. We don't currently have a means on adding to the list of mathy functions.

Right now, there's a global on/off switch in the options inspector (AutoMultiplicationSymbol). For V12.1, it should be more than boolean, allowing selection of certain contexts to complete. For example, some people like the implict times at the end of a line as a warning, but not in the middle of line.

Customizing the list of mathy functions seem reasonable, but I don't know whether it is in the pipeline.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.