Skip to content

Preparing the epub for conversion

Bianca Gualandi edited this page Sep 29, 2017 · 27 revisions

Creating the InDesign documents

The instructions below must be followed closely for the conversion to work and to produce valid XML TEI files.

The text must be organised into a collection of InDesign documents (file extension: .indd) listed in a specific order within a book (file extension: .indb ). Each document corresponds to a section of text that is considered as a separate unit. From a technical standpoint, a document will correspond to a single input XHTML file in the epub and to a single output XML file. Documents must be named according to the following list of filenames. Their order within the book can differ from the one outlined below. Square brackets indicate that document may not occur within a book:

FILENAME TYPE OF SECTION
half-title Half title page
title Title page
copyright Copyright page
[dedication] [Dedication page]
contents Table of contents
[illustrations] [List of illustrations]
[tables] [List of tables]
[resources] [List of resources]
[acknowledgments] [Acknowledgments]
[contributors] [Contributors’ short biographies]
[foreword] [Foreword]
[preface] [Preface]
[introduction] [Introduction]
ch1 Chapter 1
[ch2] [Chapter 2]
[ch3] [Chapter 3]
[chN] [Chapter N]
[bibliography] [Bibliography]
[index] [Index]
back-page Back page

Each document (encoded in a separate XHTML file) will be converted into one single XML TEI file featuring its own <header> and <body>. These files will then be merged into one single file that spans the entire book using the <TEIcorpus> element.

Although describing a book as a corpus may seem counter-intuitive, we find this approach particularly interesting. Not only it puts emphasis on the modular nature of academic publication (especially, but not solely, of edited books) but it also makes possible to retain all section-level metadata right at the start of the content they refer to. This is particular important as each section may be authored by a different group and may be licensed differently from other sections and from the book as a whole.

Styling the InDesign documents

ID-document-TEMPLATE.indt (see the 'documents and templates' folder) groups all the styles needed to format the majority of OBP humanities monographs. Style names have been chosen to be self-explanatory and easy to use. While style specifications can and should change to match the house style, their names must remain the same.

Character Styles

CHARACTER STYLE TEXT FEATURE
italic Italicised text
bold Bolded text (keep to a minimum)
bolditalic Bolded, italicised text
superscript Superscript text (including footnote markers)
superscript-italic Superscript, italicised text
subscript Subscript text
smaller Smaller text (for any reasons)
times-new-roman Times New Roman font face (used for glyphs that do not exist in Palatino)
times-new-roman-italic as above, italicised
underline Underlined text
strikethrough Strikethrough text
strikethrough-italic Strikethrough, italicised text
line-number Line numbers in poems

Paragraph Styles

PARAGRAPH STYLE TYPE OF TEXT BLOCK
running-title Running headers in master pages
FM-half-title Half-title
FM-title Title page: book main title
FM-subtitle Title page: book subtitle
FM-author Title page: contributors’ names
FM-affiliation Title page: contributors’ affiliation
CP-centered-para Copyright page: centered text
CP-first-para Copyright page: justified text, with space above
CP-other-para Copyright page: justified text
TOC-chapter-title Table of contents: chapter headings
TOC-part-title Table of contents: part headings
TOC-author Table of contents: authors’ names
illustration-list Any item in an illustration, table or resource list
dedication Any dedicatory line or paragraph
signature Author’s signature eg at the end of a preface
heading0 Part heading
heading1 Chapter heading
heading1-aut Chapter heading (when author name follows)
author-name Author name following chapter heading
heading2 Section heading (level 1)
heading3 Section heading (level 2)
heading4 Section heading (level 3)
heading5 Section heading (level 4)
first-para Paragraph in main text, if occurring at the start of a chapter or after an image, table, poem, etc.
other-para Any other paragraph in main text
footnote-first-para First paragraph in footnote
footnote-other-para Any other paragraph in footnote
endnote-first-para First paragraph in endnote
endnote-other-para Any other paragraph in endnote
quote-first-para First paragraph in quote
quote-other-para Any other paragraph in quote
quote-in-footnote-first-para First paragraph of a quote in footnote
quote-in-footnote-other-para Any other paragraph of a quote in footnote
short-ref Short in-text reference following quoted text
numbered-list-lev1 Each item in an ordered list
numbered-list-lev2 Each item in an ordered list within another list’s item
bullet-list-lev1 Each item in an unordered list
caption-centered Short image captions (below image)
caption-justified Longer image captions (below image)
image-centered Paragraph return carrying an anchored object
table-centered Paragraph return carrying a table
table-caption Table captions (above table)
table-text-centered Table text, aligned in the centre of the cell
table-text-left Table text, aligned to the left of the cell
poem-first-para First line in each stanza of a poem
poem-other-para Any other line in a poem
poem-first-para-indented Same as above, use only when a poem has two different indentation levels
poem-other-para-indented
poem-in-footnote Any line of poetry in footnote
stage-directions Stage directions in a play
play-first-para First paragraph in a play (prose)
play-other-para Any other paragraph in a play (prose)
doi Chapter-lev DOI as printed on a section’s first page
bibliography-first-para First entry in bibliography
bibliography-other-para Any other entry in bibliography
index-lev1-spaced First index entry for any given letter A-Z
index-lev1 Any other main entry in index
index-lev2 Sub-entry in index (level 1)
index-lev3 Sub-entry in index (level 2)
index-lev4 Sub-entry in index (level 3)
highlighted-first-para The first and following paragraphs in a block that stands out from the surrounding text but is not described by any of the styles above
highlighted-other-para
break Any sequence of characters (eg ****, or ~~~) that breaks the text flow without starting a new section
back-page-title Back page: main heading
back-page-text Back page: justified text
back-page-text-centered Back page: centered text

During pagination you may sometimes need to modify the text without necessarily modifying the corresponding paragraph or character style. For example, you may want to locally decrease character spacing to fit a chunk of text on one single line, or add more blank space before one particular image to centre it vertically on the page. In these instances it is possible and encouraged to use overrides (or local styling) to fine-tune how text and images will appear in the printed book. Remember, however, that overrides cannot be used to record any meaningful aspect or function in the text because they will be automatically discarded during the last stages of the book production leading to XML conversion.

Table styles

The template also features two different table styles, and two cell styles. 'Visible-table' and 'visible-cell' should be used for actual tables, while 'invisible-table' and 'invisible-cell' can be used in any other context where a tabular format is required (eg table of contents, list of illustrations, complex multi-column layout etc.). Note that these styles apply to tables and cells only, and not to the text they contain.

Embedded objects and interactivity

Inserting image, audio and video files

Make sure each of these 'objects' is anchored to its insertion point in the text, which should never be at the very beginning of the document. Inserting any embedded object before 'heading1' will in fact prevent a smooth conversion to XML.

Audio a video files must also be immediately preceded by an image, possibly identical to the poster image selected for that media. The image should be superimposed to the media frame to insure a pleasant layout on all supports where the embedded media cannot be played.

Inserting links

The internet protocol (http:// or https://) must always appear at the start of the URL or external links will be mistakenly identified as cross-references during epub export.

DOIs should be included as full links, as recommended by CrossRef (https://www.crossref.org/display-guidelines/): https://doi.org/10.xxxxx/xxxxx.

Exporting to epub

The book should be exported to a reflowable epub 3.0. It is recommended to validate the epub using epubcheck (see http://www.daisy.org/daisypedia/how-validate-epub-files-epubcheck-overview) as this will help spotting common mistakes that may prevent a correct conversion to XML.

Clone this wiki locally