bash# apt-get install sgmltools-2 |
To use SGMLtools-2 simply do this at the command line (as a regular user):
bash$ sgmltools -b html name-of-sgml-file.sgml |
bash$ sgmltools --help |
Sgmltools-lite is the replacement to SGMLtools-2 but is only apt-gettable in unstable. Luckily, I came upon a version for potato. It can be downloaded from here. I recommend you install SGMLtools-2 first using the instructions in sgmltools-2, and then use dpkg to upgrade the package. Since it's not apt-gettable you'll have to install/upgrade it like this (as root):
bash# dpkg -i sgmltools-lite_3.0.2.3.cvs0-0potato2_all.deb |
As with all things Debian, upgrades rarely change the way you do things. Sgmltools-lite uses the same command and options (almost) as SGMLtools-2. Here's how you would use SGMLtools-lite to render your SGML file as html:
bash$ sgmltools -b html -s howtoh name-of-sgml-file.sgml |
And for print based documents do this:
bash$ sgmltools -b html -s howtop name-of-sgml-file.sgml |
Once you have mastered this document you will need this reference (it will probably help even before that!). You can browse this book online at http://www.docbook.org/tdg/html/docbook.html or you can download it at http://www.docbook.org/tdg/index.html If you do download it get the ZIP archive that is the same as the online version. This file will be called html.zip and when you unzip it it will put everything in a directory called html. Also, pay attention to their note that the root page is docbook.html, not index.html. You will need the program unzip to unzip it. This program is non-free so make sure you have the appropriate lines in your /etc/apt/sources.list file. At the command line do (the first command as root, the second as any user):
bash# apt-get install unzip Then do: bash$ unzip html.zip |
![]() | There are currently three versions of the DocBook guide available on the DocBook site. Version 2.0.4 is the most current edition, as well as the most well-written. However, that book describes DocBook V4.2, which is not exactly the same as the version we use, LinuxDoc (DocBook V3.1). The 2.0.3 version of the book covers DocBook V4.1.2, which is almost exactly the same as V4.2, though it's not as detailed. Finally, Version 1.0.3 covers DocBook V3.1/LinuxDoc, but, again, is less detailed than the others. Our suggestion is to use the latest version of the book, even if it applies to a newer version. Anything describing something that was a part of V3.1 will still work, but be aware that there are some new additions that may not work as expected. |
In order to format your documents in the same manner as this one you should use the NewbieDoc custom stylesheets. The stylesheets are called newbiedoc-html.dsl, newbiedoc-onehtml.dsl, and newbiedoc-pdf.dsl. You can download them from newbiedoc cvs or you can post to: <newbiedoc-discuss@lists.sourceforge.net>. Someone on the mailing list should be able to get you a copy. Once you get the custom stylesheets, save the stylesheets in the same directory as the SGML file you wish to parse. Here's the formal usage of SGMLtools:
sgmltools {-b {html | onehtml | pdf | ps}} [-s | stylesheet] {SGML-file}
If you don't understand the above syntax don't worry about it. I'll be giving specific examples of how to use the stylesheets in the following sections.
Here's how you use the custom stylesheet for html using SGMLtools-2:
bash$ sgmltools -b html -s newbiedoc-html.dsl name-of-SGML-file.sgml |
bash$ sgmltools -b onehtml -s newbiedoc-onehtml.dsl name-of-SGML-file.sgml |
Here's how to use the pdf stylesheet:
bash$ sgmltools -b pdf -s newbiedoc-pdf.dsl name-of-SGML-file.sgml |