Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Controlling breaking of lines in output of Write
Replies: 1   Last Post: Apr 11, 2014 2:09 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
hmichel@cox.net

Posts: 122
Registered: 1/29/05
Re: Controlling breaking of lines in output of Write
Posted: Apr 11, 2014 2:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Derivator

Straight from the Help Files

file1 = $TemporaryPrefix <> "test1";

stream = OpenWrite[file1, PageWidth -> 60];
Write[stream, Expand[(x + y)^5]];
Close[stream];

You are looking for the PageWidth option in the OpenWrite function when
initializing the stream.

PageWidth -> Infinity no linebreaking

I believe the default is PageWidth -> 80 (0--79)

If you output a newline character into your stream then you control where
the lines are broken.

Hans

-----Original Message-----
From: derivator [mailto:derivatorb@gmail.com]
Sent: Thursday, April 10, 2014 2:10 AM
Subject: Controlling breaking of lines in output of Write

Dear all,

When I use Write["file", expression], I find that if the expression is
sufficiently long the output in "file" is broken into two or more lines.
Usually this happens for expressions longer than 79 characters.
Is it possible to change 79 to some other value, or control how the lines
are broken in the output?

Thanks in advance

Derivator






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.