[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK: 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC