What's new? | Help | Directory | Sign in
Google
  
  
  
  
    
Search
for
Updated Sep 09, 2007 by ted.husted
TextColophon  
How the text book is created and maintained (Issue 4)

Text Colophon

The text is being authored in DocBook, using TextPad on Windows XP. The text is validated with xmllint, converted to a formatted output (fo) file by xlstproc, and then rendered as a PDF using Apache FOP. All three steps (validation, preprocessing, and rendering) are run from TextPad from the Tools menu.

All of the text source, including the templates, are kept under Subversion. The text is committed to repository as soon as it is written. Nothing is held back longer than a few hours.

How the textbook is made

Chapter draft mode

While a chapter is being written or revised, it can be convenient to add an enclosing <book> tag. In this way, the chapter can be validated as a complete book. When the draft is complete, change the <book> tags into comments (<!-- book -->), so that the chapter can be included by the master "book" file.

Style Guide

Content and markup conventions

TextPad

Before committing

Installing under Windows

Unzip sq1-docbooktools.zip to create or extend etc, opt, and usr folders on C:\

Set Environment Variables

FOP_HOME = C:\opt\Apache\fop-0.93 LIBXML_BIN=C:\opt\libxml\bin

PATH= ... ;%FOP_HOME%;%LIBXML_BIN%

FP_NO_HOST_CHECK = NO XML_CATALOG = c:\etc\xml\catalog.xml

In TextPad, setup DocBook utilities

DocBook Validate 
xmllint --postvalid --noout --xinclude $File
$FileDir

DocBook format chapter
xsltproc --output book.fo --xinclude --stringparam fox.extensions 1 fo-docbook.xsl $File
$FileDir

DocBook format book 
xsltproc --output book.fo --xinclude --stringparam fox.extensions 1 fo-book.xsl $File
$FileDir

DocBook render PDF 
fop.bat -fo book.fo -pdf book.pdf
$FileDir

DocBook Single HTML File
C:\opt\libxml\bin\xsltproc.exe
--nonet --xinclude --stringparam fox.extensions 1 docbook.xsl $File > $File.html
$FileDir

Sign in to add a comment