[NTG-context] \setfirstline is applied to whole paragraph

Nicola nvitacolonna at gmail.com
Wed Aug 12 14:04:22 CEST 2020


When I typeset the example at

    https://wiki.contextgarden.net/Command/definefirstline

(reported below for your convenience), \setfirstline is applied to the
whole first paragraph, which is laid out on a single line (hence, it is
cropped at the edge of the page). Besides, the second \setfirstline is
not applied at all, i.e., there are no small caps. If I comment out the
first \setfirstline, then the second one does produce small caps, but
again, a whole paragraph is set in small caps, not just the first line.

$ context --version
mtx-context     | ConTeXt Process Management 1.03
mtx-context     |
mtx-context     | main context file: /Users/nicola/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context     | current version: 2020.08.11 15:59
mtx-context     | main context file: /Users/nicola/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkiv/context.mkxl
mtx-context     | current version: 2020.08.11 15:59

Nicola

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setupbodyfont [heros] %% important: smallcaps capable font!

\definefirstline [italicfirstline] [
  alternative=line,
  style=italic,
]

\definefirstline [smallcapsfirstline] [
  alternative=line,
  color=darkred,
  style=smallcaps,
]

\starttext

  % \setfirstline[italicfirstline]    \input knuth \par
  \setfirstline[smallcapsfirstline] \input knuth \par

\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the ntg-context mailing list