Sample Generator

Use the Sample Generator to create a design sample.


The Scribe Sample Generator uses the Digital Hub to provide all you need to show the elements within a book. This tool is intended to reduce the amount of effort involved in finding elements to include in a sample, guiding the creation of InDesign templates or e-book CSS.

When .docx is converted to IDTT or ScML in the Digital Hub, the intermediate step is the creation of a .sam file. This is the file used to generate the design sample output. In essence, the Sample Generator is a tool to pare down a larger file into a smaller .sam file.

A single .sam file is the required source for the Sample Generator.

The Sample Generator Page

  • Choose Counts: Set the number of instances for each paragraph style to be included in the sample. Defaults to 1. Increase or decrease using the plus and minus buttons, or set all to 0.
  • Rearrange Elements: As a default, elements are listed in the order in which they appear in the file. When this list is locked and increments are changed in the Choose Counts area, the order from the file is maintained. Once unlocked, any elements added are placed at the bottom of the list. Users can drag elements to rearrange the order.
  • Make the Sample: Select the output type. Options are IDTT, ScML, ePub 2, ePub 3, and HTML. The sample will be generated with the output settings from the original project.
  • Download Sample: After choosing Make the Sample, click to download the sample. The sample is not saved within the Digital Hub project record.

File Naming

The output files will be named [project-code]-sample.

This zip file will contain the new .sam file and the selected output.

Output (General)

The output file will include the following:

  • The content selected.
  • A paragraph containing an example of all character styles used in the file. This will be preceded by a p paragraph with the following text inside query tags: {~?~The following paragraph contains all of the character styles used in this document:}
  • A paragraph containing all of the special characters used in the file. This will be preceded by a p paragraph with the following text inside query tags: {~?~The following paragraph contains all of the special characters used in this document, separated by pipes:}
  • The IDTT output will include a Define List with all elements in the file.


Because tables can contain any paragraph style, the Sample Generator approaches tables with some basic defaults.

  • When the table style is selected and increment adjusted to “1,” the Sample Generator will output one complete table (the first it encounters in the file).
  • If the td paragraph style is set to “0” in the Choose Counts area, that style will still be included if it is part of a selected table.
  • If the td style is set to “1” or more in the Choose Counts area, an additional td paragraph will be output outside of the table.

Footnotes and Endnotes

The Sample Generator will output one instance of a footnote and an endnote, if present in the file.

  • The fn and en paragraphs are not available to users to be increased or rearranged because these are included by default.
  • Likewise, fnref, fnnum, enref, and ennum are not included in the character styles list at the end of the file. The Sample Generator will automatically include an example of each somewhere in the sample.
  • The tool will ensure that note counts match so that notes can be linked or embedded correctly in the output.


The output will be created using the settings in the project. E-book outputs will use the CSS and images from the main project record.


The Sample Generator can only approach the input in standardized ways.

It cannot read a book and select the best or most appropriate chapter or elements to include the way a human can. For example, the tool cannot choose the best table based on complexity or size, only the tables it encounters, in order, for however many have been selected in the Choose Counts area.

In many cases, use of both the complete output and the sample output will be best to produce a design that includes all elements appearing in a publication.

For example, the output is created based on the .sam input. If an ah contains the i character style, the combination style that the Hub creates during conversion, ah-i, will appear in the DefineList and body of the IDTT, but this Hub-created style will not appear in the paragraph that lists the character styles being used in the file. That paragraph only contains the character styles that existed in the .sam input.

Sample Creation Procedure

To produce a design using the Sample Generator, follow the Sample Creation procedure here.

The following are some ways in which the Sample Generator may be used:

  • Output one or more examples of all paragraph and character styles present in a .sam file.
  • Isolate and output all instances of a particular paragraph style.
  • Isolate and output all tables.
  • Isolate and output all special characters.