Difference between revisions of "Courses/Hybrid publishing resources"

From Publication Station
Line 148: Line 148:
* [http://www.gnu.org/software/make/ GNU Make official site ]
* [http://www.gnu.org/software/make/ GNU Make official site ]


== download ==
== download code ==
download a code repository into  
Download the code repository into your computer:
 
https://gitlab.com/DigitalPublishingToolkit/Hybrid-Publishing-Resources/repository/archive.zip?ref=wdka
 
 


== the makefile ==
== the makefile ==
Line 155: Line 159:




----
== ***** ==
 
== IMCL ==
== IMCL ==
: to be edited
: to be edited

Revision as of 17:36, 11 March 2015

<slidy theme="a" />

publicationstation.wdka.hro.nl/wiki

Hybrid Publishing

Focus

Transforming a source (manuscript) into multiple publishable outputs

In a Hybrid Publishing Workflow

Hybrid Publishing Workflow

  1. various outcomes from one workflow
  2. constant connection between source-content and outcome
  3. avoiding repeating tasks

Hybrid Publishing Workflow

Hybrid-workflow.png

http://networkcultures.org/blog/publication/from-print-to-ebooks-a-hybrid-publishing-toolkit-for-the-arts/

EPUB trailer


How?

How can we achieve a publishing workflow where we can go from the source (a word document, a wiki page, a webpage) to several outputs (an EPUB, a website, an animated gif, an inDesign project)?

Structure

By putting the content into an explicit structure, which can withstand those transformations.

How to achieve explicit structure?

An explicit structure is achieved by marking the text with structural information.

marking the text = markup

Markup languages

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>

Wiki markup:


= 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

Markdown:

# 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

pandoc

pandoc: software for converting between markups with

http://johnmacfarlane.net/pandoc/diagram.png


markup a text in MS Word/Libre Office/Open Office

styles; Test on WDKA

create a .docx file and mark it up with a few of the following paragraph and characters styles:

  • headings
  • body text
  • block quotes: indented blocks of text
  • footnotes
  • hyperlinks
  • Preformatted text
  • Bold
  • Italics

Save in .docx

convert

Convert your docx file into a an HTML file using Pandoc.

shell
Pandoc command

convert once more, now to EPUB

Can you instead of converting the .docx into HTML convert into an EPUB?

clues

Markdown

Markdown as the source file.

link to Markdown syntax

Any plain text editor such as Sublime Text or Gedit can be used to edit Markdown files. There are also WYSIWYG Markdown editors such as MacDown.

Why Markdown ?

  • simple
  • only one way to create a structure
  • compatible with HTML, but easier to read and write
  • allows the inclusion of HTML tags. E.g.
    <!-- an html comment -->  <span id="mrspan">a div</span>

convert once more, now to Markdown

pandoc argument


****

stream line: makefile

This same approach of converting between markups using Pandoc can be automated through scripts that execute the commands we have been writing in the terminal.

Ands since computers are good at doing repetitive and boring tasks, we can take advantage from it.

We can make them perform the same task on multiple source files, and make them produce multiple outputs (E.G. EPUB, ICML, HTML).

makefile

My proposal involves using a Makefile to automate conversions between markup-languages

Makefiles are usually used to in the free-software community to compile source code into running applications. However they are not more than a notebook of commands to process stuff and generate other stuff from it: e.g. create executables programs out of source code files. There is nothing stopping us from using makefiles to automate conversions between markup-languages.

Read more about Makefiles in the context of hybrid publishing:

  • the blog post Make Book by Michael Murtaugh
  • the report on the Don Marti's presentation at SCALE
another, he said, so they can be used for any repetitive task, not just compilation.

download code

Download the code repository into your computer:

https://gitlab.com/DigitalPublishingToolkit/Hybrid-Publishing-Resources/repository/archive.zip?ref=wdka


the makefile

*****

IMCL

to be edited

Recipe Ingredients

  • empty folder - to create the recipe
  • content in a markup language: HTML (or wiki syntax)
  • terminal - a text-based interface to your file system
  • pandoc - markup converter software
  • plain-text editor: Sublime Text or Gedit
  • your favorite text layout software

Testing the Recipe

Testing the Recipe step#1

In on empty folder in your computer save 1 BS article in HTML.

Testing the Recipe step#2

Convert that HTML file into an ICML file.

pandoc -f html -t icml -s input.html -o output.icml

pandoc - program dedicate to the conversion between different markups.

-f - option standing for “from”, is followed by the input format;

-t - option standing for “to”, is followed by the output format;

-s - option standing for “standalone”, produces output with an appropriate header and footer;

-o - option for file output;

input.html - html input filename - you need to replace it by its actual name

Testing the Recipe step#3

Open inDesign and ...

Place your output.icml in a inDesign project.

The Place function is in: File > Place (shortcut: Apple+D)

Testing the Recipe step#4

Style the content using paragraph and character styles.

Paragraph/Characters styles are in: Type > Paragraph/Character Styles


Testing the Recipe step#5

Content updates

Using Sublime Text, edit the source html file adding something or extracting something to it.

Repeat the whole recipe, so that you see the content being updated in inDesign.

Recipe Warning

Content should remain untouched until the last moment

If you change the content of the articles inDesign, the link between the inDesign content and its source ICML file will be lost, and it no longer be able to be updated.

This "disconnection" should only be the last step to be done on your design workflow.

Recipe Tips

Loading paragraph styles

Recipe Questions

Can CSS rules be imported and used as inDesign Paragraph/Character Styles ?

Can inDesign styles be exported as CSS style-sheets ?

+ ... ?





software used