Difference between revisions of "Courses/Hybrid publishing/Q8"

From Publication Station
(Created page with "<slidy theme="a" /> __TOC__ <div style="background:#ABE9F4;width:70%; padding:3px"> '''Professional development workshop on Hybrid Publishing''' =practicals= * #Feedbac...")
 
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
<slidy theme="a" />


__TOC__
__TOC__
Line 5: Line 4:
<div style="background:#ABE9F4;width:70%; padding:3px">  
<div style="background:#ABE9F4;width:70%; padding:3px">  
'''Professional development workshop on Hybrid Publishing'''  
'''Professional development workshop on Hybrid Publishing'''  
=practicals=
==practicals==
* [[#Feedback]]
* planning page: https://mywdka.nl/15kw8go/onderwijsenlesaanbod/planning/#post-7
* pad: http://pzwart1.wdka.hro.nl/pad/p/prof_workshop_publishing
* Room: [https://wdka.asimut.net/public/index.php?dato=20160527&akt=vislokale&id=81 BL.00.10a]
* room: [https://wdka.asimut.net/public/event.php?id=17069&url=https%3A//wdka.asimut.net/public/index.php%3Fdato%3D20160308%26akt%3Dvisgruppe%26id%3D19 BL.00.10a]
 
* duration: 3 hours
* Reading List
* date: March 8 afternoon (1.30-16.30+ drinks until 5).
** [http://networkcultures.org/blog/publication/from-print-to-ebooks-a-hybrid-publishing-toolkit-for-the-arts/ From Print to Ebooks: a Hybrid Publishing Toolkit for the Arts]
* software used:
*** chapters 02,
*** chapert 6.3 3. "Do-it-yourself EPUB using Pandoc"
 
* Publications we'll work on:
** repository: https://github.com/wdka-publicationSt/editorial_design/
** zip: https://github.com/wdka-publicationSt/editorial_design/archive/master.zip
 
* software used '''(download to your computer)''':
** [http://calibre-ebook.com/ Calibre],  
** [http://calibre-ebook.com/ Calibre],  
** [http://pandoc.org/ Pandoc],  
** [http://pandoc.org/ Pandoc] [https://github.com/jgm/pandoc/releases/download/1.17.0.2/pandoc-1.17.0.2-osx.pkg  download for mac],  
** plain-text editors ( [http://www.sublimetext.com/ Sublime Text], [https://wiki.gnome.org/Apps/Gedit Gedit] )
** plain-text editors ( [http://www.sublimetext.com/ Sublime Text], [https://wiki.gnome.org/Apps/Gedit Gedit] )
** Base64 encoder: ( [http://www.motobit.com/util/base64-decoder-encoder.asp Online encoder], [http://www.macupdate.com/app/mac/31983/convert64 Convert64 (Mac OS X, commercial)]
** [https://developer.apple.com/xcode/download/ Xcode] (mac)
 
</div>
</div>


== Plan ==
* Presentations
* Hybrid publishing
* concepts,
* examples
* formats (markups)
* tools and strategies


== Plan ==
* Hybrid publishing.
* Motivations, concepts, tools, strategies, formats that have been present in hybrid publishing efforts of WdKA.
* Role and possibilities for publishing in an art school.
* Presentation of developed and in-progress publications .
* Inauguration the Device Lab.


==Why ''publishing''?==  
==publishing in WdKA==  
* hybrid publishing as an extension of efforts from Publication station - establishing dialog between analog &amp; digital  
* hybrid publishing as an extension of efforts from Publication station - establishing dialog between analog &amp; digital  
* continuation of [http://monoskop.org/log/?p=4165 Alessandro Ludovico's research on Post-Digital Print at WdKA]
* continuation of [http://monoskop.org/log/?p=4165 Alessandro Ludovico's research on Post-Digital Print at WdKA]
Line 34: Line 40:
* publishing as a learning tool
* publishing as a learning tool


==Possibilities and constraints==
==''hybrid publication''?==
Plain text + poor visuals vs. rich visuals + interactivity
A publication that inhabits both analog and digital worlds.
 
[[File:E-publishing_richness.png]]
 
==How ''hybrid''?==
"a single 'entity' that would extensively implement both worlds (analogue and digital), we might call this entity a 'hybrid' – a publication which would 'perform the networks' in depth"<br/><small>Ludovico, Alessandro. “Networks as Agents in the Clash Between Personal and Industrial Post-Digital Print.” Progetto Grafico, August 2015.</small>
 
<small>[https://vimeo.com/96574475 Video] from Ludovico's presentation of “Networks as Agents in the Clash Between Personal and Industrial Post-Digital Print.”</small>


==hybrid publishing works==
==hybrid publishing works==
Line 49: Line 48:
[http://traumawien.at/ghostwriters/]
[http://traumawien.at/ghostwriters/]
http://rlv.zcache.com/traumawien_button-rb0a7981400224870838ec6aaa582161c_x7j3i_8byvr_512.jpg
http://rlv.zcache.com/traumawien_button-rb0a7981400224870838ec6aaa582161c_x7j3i_8byvr_512.jpg


[http://badlandsunlimited.com/ Badlands Unlimited]
[http://badlandsunlimited.com/ Badlands Unlimited]
http://badlandsunlimited.com/wp-content/uploads/2013/06/book_small.gif
http://badlandsunlimited.com/wp-content/uploads/2013/06/book_small.gif
http://badlandsunlimited.com/books/phaedrus-pron/
http://badlandsunlimited.com/books/phaedrus-pron/


[http://www.julienlevesque.net/books-scapes/ Books Scapes], Julien Levesque, 2012
[http://www.julienlevesque.net/books-scapes/ Books Scapes], Julien Levesque, 2012


http://p-dpa.net/wp-content/uploads/2015/03/Screen-Shot-2014-02-15-at-17.17.18-600x150.png
http://p-dpa.net/wp-content/uploads/2015/03/Screen-Shot-2014-02-15-at-17.17.18-600x150.png


[http://p-dpa.net/work/e-book-backup/ E-Book Backup], Jesse England, 2012
[http://p-dpa.net/work/e-book-backup/ E-Book Backup], Jesse England, 2012
Line 69: Line 64:
<small>More hybrid publishing works in [http://p-dpa.net/work/books-scapes/ Post-Digital Publishing Archive]</small>
<small>More hybrid publishing works in [http://p-dpa.net/work/books-scapes/ Post-Digital Publishing Archive]</small>


==Publications we'll work on==
repository: https://github.com/wdka-publicationSt/editorial_design/
zip: https://github.com/wdka-publicationSt/editorial_design/archive/master.zip
* Radical Tactics of the Offline Library - Henry Warwick
* The Radiated Book - ed. Femke Snelting
* About Bugs Bots & Bytes - Hackers & Designers
==Multichannel publishing workflows==
==Multichannel publishing workflows==


* ePub
* ePub
* PDF  
* PDF (print book)
* self-contained single-file HTML e-books 
* website
* Comic book Archive
* ebook trailer   
* ebook trailer   


'''Ebook trailer for From Print to Ebooks'''
[[File:multipleouptus.svg|500px]]
 
[[File:multipleouptus.svg]]


[[File:Trailer-From_Print_to_Ebooks-_a_Hybrid_Publishing_Toolkit_for_the_Arts.gif|ebook trailer]]
[[File:From_Print_to_Ebooks-print.jpg|300px|Print book]] [[File:From_Print_to_Ebooks-ebook.jpg|300px|Electroni book]] [[File:Trailer-From_Print_to_Ebooks-_a_Hybrid_Publishing_Toolkit_for_the_Arts.gif|ebook trailer]]


<small>Ebook trailer for From Print to Ebooks</small>
<small>Ebook trailer of From Print to Ebooks</small>


==Tools for hybrid publishing==
==Tools for hybrid publishing==
: open source, simple tools that work in combination, forming publishing pipelines
: open source, simple tools that work in combination, forming publishing pipelines


* [https://en.wikipedia.org/wiki/Wiki Wikis] aka Quick
* [http://calibre-ebook.com/ Calibre]
* [http://calibre-ebook.com/ Calibre]
* [http://pandoc.org/ Pandoc]
* [http://pandoc.org/ Pandoc]
Line 104: Line 103:
Can be displayed using the terminal <code>cat myfile.txt</code> will print the content of myfile.txt
Can be displayed using the terminal <code>cat myfile.txt</code> will print the content of myfile.txt


Markings are done using special (meta)characters  
'''Markings are done using special (meta)characters'''


[http://textfiles.com/directory.html Historical examples of plain text file undeground publishing]
[http://textfiles.com/directory.html Historical examples of plain text file undeground publishing]


==Markups==
==Markups languages==
"In electronic processing of texts, this '''hierarchical ordering''' <nowiki>[...]</nowiki> as well as additional '''reading aids''' such bold or italic text, is made possible by using specific formatting codes. This process is called '''markup''' and the codes are called markup element"<small>[http://www.publishinglab.nl/blog/publication/from-print-to-ebooks-a-hybrid-publishing-toolkit-for-the-arts/ From Print to Ebooks: a Hybrid Publishing Toolkit for the Arts]</small>
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 mostly compatible 


==Different Markup languages==
 
Each markup uses a different marking syntax
==Markup languages examples ==
Each markup uses a different markings


[http://en.wikipedia.org/wiki/HTML HTML]:
[http://en.wikipedia.org/wiki/HTML HTML]:
Line 127: Line 131:
</source>
</source>


[http://en.wikipedia.org/wiki/Wiki_markup Wiki markup]:
[http://en.wikipedia.org/wiki/Markdown Markdown]: <ref>Markdown Syntax in http://daringfireball.net/projects/markdown/syntax</ref>
<pre>
<pre>
= Revenge of the Text =
# Revenge of the Text
There is a room in the '''Musée d’Orsay''' that I call the ''room of possibilities''.
There is a room in the **Musée d’Orsay** that I call the *room of possibilities*.


That room contains:
That room contains:
Line 137: Line 141:
* a bit of nothing
* a bit of nothing
</pre>
</pre>
 
[http://en.wikipedia.org/wiki/Markdown Markdown]:
 
[http://en.wikipedia.org/wiki/Wiki_markup Wiki markup]:
<pre>
<pre>
# Revenge of the Text
= Revenge of the Text =
There is a room in the **Musée d’Orsay** that I call the *room of possibilities*.
There is a room in the '''Musée d’Orsay''' that I call the ''room of possibilities''.


That room contains:
That room contains:
Line 149: Line 154:
</pre>
</pre>


[https://en.wikipedia.org/wiki/Text_Encoding_Initiative TEI XML]:


<pre>
== Why Markdown ? ==
p> <hi>A New yeares guift for shrews</hi> is a diminutive sheet engraved c.1630 and signed by the relatively unknown Thomas Cecill, who seems to have been active between 1625 and 1640. It bears the imprint of the even less known Edward Lee, whose only other issue is a large equestrian portrait of Charles I. </p>
* simple
<p>In a series of unified scenes, it depicts the traditional nagging wife eventually beaten by her husband, and ultimately chased off by the devil. It is accompanied by the following rhyme of a traditional type, reminiscent of the ditty about <hi>Solomon Grundy</hi>, who was <hi>Born on Monday</hi>, and then on successive days christened, married, taken fatally ill and <hi>Buried on Sunday</hi>: </p>
* only '''one way''' to create a structure 
<q>
* compatible with HTML, but easier to read and write
<lg rend="italics">
* allows the inclusion of HTML tags.
<l>Who marieth a wife uppon a Moneday,</l>
* any plain text editor such as [http://www.sublimetext.com/ Sublime Text] or [https://wiki.gnome.org/Apps/Gedit Gedit] can edit Markdown files.
<l>If she will not be good uppon a Tewesday, </l>
* there are WYSIWYG Markdown editors such as [http://macdown.uranusjr.com/ MacDown].
<l>Lett him go to the wood uppon a Wensday, </l>
'''
<l>And cutt him a cudgell uppon the Thursday, </l>
How to write in Markdown''' http://daringfireball.net/projects/markdown/syntax
<l>And pay her soundly uppon a Fryday; </l>
 
<l>And<note><hi>And</hi>: if</note> she mend not, the Divil take her a Saterday </l>
==Hands on==
<l>Then may he eate his meate in peace on the Sonday.</l>
* '''download''' the [https://github.com/wdka-publicationSt/editorial_design/ repository] of texts for this project: https://github.com/wdka-publicationSt/editorial_design/archive/master.zip
</lg>
* unzip
</q>
* from all its files there '''choose 1 file, you'll be working on''', for today
</pre>
* copy it to a folder dedicated to today's class
* open in a text editor: sublime, gedit,etc
* Look at the markdown syntax
 
 
 
 
==Pandoc - a markup converter ==
 
''If you need to convert files from one markup format into another, '''[http://pandoc.org/ Pandoc]''' is your swiss-army knife''. But it runs on the '''command line'''.
 
With Pandoc is possible to convert between different formats:
 
For instances: <code>docx <-> markdown <-> html<code>
 
[[File:Pandoc_diagram.png|600px]]
 
 
 
 
==Command Line or Shell==
* a text-based interface to your computer's file system
* popularized before the period of personal computers,  
** when computers where shared (''time-sharing'') by many users
** accessed by a dumb terminal (screen and keyboard interface to the main computer) [[File:dumbterminal.jpg]]
* centeral to UNIX and descendant operating systems: Linux, Mac
* constituted by small programs that ''do one thing only and well''
 
===Command line cheat-sheet ===
<div style="background:black; color:#0CF953; font-family:monospace; font-size:12pt;  ">
{{:Terminal cheat sheet}} from [[Terminal_cheat_sheet]]
</div>
 
===Command line exercise===
create directory Game: <code>mkdir ~/Documents/Game</code>
 
write to file: <code>echo 'Can you find me?'> ~/Documents/Game/caca.txt </code>
 
Now, using only the command line, you have to :
* '''change to directory''' ''Game'', which is inside ''Documents''
* ''copy the file caca.txt'' ''from'' the Game folder ''to'' the Desktop
 
== Pandoc - Convert from Markdown to HTML==
<pre>pandoc --from markdown --to html5 --standalone input.mw --css style.css --output output.html</pre>
 
* <code>--from</code> - option: '''format to convert “from”''';
* <code>--to </code> - option: '''format to convert “to”''';
* <code>--standalone </code> - option: standing for '''“standalone”,''' produces HTML file with an appropriate html, head, body tags;
* <code>--css</code> - option: option for CSS style file
* <code>--output</code> - option for '''file output'''
 
==on EPUB and HTML ==
The EPUB format is essentially a bundled archive of HTML files.


[https://en.wikipedia.org/wiki/DocBook Docbook XML]
To try out sketches for the identity of an EPUB, it is simpler to:
<pre>
* use a HTML file instead of an EPUB
<?xml version="1.0" encoding="UTF-8"?>
* use a CSS file - for style
<book xml:id="simple_book" xmlns="http://docbook.org/ns/docbook" version="5.0">
* try out the sketches using the CSS
  <title>Very simple book</title>
 
  <chapter xml:id="chapter_1">
    <title>Chapter 1</title>
    <para>Hello world!</para>
    <para>I hope that your day is proceeding <emphasis>splendidly</emphasis>!</para>
  </chapter>
  <chapter xml:id="chapter_2">
    <title>Chapter 2</title>
    <para>Hello again, world!</para>
  </chapter>
</book>
</pre>


Reference: Petr van Blokland, [http://www.petr.com/index/-/p-358 Het boek als object], Items, 2004 (!)


==Create one plain-text file==
== Pandoc - converting to ICML==
Using either in '''HTML''' or '''Wiki''' syntax:
ICML is a (XML based) file format, from InCopy(Adobe’s own text processor), which can be imported into Adobe InDesign, and maintain its structures (bolds, italics, section titles), etc.
* write it from scratch
* copy HTML content from any website with "View Source"
* copy Wiki content from any wiki: [http://publicationstation.wdka.hro.nl/wiki Publication Station], [http://beyond-social.org/wiki/ Beyond Social], [http://wikipedia.com/ Wikipedia], etc  
* edit its content


Save it dedicated folder.
<pre>pandoc --standalone --from markdown --to icml input.html --output=ouput.icml</pre>


==turn this file into into other formats==
...with '''[http://pandoc.org/ Pandoc]'''


==Pandoc - a markup converter ==
===Importing ICML to inDesign===
''If you need to convert files from one markup format into another, pandoc is your swiss-army knife''


[[File:Pandoc_diagram.png|700px]]
* import ICML file to a InDesign project with: File > Place
* Its paragraph and chapter styles remain ''intact'':
* Images are given an empty  placeholder.


== Pandoc - Convert from Wiki to HTML==
=== Design with Styles in inDesign===
<pre>pandoc --from mediawiki --to html5 --standalone input.mw -o output.html</pre>
'''Style the content only using paragraph and character styles. '''


* <code>--from</code> - option standing for “from”, is followed by the input format;
Paragraph/Characters styles are in: Type > Paragraph/Character Styles
* <code>--to </code> - option standing for “to”, is followed by the output format;
* <code>--standalone </code> - option standing for “standalone”, produces output with an appropriate header and footer;
* <code>-o</code> - option for file output


===Updating content in inDesign===
If you don't change the content inside a inDesign project.
* the ICML remains linked to the inDesign project,
* changes: in the performed on Markdown source file will be integrated into the inDesign project.


=== Pandoc - Convert from HTML to wiki===
<pre>pandoc --from html5 --to mediawiki input.html -o output.wiki</pre>


== Pandoc - converting to ePub==
== Pandoc - converting to ePub==
'''Simple''':  
'''Simple''':  
<pre>pandoc --from html --to epub3 input.html --output=mybook.epub</pre>
<pre>pandoc --from html --to epub3 input.html --output=mybook.epub</pre>


 
<s>
'''Advanced (including stylesheet, cover image, chapter level )''':  
'''Advanced (including stylesheet, cover image, chapter level )''':  


Line 228: Line 265:
* <code>--epub-cover-image</code> - cover file - can either be .jpg or .png
* <code>--epub-cover-image</code> - cover file - can either be .jpg or .png
* <code>--epub-chapter-level</code> - at what heading level will the chapter brakes occur
* <code>--epub-chapter-level</code> - at what heading level will the chapter brakes occur
</s>
<div style="background:#EF5DF7; color:black; font-size:14pt;  ">
=ASSIGNMENT=
For May 27:
Choose 1 publication (does not have to be the final one you'll work with) from the 3 possible publications in https://github.com/wdka-publicationSt/editorial_design/archive/master.zip
Using  at least '''1 file''' from the chosen publication
* '''convert it to: an HTML file'''
** '''use CSSing''' to make different sketches for the digital (html/epub) publication this book
*  '''convert it to: an ICML file'''  (to be Place in inDesign):
** '''using inDesign paragraph and chapter styles''': create different sketches for the paper publication.
'''These sketches will be the starting points for the publication you will develop during the quarter 8.'''
'''Bring these sketches to next class, on May 27; '''
</div>
------
= Day 2=
==Revision: 1 source many outputs==
'''1 source many outputs'''
[[File:Conversions.svg]]
=== 3 Conversions - using Pandoc ===
<pre>pandoc input.md --from markdown --to html5 --standalone --css style.css --output output.html</pre>
* markdown (source) -> HTML (website)
** using CSS
* markdown (source) -> ICML (PDF of paper book)
** to be used with inDesign styles 
<pre>pandoc input.md --from markdown --to icml --standalone --output=ouput.icml</pre>
* markdown (source) -> epub3 (ebook)
** '''Simple''':
<pre>pandoc input.md --from markdown --to epub3 --output=mybook.epub</pre>
** '''using CSS and cover image'''
<pre>pandoc input.md --from markdown --to epub3 --epub-stylesheet=styles.css --epub-cover-image=cover.jpg --output=mybook.epub</pre>


==Epub An editable format ==
==== options ====
* <code>--from</code> - option: '''format to convert “from”''';
* <code>--to </code> - option: '''format to convert “to”''';
* <code>--standalone </code> - option: standing for '''“standalone”,''' produces HTML file with an appropriate html, head, body tags;
* <code>--css</code>  - option: option for CSS style file
* <code>--output</code> - option for '''file output'''
* <code>--epub-stylesheet</code>  - option for CSS style file in ePub
* <code>----epub-cover-image</code>  - option for cover img in ePub


Calibre's edit book function to
-------


* open an epub
<div style="background:#FFE972">
* navigate structure
* change content, style, metadata
* the issue of good reader apps


==Self-contained HTML==
{{:Hybrid_publishing_resources}}


* Example of a [http://cramer.pleintekst.nl/deplayer-impro-snodge/de_player-vroom-impro_snodge-2015-12-17.html multimedia e-zine] with animated GIFs and sound
== Hybrid Publishing Resources ==
* Look at the source code
An easier way to automate the process of converting and updating the content, style or metadata of a publication.
* What is a data URI?
* What can you do better with self-contained HTML, what can you do better EPUB?


==converting to PDF==
* using calibre viewer, also as prototyping tool
A complicated case.
* using calibre editor to change


Different approaches tried:
==Todo ==
* [[Research/Web-to-print/ICML|Research on ICML & inDesign]]
fix links and dowload images from Mondotheque
* Pandoc via LaTeX/XeTeX
* [http://weasyprint.org/ Weasyprint](HTML + CSS)  [[Research/Web-to-print/WeasyPrint|Research on Weasyprint]]


==Feedback==
<references/>
<iframe name='embed_readwrite' src='http://pzwart1.wdka.hro.nl/pad/p/prof_workshop_publishing?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false' width=600 height=400></iframe>


[[Category:Courses]]
[[Category:Courses]]

Latest revision as of 07:41, 20 July 2016

Professional development workshop on Hybrid Publishing

practicals

Plan

  • Presentations
  • Hybrid publishing
  • concepts,
  • examples
  • formats (markups)
  • tools and strategies


publishing in WdKA

hybrid publication?

A publication that inhabits both analog and digital worlds.

hybrid publishing works

Traumawien [1] [2] http://rlv.zcache.com/traumawien_button-rb0a7981400224870838ec6aaa582161c_x7j3i_8byvr_512.jpg

Badlands Unlimited http://badlandsunlimited.com/wp-content/uploads/2013/06/book_small.gif http://badlandsunlimited.com/books/phaedrus-pron/

Books Scapes, Julien Levesque, 2012

http://p-dpa.net/wp-content/uploads/2015/03/Screen-Shot-2014-02-15-at-17.17.18-600x150.png

E-Book Backup, Jesse England, 2012

http://p-dpa.net/wp-content/uploads/2015/03/9_ebookbackup4-300x225.jpg


More hybrid publishing works in Post-Digital Publishing Archive


Publications we'll work on

repository: https://github.com/wdka-publicationSt/editorial_design/ zip: https://github.com/wdka-publicationSt/editorial_design/archive/master.zip

  • Radical Tactics of the Offline Library - Henry Warwick
  • The Radiated Book - ed. Femke Snelting
  • About Bugs Bots & Bytes - Hackers & Designers

Multichannel publishing workflows

  • ePub
  • PDF (print book)
  • website
  • ebook trailer

Multipleouptus.svg

Print book Electroni book ebook trailer

Ebook trailer of From Print to Ebooks

Tools for hybrid publishing

open source, simple tools that work in combination, forming publishing pipelines


Hands-on exploration of strategies and tools

plain text files

Are only constituted by text. No images, no visual markings.

Are edited using plain text editors and NOT word processors.

Can be displayed using the terminal cat myfile.txt will print the content of myfile.txt

Markings are done using special (meta)characters

Historical examples of plain text file undeground publishing

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 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>

Markdown: [1]

# 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


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


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.
  • any plain text editor such as Sublime Text or Gedit can edit Markdown files.
  • there are WYSIWYG Markdown editors such as MacDown.

How to write in Markdown http://daringfireball.net/projects/markdown/syntax

Hands on



Pandoc - a markup converter

If you need to convert files from one markup format into another, Pandoc is your swiss-army knife. But it runs on the command line.

With Pandoc is possible to convert between different formats:

For instances: docx <-> markdown <-> html

Pandoc diagram.png



Command Line or Shell

  • a text-based interface to your computer's file system
  • popularized before the period of personal computers,
    • when computers where shared (time-sharing) by many users
    • accessed by a dumb terminal (screen and keyboard interface to the main computer) File:Dumbterminal.jpg
  • centeral to UNIX and descendant operating systems: Linux, Mac
  • constituted by small programs that do one thing only and well

Command line cheat-sheet

CORE COMMANDS

cd [folder] Change directory
~/ shortcut for your home directory. ~/Documents, ~/Downloads, ~/Desktop
cd ~ Change to Home directory, e.g. ‘cd ~/Documents/’
cd / Root of drive
‘cd ../’ = Move 1 level up
‘cd ../../’ = Move 2 levels up
ls List files and folder inside current folder
pwd Full path to working directory
cat [file] print content (concatenate) of file to screen
less [file] read into content (concatenate) of file to screen
rm [file] Remove a file, e.g. rm [file] [file]
rm -r [dir] Remove a directory and contents
cp [file] [newfile] Copy file to file
cp [file] [dir] Copy file to directory
mv [file] [new filename] Move/Rename file or dirtory, e.g. mv -v [file] [dir]
clear Clear screen

COMMAND HISTORY

history Shows the stuff typed previously

DIRECTORY MANAGEMENT

mkdir [dir] Create new directory
mkdir -p [dir]/[dir] Create nested directories
rmdir [dir] Remove directory ( only operates on empty directories )
rm -R [dir] Remove directory and contents

PIPES - Allows to combine multiple commands that generate output

more Output content delivered in screensize chunks
> [file] Push output to file, keep in mind it will get overwritten
>> [file] Append output to existing file
< Tell command to read content from a file

HELP

man [command] Show the manual for ‘command’
whatis [command] Gives a one-line description of ‘command’
[command] -h Offers help
[command] —help Offers help
[command] help Offers help
reset Resets the terminal display

~ from Terminal_cheat_sheet

Command line exercise

create directory Game: mkdir ~/Documents/Game

write to file: echo 'Can you find me?'> ~/Documents/Game/caca.txt

Now, using only the command line, you have to :

  • change to directory Game, which is inside Documents
  • copy the file caca.txt from the Game folder to the Desktop

Pandoc - Convert from Markdown to HTML

pandoc --from markdown --to html5 --standalone input.mw --css style.css --output output.html
  • --from - option: format to convert “from”;
  • --to - option: format to convert “to”;
  • --standalone - option: standing for “standalone”, produces HTML file with an appropriate html, head, body tags;
  • --css - option: option for CSS style file
  • --output - option for file output

on EPUB and HTML

The EPUB format is essentially a bundled archive of HTML files.

To try out sketches for the identity of an EPUB, it is simpler to:

  • use a HTML file instead of an EPUB
  • use a CSS file - for style
  • try out the sketches using the CSS


Pandoc - converting to ICML

ICML is a (XML based) file format, from InCopy(Adobe’s own text processor), which can be imported into Adobe InDesign, and maintain its structures (bolds, italics, section titles), etc.

pandoc --standalone --from markdown --to icml input.html --output=ouput.icml


Importing ICML to inDesign

  • import ICML file to a InDesign project with: File > Place
  • Its paragraph and chapter styles remain intact:
  • Images are given an empty placeholder.

Design with Styles in inDesign

Style the content only using paragraph and character styles.

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

Updating content in inDesign

If you don't change the content inside a inDesign project.

  • the ICML remains linked to the inDesign project,
  • changes: in the performed on Markdown source file will be integrated into the inDesign project.


Pandoc - converting to ePub

Simple:

pandoc --from html --to epub3 input.html --output=mybook.epub

Advanced (including stylesheet, cover image, chapter level ):

pandoc --from html --to epub3 input.html --output=mybook.epub --epub-stylesheet=styles.css --epub-cover-image=cover.jpg --epub-chapter-level=1
  • --epub-stylesheet - CSS file that will style the Epub
  • --epub-cover-image - cover file - can either be .jpg or .png
  • --epub-chapter-level - at what heading level will the chapter brakes occur



ASSIGNMENT

For May 27:

Choose 1 publication (does not have to be the final one you'll work with) from the 3 possible publications in https://github.com/wdka-publicationSt/editorial_design/archive/master.zip

Using at least 1 file from the chosen publication

  • convert it to: an HTML file
    • use CSSing to make different sketches for the digital (html/epub) publication this book
  • convert it to: an ICML file (to be Place in inDesign):
    • using inDesign paragraph and chapter styles: create different sketches for the paper publication.

These sketches will be the starting points for the publication you will develop during the quarter 8.

Bring these sketches to next class, on May 27;


Day 2

Revision: 1 source many outputs

1 source many outputs

Conversions.svg

3 Conversions - using Pandoc

pandoc input.md --from markdown --to html5 --standalone --css style.css --output output.html
  • markdown (source) -> HTML (website)
    • using CSS
  • markdown (source) -> ICML (PDF of paper book)
    • to be used with inDesign styles
pandoc input.md --from markdown --to icml --standalone --output=ouput.icml
  • markdown (source) -> epub3 (ebook)
    • Simple:
pandoc input.md --from markdown --to epub3 --output=mybook.epub
    • using CSS and cover image
pandoc input.md --from markdown --to epub3 --epub-stylesheet=styles.css --epub-cover-image=cover.jpg --output=mybook.epub

options

  • --from - option: format to convert “from”;
  • --to - option: format to convert “to”;
  • --standalone - option: standing for “standalone”, produces HTML file with an appropriate html, head, body tags;
  • --css - option: option for CSS style file
  • --output - option for file output
  • --epub-stylesheet - option for CSS style file in ePub
  • ----epub-cover-image - option for cover img in ePub

streamlining conversions

This same approach for converting between markups using Pandoc can be automated.

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

We can store commands in scripts and have them perform the same task on multiple source files, producing multiple outputs (E.G. EPUB, ICML, HTML).

Overview

In this process, from several .docx files we'll try to create two outputs:

  • an ICML file for inDesign
  • an EPUB

And we'll also try to keep a connection between the source and its outcomes.


Makefile

My proposal involves using a Makefile to automate the conversions between markups.

They are like recipe book, with instructions of how to process stuff and generate other stuff from it.

Read more about Makefiles in the context of hybrid publishing:


Recipe Preparation

Download Hybrid Publishing Resources


Start Cooking

0. Folder structure

To create folder structure, which will be understood by the scripts from this repository, you need to run:

make folders

This script will generate the following folder structure, which you'll use to store the files essentially for the creation of the EPUB.

├── docx 
├── epub 
├── icml 
├── md 
│   └── imgs 
└── scripts

1. 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.

You need to edit the manuscript, handed by the author, using paragraph styles in MS Word/Libre Office/Open Office


2. Source: converting the manuscript files to Markdown files

Run: make markdowns to start this stage.

This command will convert all the .docx files inside the docx/folder into corresponding markdown files inside md/ folder.

The resulting markdown files are the source files, from which all of the publication's outputs will be generated.


2.1 Images in Markdown

At this stage you should insert the images onto the texts, now in markdown format.

First of all, you need to save all the images included in the essays in the folder md/imgs/ Then place the images on the markdown document: ![My image caption](imgs/myImage.jpg)

Don't forget to include captions, if the image has them. Markdown captions will become visible, and associated to the image in the EPUB output.

3. make icmls - ICML files for inDesign

Run: make icmls to start this stage.

The individual Markdown source files, stored in md/, can be converted into ICML files which can be imported into inDesign.

Read more on ICML files and inDesign in #working_with_ICML_files section


4. make book.epub

4.0 make book.md

You don't have to perform this step, the makefile does it for you.

It generates a single Markdown file book.md and save it it inside the md/ folder.

book.md consists of the content from all the individual Markdow files inside the md/ folder, in alphabetical order (00 to ZZ).

If you want to change the order the publication, you can change the filenames in order to do so.

Markdown filenames should NOT contain spaces or dots, except for the extension .md


4.1 make book.epub (EPUB)

Produce the epub file: make book.epub


4.1.1 Essential files for EPUB

To produce an EPUB a few files are needed, namely:

  • cover image epub/cover.jpg
  • metadata epub/metadata.xml
  • CSS stylesheet epub/styles.epub.css


These files will strongly influence the EPUB's outcome, and consequently should be edited for each publication.


4.1.2 Fonts (optional) for EPUB

lib/ is folder for storing custom fonts, that will be used in the EPUB

If you choose to use fonts, make sure to change the makefile to include the use of fonts in the makefile epub rule, such as in the rule bellow, where --epub-embed-font=lib/UbuntuMono-B.ttf \ is added to allow for the use of the Ubuntu Mono font. Also include the font on the EPUB style-sheet with @font-face rule

4.1.3 EPUB check

The health of the created EPUB can be checked with http://validator.idpf.org/


4.1.5 make book.epub : An iterative process

This work is in many way as cyclical process, where you work in circles: changing the source files (markdown files, the EPUB's stylesheet, the EPUB's metadata) and seeing the results of those changes in Calibre (or other ebook-viwerer)



ICML files

ICML files are useful, since they ensure that the structural information of the Markdown source files is also present in the inDesign projects, which use them.

With ICML it is also possible to update the content and structure of the inDesign projects, by changing the Markdown source files, converting the once more to ICML. For this to happens is however necessary that inDesign remains linked to its source, and that the designers works with paragraph and chapter styles, instead of directly into the text.

Note: malformatted links in the markdown files will create problems when imported into inDesign.


Place ICMLs

Open inDesign and ...

Place your output.icml in a inDesign project.

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

Design with Styles

Style the content using paragraph and character styles.

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

ICML Content updates

Using Sublime Text, edit one ICML file adding some text to it.

See the content being updated in inDesign.


Hands off content

In in inDesgin content shall 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.

Hybrid Publishing Resources

An easier way to automate the process of converting and updating the content, style or metadata of a publication.

  • using calibre viewer, also as prototyping tool
  • using calibre editor to change

Todo

fix links and dowload images from Mondotheque