Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Applying StyleForm to String plus Table?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51648] Re: [mg51602] Applying StyleForm to String plus Table?
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 27 Oct 2004 23:43:12 -0400 (EDT)
  • Reply-to: jfultz at wolfram.com
  • Sender: owner-wri-mathgroup at wolfram.com

Your first example is the closest to something that will work for you, but 
instead of using StringJoin (i.e., what <> does), you want to use 
SequenceForm.  So, let's plug in a few values for your dummy values and see 
some working code.

Print[StyleForm[
    SequenceForm["Title text\n", TableForm[Table[i j, {i, 5}, {j, 5}]]], 
    FontSlant -> Italic]]

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Wed, 27 Oct 2004 01:54:04 -0400 (EDT), AES/newspost wrote:
> 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 . . .


  • Prev by Date: Re: listplot and plot of the same function display in different scale...
  • Next by Date: Re : Re: 1) Global Real Space and 2) Histogram Y-axis
  • Previous by thread: Applying StyleForm to String plus Table?
  • Next by thread: listplot and plot of the same function display in different scale...