Pages
Unlike emails, Print can contain multiple pages. Pages are naturally limited by their size and margins. If the content of a doesn't fit on one page, the overflow goes to the next page. This happens automatically, based on the section's page size and margins; see Page settings: size, margins and bleed.
Although generally the same content elements can be used in all three (see Content elements), the specific characteristics of pages make it possible to use special elements, such as page numbers; see Page numbers.
The widow/orphan setting lets you control how many lines of a paragraph stick together, when content has to move to another page; see Preventing widows and orphans.
Each page in a print section has a natural position: it is the first page, the last page, a 'middle' page (a page between the first and the last page) or a single page. For each of those positions, a different and can be set. A Master Page functions as a page's background, with for example a header and footer. A Media represents preprinted paper that a page can be printed on. See Master Pages and Media.
Page specific content elements
The specific characteristics of pages make it possible to use these special elements:
- Page numbers can only be used in a Print . See Page numbers to learn how to add and change them.
- Conditional content and dynamic tables, when used in a Print section, may or may not leave an empty space at the bottom of the last page. To fill that space, if there is any, an image or advert can be used as a whitespace element; see Whitespace elements: using optional space at the end of the last page.
- Dynamic tables can be used in all contexts, but transport lines are only useful in a Print context; see Dynamic table.
Positioning and aligning elements
Sometimes, in a Print template, you don't want content to move up or down with the text flow. To prevent that, put that content in a Positioned Box. See Content elements.
When it comes to positioning elements on a page, Guides can be useful, as well as Tables. See How to position elements.
Page settings: size, margins and bleed
On paper, whether it is real or virtual, content is naturally limited by the page size and margins.
These, as well as the bleed, are set per Print section, as follows:
- On the Resources pane, right-click a section in the Print context and click Properties.
For the page size, click the drop-down to select a page size from a list of common paper sizes. Changing the width or height automatically sets the page size to Custom.
Margins define where your text flow will go. Static elements can go everywhere on a page, that is to say, within the printable space on a page that depends on the printer.
The bleed is the printable space around a page. It can be used on some printers to ensure that no unprinted edges occur in the final trimmed document. Note: Printers that can’t print a bleed, will misinterpret this setting. Set the bleed to zero to avoid this.
By default, measurements settings are in inches (in). You could also type measures in centimeters (add 'cm' to the measurement, for example: 20cm) or in millimeters (for example: 150mm). To change the default unit for measurement settings to centimeters or millimeters:
on the Window menu, click Preferences, click Print, and then click Measurements.
Whitespace elements: using optional space at the end of the last page
Print sections with conditional content and dynamic tables (see Personalizing Content) can have a variable amount of space at the bottom of the last page. It is useful to fill the empty space at the bottom with transpromotional material, but of course you don’t want extra pages created just for promotional data. 'Whitespace elements' are elements that will only appear on the page if there is enough space for them.
To convert an element into a whitespace element:
- Import the promotional image or ; see Images and Snippets.
- Insert the promotional image or snippet in the content.
- Only a top-level element (for example, a paragraph that is not inside a table or div) can function as a whitespace element.
- Do not place the promotional image or snippet inside an absolute positioned box. Whitespacing only works for elements that are part of the text flow, not for absolute-positioned boxes.
- Select the image or the element that holds the promotional content: click it, or use the , or select it on the Outline tab; see Selecting an element.
- On the Attributes pane, check the option Whitespace element.
- (Optional.) Add extra space at the top of the element: on the menu Format, click the option relevant to the selected element (Image for an image, Paragraph for a paragraph, etc.) and adjust the spacing (padding and/or margins).
Do not add an empty paragraph to provide space between the whitespace element and the variable content. The extra paragraph would be considered content and could end up on a separate page, together with the whitespace element.
Page numbers
Page numbers can be added to a Print section, but they are usually added to a Master Page, because headers and footers are designed on ; see also: Master Pages.
To insert a page number, select Insert > Special character > Markers on the menu, and then click one of the options to decide with what kind of page number the marker will be replaced:
- Page number: The current page number in the document. If a page is empty or does not display a page number, it is still added to the page count.
- Page count: The total number of pages in the document, including pages with no contents or without a page number.
- Content page number: The current page number in the document, counting only pages with contents that are supplied by the Print section. A page that has a Master Page (as set in the Sheet Configuration dialog, see Applying a Master Page to a page in a Print section) but no contents, is not included in the Content page count.
- Content page count: This is the total number of pages in the current document that have contents, supplied by the Print section. A page that has a Master Page but no contents, is not included in the Content page count.
- Sheet number: The current sheet number in the document. A sheet is a physical piece of paper, with two sides (or pages). This is equivalent to half the page number, for example if there are 10 pages, there will be 5 sheets.
- Sheet count: This marker is replaced by the total number of sheets in the document, whether or not they have contents.
By default, page numbering starts with page 1 for each section. This can be changed using a Control Script; see Control Scripts
Preventing widows and orphans
Widows and orphans are lines at the beginning or at the end of a paragraph respectively, dangling at the bottom or at the top of a page, separated from the rest of the paragraph.
By default, to prevent orphans and widows, lines are moved to the next page as soon as two lines get separated from the rest of the paragraph.
This setting can be changed for the entire Print context, per paragraph and in tables.
Widows and orphans are ignored if the page-break-inside property of the paragraph is set to avoid.
Widows and orphans in tables
The CSS properties widows
and orphans can also be used in
tables. They are not available in the Table Formatting dialog, however,
so they must be added manually, either in the style sheet (see Styling templates with CSS files) or directly in the style attribute
of the table element, using the Advanced mode of the Formatting dialog or the Source tab of the Workspace.
In the entire Print context
To prevent widows and orphans in the entire Print context:
- On the menu, select Edit > Stylesheets.
- Select the Print context.
- Click New (or, when there are already CSS rules for paragraphs, click the p and click Edit).
- Click Format.
- After Widows and Orphans, type the number of lines that should be considered a widow or orphan (this amounts to the minimum number of lines that may be separated from a paragraph, minus one).
Alternatively, manually set the set the widows and orphans properties in a style sheet:
- Open the style sheet for the Print context: on the Resources pane, expand the Styles folder and double-click context_print_styles.css.
- Add a CSS rule, like the following:
p { widows: 4; orphans: 3 }
Per paragraph
To change the widow or orphan setting for one paragraph only:
- Select the paragraph, using the breadcrumbs or the Outline pane (next to the Resources pane).
- On the Format menu, click Paragraph.
- After Widows and Orphans, type the number of lines to be considered a widow or orphan (this amounts to the minimum number of lines that may be separated from a paragraph, minus one).
In tables
The CSS properties widows
and orphans can be used in
tables. They are not available in the Table Formatting dialog, however,
so they must be added manually, either directly in the style attribute
of the <table> element (on the Source tab in the Workspace) or in a style sheet rule, as follows:
- On the menu, select Edit > Stylesheets.
- Select the Print context.
- Click New (or, when there are already CSS rules for tables, click the selector table and click Edit).
- Click the Advanced button.
- Add a rule for widows and/or orphans, typing the name of the CSS property in the left column and the value in the right column.
- Close the dialogs.
Page breaks
A page break occurs automatically when the contents of a section don't fit on one page.
Inserting a page break
To insert a page break before or after a certain element, set the page-break-before property or the page-break-after property of that element (a paragraph for example; see also Styling text and paragraphs):
- Select the element (see Selecting an element).
- On the Format menu select the respective element to open the Formatting dialog.
- In the Breaks group, set the before or after property.
- Before: Sets whether a page break should occur before the element. This is equivalent to the page-break-before property in CSS; see CSS page-break-before property for an explanation of the available options.
- After: Sets whether a page break should occur after the element. Equivalent to the page-break-after property in CSS; see CSS page-break-after property for an explanation of the available options.
Click the button Advanced to add CSS properties and values to the inline style tag directly.
You cannot use these properties on an empty <div> or on absolutely positioned elements.
Preventing a page break
To prevent a page break inside a certain element, set the page-break-inside property of that element to avoid:
- Select the element (see Selecting an element).
- On the Format menu, select the respective element to open the Formatting dialog.
- In the Breaks group, set the inside property to avoid, to prevent a page break inside the element. This is equivalent to the page-break-inside property in CSS; see CSS page-break-inside property for an explanation of all available options.
Adding blank pages to a section
How to add a blank page to a section is described in a how-to: Create blank page on field value.
|
|