PageWidth

PageWidth

is an option for output streams and for cells that specifies how wide each line of text is allowed to be.

Details

  • Possible settings for output streams are:
  • Infinityan infinite width (no line breaking)
    nexplicit width in characters
  • SetOptions[stream,PageWidth->val] resets the line width allowed for an open stream.
  • Possible settings for cells are:
  • WindowWidththe width of the window on the screen
    PaperWidththe width of the page as it would be printed
    nexplicit width given in printer's points
  • PageWidth->WindowWidth allows each line to use the full width of the displayed window, taking into account settings for CellMargins.
  • The PageWidth setting of a cell sets the boundary for all of the cell's elements including the CellMargins, CellFrame and CellFrameLabels. It does not include the space allocated for the cell bracket.

Examples

open all close all

Basic Examples  (2)

Set the PageWidth to be 60 characters for a stream:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Set the PageWidth to be 30 characters for a stream:

In[3]:=
Click for copyable input
In[4]:=
Click for copyable input

Compare the two resulting files:

In[5]:=
Click for copyable input
In[6]:=
Click for copyable input

Delete the temporary files:

In[7]:=
Click for copyable input

Create an Output cell with a fixed width:

In[1]:=
Click for copyable input
This is a bit of text

Scope  (3)

Properties & Relations  (2)

Introduced in 1988
(1.0)
|
Updated in 2003
(5.0)