Difference between revisions of "Command/setupinitial"
< Command
Jump to navigation
Jump to search
Line 128: | Line 128: | ||
\placeinitial | \placeinitial | ||
\input knuth | \input knuth | ||
+ | |||
+ | \blank[2*big]} | ||
Here is some text 2. | Here is some text 2. |
Revision as of 17:27, 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.
Lettrine module
Beware: At this point (2020-12), the lettrine module doesn’t work with LMTX!
If you want more options to customize your initials, try the lettrine module. An example of the types of customizations that this module allows is:
\usemodule[lettrine] \def \LettrineStyle{\definefontsynonym[LettrineFont][Italic]} \setuplettrine [A][Lines=2,Findent=0.2em,Nindent=0.01em,FontHook={\LettrineStyle}] \setuplettrine [T][Lines=2,Findent=0.35em,Nindent=0.01em,FontHook={\LettrineStyle},Hang=.25] \setuplettrine [I][Lines=2,Findent=0.3em,Nindent=0.01em,FontHook={\LettrineStyle},Hang=.25] \setuplettrine [O][Lines=2,Findent=0.2em,Nindent=0.01em,FontHook={\LettrineStyle}] \setuplettrine [C][Lines=2,Findent=0.3em,Nindent=0.01em,FontHook={\LettrineStyle}] \setuplettrine [W][Lines=2,Findent=0.3em,Nindent=0.01em,FontHook={\LettrineStyle},Hang=.34] \starttext \lettrine{A}{fter the three} \input ward \stoptext
Examples
Example 1
The following example produces an awful-looking initial, but it illustrates how some of these parameters work:
\definepapersize[sheet][width=150mm,height=100mm] \setuppapersize[sheet] \setuppagenumbering[location=] \setuplayout[width=150mm,backspace=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 \stoptextinternal error: copy error BCHD7E/cropped.pdf
Notes
See also
- \defineinitial placeinitial
- typo-drp.mkiv
- \placeinitial placeinitial