Difference between revisions of "Command/Cap"
< Command
Jump to navigation
Jump to search
m (Add history note.) |
(Merge examples; add code demonstrating \Word{\sc ...} trick.) |
||
Line 14: | Line 14: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
== Description == | == Description == | ||
Turns the first character of the text into a small capital, regardless of case. In Mkii, this works as a solution for fonts lacking small capitals. | Turns the first character of the text into a small capital, regardless of case. In Mkii, this works as a solution for fonts lacking small capitals. | ||
− | |||
== Example == | == Example == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<context source='yes'> | <context source='yes'> | ||
− | \Cap{mayday, mayday} | + | \setupbodyfont[9pt] |
− | + | Uppercase or lowercase to small caps:\crlf | |
+ | \Cap{Mayday, Mayday}; \Cap{mayday, mayday}.\crlf | ||
− | + | Punctuation counts as the first character:\crlf | |
+ | \Cap{'ayday, 'ayday}.\crlf | ||
− | + | First letter uppercase and the rest small capitals:\crlf | |
− | + | \Word{\sc andra moi ennepe}\crlf | |
− | \ | + | (May not work with the \CONTEXT\ on this wiki,\crlf |
+ | but should work on your local install.) | ||
</context> | </context> | ||
Revision as of 20:13, 28 March 2012
\Cap
Syntax
\cap{...} | |
{...} | text |
Description
Turns the first character of the text into a small capital, regardless of case. In Mkii, this works as a solution for fonts lacking small capitals.
Example
\setupbodyfont[9pt] Uppercase or lowercase to small caps:\crlf \Cap{Mayday, Mayday}; \Cap{mayday, mayday}.\crlf Punctuation counts as the first character:\crlf \Cap{'ayday, 'ayday}.\crlf First letter uppercase and the rest small capitals:\crlf \Word{\sc andra moi ennepe}\crlf (May not work with the \CONTEXT\ on this wiki,\crlf but should work on your local install.)
See also
- \cap -- turn text into small caps
- \Cap -- turn first character into small caps
- \Caps -- turn first character of each word into small caps
- \CAP -- doesn't work
- \Word -- turn first character into uppercase
- \Words -- turn first character of each word into uppercase
- \WORD -- turn first word into uppercase
- \WORDS -- turn text into uppercase
Help from ConTeXt-Mailinglist/Forum
All issues with: