Single-source workflow
goal
Create ICML and HTML files from a styled docx manuscript file.
- The ICML is the content of the inDesing project that will originate the print publication
- The HTML is the content of the Website project
why
- updatable: changes to the manuscript are propagated to the outputs
- reusable: structure (headings, bloque quotes) and paragraphs styles (bold, italics) are maintained from manuscript to outputs
how:Pandoc / Hybrid Publishing Editor
Markups languages
Markups languages are ways of marking text, giving with words specific hierarchical and visual rendering.
By marking the text according to markup languages it is possible to:
- add reading aids, such bold, italic, blockquotes
- add a clear text hierarchy: section titles, sub-section titles, sub-sub-sub section titles
- convert between different markup languages - as they are mostly compatible
Markup languages examples
Each markup uses a different markings
HTML:
<h1>Revenge of the Text</h1>
<p>There is a room in the <strong>Musée d’Orsay</strong> that I call the <em>room of possibilities</em>.</p>
<p>That room contains:</p>
<ul>
<li>a snow flake</li>
<li>the end of a cloud</li>
<li>a bit of nothing</li>
</ul>
# Revenge of the Text There is a room in the **Musée d’Orsay** that I call the *room of possibilities*. That room contains: * a snow flake * the end of a cloud * a bit of nothing
ICML (xml):
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Header1">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>Revenge of the Text</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
<Br />
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>There is a room in the </Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Bold">
<Content>Musée d’Orsay</Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content> that I call the </Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic">
<Content>room of possibilities</Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>.</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
<Br />
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>That room contains:</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
<Br />
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList > first" NumberingContinue="false">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>a snow flake</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
<Br />
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>the end of a cloud</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
<Br />
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>a bit of nothing</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
t
Word styles in manuscript (.docx)
This is a preparatory stage. Yet it is important for the series of conversions that will lead to the different publication's outputs.
If changes to the manuscript are needed the use paragraph styles in MS Word/Libre Office/Open Office "mark" the text, so as to allow those structural markings to propagate to ICML(inDesign) and HTML(website).
Some existing paragraph and characters styles:
- headings: heading1, heading2, etc
- body text: regular text
- block quotes: indented blocks of text
- footnotes
- hyperlinks
- Preformatted text as in
Hello world
- Bold
- Italics
Save in .docx. Pandoc cannot read .doc, only .docx
Pandoc
pandoc: is a software for converting text between different markups
Pandoc has a text-based interface, which can be challenging to use, to those unused to use the command-line terminal.
Luckily there are a few Web interfaces to Pandoc, such as Hybrid Publishing Editor by Michael Murtaugh
ICML files
ICML files are essentially XML files, usualy managed by InCopy, Adobe’s own word processor, which can be easily imported into Adobe InDesign.
Importing ICML to InDesign
An ICML file can be imported into InDesign with File>Place
The present paragraph styles and chapter styles that were present in the manuscript which gave origin to the ICML are kept and included in the HTML file.
bold; italic; blockquotes; footnotes; headers; paragraphs; tables; lists.
Images are given an empty placeholder.
Updating content
If the ICML remains linked to the inDesign project, changes performed in manuscript, once converted to the ICML, will be integrated into the inDesign project.
inDesign Styles
See more in https://helpx.adobe.com/indesign/using/paragraph-character-styles.html
Importing styles from another inDesign project
To import character and paragraph styles from another inDesign project:
- Choose Load All Text Styles from the Paragraph Styles panel menu
- InDesign displays the Open a File dialog box.
- Locate and select the InDesign project file containing the styles you want and click the Open button.
- InDesign copies the character styles from that publication into the current document.
http://ptgmedia.pearsoncmg.com/images/art_0600indesign_b/elementLinks/styles07.gif
Importing/Exporting styles
According to Lynda.com course Exporting InDesign styles for CSS and HTML "InDesign writes and creates the CSS for you. This is not an option that I really recommend because InDesign, great as it is, does not write very good CSS. It tries to write CSS that is a very, very close match in appearance to your print layout and that's not necessarily Web-friendly."
Besides the design spaces - the page and the screen have different properties and behaviors.
Conversions to ICML
Pandoc can convert HTML and Markdown markups into ICML, since the file format is is essentially XML markup.
Example command:
pandoc -s -f markdown -t icml -o my.icml my.md
-s option, which stands for “standalone”, produces output with an appropriate header and footer;
-f option, which stands for “from”, is followed by the source format;
-t option, which stands for “to”, is followed by the output format;
-o option, which stands for “output”;;
my.md is the markdown source filename.
Links
Updatable Website
How to integrating changing content & website creation?
Our problem: like in inDesign we want to work on the identity and navigation of our website, while keeping the content updatable.
inDesign addresses this issue with the use of chapter styles.
How can it work for the website creation?
https://github.com/wdka-publicationSt/book-website/archive/master.zip
- ↑ Markdown Syntax in http://daringfireball.net/projects/markdown/syntax