Message Boards Message Boards

0
|
4381 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How can I format an output cell of text?

Posted 10 years ago

This is my first post so I apologize if I am not following all the recommendations for posting. I would like to insert some computed results in an output cell so that I can use the notebook as a memo explaining results. I have figured out most of how to do that, but if the output cell is longer than a single line then the second and subsequent lines are indented. I suppose that I can add spaces at the beginning of the first line to indent it as well, but is there a better way to force these lines to be left justified? When generating the document the input cells 19 and 24 would be closed so that only output cell 24 and the result definitions would be visible.

Since I can't seem to reproduce the exact output format in this post I have attached a picture of the example. enter image description here

POSTED BY: Mike Luntz
2 Replies
Posted 10 years ago

Many thanks David. The use of TextCell did the trick.

POSTED BY: Mike Luntz

Try something along these lines:

text1 = "This is some text. ";  

text2 = "And this is some more text. ";  

text3 = "And this is a bunch more text that it longer than the other text because I want it to be longer.";  

TextCell[text1 <> text2 <> text3, "Text"]
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract