4
$\begingroup$

I tried to construct a small sheet with text and equations presented in a convenient publishing form, using Column:

Column[{
   Row[{"An integral:"}],
   Row[{Integrate[f[x], x]}]
}] // TraditionalForm

But every time the integral sign appears in one of expressions inside the Column, Mathematica reduces its size in the output. In this particular case the output looks like

Integral sign size is reduced in Column

Without the Column (or Grid, which seems to have the same effect) wrapper, the integral sign looks convenient:

Row[{Integrate[f[x], x]}] // TraditionalForm

The integral sign has the appropriate size when it does not appear as the content of Column or Grid

I tried to add Pane wrapper to the Column contents, and played with ItemSize option too, with no effect. Actually, I can't even figure out what exactly happens within the Column (or Grid) function that reduces the \[Integral] size.

So, the question is: what causes the shrinking in Column and Grid, and is there a way to control it?

I was thinking of using GraphicsGrid instead, but it seems look more like a hack than a proper solution — if it would help at all.

Notes:

  1. You can notice the same effect in a Standard Form too, it is just more clear in the Traditional output.
  2. I'm using Mathematica 8 on Windows 7 Basic.
$\endgroup$
5
$\begingroup$

It would appear that Column by default is setting the integral in the InlineFormula style. If you force it to use the DisplayFormula style, the integral will be set larger.

Column[{Row[{"An integral:"}], 
        Row[{Style[Integrate[f[x], x], "DisplayFormula"]}]}] // TraditionalForm

enter image description here

$\endgroup$
  • $\begingroup$ Ah, I missed the intent of the question. Nice solution. $\endgroup$ – Jagra Feb 13 '13 at 15:26
  • $\begingroup$ Yes, that does it! Thanks. Mathematica 8 Documentation Center is almost silent when it comes to keywords InlineFormula and DisplayFormula. :-\ $\endgroup$ – akater Feb 13 '13 at 15:28
  • $\begingroup$ Clarification, Do the uses of Row[] and TraditionalForm do anything in this? Just wondering. $\endgroup$ – Jagra Feb 13 '13 at 15:30
  • $\begingroup$ No, they don't matter. But I think that leaving Rows in the example makes sense because I could use some inline formulas in the sheet, and they'd look OK, while the standalone formulae and calculations need the DisplayFormula option, and it's only needed in the corresponding Rows. $\endgroup$ – akater Feb 13 '13 at 15:36
  • $\begingroup$ @Jagra. TraditionalForm is innocent -- Row is under suspicion. $\endgroup$ – m_goldberg Feb 13 '13 at 15:37
4
$\begingroup$

You can also use AllowScriptLevelChange -> False as an option to Column (however I'm not sure if there's such an option in Mathematica 8. I'm running version 11.3)

Compare these two outputs:

Column[{
   Row[{"An integral:"}],
   Row[{Integrate[f[x], x]}]
}] // TraditionalForm

enter image description here

Column[{
   Row[{"An integral:"}],
   Row[{Integrate[f[x], x]}]
}, AllowScriptLevelChange -> False] // TraditionalForm

enter image description here

Although it works in 11.3.0 for Microsoft Windows (64-bit), but there's a warning on the AllowScriptLevelChange help page: enter image description here

$\endgroup$
1
$\begingroup$

Using AllowScriptLevelChange as suggested by @roman addresses the main issue you are encountering. Another possibility is to set the script level directly using Style, in which case the script level change requested by Column/Grid is ignored:

Column[{
    Row[{"An integral:"}],
    Style[Row[{Integrate[f[x], x]}], ScriptLevel->0]
}] // TraditionalForm

enter image description here

$\endgroup$
0
$\begingroup$

This should do it:

Column[{"An integral:", TextCell[TraditionalForm[Integrate[f[x], x]], FontSize -> 24]}]

enter image description here

A slight variation, this works too:

Column[{"An integral:", TraditionalForm[Integrate[f[x], x]]}, 
 ItemStyle -> {2 -> FontSize -> 24}]

enter image description here Isolating the individual pieces often helps in controlling different kinds of formatting.

$\endgroup$
  • $\begingroup$ I see this i.stack.imgur.com/H27aQ.png $\endgroup$ – Dr. belisarius Feb 13 '13 at 13:23
  • $\begingroup$ @belisarius -- That looks odd. I probably have an artifact, like f[] previously defined. I'll correct and update. Ah, that does it. Thx $\endgroup$ – Jagra Feb 13 '13 at 14:17
  • $\begingroup$ Sorry if I wasn't clear enough in my post, but it's not the formula size that bothers me, it's just the integral symbol size: \[Integral], or “∫”. I could just write Style[Integrate[f[x], x], FontSize -> 24] instead of Integrate[f[x], x] in the original code, and get the larger sized formula. But I have to write something like Row[{DisplayForm@ AdjustmentBox[Style["\[Integral]", Large], BoxBaselineShift -> 1/2], f[x], "\[ThinSpace]", Dt[x]}] (aligning manually on the box level) to get the result closer to my 2nd pic of (sole) integral which is what I expect to see in the sheet. $\endgroup$ – akater Feb 13 '13 at 15:18

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.