Formatting quirk

General discussion about Mathematica features and functionality...
Forum Rules
By using the Wolfram Faculty Program Forum, you agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, or sexually oriented material. Wolfram Faculty Program Forum administrators have the right to remove, edit, move or close any topic at any time should we see fit.

Personal Information: Posts in this forum may be viewed by non-members; however, the forum prohibits non-members from viewing your profile. Although your email address is hidden from both non-members and members, your account is initially configured to allow members to contact you via email through the forum. If you wish to hide your profile, or prohibit others from contacting you directly, you may change these settings by updating your profile through the User Control Panel.

Attachments: Attachments are not currently enabled on this forum. To share a file with others on this site, simply upload your file to the online storage service of your choice and include a link to the file within your post. If your school does not offer an online file storage and sharing service, the following sites provide free basic online file storage and sharing: Mozy, FilesAnywhere, Adrive, and KeepandShare.

Formatting quirk

Postby Rob_Holman » Tue May 29, 2012 1:30 am

Hi folks:

I'm trying to make a Manipulate cell that shows some sigma notation in traditional form, and that has updating text above it.

Here is some code without the text. Everything looks just like I want it, with the exception of the missing text up top. It'd be nice to get the overscript "k" to change in the sigma notation, but no big deal:

_______

TraditionalForm[
Manipulate[
Row[{HoldForm[Sum[(-1)^n/2^n, {n, 0, Style["k", Italic]}]], " = ",
Sum[(-1)^n/2^n, {n, 0, k}], " = ",
N[Sum[(-1)^n/2^n, {n, 0, k}], 20]}], {k, 1, 40, 1}]]
_________

Now, in the next code I've added a snippet of text above, and that screws up the display of the traditional form for some reason:
_________

TraditionalForm[
Manipulate[
Column[{
Row[{"Adding up ", ToString[k], " terms:"}],
" ",
Row[{HoldForm[Sum[(-1)^n/2^n, {n, 0, Style["k", Italic]}]], " = ",
Sum[(-1)^n/2^n, {n, 0, k}], " = ",
N[Sum[(-1)^n/2^n, {n, 0, k}], 20]}]
}], {k, 1, 15, 1}]]
___________

Among other things, I have tried putting the Sigma notation in a Pane that is plenty tall enough to allow the full traditional form, and that didn't work.

Anyone have any good ideas about this? I've tried five or six different things to no avail.

Thanks,

Rob
User avatar
Rob_Holman
 
Posts: 14
Joined: Wed Feb 29, 2012 7:03 pm
Organization: The Walker School
Department: Mathematics and Science

Re: Formatting quirk

Postby Michael_Morrison » Tue May 29, 2012 3:01 am

Hi Rob,

The Column command has a default setting that automatically shrinks the typesetting for things like Sum, Product, and Integrate. If we turn this behavior off, you'll get result you're looking for:

TraditionalForm[
Manipulate[
Column[{Row[{"Adding up ", ToString[k], " terms:"}], " ",
Row[{HoldForm[Sum[(-1)^n/2^n, {n, 0, Style["k", Italic]}]], " = ",
Sum[(-1)^n/2^n, {n, 0, k}], " = ",
N[Sum[(-1)^n/2^n, {n, 0, k}], 20]}]},
AllowScriptLevelChange -> False], {k, 1, 15, 1}]]

More information about that option here: http://reference.wolfram.com/mathematic ... hange.html

Thanks,
Michael
User avatar
Michael_Morrison
 
Posts: 42
Joined: Fri Sep 11, 2009 9:50 pm
Organization: Wolfram Research, Inc.
Department: Academic Initiatives


Return to General Mathematica Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron