perrotuerto.blog/html/entry001.html

39 lines
21 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Publishing is Coding: Change My Mind | Digital Publishing as Publishing from Scratch</title>
<meta charset="utf-8" />
<meta name="application-name" content="Publishing is Coding: Change My Mind">
<meta name="description" content="Nika Zhenya's entries from Mariana Eguaras' blog in broken english.">
<meta name="keywords" content="publishing, blog, book, ebook, methodology, foss, libre-software, format, markdown, html, epub, pdf, mobi, latex, tex">
<link rel="shortcut icon" href="../icon.png">
<link rel="alternate" type="application/rss+xml" href="https://blog.cliteratu.re/feed/" title="Publishing is Coding: Change My Mind">
<link type="text/css" rel="stylesheet" href="../css/core.css">
<link type="text/css" rel="stylesheet" href="../css/extra.css">
<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/piwik.js"></script>
</head>
<body>
<header>
<h1><a href="https://blog.cliteratu.re">Publishing is Coding: Change My Mind</a></h1>
<p>Nika Zhenya's entries from <a target="_blank" href="https://marianaeguaras.com/blog/">Mariana Eguaras' blog</a> in broken english.</p>
<nav>
<h3>Contact</h3>
<p><a target="_blank" href="mailto:nika.zhenya@cliteratu.re">Email</a></p>
<p><a target="_blank" href="https://mastodon.social/@_perroTuerto">Mastodon</a></p>
<p><a target="_blank" href="https://twitter.com/_perroTuerto">Twitter</a></p>
</nav>
</header>
<section>
<h1 id="digital-publishing-as-publishing-from-scratch">Digital Publishing as Publishing from Scratch</h1> <p class="meta">October 3, 2018 | Methodology | <span class="smallcap"><a target="_blank" href="https://blog.cliteratu.re/md/entry001.md">MD</a></span> / <span class="smallcap"><a target="_blank" href="https://blog.cliteratu.re/ebooks/entry001.epub">EPUB</a></span> / <span class="smallcap"><a target="_blank" href="https://blog.cliteratu.re/ebooks/entry001.mobi">MOBI</a></span> / <a target="_blank" href="https://marianaeguaras.com/edicion-digital-como-edicion-desde-cero">spanish version</a></p> <p>Thanks to <a href="http://marianaeguaras.com/">Mariana Eguaras</a> we are going to blog about <b>digital publishing</b>, its <b>characteristics, benefits and challenges</b>. We are also going to talk about <b>its relation with print publishing</b> and how these issues directly affect the proceedings for any kind of publishing.</p> <p>We already have planned what we are going to write about in the first entries, but any suggestions are welcome. As much as it is possible the writing won't be technical. We are going to try to be more friendly to the general public or publishers.</p> <p>However, you have to consider that some technicalities are necessary for publishing. The typography, printing or design slangs are common knowledge for publishers. In the same way, the jargons from web or software developers are starting to be part of our cultural background.</p> <blockquote class="addenda"> <p>The entries were originally wrote in spanish. Some of them are now kind of old: in some things I have a different opinion or approach. And as it is obvious, english is not my first language. Therefore, you are going to find a lot of grammar mistakes or typos and I will only translate (in a very loose way) the entries that I still consider relevant. So when you find this kind of box, it means that it is an <i>addendum</i> only for this broken english version.</p> </blockquote> <blockquote class="addenda"> <p>Do you want to improve this mess? You can always help through <a href="https://gitlab.com/NikaZhenya/publishing-is-coding">GitLab</a> or <a href="https://github.com/NikaZhenya/publishing-is-coding">GitHub</a>.</p> </blockquote> <p>In this first entry we will do a <b>general comparison between some of the most common methods for developing an standarized ebook in <span class="smallcap">EPUB</span> format</b>. Some other time we will go deeper in the history of <span class="smallcap">EPUB</span>.</p> <p>First off we should say that between the different ebook formats available the <span class="smallcap">EPUB</span> since the begining was created as a type of file for <i>ebooks</i>. The <span class="smallcap">EPUB</span> stands out because of its <b>versatility, lightness and respect of web standards</b>. This ensures code uniformity and <b>complete control over the text edition</b>.</p> <p>With these features, the <span class="smallcap">EPUB</span> is easily convertible in propertary formats as the ones used by Amazon or Apple. That means that we can save resources and time when we develop a digital publication.</p> <p>This flexibility also allows the development of software that intends to facilitate the creation of <span class="smallcap">EPUB</span>s. Just with a couple of clicks in a text processor (Writer or Word, e.g.) or desktop publishing (like InDesign) we instantly have an <span class="smallcap">EPUB</span>.</p> <p>At first glance this is a huge advantage for indie authors or publishers that don't want to invest in “additional efforts.” However there are at least <b>two disvantages</b> in doing things this way:</p> <ol> <li> <p>The code, design and text edition's qualities tend to be lower in comparison of others methods.</p> </li> <li> <p>It is often forgotten that the most important thing about the digital revolution it is not the ebook.</p> </li> </ol> <p>The ebook is the most common feature in digital publishing but it is just the tip of the iceberg. In order to go deeper we will have to familiarize with <b>the behind the scenes of ebook's development</b>.</p> <blockquote class="addenda"> <p>In spanish I insist that digital publishing isn't the same as digital editing. In spanish it is common to use the word “edition” and derivatives for things concerning publishing. But as far as I can see, “edition“ has a more general meaning in english spoken world.</p> </blockquote> <blockquote class="addenda"> <p>With “digital editing” I mean <i>the process</i> of publishing that involves the use of a computer (practically all publishing industry nowadays). “Digital publishing” is <i>the product</i> of such process. In these translations I will use the terms interchangeably. Only when I see it relevant I will say “digital editing” or “digital text editing.”</p> </blockquote> <p>Some people are skeptical about the need of publishing “from scratch.” Most people prefer to use converters to automatically create <span class="smallcap">EPUB</span> files.</p> <p>Why do we have to learn markup languages such as <a href="https://en.wikipedia.org/wiki/HTML"><span class="smallcap">HTML</span></a> or <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a>? Why should we worry about styles sheets like <a href="https://en.wikipedia.org/wiki/Cascading_Style_Sheets"><span class="smallcap">CSS</span></a> or <a href="https://en.wikipedia.org/wiki/Sass_(stylesheet_language)"><span class="smallcap">SCSS</span></a>? Why must we think about programming languages (<a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a>, <a href="https://en.wikipedia.org/wiki/Python_(programming_language)">Python</a>, <a href="https://en.wikipedia.org/wiki/Ruby_(programming_language)">Ruby</a> or <a href="https://en.wikipedia.org/wiki/C++">C++</a>, e.g.) and how it could create new reading experiencies or improve the quality of text edition?</p> <p>Regardless wether you want a print or digital book, if we start to pay attention in methodologies, litle by litle we will see its importance.</p> <h2 id="exercises-peculiarities">Exercise's peculiarities</h2> <p>To show the advantages and disadvantages of converters compared to “from scratch publishing,” we will develop the same book but with each method.</p> <p>We are gonna do this exercise as realistically as possible. That is why we are gonna use <a href="http://www.gutenberg.org/ebooks/2000">Gutenberg Project's spanish edition of <i>Don Quixote</i></a>. For uniformity our standing points are the text in <span class="smallcap">HTML</span> format and the same <span class="smallcap">CSS</span> style sheet.</p> <p>You could wonder:</p> <ul> <li> <p><b>Why will we use Gutenberg Project's edition if there are better editions online?</b> Because it is public domain. Unlike <a href="https://es.wikisource.org/wiki/El_ingenioso_hidalgo_Don_Quijote_de_la_Mancha">Wikisource's edition</a>, it is easy to download in a single file.</p> </li> <li> <p><b>Why will we use an already formated text and not the direct source?</b> I found some typos and similar issues; plus, formating text could be a nigthmare which I prefer to discuss another time.</p> </li> <li> <p><b>Why will we use the same style sheet instead of redesign the book in each method?</b> Design could involve a lot of time and resources. Also, I want to show the revelance and flexibility of web style sheets on publishing even though I am going to talk about it in another entry.</p> </li> <li> <p><b>Which methods will we apply in this exercise?</b> We will see <a href="https://www.adobe.com/products/indesign.html">InDesign's</a> way of doing things because it is the most common among publishers and designers. We will use <a href="http://jutoh.com/">Jutoh</a> like an example of propertary software for ebook publishing. Also, we will employ <a href="https://github.com/Sigil-Ebook/Sigil">Sigil</a> as open software for ebook publishing. Finally, we will show how “from scratch publishing” could be a good candidate for digital publishing.</p> </li> </ul> <h2 id="production-time-chart-the-efectiveness-of-the-from-scratch-method">Production time chart: the efectiveness of the “from scratch” method</h2> <figure> <img src="../img/e001_01.jpg" alt="Production time chart in minutes."/> <figcaption> Production time chart in minutes. </figcaption> </figure> <p>One of the biggest myths about “from scratch publishing” is that it requires a lot of time. But “from scratch” doesn't mean we have to code it all by hand. As we will see in other entries, with <a href="https://en.wikipedia.org/wiki/Scripting_language">scripts</a> we can grasp all monotonous work implied in <span class="smallcap">EPUB</span> development.</p> <p>With “from scratch publishing” I mean a method were we don't have a publishing enviroment. Instead of that we use a <a href="https://en.wikipedia.org/wiki/Text_editor">plain text editor</a> or a <a href="https://en.wikipedia.org/wiki/Source_code_editor">source code editor</a> and a <a href="https://en.wikipedia.org/wiki/Command-line_interface">command-line interface</a>.</p> <p>This method could sound very complex and time consuming. While “from scratch publishing” has it owns challenges, anyone with a computer can overcome these difficulties.</p> <p>If we ignore the time needed to format text, in the following chart we can see that <b>“from scratch” method is the most efective</b>.</p> <p>With InDesign and Jutoh we have to link each <span class="smallcap">CSS</span> style to a paragraph or character style. InDesign is way more intuitive than Jutoh. With Sigil or “from scratch publishing” we don't have this need, because we can automatically link the <span class="smallcap">CSS</span> with the book. But “from scratch” method has the advantage that we don't have to recreate the directory tree or import files.</p> <h2 id="epubs-size-chart-the-impact-of-images-and-junk-code"><span class="smallcap">EPUB</span>'s size chart: the impact of images and “junk” code</h2> <figure> <img src="../img/e001_02.jpg" alt="EPUB's size chart in KBs."/> <figcaption> <span class="smallcap">EPUB</span>'s size chart in <span class="smallcap">KB</span>s. </figcaption> </figure> <p>There are two factors that impact <span class="smallcap">EPUB</span>'s size: <b>1)</b> embedded images and <b>2)</b> “junk” code.</p> <p>Most <span class="smallcap">EPUB</span>s embed at least one image, the cover, and sometimes also a back cover and an author's photo. It doesn't matter if there are just a couple elements, images are <b>the most heavy files in an <span class="smallcap">EPUB</span></b> if we have one or more of these setups:</p> <ul> <li> <p>The book is short.</p> </li> <li> <p>The images are bigger than our needs.</p> </li> <li> <p>The images lack of good compression.</p> </li> <li> <p>The images are in an inconvenient format.</p> </li> </ul> <p>Neither of this conditions affect our exercise because we are using the same 204 <span class="smallcap">KB</span> image.</p> <p><b>The difference comes from “junk” code</b>. Some converters add extra code lines. Most of the times it is because it inject its credits. We also get extra code if we work with paragraph or character styles instead of <span class="smallcap">CSS</span> styles.</p> <blockquote class="addenda"> <p>These extra code lines don't improve the reading experience of our <span class="smallcap">EPUB</span>, that is why we called them “junk” code.</p> </blockquote> <p>When we allow converters to create the <span class="smallcap">CSS</span>, they will use their own name conventions that generates <b>two downsides</b>:</p> <ol> <li> <p>Needless increase of file's size.</p> </li> <li> <p><span class="smallcap">CSS</span> name convention that could make it hard to understand or edit.</p> </li> </ol> <p>InDesing and Jutoh's <span class="smallcap">EPUB</span> are bigger because of “junk” code. Nevertheless, the size difference between Sigil and “from scratch publishing” involes the ebook's structure.</p> <p>From <span class="smallcap">EPUB</span>3 we have two files for the table of contents (<span class="smallcap">TOC</span>). <span class="smallcap">NCX</span> is the legacy file while the new file follows an <a href="https://en.wikipedia.org/wiki/XHTML"><span class="smallcap">XHTML</span></a> structure.</p> <p>Because of that, <b>the <span class="smallcap">EPUB</span> developed with “from scratch publishing” has two <span class="smallcap">TOC</span>s</b>. This adds 11 <span class="smallcap">KB</span> resulting in a difference of only 5 <span class="smallcap">KB</span> between Sigil and “from scratch publishing” books.</p> <blockquote class="addenda"> <p>This means that by default Sigil doesn't create the new required <span class="smallcap">TOC</span> format. That could affect the reading experience in newer devices.</p> </blockquote> <h2 id="errors-and-warnings-chart-epub-validation">Errors and warnings chart: <span class="smallcap">EPUB</span> validation</h2> <figure> <img src="../img/e001_03.jpg" alt="Erros and warnings chart."/> <figcaption> Erros and warnings chart. </figcaption> </figure> <p>One of the main advantages of not developing an <span class="smallcap">EPUB</span> with “from scratch” method is that we don't have to know <span class="smallcap">HTML</span>, <span class="smallcap">CSS</span> and <span class="smallcap">EPUB</span> structures. Usually we also count with a graphical interface that implies a short learning curve.</p> <p>However, <b>ebooks not only requiere good text edition and design quality, they also need coherent structures</b>, i.e. we have to care about technical issues. <span class="smallcap">EPUB</span>s must not have errors or warnings because of bad quality <span class="smallcap">HTML</span> or <span class="smallcap">CSS</span> code, insufficient metadata or image issues.</p> <p>For this reasons we need <b><span class="smallcap">EPUB</span> validators</b>. The official tool for <span class="smallcap">EPUB</span> validation is EpubCheck. You can use it <a href="http://validator.idpf.org/">online</a> or <a href="https://github.com/IDPF/epubcheck/releases">download it</a>.</p> <p>Generally we use another validator so we can do a double check. For this exercise we also used <a href="http://www.bluegriffon-epubedition.com/BGEV.html">BlueGriffon</a>. This software isn't free, but is demanded by some clients.</p> <p>The above chart only show BlueGriffon's validation because EpubCheck didn't find any error or warning. We had a few issues because we used the same <span class="smallcap">HTML</span> and <span class="smallcap">CSS</span> files. Besides, each method created metadata independently. (For “from scratch publishing” we used <a href="https://pecas.cliteratu.re/">Pecas</a>, a suite of publishing scripts.)</p> <p>In InDesign the issue is because an incorrect image compression. For Sigil and Jutoh, BlueGriffon considers they are using obsolete metadata elements.</p> <p>Actually, <b>it isn't hard to solve these issues</b>. Nevertheless, it could be very frustrating to solve them if you don't know what is inside an <span class="smallcap">EPUB</span> file. In order to solve them we must decompress the <span class="smallcap">EPUB</span>, then we have to modify the problematic files and, finally, compress the files again.</p> <h2 id="implicit-production-costs-propertary-vs-free-software">Implicit production costs: propertary <i>vs</i> free software</h2> <p>We dont need to buy software in order to develop <span class="smallcap">EPUB</span>s.</p> <p>However, half of the methods seen here use propertary software and, therefore, they have some additional costs. For InDesign and Jutoh we have to purchase software licenses. Sigil and “from scratch publishing” only use free software.</p> <p>A common myth between non-free software users is that this kind of tools have lower quality. At least in publishing enviroment this isn't true. As we could see in this exercise: <b>Sigil and “from scratch publishing” had better results</b>.</p> <p>However, most publishers only use Adobe products, so in specific circumstances it is more convenient to develop ebooks by this way.</p> <p>If you really care about the quality of your <span class="smallcap">EPUB</span>s, think twice before buying propertary software. The free and open source software communities have great alternatives that could fulfill your needs.</p> <h2 id="conclusion-from-scratch-publishing-wins-the-match">Conclusion: “from scratch publishing” wins the match</h2> <p>As it was shown in this exercise <b>“from scratch publishing”</b> had better results. Most readers could think that this method requieres certain complex knowledge and a long learning curve.</p> <p>I can say that within a 24 hours workshop anybody can develop their first ebook “from scratch.” Usually most learners don't have a technical background such as knowing <span class="smallcap">HTML</span>, <span class="smallcap">CSS</span> or command line tools.</p> <p>If you are gong to use software exclusively for ebooks, the recommendation is that it has to be free or open source software. With this you can avoid the cost increments at the same time that you can get free help from their communities.</p> <p>You can download the <a href="http://git.cliteratu.re/publishing-is-coding/blob/master/src/entry001/graphics.ods">graphics</a> and the <a href="http://git.cliteratu.re/publishing-is-coding/raw/master/src/entry001/data.txt">data</a> :)</p>
</section>
<footer>
<p><a target="_blank" href="https://ted.cliteratu.re/">ted.cliteratu.re</a> | <a target="_blank" href="https://ed.cliteratu.re/">ed.cliteratu.re</a> | <a target="_blank" href="https://pecas.cliteratu.re/">pecas.cliteratu.re</a> | <a target="_blank" href="https://xxx.cliteratu.re/">xxx.cliteratu.re</a></p>
<p>All content is under <a target="_blank" href="https://github.com/NikaZhenya/publishing-is-coding#license">Licencia Editorial Abierta y Libre (<span class="smallcap">LEAL</span>)</a>.</p>
<p>Last build: November 5, 2018 | <span class="smallcap"><a target="_blank" href="https://blog.cliteratu.re/feed/rss.xml">RSS</a></span></p>
<p><a target="_blank" href="https://gitlab.com/NikaZhenya/publishing-is-coding">GitLab</a> | <a target="_blank" href="https://github.com/NikaZhenya/publishing-is-coding">GitHub</a> | <a target="_blank" href="http://git.cliteratu.re/publishing-is-coding">GitList</a></p>
<p><a target="_blank" href="https://etherscan.io/address/0x39b0bf0cf86776060450aba23d1a6b47f5570486"><span class="smallcap">ETH</span></a> | <a target="_blank" href="https://dogechain.info/address/DMbxM4nPLVbzTALv5n8G16TTzK4WDUhC7G"><span class="smallcap">DOGE</span></a> | <a target="_blank" href="https://www.paypal.me/perrotuerto">PayPal</a></p>
</footer>
</body>
</html>