6
$\begingroup$

For example:

The default output is

enter image description here

I want to the output display like

enter image description here

I noticed that FractionBoxOptions, but couldn't find a appropriate options.

$\endgroup$
1
  • $\begingroup$ The box language can be applied, but it is rather heavy and requires an additional programming. You need to have good reasons to refuse form the usual way in favor for the box language. It is not quite clear: where do you want to display the result in this form? And what for? I guess you are quite familiar with the typesetting using palettes, are you? Do you need that the output is in this form right after the evaluation? What for? $\endgroup$ Sep 21 '17 at 7:52
6
$\begingroup$

In this particular case it is sufficient to add a custom formatting rule:

MakeBoxes[Times[Rational[n_, d_], expr__], StandardForm] := 
 FractionBox[ToBoxes[Times[n, expr]], d]

Now

Solve[x^2 - 3 x + 1 == 0]

screenshot

$\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.