OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: 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

<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.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]