{"id":456,"date":"2015-03-16T12:40:55","date_gmt":"2015-03-16T10:40:55","guid":{"rendered":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/?p=456"},"modified":"2015-03-26T16:38:42","modified_gmt":"2015-03-26T14:38:42","slug":"electronic-book-formats","status":"publish","type":"post","link":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/2015\/03\/16\/electronic-book-formats\/","title":{"rendered":"Electronic book formats"},"content":{"rendered":"<p>Language Science Press currently offers electronic versions of published books only in PDF format. This blog post describes our plans for providing additional book formats in the near future and our recent progress.<\/p>\n<p><!--more--><\/p>\n<p>As you might know, the required submission format for LangSci books is LaTeX (<code>.tex<\/code>). For books in Microsoft Word (<code>.doc<\/code>) or Libre Office (<code>.odt<\/code>) format, we offer a <a href=\"https:\/\/langsci-press.org\/information\/forAuthors\">webservice<\/a> to generate an initial LaTeX version. After the final editing and polishing steps, the heavy lifting to produce a PDF document from the LaTeX source is done by <code>xelatex<\/code>. So if we include the optional preprocessing stages in the picture, the current production pipeline can be represented as follows:<\/p>\n<p><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-current.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-454 aligncenter\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-current-300x121.png\" alt=\"Current conversion pipeline\" width=\"300\" height=\"121\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-current-300x121.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-current.png 424w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>We are currently working on substituting that with the following conversion network:<\/p>\n<p><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-planned.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-455 aligncenter\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-planned-300x112.png\" alt=\"Planned conversion pipeline\" width=\"300\" height=\"112\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-planned-300x112.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-planned-500x187.png 500w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2015\/03\/conversion-planned.png 581w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Once this is in place, Language Science Press will be able to offer every book in three main output formats:<\/p>\n<ul>\n<li>PDF: for a classic page-based presentation of the content that matches the printed book<\/li>\n<li>HTML: for reading in a webbrowser and for linkable content (making it easy to refer to a specific paragraph or example sentence in a LangSci book with a link)<\/li>\n<li>EPUB: for reading on an <a href=\"https:\/\/en.wikipedia.org\/wiki\/E-reader\">e-book reader<\/a> or on other devices with appropriate apps (like iBooks, FBReader, etc.)<\/li>\n<\/ul>\n<p>Additionally, there will be a structured representation of the book content in XML format. This can be used to access pieces of information in a standardized machine-readable format, e.g. to extract linguistic example sentences or syntactic tree structures. The XML format also plays an important role as an intermediate step for producing HTML and EPUB versions of the book.<\/p>\n<p>We are also planning to use the HTML version of books in a pre-publication stage with <a href=\"https:\/\/annotatorjs.org\/\">Annotator<\/a> as an easy way for reviewers and proofreaders to provide feedback or add comments at specific positions in the document.<\/p>\n<p>While there are many existing tools to convert LaTeX documents into other formats (e.g. <a href=\"https:\/\/johnmacfarlane.net\/pandoc\/\">pandoc<\/a>, <a href=\"https:\/\/tiarno.github.io\/plastex\/\">plasTeX<\/a>, <a href=\"https:\/\/pauillac.inria.fr\/~maranget\/hevea\/\">HeVeA<\/a>, <a href=\"https:\/\/tug.org\/tex4ht\">tex4ht<\/a>), none of them is capable of handling documents with typical linguistic content in an entirely satisfactory way. In particular, we want to make sure that glossed example sentences, syntax trees, attribute-value matrices and other data types commonly found in linguistic writing are automatically handled correctly. That&#8217;s why we are developing additional conversion tools, specifically designed to handle these cases. In particular, in the past few months we have been working on a <a href=\"https:\/\/github.com\/synsem\/texhs\">LaTeX parser<\/a> that will serve as the basis for extracting custom data structures from LangSci books, like glossed example sentences or syntactic trees. Since the parser is written in <a href=\"https:\/\/www.haskell.org\/\">Haskell<\/a>, it is easy to interface with the universal markup converter <a href=\"https:\/\/johnmacfarlane.net\/pandoc\/\">pandoc<\/a>, which already provides excellent conversion routines to HTML and EPUB, among many other formats.<\/p>\n<p>In principle, it would be desirable to integrate our parsing extensions directly into pandoc, but since pandoc aims to support an impressive list of input and output formats and is designed for a wide range of use cases, its internal data structures are less flexible than those of our LangSci-specific LaTeX-only reader. However, we already started to contribute code to pandoc and are planning to keep a close relationship to its development. The exact document representation for LangSci books is still in the design process, but we intend to provide a direct interface to pandoc&#8217;s internal types which would massively increase the list of input and output formats that Language Science Press could support. Still, our main focus for the next months is on a proper mapping of linguistic data structures to HTML and EPUB. As our toolchain becomes ready for general use, we will announce its availability under an open license in a future blogpost.<\/p>\n<p>Some parts of this conversion pipeline are already working. For example, we have used an early version of the converter to extract XML representations of linguistic example sentences from the LangSci books published so far. These files can be accessed <a href=\"https:\/\/github.com\/langsci\/lsp-xml\">here<\/a>.<\/p>\n<p>A final note: Our conversion tools are designed for documents that adhere to the <a href=\"https:\/\/langsci-press.org\/public\/downloads\/LangSci_Guidelines.pdf\">LangSci Guidelines<\/a>. These guidelines do not only ensure a consistent look and feel for all LangSci books, but also help our conversion tools to make sense of the content and map it appropriately to formats like HTML and EPUB.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Language Science Press currently offers electronic versions of published books only in PDF format. This blog post describes our plans for providing additional book formats in the near future and our recent progress.<\/p>\n","protected":false},"author":2483,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[682,1150],"tags":[],"class_list":["post-456","post","type-post","status-publish","format-standard","hentry","category-development","category-latex"],"_links":{"self":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/users\/2483"}],"replies":[{"embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":5,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"predecessor-version":[{"id":465,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts\/456\/revisions\/465"}],"wp:attachment":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}