Flow
Pours a sequence of blocks into the frames of a positioning area, page after page. Paragraphs break between lines, with the CSS properties widows and orphans, and tables between rows, their TableHead and TableFoot repeated. break-after: avoid keeps a block with the next one, break-before and break-after with column go on in the next frame and with page, left or right on the next page.
The flow starts at the area’s current row and fills the free rows of each frame: rows that hold objects placed earlier are passed over. The blocks are not rounded to the grid; the rows they reach into are allocated. A free band does not start on the next whole row but at the exact bottom of the objects that end in the row above it, so where the text starts does not depend on the row height. In a frame that reaches the grid’s last row, the band runs on to the bottom margin, past what is left of a row below the last one; a frame that ends higher, or rows taken by an object such as a footer, end it at the row edge. A PlaceObject after the flow starts on the next whole row. A Flow that follows another directly, with nothing placed in between, goes on exactly where it ended, its last margin collapsing with the first block’s, and so does every frame of its area that is free from there on the same page.
Every child with an id keeps it, also when it breaks across frames and pages: each part shows up in --dumpoutput with its page and position.
A TextBlock, an Image or a Box cannot be part of a flow yet and is left out with a warning.
In a Slate, a flow stacks its blocks as one object, as wide as the slate’s frame, with the same children, rules and warnings: the blocks keep their exact heights and their margins collapse, but nothing goes on to a next frame or page. It starts at the slate’s current row, at the exact bottom of what ends in the row above, and a PlaceObject after it starts on the next whole row. A forced break with page, column, left or right has nothing to break to there: the blocks go on as without it, with a warning once per flow. The slate has no positioning areas, so area is an error in a slate. A Mark or Bookmark takes the page the slate is placed on.
The children are read before the flow is laid out, so a command that acts on the page at once, PlaceObject, ClearPage, NextFrame or NextRow, is an error inside a flow. A forced break goes through CSS, such as break-before: page. CallTemplate and ProcessNode work as everywhere: the blocks of the template or of the records go into the flow.
A Mark between the blocks of a flow, also in an Action, marks the page of the block that follows it, wherever that block lands; after the last block, the page where the flow ends. With pdftarget it is a named destination at the top of that block. A Bookmark between the blocks points to the top of the block that follows it. Inside a Paragraph, a Mark in an Action and a Bookmark go into their line and take its page and position, also when the flow breaks the paragraph across pages. Elsewhere inside a block, such as directly in a table cell, both are an error for now.
Child elements
Action, Bookmark, CallTemplate, ForAll, HTML, Mark, Ol, Paragraph, ProcessNode, Switch, Table, Ul
Parent elements
AtPageCreation, AtPageShipout, Case, Contents, ForAll, Loop, Otherwise, Record, Template, Until, While
Attributes
area(text, optional)- Name of the positioning area to fill. Defaults to the page’s area.
bottom(text, optional)- Name of a variable that is set to where the flow ends, in points below the top of the page’s grid, as a number. With frames side by side, that is the bottom of the longest one on the last page.
column-fill(optional)- How the flow fills the frames of its last page.
auto- One frame after the other, as on every page before (default).
balance- The part of the flow after its last forced break that ends on a page is spread over the frames of that page, so that they end at about the same height: each frame ends on one line across the page, the highest at which the part still ends there, or at its own foot above it.
widows,orphansand the breaks hold as without it. The pages before are filled as withauto, and so is a page on which a block moves into a frame of another width. No effect in a Slate.
Example
<Record match="data">
<Flow area="text">
<Paragraph id="intro" style="break-after: avoid"><Value>Introduction</Value></Paragraph>
<ForAll select="paragraph">
<Paragraph><Value select="."/></Paragraph>
</ForAll>
<Table id="prices">…</Table>
</Flow>
</Record>Pours a heading, the paragraphs and a table into the frames of the area text, starting new pages as needed.
See also
- Commands: PlaceObject, PositioningArea, Table, Paragraph
- Manual: Flowing Text, Multi-Page Content, Working with Tables: Tables across pages