Difference between revisions of "Command/setupinitial"
< Command
Jump to navigation
Jump to search
Line 90: | Line 90: | ||
</cd:description> | </cd:description> | ||
− | <cd:examples><cd:example title="The following example produces an awful-looking initial, but it illustrates how some of these parameters work. | + | <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=200mm] | \definepapersize[sheet][width=120mm,height=200mm] | ||
\setuppapersize[sheet] | \setuppapersize[sheet] | ||
Line 98: | Line 100: | ||
\starttext | \starttext | ||
− | + | \setupinitial[color=darkred, distance=10mm, before={\blank[big]\hairline\blank[big]}] | |
+ | |||
+ | \type[option=context]{\setupinitial[n=2, m=2]} | ||
− | \setupinitial[ | + | \setupinitial[n=2, m=2] |
\placeinitial | \placeinitial | ||
\input knuth | \input knuth | ||
Line 106: | Line 110: | ||
\blank[2*big] | \blank[2*big] | ||
− | + | \type[option=context]{\setupinitial[n=3, m=4]} | |
\setupinitial[n=3, m=4] | \setupinitial[n=3, m=4] | ||
Line 114: | Line 118: | ||
\blank[2*big] | \blank[2*big] | ||
− | + | \type[option=context]{\setupinitial[location=margin,n=3, m=1,distance=5mm]} | |
\setupinitial[location=margin,n=3, m=1,distance=5mm] | \setupinitial[location=margin,n=3, m=1,distance=5mm] | ||
Line 136: | Line 140: | ||
\input knuth | \input knuth | ||
− | \blank[ | + | \blank[big] |
− | + | \type[option=context]{\setupinitial[hoffset=0mm]} | |
− | |||
\setupinitial[hoffset=0mm] | \setupinitial[hoffset=0mm] | ||
\placeinitial | \placeinitial | ||
− | + | \input knuth | |
+ | |||
+ | \blank[big] | ||
+ | \type[option=context]{\setupinitial[hoffset=5mm]} | ||
\setupinitial[hoffset=5mm] | \setupinitial[hoffset=5mm] | ||
\placeinitial | \placeinitial | ||
− | + | \input knuth | |
+ | |||
+ | \blank[big] | ||
+ | \type[option=context]{\setupinitial[hoffset=-5mm]} | ||
\setupinitial[hoffset=-5mm] | \setupinitial[hoffset=-5mm] | ||
\placeinitial | \placeinitial | ||
− | + | \input knuth | |
\stoptext | \stoptext | ||
Line 219: | Line 228: | ||
</context></cd:example><cd:example title="Details about font"><context mode="mkiv" source="yes"> | </context></cd:example><cd:example title="Details about font"><context mode="mkiv" source="yes"> | ||
− | \definepapersize[sheet][width=120mm,height= | + | \definepapersize[sheet][width=120mm,height=120mm] |
\setuppapersize[sheet] | \setuppapersize[sheet] | ||
\setuppagenumbering[location=] | \setuppagenumbering[location=] |
Revision as of 21:29, 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
Example 1
The following example produces an awful-looking initial, but it illustrates how some of these parameters work.
\definepapersize[sheet][width=120mm,height=200mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=100mm,backspace=15mm,topspace=0mm,header=0mm,headerdistance=0mm] \starttext \setupinitial[color=darkred, distance=10mm, before={\blank[big]\hairline\blank[big]}] \type[option=context]{\setupinitial[n=2, m=2]} \setupinitial[n=2, m=2] \placeinitial \input knuth \blank[2*big] \type[option=context]{\setupinitial[n=3, m=4]} \setupinitial[n=3, m=4] \placeinitial \input knuth \blank[2*big] \type[option=context]{\setupinitial[location=margin,n=3, m=1,distance=5mm]} \setupinitial[location=margin,n=3, m=1,distance=5mm] \placeinitial \input knuth \stoptext
Details about hoffset
\definepapersize[sheet][width=120mm,height=200mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=100mm,backspace=15mm,topspace=0mm,header=0mm,headerdistance=0mm] \starttext Here is some text 1. \setupinitial[color=darkred] \placeinitial \input knuth \blank[big] \type[option=context]{\setupinitial[hoffset=0mm]} \setupinitial[hoffset=0mm] \placeinitial \input knuth \blank[big] \type[option=context]{\setupinitial[hoffset=5mm]} \setupinitial[hoffset=5mm] \placeinitial \input knuth \blank[big] \type[option=context]{\setupinitial[hoffset=-5mm]} \setupinitial[hoffset=-5mm] \placeinitial \input knuth \stoptext
Details about voffset
\definepapersize[sheet][width=120mm,height=200mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=100mm,backspace=15mm,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[voffset=0mm] \placeinitial T{\tt\bf voffset=0mm}~\input knuth \setupinitial[voffset=5mm] \placeinitial T{\tt\bf voffset=5mm}~\input knuth \setupinitial[voffset=-5mm] \placeinitial T{\tt\bf voffset=-5mm}~\input knuth \stoptext
Details about font
\definepapersize[sheet][width=120mm,height=200mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=100mm,backspace=15mm,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[font=Bold at 45pt] \placeinitial \input knuth Here is some text 3. \setupinitial[font=SansBold at 45pt] \placeinitial \input knuth \stoptext
Details about font
\definepapersize[sheet][width=120mm,height=120mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=100mm,backspace=15mm,topspace=0mm,header=0mm,headerdistance=0mm] \starttext Here is some text 1. \setupinitial[color=darkred,text=Here] \placeinitial \input knuth \stoptext
Notes
See also
- \defineinitial placeinitial
- typo-drp.mkiv
- \placeinitial placeinitial