Difference between revisions of "Command/Cap"

From Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>Cap</syntax>
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
Line 14: Line 16:
 
   </tr>
 
   </tr>
 
</table>
 
</table>
 
  
 
== Description ==  
 
== Description ==  
Turns the first character of the text into a small capital, regardless of case.
+
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 ==
Uppercase to small caps
 
 
<context source='yes'>
 
<context source='yes'>
\Cap{Mayday, Mayday}, Mayday
+
\setupbodyfont[9pt]
</context>
+
Uppercase or lowercase to small caps:\crlf
 
+
\Cap{Mayday, Mayday}; \Cap{mayday, mayday}.\crlf
----
 
  
Lowercase to small caps
+
Punctuation counts as the first character:\crlf
<context source='yes'>
+
\Cap{'ayday, 'ayday}.\crlf
\Cap{mayday, mayday}, mayday
 
 
</context>
 
</context>
 
----
 
 
Punctuation to small caps
 
<context source='yes'>
 
\Cap{'ayday, mayday}, 'ayday
 
</context>
 
 
  
 
== See also ==
 
== See also ==
* {{cmd|cap}} -- turn text into small caps
+
{{See also casing commands}}
* {{cmd|Cap}} -- turn first character into small caps
 
* {{cmd|Caps}} -- turn first character of each word into small caps
 
* {{cmd|CAP}} -- doesn't work
 
 
 
* {{cmd|Word}} -- turn first character into uppercase
 
* {{cmd|Words}} -- turn first character of each word into uppercase
 
* {{cmd|WORD}} -- turn first word into uppercase
 
* {{cmd|WORDS}} -- turn text into uppercase
 
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==
Line 56: Line 37:
 
{{Forum|{{SUBPAGENAME}}}}
 
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Command/Typography|cap]]
+
[[Category:Command/Fonts|Cap]]

Latest revision as of 14:55, 15 October 2019

\Cap

Syntax (autogenerated)

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

See also

  • \sc — start using small caps (preserve capitals)
  • \cap — turn text into small caps
  • \Cap — turn first character into small caps
  • \Caps — turn first character of each word into small caps
  • \CAP — change specific letters to small capitals (MkII)
  • \Word — turn first character into uppercase
  • \Words — turn first character of each word into uppercase
  • \WORD, \WORDS — turn text into uppercase
  • \setcharactercasing — Pass casing command (Word, WORD, etc) as a keyword
  • typo-cap.mkiv

Help from ConTeXt-Mailinglist/Forum

All issues with: