LineSpacing
Details
- LineSpacing->{c,0} leaves space so that the total height of each line is c times the height of its contents.
- LineSpacing->{0,n} makes the total height of each line exactly n printer's points.
- LineSpacing->{c,n} makes the total height c times the height of the contents plus n printer's points.
- LineSpacing->{c,n,max} limits the amount of extra space to be max times the height of a single line of ordinary text in the current font.
- A typical default setting for text is LineSpacing->{1,1}, which leaves space for the contents of the line, plus 1 printer's point (approximately
of an inch) of extra space. - LineSpacing->{2,0} makes text "double spaced".
- LineSpacing->{1,-n} tightens text by n printer's points.
- LineSpacing applies both to ordinary text and Wolfram Language expressions, including graphics.
- A typical default setting for general Wolfram Language expressions is LineSpacing->{1.25,0,2}.
- In ordinary text, LineSpacing determines the spacing between lines produced by automatic linebreaking. For lines produced by explicit newline characters, ParagraphSpacing is added.
- In Wolfram Language expressions, LineSpacing is used whether lines are produced by automatic linebreaking or by explicit newline characters.
- Extra space specified by LineSpacing is inserted equally above and below a line, except that no extra space is inserted before the first line or after the last line of an expression or cell.
Examples
open all close allBasic Examples (3)
t = StringJoin@@Table["abcde ", {40}];Framed@Text[Style[t, LineSpacing -> {2, 0}]]Make the height of each line 10 printer's points:
t = StringJoin@@Table["abcde ", {40}];Framed@Text[Style[t, LineSpacing -> {0, 10}]]Single spacing with 5 printer's points of extra space added to each line:
t = StringJoin@@Table["abcde ", {40}];Framed@Text[Style[t, LineSpacing -> {1, 5}]]Scope (2)
Limit the line space to be half the height of a single line:
t = StringJoin@@Table["abcde ", {40}];Framed@Text[Style[t, LineSpacing -> {2, 0, 1 / 2}]]Tighten text by 3 printer's points:
Framed@Text[Style[t, LineSpacing -> {1, -3}]]Create a notebook with double spacing:
nb = CreateDocument[ExpressionCell[{}, "Input", LineSpacing -> {2, 0}]];When you press the
key, the Wolfram System leaves two times the height of each line:
See Also
Tech Notes
Related Guides
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1996), LineSpacing, Wolfram Language function, https://reference.wolfram.com/language/ref/LineSpacing.html (updated 2007).
CMS
Wolfram Language. 1996. "LineSpacing." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/LineSpacing.html.
APA
Wolfram Language. (1996). LineSpacing. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LineSpacing.html
BibTeX
@misc{reference.wolfram_2026_linespacing, author="Wolfram Research", title="{LineSpacing}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/LineSpacing.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_linespacing, organization={Wolfram Research}, title={LineSpacing}, year={2007}, url={https://reference.wolfram.com/language/ref/LineSpacing.html}, note=[Accessed: 12-June-2026]}