Figure: Example of an InDesign layout (left) imported as a Story in Inception (right). Imported are the title (A), subtitle (B), author (C) and body text (D). Images are currently added as attachments (E) and can be manually added.

This method requires scripts to be installed and configured in InDesign.

// The directory used as base directory for the export. The script will create directories with the document name
// inside the base folder to separate the export of different documents. Consecutive exports of the same document
// will overwrite existing files. Orphaned files will not be removed.
exportDirectory: '~/Desktop/inception-indesign-export',

Controlling which paragraphs to export and linking them to Inception components

An InDesign Article can be generated automatically by choosing Inception > Create InDesign Article. During this process, paragraphs are automatically added to an InDesign Article as items.

During export, it needs to be defined into which Inception component each paragraph needs to be loaded.

Both actions are controlled by associating a paragraph style with an Inception component. This is done in the configuration file.

Example: A paragraph has the style 'Title-black" applied. In the configuration file, the Inception component 'title' is associated with the paragraph style 'Title-black'.

When automatically creating the InDesign Article, the paragraph is added as an item because its paragraph style is defined in the configuration file.

When exporting the layout, the paragraph is designated to be imported into Inception as a title component because the paragraph style is associated with the Inception component in the configuration file.

Step 1. Access the inception-config.jsx file.

Show me the location of this file

<location where the scripts were installed (see above)>/inception/inception-config.jsx

Example: Here the file is stored in the Application Scripts folder on Mac OS:

Step 2. In the textFilterList option, add a paragraph style to its corresponding Inception component.

Example: For the Title component, add the paragraph style(s) that is used for styling the title in InDesign; for the Subtitle component, add the paragraph style(s) that is used for styling the subtitle in InDesign, and so on.

Although not recommended, it is not uncommon that layouts have no custom paragraph styles defined and that text is solely formatted through the use of character styles or local styling.

To still export the content from the layout to Inception, associate the default paragraph styles "[No Paragraph Style]" and "[Basic Paragraph]" with an Inception component. Most practical will be to associate them to the Body component.

Example: Here, all text that has the default paragraph styles assigned is exported as an Inception body text component:

body: [
"[No Paragraph Style]",
"[Basic Paragraph]"
]

Defining which text formatting should be treated as bold and italic

Text that is formatted as bold or italic (or should be treated as such) can be defined in the configuration file.

Step 1. Access the inception-config.jsx file.

Show me the location of this file

<location where the scripts were installed (see above)>/inception/inception-config.jsx

Example: Here the file is stored in the Application Scripts folder on Mac OS:

// The 'styles' section provides the export details about what styling should result in bold and italic
// overrides in the output.
styles: {
// Mark character styles as bold or italic. Matching is on full character style name. Most commonly used.
character: {
},
// Mark use of certain font styles as bold or italic in the output. Be aware that this will match for all
// font families used with the specified font style
font: {
},
// Mark entire paragraphs as bold or italic. Not commonly used.
paragraph: {
}
},