Difference between revisions of "Command/setupinitial"
< Command
Jump to navigation
Jump to search
Line 88: | Line 88: | ||
<cd:description>Because the space carved out for the initial is rectangular, initials work best with a font with rectangular ornaments around the letter. | <cd:description>Because the space carved out for the initial is rectangular, initials work best with a font with rectangular ornaments around the letter. | ||
− | |||
− | + | </cd:description> | |
+ | <cd:examples><cd:example title="The following example produces an awful-looking initial, but it illustrates how some of these parameters work."><context mode="mkiv" source="yes"> | ||
+ | \definepapersize[sheet][width=120mm,height=120mm] | ||
+ | \setuppapersize[sheet] | ||
+ | \setuppagenumbering[location=] | ||
+ | \setuplayout[width=120mm,backspace=20mm,topspace=0mm,header=0mm,headerdistance=0mm] | ||
+ | |||
+ | \starttext | ||
− | + | Here is some text 1. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | \ | + | \setupinitial[color=darkred, distance=15mm, n=2, m=2, before={\blank[big]\hairline\blank[big]}] |
− | \ | + | \placeinitial |
− | \ | + | \input knuth |
− | + | ||
+ | \blank[2*big] | ||
+ | Here is some text 2. | ||
− | + | \setupinitial[n=3, m=4] | |
− | + | \placeinitial | |
+ | \input knuth | ||
+ | \stoptext | ||
− | <context mode="mkiv" source="yes"> | + | </context></cd:example><cd:example title="Details about offset"><context mode="mkiv" source="yes"> |
− | \definepapersize[sheet][width= | + | \definepapersize[sheet][width=120mm,height=250mm] |
\setuppapersize[sheet] | \setuppapersize[sheet] | ||
\setuppagenumbering[location=] | \setuppagenumbering[location=] | ||
− | \setuplayout[width= | + | \setuplayout[width=120mm,backspace=20mm,topspace=0mm,header=0mm,headerdistance=0mm] |
\starttext | \starttext | ||
Line 123: | Line 124: | ||
Here is some text 1. | Here is some text 1. | ||
− | \setupinitial[color=darkred | + | \setupinitial[color=darkred] |
\placeinitial | \placeinitial | ||
\input knuth | \input knuth | ||
Line 131: | Line 132: | ||
Here is some text 2. | Here is some text 2. | ||
− | \setupinitial[ | + | \setupinitial[hoffset=5mm] |
+ | \placeinitial | ||
+ | T{\tt hoffset=5mm}\input knuth | ||
+ | |||
+ | \setupinitial[hoffset=-5mm] | ||
+ | \placeinitial | ||
+ | T{\tt hoffset=-5mm}\input knuth | ||
+ | |||
+ | |||
+ | \setupinitial[voffset=5mm] | ||
+ | \placeinitial | ||
+ | T{\tt voffset=5mm}\input knuth | ||
+ | |||
+ | \setupinitial[voffset=-5mm] | ||
\placeinitial | \placeinitial | ||
− | \input knuth | + | T{\tt voffset=-5mm}\input knuth |
\stoptext | \stoptext |
Revision as of 17:36, 12 December 2020
Contents
\setupinitial
Summary
Initials (also known as drop caps, dropped caps, or versals) can be made in ConTeXt using the \placeinitial command.
The command \setupinitial
is used to customize this decorative or ornate first letter(s) to prose at the start of chapters, sections, paragraphs, and so forth.
Settings
\setupinitial[...,...][...=...,...] | |
[...,...] | name |
n | number |
m | number |
before | command |
distance | dimension |
hoffset | dimension |
voffset | line dimension |
style | style command |
color | color |
font | font |
text | text |
location | margin text |
method | first last auto none |
Option | Explanation | ||
---|---|---|---|
n |
| ||
m |
| ||
before |
| ||
distance |
| ||
hoffset |
| ||
voffset |
| ||
style |
| ||
color |
| ||
font |
| ||
text |
| ||
location |
| ||
method |
|
Description
Because the space carved out for the initial is rectangular, initials work best with a font with rectangular ornaments around the letter.
Examples
The following example produces an awful-looking initial, but it illustrates how some of these parameters work.
\definepapersize[sheet][width=120mm,height=120mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=120mm,backspace=20mm,topspace=0mm,header=0mm,headerdistance=0mm] \starttext Here is some text 1. \setupinitial[color=darkred, distance=15mm, n=2, m=2, before={\blank[big]\hairline\blank[big]}] \placeinitial \input knuth \blank[2*big] Here is some text 2. \setupinitial[n=3, m=4] \placeinitial \input knuth \stoptext
Details about offset
\definepapersize[sheet][width=120mm,height=250mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=120mm,backspace=20mm,topspace=0mm,header=0mm,headerdistance=0mm] \starttext Here is some text 1. \setupinitial[color=darkred] \placeinitial \input knuth \blank[2*big] Here is some text 2. \setupinitial[hoffset=5mm] \placeinitial T{\tt hoffset=5mm}\input knuth \setupinitial[hoffset=-5mm] \placeinitial T{\tt hoffset=-5mm}\input knuth \setupinitial[voffset=5mm] \placeinitial T{\tt voffset=5mm}\input knuth \setupinitial[voffset=-5mm] \placeinitial T{\tt voffset=-5mm}\input knuth \stoptext
Notes
See also
- \defineinitial placeinitial
- typo-drp.mkiv
- \placeinitial placeinitial