The Publishing Project

XML Workflows: CSS Styles for Paged Media

This is the generated CSS from the SCSS style sheets (see the scss/ directory for the source material.) I’ve chosen to document the resulting stylesheet here and document the SCSS source in another document to make life simpler for people who don’t want to deal with SASS or who want to see what the style sheets look like. Typography derived from work done at this URL: The following scale (also using minor third progression) may also help: Feel free to play with these and use them as starting point for your own work 🙂 The project currently uses

XML Wokflows: From XML to PDF: Part 2: CSS

With the HTML ready, we can no look at the CSS stylesheet to process it into PDF. The extensions, pseudo elements and attributes we use are all part of the CSS Paged Media or Generated Content for Paged Media specifications. Where appropriate I’ve translated them to work on both PDF and HTML. Book defaults The first step in creating the default structure for the book using @page at-element. Our base definition does the following: Size the page to letter (8.5 by 11 inches), width first Use CSS notation for margins. In this case the top and bottom margin are 0.5

XML Wokflows: From XML to PDF: Part 1: Special Transformation

Rather than having to deal with XSL-FO, another XML based vocabulary to create PDF content, we’ll use XSLT to create another HTML file and process it with CSS Paged Media and the companion Generated Content for Paged Media specifications to create PDF content. I’m not against XSL-FO but the structure of document is not the easiest or most intuitive. An example of XSL-FO looks like this: <?xml version=”1.0″ encoding=”iso-8859-1″?> (1) <fo:root xmlns:fo=””> (2) <fo:layout-master-set> (3) <fo:simple-page-master master-name=”my-page”> <fo:region-body margin=”1in”/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference=”my-page”> (4) <fo:flow flow-name=”xsl-region-body”> (5) <fo:block>Hello, world!</fo:block> (6) </fo:flow> </fo:page-sequence> </fo:root> This is an XML declaration. XSL FO

XML workflows: Converting our content to HTML

One of the biggest advantages of working with XML is that we can convert the abstract tags into other markups. For the purposes of this project we’ll convert the XML created to match the schema we just created to HTML and then use tools like PrinceXML or AntenaHouse we’ll convert the HTML/CSS files to PDF Why HTML HTML is the default format for the web and for most web/html based content such as ePub and Kindle. As such it makes a perfect candidate to explore how to generate it programmatically from a single source file. HTML will also act as

XML workflows: Introduction

One of the biggest limitations of markup languages, in my opinion, is how confining they are. Even large vocabularies like Docbook have limited functionality out of the box. HTML4 is non-extensible and HTML5 limits how you can extend it (web components are the only way to extend HTML5 I’m aware of that doesn’t need an update to the HTML specification.) By creating our own markup vocabulary we can be as expressive as we need without adding complexity for writers and users and without adding unnecessary complexity for the developers building the tools to interact with the markup. Why create our