w:caps (All Capitals)
Displays all lowercase letters in the run as uppercase without altering the stored text.
Parent elements
Description
w:caps displays all lowercase letters in the run as uppercase characters. It is an on/off toggle property defined in ECMA-376 Part 1 §17.3.2.4.
Unlike converting text to uppercase, w:caps does not change the stored text — the underlying characters remain in their original case. Only the rendered glyphs are uppercased. This means a spell-checker still uses the original mixed-case text.
w:smallCaps and w:caps are mutually exclusive; if both are set, w:caps takes precedence.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, 1, on (enabled) / false, 0, off (disabled). Omitting the attribute is equivalent to true. |
Toggles All Caps on or off. |
Examples
<w:r>
<w:rPr>
<w:caps/>
</w:rPr>
<w:t>all caps</w:t>
</w:r>
new Run(
new RunProperties(new Caps()),
new Text("all caps"));
Notes
- The stored text is unchanged; only rendering is affected.
- If
w:capsandw:smallCapsare both present,w:capswins.