Background
Looking to reproduce the following text layout (ignore the slight curve to the text, it's a magazine scan of a Robert Frost's Fire and Ice, first published in 1920):
The first letter is ornate and the first word is all caps.
Problem
Using \definefirstline with an alternative style that sets the first word to capital letters is proving elusive. I suspect the implementation is incomplete because changing the style to use different colours or fonts works.
Code
Here's the styling code so far (main.tex):
\setupindenting[yes, 0.75em]
\setupinitial[
state=start,
n=2,
distance=\zeropoint,
]
\definealternativestyle[PoemFirstWord][\WORD][]
\definefirstline[PoemFirstLine][
alternative=word,
style=PoemFirstWord,
n=1,
]
\definestartstop[poem][
before={\startlines \setfirstline[PoemFirstLine] \placeinitial},
after={\stoplines},
]
\setuplines[indenting=odd]
\starttext
\input poem.tex
\stoptext
Here's the poem.tex file:
\startpoem
Some say the world will end in fire,
Some say in ice.
From what I've tasted of desire
I hold with those who favor fire.
But if it had to perish twice,
I think I know enough of hate
To say that for destruction ice
Is also great,
And would suffice.
\stoppoem
Output
Running the code produces:
The word "Some" is not in all caps, even though PoemFirstWord is an alternative style that should work with the style option of definefirstline.
Questions
- How would you create an alternative style that works with
\placeinitialand\startlineswithin a custom start/stop macro? - Bonus. How would you indent the second line to avoid overlapping the initial, ornate S? (Is there something like
definesecondline?) - Bonus. How would you prevent indenting the third line?
Constraints
- The file
poem.texcannot be modified (it is autogenerated). - Cannot use the lettrine module because it requires changing
poem.tex.
Related
Version
$ context --version
mtx-context | current version: 2019.12.06 19:45


