Macro Language Reference > PIs > Text > <?tcaps>
  
<?tcaps>
Description
Changes the case of text.
 
Example 515. Use @ to manually capitalize first letter of each word in a paragraph
There is no simple way of capitalizing text so that only the first letter of each word is set in capitals. You could, however, use the @ macro to make repeated copies of the call-out shown below at the end of your paragraph style. This would work in most circumstances, although it would prevent the use of other call-outs:
@<#,32><?up><?tcaps=1> <?char><?down>
 
Example 516. Automatically capitalize the first letter of each word
This example capitalizes the first letter of each word, automatically inserting the commands each time they are required and using a loop and a label placed in relevant positions to repeat the code no matter how much text is entered.
<?:loop><#,32><?up><?tcaps=1> <?char><?down><?{loop>
Syntax
<?tcaps cap mode:n?>
<?tcaps>
[no parameter]
Invoke the Capitalise/Lower case text dialog box.
cap mode
0
Display text as typed.
1
Display text in upper case. Set a character map for this transform, if required, using <?ttoupper>.
2
Display text in lower case. Set a character map for this transform, if required, using <?ttolower>.
3
Display text in small caps, with capital letters as normal size capitals
4
Display text in small caps.
Additional Information
 
The conversion only takes place for display and print purposes, leaving the actual contents of the text stream unchanged.
Related Links