{"id":184,"date":"2004-09-15T22:36:33","date_gmt":"2004-09-16T04:36:33","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=184"},"modified":"2006-12-02T09:29:15","modified_gmt":"2006-12-02T15:29:15","slug":"relearning-the-joys-of-docbook","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/184","title":{"rendered":"Relearning the joys of DocBook"},"content":{"rendered":"<p>I remember the first time I looked at <a href=\"http:\/\/www.oasis-open.org\/docbook\/xml\/simple\/\">Simple DocBook<\/a>.  I have always enjoyed compiling my writing&#8211;I wrote my senior thesis using <a href=\"http:\/\/www.latex-project.org\/\">LaTeX<\/a>.  When I found DocBook, I was hooked&#8211;it was easier to use and understand than any of the TeX derivatives, and the Simplified grammar had just what I needed for technical documentation.   I used it to write my <a href=\"http:\/\/www.mooreds.com\/jaas.html\">JAAS article<\/a>.<\/p>\n<p>But, I remember it being a huge hassle to set up.  You had to download openjade, compile it on some systems, set up some environment variables, point to certain configuration files and in general do quite a bit of fiddling.  I grew so exasperated that I didn&#8217;t even setup the XML to PDF conversion, just the XML to HTML.<\/p>\n<p>Well, I went back a few weeks ago, and found things had improved greatly.  With the help of <a href=\"http:\/\/supportweb.cs.bham.ac.uk\/docs\/tutorials\/docsystem\/build\/tutorials\/docbooksys\/segmentedhtml\/ch02.html\">this document explaining how to set DocBook up on Windows<\/a> (updated 12\/2\/2006 to fix a broken link) I was able to generate PDF and HTML files quickly.  In fact, with the DocBook XSL transformations and the power of <a href=\"http:\/\/xml.apache.org\/fop\/\">FOP<\/a>, turning a Simplified DocBook article into a snazzy looking PDF file is as simple as this (stolen from <a href=\"http:\/\/ourworld.compuserve.com\/homepages\/hoenicka_markus\/x1895.html\">here<\/a>):<\/p>\n<p><code><br \/>\njava -cp \"C:\\Programs\\java\\fop.jar; \\<br \/>\nC:\\Programs\\java\\batik.jar;C:\\Programs\\java\\jimi-1.0.jar; \\<br \/>\nC:\\Programs\\java\\xalan.jar; C:\\Programs\\java\\xerces.jar; \\<br \/>\nC:\\Programs\\java\\logkit-1.0b4.jar;C:\\Programs\\java\\avalon-framework-4.0.jar\" \\org.apache.fop.apps.Fop -xsl \\ \"C:\\user\\default\\xml\\stylesheets\\docbook-xsl-1.45\\fo\\docbook.xsl\" \\ -xml test.xml -pdf test.pdf<br \/>\n<\/code><\/p>\n<p>Wrap that up in a shell script, and you have a javac for dcuments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I remember the first time I looked at Simple DocBook. I have always enjoyed compiling my writing&#8211;I wrote my senior thesis using LaTeX. When I found DocBook, I was hooked&#8211;it [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":0,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}