Difference between revisions of "Command/textwidth"
< Command
Jump to navigation
Jump to search
m |
m |
||
Line 7: | Line 7: | ||
The following example scales a long line of text to prevent it from breaking over multiple lines. | The following example scales a long line of text to prevent it from breaking over multiple lines. | ||
− | <context | + | <context source=yes> |
\starttext | \starttext | ||
\startcolumns[rule=on,] | \startcolumns[rule=on,] |
Revision as of 04:40, 28 February 2014
Description
The \textwidth command contains a value that represents the width of the current line on the page. The value is contextual in that if the current line is within a columnar environment, then \textwidth returns the value of the current column width.
Example
The following example scales a long line of text to prevent it from breaking over multiple lines.
\starttext \startcolumns[rule=on,] \scale[maxwidth=\textwidth]{ This line uses the scaled command to fit within a column's width. } \column This line avoids the scaled command and will be split using line breaks. \stopcolumns \stoptext