This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Block element for user input


Dear DocBookers,

I often find the need to use something like the <userinput> element that is
a block level element. Putting a <userinput> inside a <para> makes
formatting the <para> difficult.

Consider the following sample:

<step>
  <para>Change directory to the <filename>/tmp</filename> directory:</para>
  <para># <userinput>cd /tmp</userinput></para>
</step>

My FOSI for print output formats <para> as justified with hyphenation turned
on. However,  commands require the <para> parent element to be formatted as
left aligned, as-is with hyphenation disabled.

Notice also that I have to insert the shell prompt manually every time.

I propose the following enhancement to the DocBook DTD:

<step>
  <para>Change directory to the <filename>/tmp</filename> directory:</para>
  <userinput prompt='root'>cd /tmp</userinput>
</step>

This has three advantages:

- Less markup (obvious advantages ;-)  )

- Use attribute to set shell prompt. Legal values could include DOS, root
and normal (for Unix) and perhaps others too for other operating systems.

- Easier to format for print output, when normal paragraphs are formatted
differently from user input.

I find the need for <computeroutput> to be block for similar reasons, though
I get by using <programlisting> instead. However, my bones quiver whenever I
use an element for something other than what its name suggests ;-)

What are your thoughts on this issue?

Cheers,

Gershon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]