Strut (typesetting)
Encyclopedia
In typesetting
Typesetting
Typesetting is the composition of text by means of types.Typesetting requires the prior process of designing a font and storing it in some manner...

, a strut is an invisible character or element, used to ensure that a text has a minimum height and depth, even if no other elements are included.

For example, LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

 and plainTeX
TeX
TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

 provide the command
\strut
to insert a font size specific strut. In LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

 it has a height of 70% of the baseline skip (the distance between the baselines of two consecutive lines of text) and a depth of 30% of the baseline skip. It ensures that two vertical stacked boxes which include such a strut have the same distance like two normal consecutive lines. LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

also supports the creation of general struts using the command:
\rule[-depth]{0pt}{total height}

where \strut is equivalent in size to \rule[-.3\baselineskip]{0pt}{\baselineskip}.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK