The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

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


Straight from the Help Files

file1 = $TemporaryPrefix <> "test1";

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

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.


-----Original Message-----
From: derivator []
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


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.