Difference between revisions of "Command/stretched"
< Command
(Created page with "Documentation for \stretched") |
Tags: Mobile web edit Mobile edit |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
</cd:command> | </cd:command> | ||
</cd:variants> | </cd:variants> | ||
− | <cd:description>Use this command to change the inter-character spacing (known as tracking).</cd:description> | + | <cd:description>Use this command to change the inter-character spacing (known as tracking). |
+ | |||
+ | The <code>\stretched</code> command is actually just a frontend for the <code>\kern</code> command. And the value of <code>factor</code> isn’t multiplied by the kerning specified by the font, but rather added to it. So, to decrease the distance between characters, <code>factor</code> should be negative. And to increase it, <code>factor</code> should be positive. </cd:description> | ||
<cd:examples><cd:example title=""><context source="yes"> | <cd:examples><cd:example title=""><context source="yes"> | ||
\ruledhbox{\stretched[width=2cm]{\bfd to the limit}} | \ruledhbox{\stretched[width=2cm]{\bfd to the limit}} | ||
Line 23: | Line 25: | ||
\ruledhbox{\stretched[width=8cm]{\bfd to the limit}} | \ruledhbox{\stretched[width=8cm]{\bfd to the limit}} | ||
\ruledhbox{\stretched[width=10cm]{\bfd to the limit}} | \ruledhbox{\stretched[width=10cm]{\bfd to the limit}} | ||
+ | </context></cd:example><cd:example title="Give the title of a poem the same appearance as its text has, but stretched"><context source="yes"> | ||
+ | \setupstretched[factor=0.3] %the higher the number, the more the stretch | ||
+ | \setuphead[title][ | ||
+ | style=\tf, | ||
+ | ] | ||
+ | |||
+ | \stretched{\title{Syd}} | ||
+ | |||
+ | \blank[line] % one blank line | ||
+ | I'm a poet, don't you know it \crlf | ||
+ | And the winds, they can blow it | ||
</context></cd:example></cd:examples> | </context></cd:example></cd:examples> | ||
<cd:notes></cd:notes> | <cd:notes></cd:notes> |
Latest revision as of 12:47, 1 November 2023
Contents
\stretched
Summary
The command \stretched is used for inter-character spacing
Settings
Description
Use this command to change the inter-character spacing (known as tracking).
The \stretched
command is actually just a frontend for the \kern
command. And the value of factor
isn’t multiplied by the kerning specified by the font, but rather added to it. So, to decrease the distance between characters, factor
should be negative. And to increase it, factor
should be positive.
Examples
Example 1
\ruledhbox{\stretched[width=2cm]{\bfd to the limit}} \ruledhbox{\stretched[width=4cm]{\bfd to the limit}} \ruledhbox{\stretched[width=6cm]{\bfd to the limit}} \ruledhbox{\stretched[width=8cm]{\bfd to the limit}} \ruledhbox{\stretched[width=10cm]{\bfd to the limit}}
Give the title of a poem the same appearance as its text has, but stretched
\setupstretched[factor=0.3] %the higher the number, the more the stretch \setuphead[title][ style=\tf, ] \stretched{\title{Syd}} \blank[line] % one blank line I'm a poet, don't you know it \crlf And the winds, they can blow it