Skip to main content

Chapter 12.2 · Part III · In practice

Sandbox: composed pages

Page templates and frames edited on the page, the library of frame styles, the checks of composed pages in every edition, moving a book's text to the Markdown, and fixing a frame in one click

Updated 2026-10-1713 minIn chapter 12 Sandboxenescadefritptzhjaar

In short

This page covers what the Sandbox offers for composed pages, the pages whose text is poured into frames laid out by a template. You draw and move the frames of a template right on the page, and you tidy the frame styles in a library. The Checks panel tells you, in every language of the book, which composed pages have text that does not fit, and it offers buttons that fix a frame. A book made before composed pages can have the text of its pages moved into the Markdown in one step.

This page gathers the parts of the Design and Checks panels that deal with composed pages (::::page blocks that pour their content into the frames of a page template). The rest of both panels is on Sandbox: the Design and Checks panels; how a composed page is written is on Composed pages.

#Page templates

Design › Page & columns › Page templates edits pageTemplates, the layouts a composed page (::::page{template="…"}) pours its content into, without opening the configuration file.

  • The list shows each template with a drawing of its frames, its id, the number of pages of the book that use it (a spread counts two) and the template it is Based on. New starts a template with one frame that takes the page's loose text; Duplicate copies the one open; Save layout as template turns the composed page you picked (or the first one laid out) into a new template whose frames stand where they came out, at fixed sizes in millimetres, keeping their styles and the rest of their fields.
  • Edit for chooses what the fields change: All pages (the template), Recto (odd) or Verso (even) (variants.recto, variants.verso). A field the scope does not set shows the value it inherits, muted, and its reset button hands it back. A spread template (Two facing pages, with its Gutter) is drawn as one sheet across two pages with the spine band marked, and has no variants. On right-to-left and vertical books the sheet is read in the page's flow: the first page of the spread is the right one, and the facing page's area and the spine band are drawn on the side the engine laid them (since postext 1.40).
  • Template: id (renaming it renames every page fence that names it), name, Based on (extends), the spread switch, Frames measured from (area), Added pages use (overflowTemplate: the template of the pages a frame's content goes on to, see When the text continues), the grid, Delete template (it says how many pages name it; templates based on it keep what they inherited).
  • Frames: one button per frame, Add frame, and the properties of the frame picked: name (the slot), May stay empty; position (anchor to the template area, the trimmed page, the bleed or another frame or group, the edge, offsets) or a grid cell; width and height (Fixed, Share of the area, Its content, Up to the edge) with their limits; box style, layer, rotation, where the content sits, columns, padding per side; Takes the page's loose text (flow), Takes the first heading (takes), Text that does not fit goes on in (next), Other frames' text runs round it (exclude: "push") and, once it does, Push with Box or Contour (wrap, the shape of the pictures it holds); fitting (fit); grow, shrink, priority and pin for groups; continuation (overflow.continueIn, overflow.mark, overflow.fromMark): Content that does not fit goes to also lists every page fence with an id (page:<id>), and A later page by its id… takes a typed value ({attr.sigue}). Every field has its help and its reset.
  • Groups: name, stacked or in a row, the space between frames, where spare room goes, and the members in page order. A group with a Box of its own shares out its spare room and lets its frames give room back inside it; without one it is the union of its frames' boxes.
  • Running heads (As in the book, Hidden, Its own) and Decoration, edited like the book's header and footer; a text there may read the page's attributes ({attr.name}).

On the page, in Design mode. With the switch above the preview on Design (or Edit frames on the page in the section), a composed page shows its margins, its grid, the gutter of a spread and an arrow for each chain. A press on a frame picks it and opens its properties; a drag moves it; the eight handles of the frame picked resize it; a drag on an empty spot draws a new frame. Boxes snap to the margins, the grid and the other frames' edges and centres (hold Alt to place freely; Escape cancels the drag). The box is written back in millimetres: a frame hung from another keeps its anchor and changes its offset. When other pages use the template, the page asks where the change goes: Change the template (with the number of pages) or Only this page, which makes a template for that page based on the first one and points the page's fence at it. A rotated frame moves on the page and is sized in its fields. The fields are the keyboard way to do everything the drag does.

#Frame styles

Design › Boxes › Frame styles shows the box styles (calloutStyles) as a library. The frames of page templates are dressed with the same styles (frames[].style), so one style serves a :::callout box in the text and a frame on a composed page alike.

  • Each style is drawn by the engine with a sample paragraph, and a sample tab when the style has a label tab, the way a frame wears it: 80 mm wide (wider when its padding leaves less than 40 mm of measure), in the flow, without the fixed place a callout style may give its box. A style based on another (extends) is drawn with the look it inherits from its parent, as the page draws it (since postext 1.40). Under its name the section says where the book uses it: template frames, composed pages laid with those templates, and boxes in the text. Opened, a style lists every frame (Open goes to it in Page templates) and every chapter with its boxes (Show selects the next fence in the Text panel; a fence with no type counts for the first style, which the engine gives it), and Edit the style opens the Box styles editor in place. Show filters the list: In templates (the default once a template uses a style), In the text, Unused, All.
  • Merge suggestions group near-identical styles around the most used one: «These 3 styles differ only in padding: merge?». Styles are compared on what the engine resolves them to, setting by setting, leaving out their id and name. Lengths within 0.5 mm and colours within ΔE 2 count as equal, the four sides of a padding count as one setting, and Settings that may differ (2 by default) sets how many settings may differ.
  • Where a :::callout box stands (placement, fixed position, span, the space above and below) has to match, or merging would move the box. Compare the look only leaves it out, and the review then says how many boxes would move; while it is off, the section says how many more styles it would merge. Styles that only template frames use are always compared on their look: a frame takes its place from its template.
  • Keep each box where it stands (with Compare the look only, on by default): a style whose boxes stand elsewhere stays with only its place, based on the kept style (extends), so its boxes take the kept look without moving.
  • Review lists each style that goes, what it differs in, and the chapters and frames rewritten. Merge into (or Merge every suggestion) rewrites the style of every template frame, variants included, and the type of every fence of every chapter to the kept style, removes the others, and puts the kept style where the first of its group stood, so a fence with no type keeps its look. The merge enters the Sandbox's undo history as one step per chapter rewritten and one for the styles and templates. Undo in the section takes the whole merge back while nothing was changed after it; Cmd/Ctrl+Z takes it back a step at a time, the styles first, so every state on the way names styles that exist.
  • Renaming a style in Box styles renames it in every fence and template frame as well.

The merge rewrites the chapters of the edition that is open: another language of the book, kept as a draft or a project of its own, keeps its own styles. Agents get the same library through sandbox_frame_styles and sandbox_merge_styles (see WebMCP).

#Composed pages in every edition

In a book with page templates (pageTemplates), the panel opens with Composed pages: the checks of every composed page of every chapter, in every edition the book carries. A bundle in Spanish, English and Catalan is checked in all three while one of them is on screen. The editions not on screen are laid out in the background, each read the way opening it would read it: its draft when it was edited, else the bundle's text in that language. A line under the controls says which editions are being laid out and, once they are all done, which were checked.

The section lists:

  • Text does not fit its frame (frameOverflow), with the steps the reflow ladder tried and the changes that would make the frame fit;
  • Text still runs past its last added page (frameContinuationLimit): the frame's content went on to the most pages a composed page may add and still does not fit;
  • A story jumps to a page that does not follow (continueTargetMissing): no later page fence has the id the frame's continueIn names;
  • Label at an unknown anchor and Anchor without a label (labelAnchorUnknown, anchorUnlabelled), filed under the frame that sets the figure;
  • Label wider than its measure and Labels run into each other (labelOverflow, labelOverlap), filed under the same frame: each edition's labels are measured with its own words, so a language with longer words overflows where another does not;
  • Slot with no frame, Empty frame, Unknown page template, Composed page with three colons and Spread flag and template disagree (slotUnknown, slotEmpty, templateUnknown, pageFenceLength, spreadMismatch);
  • Contents block cut between columns (tocGroupSplit);
  • the page templates' own warnings (a frame style or anchor that does not exist, sizes that contradict each other, a chain that loops) and design text that holds the book's content (contentInConfig).

These entries are not repeated in the groups below.

Page, Frame and Language group the list by composed page (the same page in every edition, whatever number it carries there), by frame or by edition. The three menus under them keep one language, one page or one frame. Each entry shows the edition's tag (CA), the page number in that edition and the frame's name.

A click on an entry takes you to its frame in its edition. When another edition is on screen, the book switches to the entry's language; then the chapter and the page open, the frame is picked on the page (its path shows at the foot of the preview) and the caret goes to the start of its slot in the Text panel. A template's own warning opens the first page set with that template, with its frame picked; design text that holds content opens the Design panel.

A local project imported from a bundle in several languages keeps all of them, so its composed pages are checked in every language as a sample's are, and a check in another language takes you to it with the project switched to that language. A book in one language has one edition, and the line under the controls says so. The badge on the activity bar counts the warnings of the chapter on screen, in the edition on screen. A big book waits to be asked: when its chapters times its editions come to more than 48, the panel checks only the chapter on screen and offers Check every edition, which lays out the rest in the background (since postext 1.40). The sandbox_get_composed_checks tool (see WebMCP) lists the composed checks of every edition without the panel.

#Moving the text to the Markdown

A book made before composed pages may keep the text of whole pages in its heading styles: a hidden heading on each page whose running head places dozens of text elements, boxes and pictures where the printed page had them. The Checks panel then lists Text held in the configuration and offers Move the text to the Markdown at its head. A book imported from the Books panel with such styles opens the same dialog right after the import.

The dialog says what the move will do before it does anything:

  • Each page design becomes a page template (pageTemplates). Every text becomes a frame where the text stood; text blocks of one look set one under another at an even spacing become one frame. The boxes, rules and pictures become the template's decoration, painted over the page's running text as the running head was, and a picture that covers the page becomes the page's background attribute, which the decoration reads ({attr.background}).
  • Each page of a chapter becomes a page fence, ::::page{template="…"}, holding the page's headings and running text and a :::frame{slot="…"} per frame with its text. Bold and italics stay; the line ends of the design stay as forced breaks.
  • The face, size, weight, colour, alignment and leading of each text become a paragraph style: the book's own when one matches exactly, else a new one named after the face and the size. A filled box under bold words becomes a chip of the book's chip style of that colour, or of a new one.
  • Pages whose frames stand in the same places share a template (page-base) that their own templates extend (extends); a page that adds nothing uses it as it is.
  • Heading styles that come out the same once their running heads have left are merged (tema--p04, tema--p05 → tema) and the headings are renamed; hidden headings that only switched the running head are dropped. A page that opened with a heading set to an even or odd page gets a :::pagebreak{parity="…"} before its fence.

The numbers under What changes are the texts and letters moved, the pages written, the templates proposed, the heading styles before and after, the styles created, the size of the configuration and the Text held in the configuration warnings, before and after.

Before and after lays each chapter out twice with the Sandbox's own layout and draws every page that changes, the old one beside the new one. The list beside them says which pages look different and why, when the reason is known: a text's own box, outline or drop cap, a page whose side was not known, running text now set in the template's flow frame. Mark in red what changed paints the pixels that differ.

The options: Pages with frames in the same places share a template, A highlight box under bold words becomes a chip, and, when there are some, Delete the heading styles with text that no heading uses.

With Words on pictures become their labels, offered when the design sets short words on the book's pictures (the names of a map, the figures of a diagram), those words become the ::label lines of a :::figure, the picture gets a frame of its own and its resource gets the anchors. The summary counts the labels, the pictures, the anchors and the label styles. The option is off until you turn it on, because these pages change the most: the labels are set again with the book's fonts, so look at them beside the old pages. The anchors are written to the picture's resource as one undo step each, between the text and the design, and Undo and Put the book back as it was take them back too.

Move the text writes the change into the book's one undo history: a step for each chapter rewritten, then one for the design. Cmd/Ctrl+Z takes the design back first, then the chapters, and the dialog's Undo takes back all of them while they are the latest. The book as it was also stays stored, across reloads, until Keep the move in the Checks panel; until then Put the book back as it was writes the old design and text back, as steps that can be undone in turn.

Left in the configuration, and listed under Left in the configuration: a text that mixes words with placeholders (Page {pageNumber}), a text hung from its running head's own box or from another element, and the text of a heading design (not a page). A heading set in a frame keeps its design there (the tab of a boxed heading, bands drawn around a heading; see Headings in boxes and frames). The contrast check reads a frame's text on the box of its frame or on the decoration box under it, so a white label on a coloured box is measured on that colour (see What is read).

The same migration is a function of the engine, moveTextToMarkdown({ config, chapters, metadata }, options), which returns the new configuration, the chapters and the report the dialog shows. See Composed pages.

#Fixing a frame in one click

Under Text does not fit its frame, the fixes the reflow ladder worked out for that frame are buttons, in the warning's own words:

  • let the text shrink to 60 % sets the frame's fit.minScale (and turns fit.shrinkText on when it was off);
  • raise maxHeight to 66 mm sets its maxHeight;
  • lower the minHeight of … lowers the minimum height of another frame of its group;
  • continue it on the next page sets overflow.continueIn to next-page, so what does not fit goes on to a page added after this one;
  • set the page with template … rewrites the template of the page's ::::page fence in the text;
  • cut about 626 characters changes nothing: it selects the frame's text in the Text panel and says how many characters to cut.

The other buttons change the book's form, so each asks first, naming the setting and its value (tema-fija › dinero › maxHeight = 66 mm) or the template the page will take. A design change applies to every page set with that template. Change it makes the change as one step of the undo history: Cmd/Ctrl+Z, or the Undo button beside Content and Design, takes it back. The page is laid out again, and the warning goes, or gives way to what the change left (a box further down that no longer fits).

The same buttons follow the frame in the canvas's What moved and why panel. The warning of an edition that is not on screen offers to open that edition instead, where its fixes can be made. When the book changed after the layout proposed a fix (the template was edited, the fence names another template), the button says so and changes nothing. An agent makes the same fixes with sandbox_apply_proposal (WebMCP).