A step-by-step procedure is generally presented in a form similar to the bullet list, but with step numbers taking the place of bullets.
Enclose the entire procedure within a
element. Each step is enclosed within a
element containing one or more
For example, this input:
<procedure> <step> <para> Throw the football. </para> </step> <step> <para> Pick it up first. </para> </step> </procedure>
produces this output:
Throw the football.
Pick it up first.
If the steps of your procedure refer to other steps, you can get DocBook to insert the step number into each reference automatically. To do this:
Invent a name
I for each
step, and add an attribute
xml:id= to the corresponding
Wherever you want to refer to a step, use the element
the name of the step you are referring to.
This element will be replaced by the text “step N” where N is the step number.
Here's an example. This is a (facetious) solution to the famous Halting Problem. First, in output form:
And now the source for the above:
<procedure> <step xml:id='start-step'> <para> Has the program halted? If so, go to <xref linkend='done-step'/>. </para> </step> <step xml:id='loop-step'> <para> Go to <xref linkend='start-step'/>. </para> </step> <step xml:id='done-step'> <para> Done: we now know that the program halts. </para> </step> </procedure>