Библиотека сайта rus-linux.net
D.3. Command Prompts
There are likely as many ways of doing this as there are DocBook authors; however, here are two ways that you might find useful. Thanks to Y Giridhar Appaji Nag and Martin Brown for the markup used here.
Example D-1. Command Prompt with programlisting
|
Displays as:
|
Example D-2. Command Prompt with screen
First create a general entity in the internal subset at the very
beginning of your document. This entity will define a name for the
shortcut which you can use to display the full prompt at any point
in your document.
<!ENTITY prompt "<prompt>[user@machine
~/dir]$</prompt>">
For more information about entities, read Section D.8.
|
Displays as:
|
If you would like to add the output of your commands you can add
<computeroutput>
text</computeroutput>
within the
<screen>
or <programlisting>
as appropriate.