docbook: HTML -> DocBook equivalents
Subject:
Re: HTML -> DocBook equivalents
From:
"Martin A. Brown" ####@####.####
Date:
13 Jun 2003 04:56:33 -0000
Message-Id: <Pine.LNX.4.55.0306122337160.9585@enclitic.wonderfrog.net>
Hi there Emma,
I'm quite interested in how you find and like DocBook (as perhaps
several others on this list may be). I am a convert. I had been
using LaTeX until about a year ago, when I started writing my
linux-ip document. I find DocBook much easier to create and much
easier to read after I have written it.
: I'm working on my first HTML->DocBook conversion. I've written the HTML
: using the following:
I'll give you some examples for the tags I use. I am not a
"knowledgeable authority", just "some guy who uses DocBook", so take
my comments with a grain of salt, and compare with a reference work
(like the book I refer to below).
: var -- program names, file names, etc
program names:
<command>/usr/sbin/tcpdump</command>
<command>grep</command>
program name with with link to URL:
<ulink url="http://www.dest-unreach.org/socat/">
<command>socat</command>
</ulink>
filename:
<filename>/etc/hosts</filename>
To represent a command shell:
<programlisting>
<prompt>[user@box user]$ </prompt><userinput>host xtrinsic.com</userinput>
<computeroutput>xtrinsic.com has address 205.207.28.100</computeroutput>
</programlisting>
: code -- snippets of code (none in this article)
Depends on what you want to do with it. If I don't wish to comment
on the script, I like to incorporate it wholesale.
<programlisting>
<![CDATA[#! /bin/bash
#
# -- I do this often enough to have a script to do it for me
trap 'echo Try CTRL-D next time, bozo....' 1 2 3 15
/bin/cat - >/dev/null 2>&1
]]>
</programlisting>
If you need to use callouts or some other type of annotation, you'll
want to consult the sagehill documentation:
http://www.sagehill.net/xml/docbookxsl/SolveProblems.html#d0e12992
http://www.sagehill.net/xml/docbookxsl/SolveProblems.html
: kbd -- things that you type at a prompt
A keypress more familiar to Windows users:
<keycombo action='simul'>
<keycap>Control</keycap>
<keycap>Alt</keycap>
<keycap>Delete</keycap>
</keycombo>
: How do I figure out the DocBook equivalent for these? I've noticed a
: <filename class='directory'>directory</filename>. If I have a full URL
: including file name I simply omit the class attribute?
No, there are a larger number of tags for DocBook. I'd recommend
browsing to find the tag you are interested in. And also, I have
found reading other documentation quite helpful. Read what somebody
else has written, and use CVS....
DocBook tags (this book is also available in a print format):
http://www.oasis-open.org/docbook/documentation/reference/html/docbook.html
TLDP viewCVS CGI:
http://cvsview.tldp.org/index.cgi/
http://cvsview.tldp.org/index.cgi/LDP/howto/docbook/
: For those who are interested, my file is here:
: http://xtrinsic.com/geek/articles/acpi.phtml
Good luck! Let us know if you have any tag woes.
-Martin