Skip to content

XML and InDesign import instructions

calebwaldorf edited this page Dec 13, 2019 · 6 revisions

XML and InDesign import instructions

These instructions are for installing several extend scripts and importing the XML/IDML file into InDesign. The template file provided is for demonstration purposes only and currently may not have full support for all design and layout styles.

Installation

  1. Download the InDesign scripts and template in the b-ber-demos repository.

  2. Install the b-ber extendscripts in InDesign.

Ensure the Scripts Panel is visible:

install-1

Open the Scripts Panel, right-click on the User directory, and select Reveal in Finder:

install-2

Copy the scripts from the b-ber-IDML repository into the Scripts/User directory. The newly installed scripts should now appear in InDesign's Scripts Panel.

install-3

Importing XML Documents to InDesign

  1. Generate an XML file with b-ber from a project directory:
$ bber build xml
  1. Open a b-ber template in InDesign:

import-1

  1. Import the XML file into InDesign by selecting File > Import XML...:

import-2

Ensure the import settings match the following:

import-3

The content of the XML file is now visible in the document:

import-4

  1. Ensure the styles have been properly mapped by selecting Map Tags to Styles from the Structure Panel:

import-4

  1. Open the Scripts Panel:

import-5

  1. Run the serif-master script:

import-6

Scripts functionality

Detailed documentation for all scripts can be found inline in the files. Below is a brief overview of each file:

  • The serif-master.js script runs each script required for the b-ber-theme-serif theme.
  • The pagebreak.js script replaces HTML <pagebreak> and <br> characters with InDesign specific framebreak and line break characters.
  • The img-resize.js script programmatically resizes all images. A dialog window will prompt the user to enter how many columns wide the inline figures should formatted. The default is set to 8.5 columns.
  • The serif-adjustments.js script programmatically applies text indentation to <p> elements and formats special-case <h1> tags.
  • The nested-style-override.js script programmatically applies style specifications to nested child elements which are not natively supported by InDesign character and paragraph styles.
Clone this wiki locally