Looking to create a stylized chapter heading using the first character of the heading title.


The stem (descender) distance of text causes the containing frame's offset to alter the location of the emphasized first letter, which is obvious from the following picture:

Influential Stem

The problematic line in the code below is this line, which was added to ensure the title text does not incur a line-break, as suggested from an answer to a previous question:


When the line above is simply:


Then the alignment is perfect, but when the text is too long an undesired line-break ensues.


A minimal working example:

\definefont[BookFontChapterHeader][SansBoldItalic scaled 5000]
\definefont[BookStyleFontChapterCharacter][SerifItalic scaled 20000]


% Extract first character

% Use a nested frame to keep the overlain large letter together with
% the chapter title.
    \inframed[align=right, frame=on]{%
        % Calculate the large letter's offset using the first character's
        % width. This allows font changes without significantly affecting
        % the distance between the emphasized first character of the
        % chapter title and the complete chapter title.
        % Shift the first character back relative to the chapter title.
        % Ensure the text fits on the page.

% Avoid duplication...



How do you make ConTeXt ignore the stem height while still scaling the text to fit within the \textwidth margins?

  • 1
    Try \inframed[align=right, frame=on, location=height]{%, the frame will be positioned relative to the baseline (not the depth) of the text. Jan 6, 2014 at 21:58

1 Answer 1


The BookStyleChapterFramed needs its height adjusted:


The frame needs to be adjusted as per phg's comment:

\inframed[align=right, frame=off, location=height]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .