Difference between revisions of "Command/setupinterlinespace"
< Command
Jump to navigation
Jump to search
(Show separate invocations) |
|||
Line 80: | Line 80: | ||
== Example == | == Example == | ||
− | <context source= | + | <context source=yes mode=mkiv> |
− | \setuppapersize[A5] | + | \setuppapersize[A5][A5] |
\setupwhitespace[big] | \setupwhitespace[big] | ||
Line 102: | Line 102: | ||
\stoptext | \stoptext | ||
+ | |||
+ | </context> | ||
+ | |||
+ | == Example within {{cmd|startnarrower}}...{{cmd|stopnarrower}} == | ||
+ | <context source=yes mode=mkiv> | ||
+ | \setuppapersize[A5][A5] | ||
+ | \setupinterlinespace[5] % this has no effect before \starttext | ||
+ | |||
+ | \starttext | ||
+ | \input tufte % this is default, not 5 | ||
+ | \setupinterlinespace[big] | ||
+ | \input tufte % this is big | ||
+ | |||
+ | \startnarrower[left] | ||
+ | \setupinterlinespace[small] | ||
+ | \input tufte % this is small | ||
+ | \stopnarrower | ||
+ | |||
+ | \input tufte % this is big again | ||
+ | \stoptext | ||
+ | |||
</context> | </context> | ||
+ | |||
== See also == | == See also == | ||
* {{cmd|setupwhitespace}} to set up inter-paragraph spacing. | * {{cmd|setupwhitespace}} to set up inter-paragraph spacing. | ||
* {{cmd|setuplayout}} to set sizes of text areas. | * {{cmd|setuplayout}} to set sizes of text areas. | ||
+ | * {{cmd|setuplocalinterlinespace}} to set interline spacing locally. | ||
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == |
Revision as of 16:01, 27 July 2014
\setupinterlinespace
Syntax
\setupinterlinespace | |
\setupinterlinespace[...] | |
\setupinterlinespace[...,...=...,...] | |
[...] | reset small medium auto big on off |
height | number |
depth | number |
line | dimension |
top | number |
bottom | number |
Description
\setupinterlinespace sets up the distance between lines. can be used in three variants:
- Without any keywords:
\setupinterlinespace
The command sets the baselineskip to2.8ex
.
- With a keyword:
\setupinterlinespace[...]
The following keywords are available:- reset
- small
- medium
- big
- on
- off
- Setting all the parameters involved in line positioning:\setupinterlinespace[...,...=...,...]
line
: base interline spacing (baselineskip) (e.g. 3ex or 12pt)height
: size of strut as multiple ofline
(e.g. 0.72)depth
: size of strut as multiple ofline
(e.g. 0.28)top
: topskip (as multiple of line height)bottom
: maxdepth (as multiple of line height)stretch
: (glue) line stretching
When setting up the interlinespace, it matters which unit one chooses:
% interline space adapts itself to body font size \setupinterlinespace[line=2.8ex] % set interlinespace to 12pt for every font size --- don't do this! \setupinterlinespace[line=12pt] % set interlinespace for a particular body font size % Useful if you think in terms of "nine-point type on eleven-point leading" \definebodyfontenvironment[9pt][interlinespace=11pt]
A final note: it seems that \setupinterlinespace[line=XX\baselineskip] interacts badly with \setuplayout while \setupinterlinespace[big] works fine.
Example
\setuppapersize[A5][A5] \setupwhitespace[big] \starttext \the\baselineskip % The interlinespace does not change automatically when the font changes { \definedfont[Serif at 32pt] This is the long long title of my book\crlf baselineskip=\the\baselineskip } % Invoking \setupinterlinespace sets baselineskip to 2.8ex of current font { \definedfont[Serif at 32pt] \setupinterlinespace This is the long long title of my book\crlf baselineskip=\the\baselineskip } \stoptext
Example within \startnarrower...\stopnarrower
\setuppapersize[A5][A5] \setupinterlinespace[5] % this has no effect before \starttext \starttext \input tufte % this is default, not 5 \setupinterlinespace[big] \input tufte % this is big \startnarrower[left] \setupinterlinespace[small] \input tufte % this is small \stopnarrower \input tufte % this is big again \stoptext
See also
- \setupwhitespace to set up inter-paragraph spacing.
- \setuplayout to set sizes of text areas.
- \setuplocalinterlinespace to set interline spacing locally.
Help from ConTeXt-Mailinglist/Forum
All issues with: