w:topLinePunct (Compress Punctuation at Top of Line)
Compresses the space used by certain punctuation characters when they appear at the beginning of a line in CJK text.
Parent elements
Description
w:topLinePunct is a toggle property that enables top-of-line punctuation compression. In East Asian typography, full-width opening punctuation (e.g. 「, (, 『) normally occupies a full character width. When this property is active, such characters at the start of a line are compressed, reducing leading whitespace and producing tighter, more professional-looking East Asian text.
It is defined in ECMA-376 Part 1 §17.3.1.40.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, false, 1, 0, on, off |
Enables top-of-line punctuation compression. Omit to inherit. |
Examples
<w:p>
<w:pPr>
<w:topLinePunct/>
</w:pPr>
<w:r><w:t>「行頭の括弧が圧縮されるサンプルです」</w:t></w:r>
</w:p>
using DocumentFormat.OpenXml.Wordprocessing;
var para = new Paragraph(
new ParagraphProperties(
new TopLinePunctuation()
),
new Run(new Text("「行頭の括弧が圧縮されるサンプルです」"))
);
Notes
- Related properties:
w:kinsoku(line-break prohibition),w:overflowPunct(punctuation overflow at end of line). - This property applies to the entire paragraph. There is no run-level equivalent.