Content scanning

Full looseleaf publishing places some restrictions on the use of scanned content that is transformed or has the potential to span a page or leaf boundary.

Page and leaf boundaries

TopLeaf can only position leaf, page or line boundaries within scanned content that is:

  • sourced entirely from the partition document file.

  • rendered immediately, or if the content is suppressed, by referencing the <content/> command;

  • rendered before any other content generated by a user defined customisation.

TopLeaf cannot calculate the position of leaf, page or line boundaries located within scanned content that is rendered:

When rendered scanned content spans a page or leaf boundary, the boundary is positioned after the element containing the scanned content, and a description of the event is recorded in the typesetting composition log, as in the following example:

Paragraph boundaries

Scanned document content that is suppressed at the end of a paragraph will not be associated with that paragraph unless you force a content break or generate additional custom content — for example, by outputting a zero width space (U+200B) — before the paragraph ends.

Examples

The following table lists examples of mapping rules that process scanned content, together with a possible implementation. A in the final column indicates whether or not TopLeaf can position leaf, page or line boundaries within the scanned content.

Mapping rule requirement Description Boundaries can be positioned

Scan the content of a tag. Assign the content of a tag to a running head and render the original scanned content.

The requirement is implemented by scanning the tag content and assigning a running head directly from the mapping Content tab. The scanned content is rendered automatically.

Scan the content of a tag. If the tag identifies a telltale, then assign the tag content to a data telltale and render the original scanned content.

The requirement is implemented using the following user customisation:

<if var="@id" target="telltale" >
  <TellTale><content/></TellTale>
</if>
<content/>

The mapping scans and suppresses the tag content. If the element is a telltale, the tag content is passed to a %Telltale custom marker mapping that assigns the data telltale without rendering any additional content.

The scanned content is rendered using the <content/> command.

Scan and suppress the content of an inline tag. The tag is positioned immediately before the end of a paragraph. Assign the scanned content to a sidenote.

The requirement is implemented by rendering a zero width space (U+200B) within the end tag user customisation of the mapping that assigns the sidenote:

&#8203;

Scan the content of a tag. If the tag identifies a footnote, then assign the tag content to a data telltale and render the text of the scanned content.

The requirement is implemented using the following user customisation:

<if var="@id" target="note" >
  <Note><content/></Note>
</if>
{content}

The mapping scans and suppresses the tag content. If the element is a note, the tag content is passed to a %Note custom marker mapping that assigns a page footnote without rendering any additional content

The text of the scanned content is rendered using the {content} system variable. Boundaries cannot be positioned within the scanned content because the value of{content} is a transform version of the scanned content — the tag structure has been stripped.

Scan the content of a tag. Output additional content before and after the scanned content.

The requirement is implemented using the following user customisation:

[<I>Warning:</I> <content/> ]

The mapping scans and suppresses the tag content. It then formats and renders additional text before rendering the scanned content. Boundaries cannot be positioned within the scanned content because additional content has been inserted by the user customisation.