Changes

Jump to navigation Jump to search
no edit summary
|attributes=
}}
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>definefirstline</syntax>
== [[Help:Reference|Syntax]] ==
<tr valign="top" class="third">
<td class="cmd">[[Command/keyword:color|color]]</td>
<td>[[ColorsColor|IDENTIFIER]]: color name</td>
</tr>
</table>
[[Wishes_for_Latin_Modern#General_things|Latin Modern won’t do]]).
== Example Examples ==  === Bold and Small Caps ===
Typeset the first line once in bold, and then in small caps:
\setfirstline[sixbluewords] \input ward \par
\stoptext
</context>
 
=== Changing Case ===
 
Technically, `\WORD` is not a style, so to configure words in uppercase a different approach is necessary. The style can be defined in terms of a Lua handler, such as:
 
<context mode=mkiv source=yes>
\definealternativestyle[UpperCase][{\bf\uppercasing}][]
</context>
 
Where the handler code resembles:
 
<context mode=mkiv source=yes>
\startluacode
 
fonts.handlers.otf.addfeature {
name = "uppercasing",
type = "substitution",
prepend = true,
data = characters.uccodes
}
 
fonts.handlers.otf.addfeature {
name = "lowercasing",
type = "substitution",
prepend = true,
data = characters.lccodes
}
 
\stopluacode
 
\definefontfeature[lowercasing][lowercasing=yes]
\definefontfeature[uppercasing][uppercasing=yes]
 
\unexpanded\def\uppercasing{\addff{uppercasing}}
\unexpanded\def\lowercasing{\addff{lowercasing}}
 
\definealternativestyle[UpperCase][{\bf\uppercasing}][]
 
\definefirstline [UpperCaseWords] [
alternative=word,
style=UpperCase,
n=1,
]
 
\starttext
\setfirstline[UpperCaseWords] \input ward
\stoptext
</context>
[[Category:Command/Fonts|definefirstline]]
[[Category:Command/Paragraphs|defineindenting]]

Navigation menu