Export to docbook xml with LyX (on Ubuntu 12.10)

  1. Install LyX as well as the dependencies need to author docbook in LyX

    1. apt-get install docbook-dsssl sgmltools-lite jade docbook docbook-xml lyx jadetex
  2. It is commonly written on the web to tell LyX where to find the docbook catalogs by explicitly exporting SGML_CATALOG_FILES. This turned out to be not needed on Ubuntu and in fact caused sgmltools to fail if set (IOError: Couldn't resolve pubid ["-//SGMLtools//DOCUMENT Docbook Style Sheet for w3m Text//EN"]).

  3. Start LyX and hit Tools⇒Reconfigure followed by a LyX restart

  4. At this stage create a new document foo.lyx and change the document class to “Docbook articel (SGML)”

    1. Document => Settings => Document class
  5. Save the document and check the DVI preview (CTRL+R)

  6. Export => Docbook (XML) exports foo.lyx to foo.xml which is valid docbook xml

Want to comment? Send me an email to blog-comments-2018 at lemmster d.t de and I'll paste it here (I won't publish your address). Why don't you use an external comment service like disqus, you ask? Well, I like to keep this site under my control, comments included. You can use markdown to format your comment.