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:
-
Infinity an infinite width (no line breaking) n explicit width in characters - SetOptions[stream,PageWidth->val] resets the line width allowed for an open stream.
- Possible settings for cells are:
-
WindowWidth the width of the window on the screen PaperWidth the width of the page as it would be printed n explicit 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.
- PageWidth->UpTo[n] is equivalent to the lesser of PageWidth->WindowWidth and PageWidth->n.
- If the effective PageWidth is less than the window's width, the alignment of the contents of the cell is controlled by the Alignment option.
Examples
open allclose allBasic Examples (2)
Scope (4)
Set the width to use the full width of the window:
Four score and seven years ago, our fathers brought forth upon this continent a new nation: conceived in liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war...testing whether that nation, or any nation so conceived and so dedicated. . .Set the width to the paper width for the default printer:
Four score and seven years ago, our fathers brought forth upon this continent a new nation: conceived in liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war...testing whether that nation, or any nation so conceived and so dedicated. . .Set the width to be as much as 600 points, or narrower if the window is narrower:
Four score and seven years ago, our fathers brought forth upon this continent a new nation: conceived in liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war...testing whether that nation, or any nation so conceived and so dedicated. . .Properties & Relations (3)
The PageWidth cell setting includes the horizontal space consumed by CellMargins:
This is a bit of textThis is a bit of textThis is a bit of textThis is a bit of textPageWidth affects the width of CellFrame and the position of CellFrameLabels:
This is a bit of textThis is a bit of textThis is a bit of textThis is a bit of textAlignment determines how cells affected by a narrow PageWidth align:
abcText
Wolfram Research (1988), PageWidth, Wolfram Language function, https://reference.wolfram.com/language/ref/PageWidth.html (updated 2020).
CMS
Wolfram Language. 1988. "PageWidth." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/PageWidth.html.
APA
Wolfram Language. (1988). PageWidth. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PageWidth.html