Applying StyleForm to String plus Table?
- To: mathgroup at smc.vnet.net
- Subject: [mg51602] Applying StyleForm to String plus Table?
- From: AES/newspost <siegman at stanford.edu>
- Date: Wed, 27 Oct 2004 01:54:04 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I want to Print a title line and below it a Table, both with the same
text formats (options) applied, in a single output cell. The three
inputs:
Print[
StyleForm[
"Title text\n" <> TableForm[Table[---]],
text_formatting_options ] ]
Print[
StyleForm[
{ "Title text\n" , TableForm[Table[---]] },
text_formatting_options ] ]
Print[
StyleForm[
"Title text\n" TableForm[Table[---]] ,
text_formatting_options ] ]
all "work" in the sense of producing something like what I want, but the
first one gives me a StringJoin error message and prints the <> symbols
before the Table; the second one prints the { } symbols and the comma,
and the third one seems to do what I want.
I guess the lessons are the StyleForm is not Listable on a List (though
it is, sort of, on a TableFormed Table); and a TableFormed Table can
contain Strings but isn't itself a String. Interesting . . .