Sub topic 6
Formatting paragraphs: alignment, indents, spacing and hyphenation
This chapter covers the Paragraph panel. It assumes you can create paragraph text with the Type tool, you know where the Character panel is, and you understand that a type layer stays editable until you rasterize it. Everything here applies to point text and paragraph text, but several settings only show their full effect in a paragraph text box.
What counts as a paragraph in Photoshop
Photoshop treats any run of text that ends with a hard return (the Enter or Return key) as one paragraph. A soft line break (Shift+Enter) starts a new line but does not start a new paragraph. This difference matters because every setting in the Paragraph panel applies to whole paragraphs.
- If your cursor is inside a paragraph and nothing is selected, the settings change that whole paragraph.
- If you select text across several paragraphs, the settings change every paragraph the selection touches.
- If a type layer is selected in the Layers panel but you are not in edit mode, the settings change every paragraph on the layer.
Choose Window > Paragraph to open the panel. The same controls appear in the Options bar when the Type tool is active, but only alignment is there. Indents, spacing and hyphenation live only in the panel.
Alignment and justification
The top row of the panel has seven buttons. The first three align text. The next four justify it.
| Button | Effect | Typical use |
|---|---|---|
| Align Left | Lines start at the left edge, right edge is ragged | Body copy in left-to-right languages |
| Align Center | Each line is centered | Headlines, captions, invitations |
| Align Right | Lines end at the right edge, left edge is ragged | Labels next to images, right-to-left layouts |
| Justify Last Left | Full lines fill the width, the last line is left-aligned | Long body copy in narrow columns |
| Justify Last Centered | Same, with the last line centered | Formal, symmetrical layouts |
| Justify Last Right | Same, with the last line right-aligned | Rarely used |
| Justify All | Every line fills the width, including the last | Short blocks that must form a clean rectangle |
On point text, alignment decides which side of the click point the text grows from. Left alignment grows to the right, center grows both ways, and right alignment grows to the left. On paragraph text, alignment is measured against the edges of the text box.
Justified text stretches the spaces between words to fill each line. In a narrow column this creates uneven gaps called rivers. Two things reduce them: widen the box, and turn on hyphenation (covered below). You can also change how much Photoshop is allowed to stretch spacing in Justification in the Paragraph panel menu. The dialog sets minimum, desired and maximum values for word spacing, letter spacing and glyph scaling. A desired word spacing of 100% with a minimum of 80% and a maximum of 133% is the default. Narrowing that range gives more even spacing but pushes more words to the next line.
Composition: single-line and every-line
The Paragraph panel menu offers two composers.
- Adobe Every-line Composer looks at all lines in a paragraph and picks the best set of line breaks. It gives more even spacing, particularly in justified text. This is the default.
- Adobe Single-line Composer breaks each line one at a time. It is closer to what word processors do, and it lets you control a single line without the lines before and after it changing.
Because the Every-line Composer re-flows earlier lines when you change later ones, a small edit at the end of a paragraph can move a line break near the top. If you are matching text to a layout where breaks must not move, switch to the Single-line Composer.
Indents
Three fields control horizontal offsets. All use the document's type unit, which you set in Preferences > Units & Rulers.
| Field | What it does |
|---|---|
| Left Indent | Moves the entire paragraph in from the left edge of the box |
| Right Indent | Moves the entire paragraph in from the right edge of the box |
| First Line Indent | Offsets only the first line, relative to the left indent |
A positive first line indent gives the traditional book style, where each paragraph starts with an indented line. A negative first line indent combined with a positive left indent creates a hanging indent. The first line sits at the margin and the following lines are pushed in. Hanging indents are the standard way to format lists, because the bullet or number hangs outside the text block.
For example, to build a hanging list item:
- Set Left Indent to 24 pt.
- Set First Line Indent to -24 pt.
- Type the bullet, press Tab, then type the item text.
The Tab moves the text to the left indent position, so the wrapped lines line up with the first line's text. Without the negative first line indent, the wrapped lines would start further left than the text after the tab.
Photoshop does not generate bullets or numbered lists automatically for you in the way a word processor does. You type the bullet character yourself (Option+8 on macOS, Alt+0149 on Windows) or paste it. For simple automatic bullets, the Paragraph panel menu in recent versions has list options, but you should still check the result against your design.
Space before and after
Two fields add vertical space between paragraphs.
- Add Space Before Paragraph inserts space above the paragraph.
- Add Space After Paragraph inserts space below it.
Use these instead of blank lines. An empty paragraph made by pressing Enter twice is the height of one full line, including its leading. That makes spacing hard to adjust and impossible to apply consistently. A value in the spacing field is exact, easy to change, and can be saved in a paragraph style.
When one paragraph has space after and the next has space before, Photoshop adds the two values together. It does not collapse them as CSS margins do. If you set 6 pt after and 6 pt before, the gap is 12 pt. The first paragraph in a text box ignores its Space Before value at the top of the box in most cases, so a headline does not drift downward.
Space between paragraphs is different from leading. Leading (in the Character panel) controls the distance between baselines within a paragraph, and paragraph spacing adds to it only at paragraph breaks.
Hyphenation
Hyphenation lets Photoshop split long words at the end of a line. It is off or on for each paragraph with the Hyphenate checkbox. Choose Hyphenation from the Paragraph panel menu to open the settings.
| Setting | Meaning |
|---|---|
| Words Longer Than | Minimum word length, in letters, that can be hyphenated (default 5) |
| After First | Minimum letters before the hyphen (default 2) |
| Before Last | Minimum letters after the hyphen (default 2) |
| Hyphen Limit | Maximum consecutive lines that can end with a hyphen (default 3) |
| Hyphenation Zone | How far from the right edge a word must start to be split, used only with the Single-line Composer and non-justified text |
| Hyphenate Capitalized Words | Whether proper nouns and words in capitals can be split |
Hyphenation uses a dictionary tied to the language chosen in the Character panel's language menu at the bottom. If the language is set incorrectly, Photoshop splits words in the wrong places or not at all. When you paste text in another language, select it and set its language.
Good starting values for body text are Words Longer Than 6, After First 3, Before Last 3 and Hyphen Limit 2. Three hyphens in a row look untidy, and splitting a word after only two letters is hard to read.
Related options
The Paragraph panel menu also has Roman Hanging Punctuation. It lets opening quotation marks and similar characters sit outside the text edge. This keeps the left edge looking straight when a line begins with a quote mark.
Putting it together with a script
The same properties exist on the paragraphStyle of a text item in ExtendScript. This example sets a justified paragraph with a first line indent and hyphenation. Run it with a type layer active, from File > Scripts > Browse....
var item = app.activeDocument.activeLayer.textItem;
item.kind = TextType.PARAGRAPHTEXT;
item.width = new UnitValue(400, "px");
item.height = new UnitValue(300, "px");
var p = item.paragraphStyle;
p.justification = Justification.LEFTJUSTIFIED;
p.firstLineIndent = new UnitValue(18, "pt");
p.leftIndent = new UnitValue(0, "pt");
p.rightIndent = new UnitValue(0, "pt");
p.spaceBefore = new UnitValue(0, "pt");
p.spaceAfter = new UnitValue(6, "pt");
p.hyphenation = true;
p.hyphenationZone = new UnitValue(36, "pt");LEFTJUSTIFIED is the scripting name for Justify Last Left. If the property is rejected, check that the active layer is a text layer. Setting paragraphStyle on any other layer raises an error.
How the settings relate
Common problems
- Settings seem to do nothing. You may be editing the wrong layer. Check that the text layer is selected, and that the cursor is inside the paragraph you mean to change.
- Gaps look uneven in justified text. Widen the box, enable hyphenation, or switch to left alignment for narrow columns.
- Line breaks move after an edit. The Every-line Composer is re-flowing the paragraph. Switch to the Single-line Composer to stop it.
- Extra space appears at the top of a box. An empty paragraph or a Space Before value is responsible. Delete the blank line and use spacing values instead.
- Hyphens appear in the wrong places. Check the language setting on the Character panel.
Exercises
Exercise
You want a list item whose wrapped lines align with the text after the bullet, not with the bullet. Which two Paragraph panel values do you set, and what do they look like?
Show answer
Set a positive Left Indent (for example 24 pt) and a negative First Line Indent of the same size (-24 pt). Type the bullet, press Tab, then type the text. The first line starts at the margin, the Tab jumps to the left indent, and wrapped lines start at that same position.
Exercise
A paragraph has 6 pt Space After. The next paragraph has 6 pt Space Before. How large is the gap between them, and why is this better than pressing Enter twice?
Show answer
The gap is 12 pt, because Photoshop adds the two values. Pressing Enter twice creates an empty paragraph as tall as a full line of text with its leading, which is hard to adjust, applies unevenly and cannot be stored in a paragraph style.
Exercise
Justified text in a narrow column shows large gaps between words. Name two changes that reduce them.
Show answer
Turn on Hyphenate so long words can split across lines, and widen the text box. Narrowing the minimum and maximum word spacing in the Justification dialog, or switching to left alignment, also helps.