paged.IDML Reference
Typography

Justification and line-breaking

The Justification values and their last lines, word and letter spacing, glyph scaling, the forced line break, and the hyphenation attributes.

Tier: ProProIIIreference

Justification sets how a paragraph's lines sit in the column; the spacing and hyphenation attributes set how much the composer may stretch, squeeze and split words to get there.

In short Justification takes three ragged values (LeftAlign, CenterAlign, RightAlign), four justified values that differ in how the last line is set (LeftJustified, CenterJustified, RightJustified, FullyJustified) and two binding-relative values. In justified text, the composer stretches word spaces within the paragraph's MinimumWordSpacing…MaximumWordSpacing range and, if allowed, letter spacing and glyph scaling too. Hyphenation adds break points inside words, governed by a family of Hyphenate… attributes. The composer chooses the breaks within these limits.

The Justification values

Justification is a paragraph attribute, on a <ParagraphStyleRange> or a paragraph style.

ValueLinesLast line
LeftAlignflush left, ragged rightsame
CenterAligncentredsame
RightAlignflush right, ragged leftsame
LeftJustifiedjustified to both edgesflush left
CenterJustifiedjustified to both edgescentred
RightJustifiedjustified to both edgesflush right
FullyJustifiedjustified to both edgesjustified too, however short
ToBindingSideflush toward the spinesame
AwayFromBindingSideflush away from the spinesame

ToBindingSide and AwayFromBindingSide follow the page: on a right-hand page the binding side is the left, on a left-hand page the right. A paragraph's last line is the line before its <Br/>, or the story's last line.

A line that holds a single word has no space to stretch. SingleWordJustification says how such a line is set in justified text: FullyJustified (letter-spaced to fill the measure, the value in almost every document of the census), LeftAlign, CenterAlign or RightAlign.

In Paged: the three ragged values and LeftJustified are set as described. CenterJustified and RightJustified are set ragged, centred and flush right, instead of justified; FullyJustified is set like LeftJustified, with a ragged last line; the binding-relative values are set left and right. These are known engine issues.

The forced line break

A forced line break is the character U+2028 inside <Content>, typed in InDesign with Shift+Return. It ends the line but not the paragraph: no first-line indent, space before or list number follows it. In justified text the line before a forced break is justified to the full measure, because it is not the paragraph's last line. See the paragraph model.

In Paged: U+2028 breaks the line inside the paragraph, and in justified text the line before it is justified.

Word spacing, letter spacing and glyph scaling

Three triples on the paragraph set how far justified text may stretch or squeeze:

Attribute · ParagraphStyleValuesPagedpaged.set
MinimumWordSpacingintegerread · written
DesiredWordSpacingintegerread · written
MaximumWordSpacinginteger / realread · written
MinimumLetterSpacingintegerread · written
DesiredLetterSpacingintegerread · written
MaximumLetterSpacingintegerread · written
MinimumGlyphScalingintegerread · written
DesiredGlyphScalingintegerread · written
MaximumGlyphScalingintegerread · written
SingleWordJustificationFullyJustified | LeftAlignnot read
Selected attributes. All 331 attributes of ParagraphStyle →

Word spacing is a percentage of the font's normal space (InDesign's defaults: 80, 100, 133). Letter spacing is a percentage added between characters (defaults 0, 0, 0). Glyph scaling is a horizontal scale of the glyphs (defaults 100, 100, 100). The desired values also apply to ragged text.

In Paged: all three ranges feed the composer. Supported · verified

Hyphenation

Attribute · ParagraphStyleValuesPagedpaged.set
Hyphenationfalse | trueread · writtenparagraphHyphenation
HyphenateWordsLongerThanintegerread
HyphenateAfterFirstintegerread
HyphenateBeforeLastintegerread
HyphenateLadderLimitintegerread
HyphenationZonelength (pt)read · writtenparagraphHyphenationZone
HyphenateCapitalizedWordstrueread
HyphenateLastWordtrueread
HyphenateAcrossColumnstrueread
HyphenWeightintegerread
Selected attributes. All 331 attributes of ParagraphStyle →

Hyphenation switches it on (it is on in InDesign's defaults). A word must have at least HyphenateWordsLongerThan letters, and a break leaves at least HyphenateAfterFirst letters before it and HyphenateBeforeLast after it. HyphenateLadderLimit caps how many consecutive lines may end in a hyphen. HyphenationZone is a distance from the right edge within which ragged text may end without hyphenating. HyphenWeight balances better spacing against fewer hyphens. AppliedLanguage on the run picks the hyphenation dictionary.

In Paged: hyphenation uses TeX hyphenation patterns per language, not the dictionaries InDesign uses, so a word can occasionally break one syllable differently. The attributes above are read; the hyphenation zone applies to ragged text only, as in InDesign.

Supported · verified Supported · verified

Kinsoku

Japanese and Chinese text forbids some characters at the start or end of a line, such as closing brackets and small kana at the start. KinsokuSet names the rule table and KinsokuType how a line is adjusted to obey it.

In Paged: a built-in set of hard kinsoku rules is enforced when the paragraph sets KinsokuType; named tables are not honoured yet. Parsed, partly rendered

Frequently asked questions

What is the difference between LeftJustified and FullyJustified? Both justify every line to both edges. LeftJustified sets the last line flush left; FullyJustified stretches the last line to the full measure too, however short it is.

What do CenterJustified and RightJustified mean? Justified text whose last line is centred, or flush right, instead of flush left.

How is a forced line break written, and how is the line before it set? As U+2028 inside <Content>. It ends the line without ending the paragraph, so in justified text the line before it is justified like any other line that is not the last.

What does SingleWordJustification do? It sets how a line holding a single word is placed in justified text: spread to fill the line, or aligned left, centre or right.

On this page