Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Hybrid publishing resources
From Publication Station
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= 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: * blog post [http://networkcultures.org/digitalpublishing/2014/10/01/make-book/ Make Book] by Michael Murtaugh * [http://lwn.net/Articles/589196/ Report] on the Don Marti's presentation at SCALE * [http://www.gnu.org/software/make/ GNU Make official site ] ----- '''Recipe Preparation ''' == Download Hybrid Publishing Resources == * '''[https://github.com/wdka-publicationSt/HPR/archive/master.zip Download the zip ]''' from [https://github.com/wdka-publicationSt/HPR Hybrid Publishing Resources code repository] to your computer. * Move the downloaded .zip to a dedicated folder. * Unzip * In terminal change directory <code>cd </code> to the unzip folder ------- '''Start Cooking''' == 0. Folder structure == To create folder structure, which will be understood by the scripts from this repository, you need to run: <code>make folders</code> This script will generate the following folder structure, which you'll use to store the files essentially for the creation of the EPUB. <pre> βββ docx βββ epub βββ icml βββ md β βββ imgs βββ scripts </pre> = 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: <code>make markdowns</code> to start this stage. This command will '''convert all the <code>.docx</code> files inside the <code>docx/</code>folder into corresponding markdown files inside <code>md/ folder</code>'''. 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''' <code>md/imgs/</code> Then '''place the images on the markdown document''': <code></code> 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: <code>make icmls</code> to start this stage. The individual Markdown source files, stored in <code>md/</code>, can be converted into [[#ICML|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 <code>book.md</code> and save it it inside the <code>md/</code> folder. <code>book.md</code> consists of the content from all the individual Markdow files inside the <code>md/</code> 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''' <code>.md</code> == 4.1 make book.epub (EPUB) == Produce the epub file: <code>make book.epub</code> == 4.1.1 Essential files for EPUB == To produce an EPUB a few files are needed, namely: * cover image <code>epub/cover.jpg</code> * metadata <code>epub/metadata.xml</code> * CSS stylesheet <code>epub/styles.epub.css</code> These files will strongly influence the EPUB's outcome, and consequently should be edited for each publication. == 4.1.2 Fonts (optional) for EPUB == <code>lib/</code> 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 <code>--epub-embed-font=lib/UbuntuMono-B.ttf \</code> is added to allow for the use of the Ubuntu Mono font. Also include the font on the EPUB style-sheet with <code>@font-face</code> 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.
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs