TotalWidth
✖
TotalWidth
is an option that can be set for output streams to specify the maximum total number of characters of text that should be printed for each output expression. Short forms of expressions are given if the number of characters needed to print the whole expression is too large.
Details

- TotalWidth bounds the actual numbers of characters generated. Line breaks are not counted.
- TotalWidth->Infinity allows expressions of any length to be printed.
- SetOptions[stream,TotalWidth->n] resets the total width allowed for an open stream.
Examples
Basic Examples (1)Summary of the most common use cases
Set the TotalWidth to be 60 characters for a stream:

https://wolfram.com/xid/0rsy5hj1e-c81xvg

https://wolfram.com/xid/0rsy5hj1e-lrm980
Set the TotalWidth to be 30 characters for a stream:

https://wolfram.com/xid/0rsy5hj1e-6xnst

https://wolfram.com/xid/0rsy5hj1e-doiwge
Compare the two resulting files:

https://wolfram.com/xid/0rsy5hj1e-fdqe2a

https://wolfram.com/xid/0rsy5hj1e-bjjoej

https://wolfram.com/xid/0rsy5hj1e-ekfuwo
Wolfram Research (1988), TotalWidth, Wolfram Language function, https://reference.wolfram.com/language/ref/TotalWidth.html.
Text
Wolfram Research (1988), TotalWidth, Wolfram Language function, https://reference.wolfram.com/language/ref/TotalWidth.html.
Wolfram Research (1988), TotalWidth, Wolfram Language function, https://reference.wolfram.com/language/ref/TotalWidth.html.
CMS
Wolfram Language. 1988. "TotalWidth." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TotalWidth.html.
Wolfram Language. 1988. "TotalWidth." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TotalWidth.html.
APA
Wolfram Language. (1988). TotalWidth. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TotalWidth.html
Wolfram Language. (1988). TotalWidth. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TotalWidth.html
BibTeX
@misc{reference.wolfram_2025_totalwidth, author="Wolfram Research", title="{TotalWidth}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/TotalWidth.html}", note=[Accessed: 06-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_totalwidth, organization={Wolfram Research}, title={TotalWidth}, year={1988}, url={https://reference.wolfram.com/language/ref/TotalWidth.html}, note=[Accessed: 06-June-2025
]}