Difference between revisions of "Command/placeinitial"

From Wiki
Jump to navigation Jump to search
Line 27: Line 27:
  
 
\stoptext
 
\stoptext
</context></cd:example><cd:example title="Short Paragraphs">When the first paragraph does not take up the entire height of the drop-cap, use the {{cmd|forgetinitial}} command to indicate when the drop-cap ends.
+
</context></cd:example><cd:example title="Short Paragraphs">When the first paragraph does not take up the entire height of the drop-cap, there are a few ways to allow the second paragraph to be correctly aligned.
 +
 
 +
Use the {{cmd|setupinital}} command with the continue option to indicate that the drop-cap (lettrine) is to be protected (i.e., no text may overlap the lettrine):
 +
 
 +
<context mode="mkiv" source="yes">
 +
\setupinitial[n=2,continue=yes]
 +
 
 +
\setuphead[chapter][
 +
  after={\placeinitial},
 +
  page=no,
 +
]
 +
 
 +
\starttext
 +
\chapter{one}
 +
Thomas Jefferson wrote:
 +
 
 +
We hold these truths to be self-evident.
 +
 
 +
\chapter{two}
 +
\input knuth
 +
 
 +
We hold these truths to be self-evident.
 +
\stoptext
 +
</context>
 +
 
 +
Another way to indicate the end of the drop-cap is to use the {{cmd|forgetinitial}} command, as follows:
  
 
<context mode="mkiv" source="yes">
 
<context mode="mkiv" source="yes">

Revision as of 03:00, 19 June 2023


\placeinitial

Summary

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

See \setupinitial for customization.

Settings

\placeinitial[...]
[...]name

Description

Examples

basics

\definepapersize[sheet][width=120mm,height=60mm]
\setuppapersize[sheet]
\setuppagenumbering[location=]
\setuplayout[width=100mm,backspace=15mm,topspace=0mm,header=0mm,headerdistance=0mm,footer=0mm,footerdistance=0mm]

\starttext

\placeinitial
\input knuth

\stoptext

Short Paragraphs

When the first paragraph does not take up the entire height of the drop-cap, there are a few ways to allow the second paragraph to be correctly aligned.

Use the \setupinital command with the continue option to indicate that the drop-cap (lettrine) is to be protected (i.e., no text may overlap the lettrine):

\setupinitial[n=2,continue=yes]

\setuphead[chapter][
  after={\placeinitial},
  page=no,
]

\starttext
\chapter{one}
Thomas Jefferson wrote:

We hold these truths to be self-evident.

\chapter{two}
\input knuth

We hold these truths to be self-evident.
\stoptext

Another way to indicate the end of the drop-cap is to use the \forgetinitial command, as follows:

\enableexperiments[autoforgetinitials]
\setupinitial[n=2, style=\tfd, location=text]
\setuphead[chapter][after={\placeinitial}]

\starttext
\chapter

Short paragraph \par

\forgetinitial \input tufte

\stoptext
internal error: copy error 8weyYI/cropped.pdf

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: