Message Boards Message Boards

GROUPS:

Newbie question: How to split the text in columns?

Posted 9 years ago
3430 Views
|
2 Replies
|
1 Total Likes
|

Hi,

I was wondering what is the way to split the text that you have inputted in columns ? I couldn't find good tutorial on this (or probably I am not searching right) . Let's say I have to split this text ( that is in this post) on columns, what should I do?

POSTED BY: Slavi Kalov
2 Replies

If you are asking a question about formatting text on the page into multiple columns then the short answer is that in Mathematica there is no direct very simple way to do this as there would be in MS Word, for example. One thing that Mathematica is currently missing is the ability to easily format text and inter-text content in a more broad two-dimensional way. But, that said, here is a rudimentary example of the to programmatically do a 2-column text cell (the backslashes are just text continuation characters that come from cutting and pasting from my notebook):

text1 = "Alice was beginning to get very tired of sitting by her \
sister on the bank, and of having nothing to do: once or twice she \
had peeped into the book her sister was reading, but it had no \
pictures or conversations in it, 'and what is the use of a book,' \
thought Alice 'without pictures or conversations?'  

  So she was considering in her own mind (as well as she could, for \
the hot day made her feel very sleepy and stupid), whether the \
pleasure of making a daisy-chain would be worth the trouble of \
getting up and picking the daisies, when suddenly a White Rabbit with \
pink eyes ran close by her.";  

text2 = "There was nothing so VERY remarkable in that; nor did Alice \
think it so VERY much out of the way to hear the Rabbit say to \
itself, 'Oh dear! Oh dear! I shall be late!' (when she thought it \
over afterwards, it occurred to her that she ought to have wondered \
at this, but at the time it all seemed quite natural); but when the \
Rabbit actually TOOK A WATCH OUT OF ITS WAISTCOAT-POCKET, and looked \
at it, and then hurried on, Alice started to her feet, for it flashed \
across her mind that she had never before seen a rabbit with either a \
waistcoat-pocket, or a watch to take out of it, and burning with \
curiosity, she ran across the field after it, and fortunately was \
just in time to see it pop down a large rabbit-hole under the hedge.";

TextCell[Grid[{{TextCell[text1, "Text", LineSpacing -> {1.5, 1}], 
     TextCell[text2, "Text", LineSpacing -> {1.5, 1}]}}], "Text", 
  FontFamily -> "Helvetica"] // CellPrint

And the output in the notebook:

enter image description here

POSTED BY: David Reiss

Dear Slavi,

Welcome to the Wolfram Community. Could you provide an example of what you want. The question is not clear now.

Regards,

Sander

POSTED BY: Sander Huisman
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