This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
[docbook] how to represent userinput with a command option?
- From: "Robert P. J. Day" <rpjday at mindspring dot com>
- To: docbook mailing list <docbook at lists dot oasis-open dot org>
- Date: Tue, 13 May 2003 11:29:41 -0400 (EDT)
- Subject: [docbook] how to represent userinput with a command option?
in numerous places in my new manual, i'm going to want to show
examples of Linux commands, some with options. the problem is
how to best do this:
assuming (for the sake of brevity):
pr == prompt
ui = userinput
o == option
op == optional
let's say i wanted to, as part of a <screen>, show a sample command
$ wc [-w] letter
now, the standard way to represent userinput is to display it in
bold, to emphasize that it's typed by the user. so, as a first
attempt:
<pr>$</pr> <ui>wc <op><o>-w</o></op> letter</ui>
there is one major problem with how this is rendered, in that, ideally
the entire command should be displayed in bold, *except* for the square
brackets. (if they're also displayed in bold, too many students will
assume that they should type them.)
so, how to have those square brackets rendered in non-bold? it's
possible by turning off <userinput> just for the sake of those
brackets, as in:
<pr>$</pr> <ui>wc </ui><op><o><ui>-w</ui></o></op><ui> letter</ui>
ouch. is there a semantically more reasonable way to do this?
i mean, it seems to work but, yeesh.
rday
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org