# Fractions formatting in Column / Grid

Fractions are squished in GridBox:

expr = Style["\!$$\*FractionBox[\(\[Alpha]$$,$$360 \[Degree]$$]\)", Bold, 30];

{#, Column[{#}]} & @ expr


But we can fix this with AllowScriptLevelChange -> False as shown in linked topic.

{#, Column[{#}, AllowScriptLevelChange -> False]} &@expr


The problem is GridBox inherits this option from outer GridBoxes only when it is True! Moreover even if I fix the inner option AllowScriptLevelChange -> False it will be overwritten by default True from outer one.

Grid[{{#, Column[{#}, AllowScriptLevelChange -> False]}}
] &@expr


Grid[{{#, Column[{#}]}},
AllowScriptLevelChange -> False] &@expr


This behaviour is forcing me to manually put this option in each GridBox.

Grid[{{#, Column[{#}, AllowScriptLevelChange -> False]}},
AllowScriptLevelChange -> False] &@expr


### IMO it is a bug.

-
Are you are aware that you can change this setting on the Cell, Notebook, or Global level? I assume that is not what you want. –  Mr.Wizard May 13 at 12:19
@Mr.Wizard This is the main problem, option value is not preserved even if you explicitly state it. It makes no sense. –  Kuba May 13 at 12:38
Let me see if I understand; your primary concern is with a given expression changing when inserted into a GridBox, correct? –  Mr.Wizard May 13 at 12:51
@Mr.Wizard Let's say your code is producing Grid with fractions with AllowScriptLevelChange -> False if you pass it to someone and he puts it in his Grid structure it will change the appearance. It is not how style should work. –  Kuba May 13 at 12:54
I added an inheritance tag because I think that grouping issues such as this will eventually be useful. –  Mr.Wizard May 13 at 13:20

## A solution for the issue at hand

Based on your comments I believe you are looking for ScriptLevel itself:

expr2 = "\!$$\*FractionBox[\(\[Alpha]$$,$$360 \[Degree]$$]\)";
expr2 = Style[expr2, Bold, 30, ScriptLevel -> 0];

Grid[{{#, Column[{#}]}}] & @ expr2


For application at the Grid/Column level one can use ItemStyle:

{#, Grid[{{#, Column[{#}, ItemStyle -> {ScriptLevel -> 0}]}}]} &[1/2]


## Behavior of GridBoxOptions

I don't see this as a bug. There are other explicit GridBox options that are also not inherited by inner grid constructs. For example GridFrame:

Grid[{{#, Column[{#}]}}, GridFrame -> True] & @ expr


(The inner Column is not framed.)

Having such options inherited could itself be troublesome.

For what it's worth AllowScriptLevelChange can be controlled at the Cell, Notebook, or Global level via "GridBoxOptions". For example:

print = CellPrint @
Cell[BoxData @ ToBoxes @ #, "Output",
"GridBoxOptions" -> {AllowScriptLevelChange -> False}] &;

Grid[{{#, Column[{#}]}}] & @ expr // print


-
For the record: ItemStyle solution provides the behaviour I was looking for. –  Kuba May 13 at 13:17

ScriptMinSize behaves well in terms of inheritting so one walk-around is to add it:

{#, Grid[{{#, Column[{#}, BaseStyle -> {ScriptMinSize -> 30}]}}]} &@expr


It is still not the same and still inconvenient but sufficient for my purposes.

-