MathGroup Archive 2010

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

Search the Archive

Re: Hanging indent in Print[] output?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111971] Re: Hanging indent in Print[] output?
  • From: AES <siegman at stanford.edu>
  • Date: Sun, 22 Aug 2010 08:11:36 -0400 (EDT)
  • References: <i4o22a$agk$1@smc.vnet.net>

As a follow-on to this, out of curiosity I tried a number of experiments 
along the lines of typing in and executing

   myString="base_string  . . .  base_string";

   Print[myString];

with the base_string being either "a bb ccc dddd " (no quotes, 
obviously) or "a bb ccc dddd eeeee" and with vaying numbers of 
repetitions of this base_string, in the range of several tens or more, 
and with Wrap to Page Width turned on in the front end.  

Also tried adding Style[  ] to the string definition, then Printing it, 
or not adding style to the string definition but doing Print[Style[--]].

The results were hard to make any systematic order of, but as 
generalities:

1)  In the Input cells, the very long string part generally displayed 
such that the first line of the string had a two-character left out-hang 
on the left-hand end of the line,  _and a varying, and sometimes quite 
long, right out-hang on the right-hand end of the line_, with all 
subsequent lines breaking in a consistent fashion.

2)  In the Output cells consistently inconsistent line-breaking behavior 
happened, depending in part on how many base_strings were included.

One particular example is shown in

   <http://www.stanford.edu/~siegman/word_wrap_test.pdf>

Note lines 3, 5, 7 and 10: four output lines that start off identically 
-- and then break in three different ways.  Seems to me there's no way 
this can be called anything but a bug? (even if a very trivial one).

Let me add, to possibly save time for respondents:  I have zero interest 
in understanding why or how this behavior occurs (though others may); 
I'll just live with it.

But, it certainly reinforces my underlying belief, that Mathematica's 
attempt to be both an enormously sophisticated symbolic algebra, 
numerical computation, and graphing engine (which it certainly is), and 
a very sophisticated but still very usable formatting and presentation 
engine (which it certainly isn't), in the end seriously damages its 
usefulness for either task.


  • Prev by Date: Re: There must be a better way.
  • Next by Date: Re: Binning a dependent variable (CORRECTION)
  • Previous by thread: Re: Hanging indent in Print[] output?
  • Next by thread: Re: Hanging indent in Print[] output?