[Bioperl-l] DocBook docs, was Re: Downloading the tutorial for offline reading

Brian Osborne bosborne11 at verizon.net
Tue Jan 30 21:59:59 UTC 2007


Chris,

My recommendation would be to not use Docbook, for a couple of reasons. One
is that very few people can stand writing in Docbook XML, you have to learn
all the tags and the act of writing itself is slow. You won't get much
written if people have to use this format. WYSIWYG? Don't know, but it would
have to be an app that works on the troika of Linux, Win, and Mac

Second problem is the conversion itself, Docbook to PDF, HTML, and text.
Now, you don't have to convert to all of these formats of course, perhaps
only PDF. In this case you probably have to do Docbook -> fo -> PDF. I can
tell you that setting up all the Java applications was a true PITA, all
praise to CPAN for providing a means of installing multiple packages and
tracking version dependencies simultaneously. However, if you insist I've
given you a sense of what I did with the shell script below. Hint: you must
also hack the XSL files provided by e-novative. The reason I used them is
because the resulting PDF and HTML is very pretty.

A qualification here: all my knowledge of Docbook is a bit dated, I threw
all those *jar's out when the Wiki was set up.

There _must_ be a better way, I think it's based on Wiki and something like
html2pdf.

Brian O.


On 1/28/07 11:50 PM, "Chris Fields" <cjfields at uiuc.edu> wrote:

> so maybe going  
> back to having DocBook (or similar) for those docs is the best
> answer



setenv HTML_STYLE 
'~/bioperl-live/doc/howto/xml/stylesheet/e-novative_article_html.xsl'
setenv PDF_STYLE 
'~/bioperl-live/doc/howto/xml/stylesheet/e-novative_article_fo.xsl'
setenv XML_HOME '~/bioperl-live/doc/howto/xml'
setenv SAXON_JAR '/usr/local/saxon6-5-4/saxon.jar'
setenv JAVA '/usr/bin/java'
setenv LYNX '/sw/bin/lynx'
setenv XEP_JAR '/usr/local/RenderX/XEP/lib/saxon.jar'
setenv XEP '/usr/local/RenderX/XEP/xep'

foreach XML ($XML_HOME/[A-Z]*.xml)

    setenv HTML `echo $XML | sed 's/\.xml/\.html/'`
    # Create HTML file
    echo "Creating $HTML..."
    $JAVA -jar $SAXON_JAR -o $HTML $XML $HTML_STYLE use.extensions=1
tablecolumns.extension=0

    setenv TXT `echo $XML | sed 's/\.xml/\.txt/'`
    # Create text from HTML file
    echo "Creating $TXT..."
    $LYNX -dump $HTML > $TXT

    setenv FO `echo $XML | sed 's/\.xml/\.fo/'`
    # Create FO file
    echo "Creating $FO..."
    $JAVA -jar $XEP_JAR -o $FO $XML $PDF_STYLE

    setenv PDF `echo $XML | sed 's/\.xml/\.pdf/'`
    # Create PDF
    echo "Creating $PDF..."
    $XEP -fo $FO -pdf $PDF

end





More information about the Bioperl-l mailing list