Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

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



  • Prev by Date: Re: The uses of Condition (/;)
  • Next by Date: Re: How to get the options for ListPlot in V6
  • Previous by thread: Re: Reproducing a hash code
  • Next by thread: Optimizing inverse functions