16
$\begingroup$

I discovered by playing around that

Text[DisplayForm@SubscriptBox["λ", "k"]]

produces the same result as

Text["\*SubscriptBox[\"λ\", \"k\"]"]

and, further, that the \* is essential. This finding suggests that \* means DisplayForm when inside a string. After more playing around, I found that

Text["\!\(\*SubscriptBox[\"λ\", \"k\"]\)"]

produces the same result, but only if you have the bang and the parens, that is, that \! and \(+\) are both necessary; either construct alone will not work.

Where can I find the documentation for this magic? I don't know what to search for because I don't know what these kinds of constructs are called.

$\endgroup$
  • 9
    $\begingroup$ To the close-voter: I contend that this is not easily found in the documentation. I used Mathematica for years before stumbling into the right section. It is hard to search for if you don't already know what you're looking for. $\endgroup$ – Mr.Wizard Jul 27 '14 at 14:48
14
$\begingroup$

I believe this is the documentation you are looking for:

Notably:

enter image description here
enter image description here
enter image description here

And:

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Any idea about what \< ... \> are for? These frequently wrap Text and Print cells. $\endgroup$ – Gustavo Delfino Mar 13 '17 at 14:42
8
$\begingroup$

These are Operator Input Forms

Characters that are not letters, letter‐like forms, or structural elements are treated by the Wolfram Language as operators. The Wolfram Language has built‐in rules for interpreting all operators. The functions to which these operators correspond may or may not, however, have built‐in evaluation or other rules. ...

Operators that construct two‐dimensional boxes—all of which have names beginning with backslash—can only be used inside \(…\). ... "Input of Boxes" gives interpretations when no \! is included.

\*expr (boxes constructed from expr)
\!boxes (interpreted version of boxes)

$\endgroup$
  • $\begingroup$ It's relevant to the answer, but not as direct as the answer above. I'm upvoting because it's helpful and useful. $\endgroup$ – Reb.Cabin Jul 27 '14 at 15:59

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.