Paged.The open publishing system
The format atlas
Typography

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

Reviewed against engine v0.71.9

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: every value is set as the table describes, as measured against InDesign. The four justified values stretch the same lines and differ only in the last one, which is set flush left, centred, flush right or, for FullyJustified, justified as well. The two binding-relative values are resolved from the side of the spine the page sits on: on a right-hand page ToBindingSide is flush left, on a left-hand page flush right. SingleWordJustification is not read yet.

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 · ParagraphStyleValuesSeen in
MinimumWordSpacinginteger89%
DesiredWordSpacinginteger89%
MaximumWordSpacinginteger / real89%
MinimumLetterSpacinginteger89%
DesiredLetterSpacinginteger89%
MaximumLetterSpacinginteger89%
MinimumGlyphScalinginteger89%
DesiredGlyphScalinginteger89%
MaximumGlyphScalinginteger89%
SingleWordJustificationFullyJustified | LeftAlign | CenterAlign | RightAlign89%
Selected attributes. Seen in: the share of documents with a ParagraphStyle that set it. All 331 attributes of ParagraphStyle; what Paged reads, edits and writes is in its Paged support panel.

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 · ParagraphStyleValuesSeen in
Hyphenationfalse | true89%
HyphenateWordsLongerThaninteger89%
HyphenateAfterFirstinteger89%
HyphenateBeforeLastinteger89%
HyphenateLadderLimitinteger89%
HyphenationZonelength (pt)89%
HyphenateCapitalizedWordstrue89%
HyphenateLastWordtrue89%
HyphenateAcrossColumnstrue89%
HyphenWeightinteger89%
Selected attributes. Seen in: the share of documents with a ParagraphStyle that set it. All 331 attributes of ParagraphStyle; what Paged reads, edits and writes is in its Paged support panel.

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