0

Mathematica display complex fractions like this,

enter image description here

the second x look smaller, I want it look like this, how can I get it in Mathematica?

enter image description here

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
matrix42
  • 6,996
  • 2
  • 26
  • 62

2 Answers2

1

Start with

HoldForm[1/(1 + 1/x)] // TraditionalForm

which produces the fraction box in reduced size.

reduced

Now open the output cell with Cmnd+Shift+e and add FractionBoxOptions->{AllowScriptLevelChange->False} at the end.

Cell[BoxData[
  FormBox[
    TagBox[
      FractionBox["1", 
        RowBox[{"1", "+", 
        FractionBox["1", "x"]}]],
      HoldForm], TraditionalForm]], "Output",
  FractionBoxOptions->{AllowScriptLevelChange->False}]

Close close the cell with Cmnd+Shift+e and you will see

full-size

Note. I think on Windows it is Ctrl+Shift+e

Another way is to use the Option Inspector. Select the output cell and make the following change in the Option Inspector.

option-inspector

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
1

Just an extended comment to the answer of m_goldberg.

Without changing the standard settings in Option Inspector:

fractionStyle = Style[#, DefaultOptions -> {FractionBoxOptions -> {AllowScriptLevelChange -> False}}] &;
HoldForm[1/(1 + 1/x)] // fractionStyle // TraditionalForm

An additional advantage using DefaultOptions is i.e. having a list of fractions, or any other bigger programming construct, fractionStyle is applied only once at the end (like TraditionalForm).

hieron
  • 1,167
  • 6
  • 13