From Wiki
Jump to navigation Jump to search

Initials (also known as drop caps, dropped caps, or versals) can be made in ConTeXt using the \placeinitial command, as in

\input knuth

Initials can be further customized with the \setupinitial command, which has several useful parameters, such as:

  • color, which defaults to the current color.
  • font, which defaults to boldface scaled to the number of text lines that the initial occupies.
  • n is the number of lines in the paragraph that the initial should occupy. It defaults to 3.
  • distance is the horizontal distance which initial line(s) of the paragraph should be indented beyond the space needed for the letter. It defaults to 0pt, and it can be negative.
  • before contains any commands that you would like to do prior to placing the initial. This parameter is empty by default.

By default, the initial is placed so that its left side is at the left margin and it has the same baseline as the lowest text line that it occupies. Some further parameters to contol its position are:

  • hoffset is the distance to the left (into the left margin) that the initial should be shifted from its default position. This defaults to 0pt.
  • voffset is the distance downward from its default position that the initial should be shifted. This defaults to 0pt.

The following example produces an awful-looking initial, but it illustrates how some of these parameters work:

\setupinitial[color=red, distance=24pt, n=4, hoffset=-16pt, before={\blank[2*big]}]

Here is some text.

\input knuth

Because the space carved out for the initial is rectangular, initials work best with a font with rectangular ornaments around the letter.

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:

\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]

\lettrine{A}{fter the three} \input ward