Understanding Paragraph Formatting
What are Paragraphs?
After characters, paragraphs are the next smallest unit of text Mellel deals with. A paragraph is zero or more characters followed by a paragraph break character. A paragraph break can be the return character or any of the higher-order breaks like a column break, page break, a section break and so on. Typically a paragraph contains one or more full sentences but as far as Mellel is concerned, any text (or no text) between paragraph breaks is considered to be a paragraph.
Paragraph Attributes
Paragraph attributes define how the text of the paragraph is laid out in lines: How wide or narrow the lines are, how they align to each other and how they are spaced. In Mellel, attributes such as font, size, colour, underline, face and so on, are not considered to be paragraph attributes - these are character attributes and are discussed in the character formatting guide.
Note: Out of respect for both left to right and right to left scripts, Mellel terminology is direction agnostic - for example, instead of using left and right to describe the beginning and end of a line, Mellel uses the terms start and end.
Paragraph Margins and Indent
Line lengths and positioning are determined by the paragraph margins and the indent.
- Start margin is the distance from the page margin to the beginning of the line.
- End margin is the distance from the page margin to the end of the line.
- Indent is the distance from the page margin to the beginning of the first line.
Margins and Indent Indented (above) vs Outdented (below) Paragraphs
Paragraph Alignment
The alignment attribute determines how lines are positioned in relation to each other.
- Start alignment aligns the line starts.
- Center alignment aligns the line centers.
- End alignment aligns the line ends.
- Justified aligns both the starts and ends of lines, except for the last line which is aligned to the start.
Start, Center, End and Justified Paragraph Alignments
Paragraph Direction
Note: you can skip this section if none of your writing involves right-to-left text.
The direction of a paragraph determines two things:
- Which side, left or right, is considered to be the start of the line for the purpose of alignment and positioning.
- How segments with different writing directions are arranged on a line.
The following example shows a left-to-right paragraph and a right-to-left paragraph. Both paragraphs use Start alignment but location of the line starts is interpreted according to the paragraph direction.
Left-to-Right vs Right-to-Left Paragraph Alignment
The following example shows how a mixed-direction text is rendered with left-to-right direction (top) and right-to-left direction (bottom). Notice that the period at the end of the sentence is
Segment Order in Left-to-Right (top) Paragraph vs Right-to-Left (bottom) Paragraph.
Line Spacing
Line spacing determines the distance between lines in a paragraph. There are two types of line spacing: Automatic and Fixed.
In automatic line spacing, the spacing is expressed in terms of the line height: A value of 1 means that the distance between lines is exactly the height of the line, a value of 2 means that the distance is twice the height of the line and so on.
Automatic Line Spacing.
In automatic line spacing, the line height is derived from the font and font size used in the line. This has the advantage that you don't have to adjust line spacing when you change the font size, but it can lead to irregular spacing if multiple font sizes are used in a paragraph. This is where fixed line spacing gives you the advantage as the line are spaced exactly as specified.
Automatic vs Fixed Line Spacing
Tab Stops
Tab stops are locations you can horizontally align text to. Text is aligned to a tab stop when it is preceded by a tab character. The following image depicts a paragraph with one tab stop, the text following the tab character is aligned on the position of the tab stop.
A Tab Stop
If the text before the tab character reaches beyond a tab stop, it will skip to the next tab stop. If there is no tab stop, it will move to the next line.
Missed Tab Stops
Tab stops come in several types which effects how text is aligned to them.
- Regular Tab aligns the start of the text.
- Reverse Tab aligns to the end of the text.
- Center Tab aligns to the center of the text.
- Decimal Tab aligns to the decimal point.
Conventional Tab Types
The Indent Tab is a tab type that is unique to Mellel. At a glance it might appear identical to the Regular Tab - aligning the start of the text following the tab character, however, when the paragraph extends over the line boundary, subsequent lines are also aligned to the tab stop.
Indent Tab
The last tab type, the Combo Tab, is also unique to Mellel. This tab stop is actually made out of two elements. The Combo Tab functionality is very similar to the Indent Tab's functionality as it effect both the position of the text following the tab character and subsequent lines in the paragraph but there is one difference. Instead of aligning both start of the text and subsequent lines to the same location you can specify one location for the start of text and one location for the subsequent lines.
Indent Tab
Paragraph Styles
In Mellel, a paragraph style is a way to pack together the full set of paragraph attributes and give them a name. Once you define a style, you can apply it by choosing its name in the menu or paragraph styles palette. This saves you the trouble of applying all the individual attributes every time you want to use them and keeps your document appearance consistent. Changes you make to the style will apply to all text that uses it, which makes rapid design changes to the entire document easy.
Associated Character Style
As indicated above, attributes such as font, size and color are character attributes and are not included in a paragraph style. However, you can associate a character style with a paragraph style. The paragraph -> character style association means that when the paragraph style is applied, the associated character is applied as well. The association doesn't prevent your from applying a different character style later.
Overrides
Every paragraph in a Mellel document is applied with a paragraph style; There is no way to have text that is not applied with a paragraph style and the paragraph style is the starting point for Mellel in figuring out how to display the text. While it is perfectly OK, and even recommended, to use paragraph styles exclusively to format your text, you can also perform ad-hoc formatting by applying paragraph attributes on top of the style, this is called an override.
For example, you might have a paragraph applies with a style whose alignment is justify and single line spacing and, using the paragraph palette, you can apply on this paragraph line spacing of 1.5. The new line spacing will override the setting in the style and the text will be shown using 1.5 line spacing.
When a paragraph with overrides is selected, the style menu and paragraph style palette will show its name with an added '+' to indicate that this text has some overrides.
Using Paragraph Formatting
Applying Attributes Using the Paragraph Palette
To apply paragraph attributes like alignment, line spacing and more; use the paragraph palette Attributes tab. To reveal the paragraph palette click its tab or choose Window > Palettes > Paragraph and click the Attributes tab.
Paragraph Palette Attributes Tab
Setting Alignment
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Reveal the Attributes tab of the Paragraph Palette.
- Choose the font name in the Font popup menu.
- Click the appropriate alignment button.
Setting Double Line Spacing
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Reveal the Attributes tab of the Paragraph Palette.
- Under Line Spacing, choose Lines in the Unites popup menu, if not already selected.
- In 2 in the Amount field.
Double Line Spacing Setting
Setting Space Above and Below Paragraph
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Reveal the Attributes tab of the Paragraph Palette.
- Under Paragraph Spacing, enter the desired value in the Space Above and/or Space Below fields. If you wish space above not to apply to paragraphs at the top of the page, uncheck the Also at top checkbox.
Applying Attributes Using the Ruler
The ruler is located above the document area and provides access to positioning the paragraph margins, indent and tab stops.
The Ruler Entering a Ruler Item Position Numerically
Setting First Line Indent
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Position the Indent item after the Start Margin item.
First Line Indent
Setting Hanging Indent
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Position the Indent item before the Start Margin item.
Hanging Indent
Managing Tab Stops
Adding Tab Stops
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Drag a tab of the appropriate type from the tab well to the ruler.
Removing Tab Stops
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Drag the tab stop outside of the ruler.
Moving Tab Stops
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Drag the tab stop to the left or right.
Adding Multiple Tab Stops
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Right-click the ruler and choose Add Tab Stops... from the contextual menu.
- Select the tab type, first tab location and other details in the dialog box.
- Click OK.
Add Tab Stops Dialog
Using Paragraph Styles
Use the paragraph palette Styles tab to apply, edit and create paragraph styles. You can also use the Styles > Paragraph submenu to do the same. To reveal the paragraph palette, click its tab or choose Window > Palettes > Caragraph and click the Styles tab.
Paragraph Palette Styles Tab
Applying a Paragraph Style
- Place the insertion point in the paragraph you wish to affect or select multiple paragraphs.
- Reveal the Styles tab of the Paragraph Palette.
- Double-click the style's name in the Paragraph Styles list.
Or
- Select the text you want to change.
- Choose the style from the Styles > Paragraph Style submenu.
Tip: Paragraph styles can be assigned with a keyboard shortcut, you can see the shortcuts assigned to styles in the Styles > Paragraph Style submenu.
Creating a Paragraph Style
- Reveal the Styles tab of the Paragraph Palette.
- Press the Create New Style (+).
- Using the style editing dialog, apply the desired attributes and name your style.
- Click Create.
Paragraph Style Edit Dialog
Modifying a Paragraph Style
Using the Paragraph Style Palette
- Reveal the Styles tab of the Paragraph Palette.
- Select the style by clicking it once.
- Press Edit Style (pencil).
- Using the style editing dialog, apply the desired attributes.
- Click Save.
Using the Style Well
- Select text applied with the style you wish to modify.
- Click the Style Name in the style well.
- Using the style editing dialog, apply the desired attributes.
- Click Save.
Modifying "By Example"
- Select some text applied with the style you wish to modify.
- Reveal the Attributes tab of the Paragraph Palette.
- Format the text by applying the desired paragraph attributes.
- Reveal the Styles tab of the Paragraph Palette.
- Select the style by clicking it once.
- Click the Save Changes to Style button.