How to Print without linebreaks?
- To: mathgroup at smc.vnet.net
 - Subject: [mg82959] How to Print without linebreaks?
 - From: zac <replicatorzed at gmail.com>
 - Date: Mon, 5 Nov 2007 04:57:57 -0500 (EST)
 
Hi,
again a formatting problem, concerning Mathematica 5.2.
data = Range[500];
SetOptions[$Output, PageWidth -> Infinity];
Print[
    "1...: ", data, "\n",
    "2...: ", {data} // ColumnForm, "\n",
    "3...: ", {data} // ColumnForm
    ];
On my machine it prints the followings: the first data is starting in
the same line where the "1...: " is, and is broken by several
linebreaks, according to the actual window width. The second data is
starting in the same line where the "2...: ", is, and occupies one
line without linebreaks, but around 147, the list is cropped. The
third data is printed without linebreaks (ss the second one) but
starts in a new line under "3...: ".
There are three questions:
1. Why PageWidth -> Infinity does not inhibit line breaking? (only
{expr} // ColumnForm does.)
2. Why PageWidth -> Infinity does not inhibit line cropping?
3. Why is it that the last entry in Print is always printed in a new
line, instead of continuing the previous one?
Istvan Zachar