Changes

Jump to navigation Jump to search
2,842 bytes added ,  14:48, 3 December 2021
Created page with "Documentation for \setuptolerance"
<cd:commandgroup name="setuptolerance" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\setuptolerance</tt> configures space stretching
</cd:shortdesc>
<cd:variants>
<cd:command category="whitespace" file="spac-hor.mkiv" interfacedate="2020-06-19T13:41" interfacefile="i-tolerance.xml" level="style" name="setuptolerance" variantnumber="1">
<cd:arguments>
<cd:keywords list="yes" ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="horizontal"></cd:constant>
<cd:constant type="vertical"></cd:constant>
<cd:constant type="verystrict">horizontal: <code>\tolerance 200</code>
vertical: <code>\def\bottomtolerance{0}</code></cd:constant>
<cd:constant type="strict">horizontal: <code>\tolerance 1500</code>
vertical: <code>\def\bottomtolerance{0.050}</code></cd:constant>
<cd:constant type="tolerant">horizontal: <code>\tolerance 3000</code>
vertical: <code>\def\bottomtolerance{0.075}</code></cd:constant>
<cd:constant type="verytolerant">horizontal: <code>\tolerance 4500</code>
vertical: <code>\def\bottomtolerance{0.100}</code></cd:constant>
<cd:constant type="space">horizontal: <code>\spaceskip 0.5em plus 0.25em minus 0.25em</code></cd:constant>
<cd:constant type="stretch">horizontal: <code>\emergencystretch\bodyfontsize</code></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>Set up how tolerant TeX should be of ‘ugly’ stretching of spaces. The more stretching you allow, the easier it is for TeX to choose a stretched-out underfull line instead of a margin-invading overfull line.

Use <code>\setuptolerance[horizontal,...]</code> for interword spacing and <code>\setuptolerance[vertical,...]</code> for column stretching. Don't try to combine these two.

The default orientation is ''horizontal'', so the following two are equivalent:

<texcode>
\setuptolerance[horizontal,tolerant]
% and
\setuptolerance[tolerant]
</texcode>
</cd:description>
<cd:examples><cd:example title=" Tolerance of framed texts">Framed texts don't inherit the global tolerance setting, but instead use their own tolerance as well:

<texcode>
%% global tolerance
\setuptolerance
[tolerant]

%% tolerance for framed texts
\setupframedtext
[align=verytolerant]
</texcode></cd:example><cd:example title=" Tolerance of float captions">Float captions don't inherit the global tolerance setting, but instead use their own tolerance:

<texcode>
%% global tolerance
\setuptolerance
[tolerant]

%% tolerance for captions
\setupcaption
[align=tolerant]
</texcode></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="spac-hor.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Whitespace"></cd:wikipage></cd:seealso>
</cd:commandgroup>

Navigation menu