3
$\begingroup$

When I input

{{1,0},{0,1}} // MatrixForm

and then m = %;, the value that m takes is the actual matrix (list of lists), rather than MatrixForm[...].

Example:

In[1]:= {{1, 0}, {0, 1}} // MatrixForm

Mathematica graphics

In[2]:= Head[%]
Out[2]= List

I have defined my own wrapper myForm to display expressions in a particular form, and I would like to duplicate this behavior: I would like % to take the value before myForm is applied. Is this possible?

$\endgroup$
3
  • $\begingroup$ Related: mathematica.stackexchange.com/questions/44189/… $\endgroup$
    – Szabolcs
    Jul 6, 2015 at 9:41
  • 1
    $\begingroup$ According to the last answer in the question I linked above, it's as simple as appending it to $OutputForms. This works at least in 10.1, but I make no claims about robustness: Unprotect[$OutputForms]; AppendTo[$OutputForms, myForm]; Protect[$OutputForms]; $\endgroup$
    – Szabolcs
    Jul 6, 2015 at 9:47
  • $\begingroup$ If you think it's appropriate, you can always mark your own questions as duplicates (unless something has changed, the site doesn't show exactly the same interface, based on reputation score). You can flag/close as "duplicate", then when you load the webpage next time, it'll show a button above the question asking if you already have an answer. Pressing that button closes the question. $\endgroup$
    – Szabolcs
    Jul 6, 2015 at 9:56

0

Browse other questions tagged or ask your own question.