We’re rewarding the question askers & reputations are being recalculated! Read more.

3 edited tags
2 edited tags
1

HoldForm: Display exactly as entered?

Sometimes, Mathematica's internal representation of expressions can give somewhat surprising results. Specifically, I noticed this when I tried to preserve products of fractions for display.

E.g. the following example as in "HoldForm does not Hold Form for fractions sometimes":

i.e. it isn't easily possible to preserve the output fractions as they are written. This is actually surprising though, because Mathematica internally preserves the "product of two fractions" form:

In[1]:=  HoldForm[1/x 1/y]  // InputForm
Out[1]=  HoldForm[(1/x)*(1/y)]

In[2]:=  HoldForm[1/x 1/y]  // FullForm
Out[2]=  HoldForm[Times[Times[1,Power[x,-1]],Times[1,Power[y,-1]]]]


Is there some way to get Mathematica to display such forms as actual product of fractions in any of the formatted output forms, without manually adding holdform constructs?