Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I discovered by playing around that

Text[DisplayForm@SubscriptBox["\[Lambda]", "k"]]

produces the same result as

Text["\*SubscriptBox[\"\[Lambda]\", \"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[\"\[Lambda]\", \"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.

share|improve this question
3  
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. –  Mr.Wizard Jul 27 at 14:48

2 Answers 2

up vote 6 down vote accepted

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

share|improve this answer

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)

share|improve this answer
3  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  m_goldberg Jul 27 at 15:08
    
It's relevant to the answer, but not as direct as the answer above. I'm upvoting because it's helpful and useful. –  Reb.Cabin Jul 27 at 15:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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