Syntax #
p.step.example
Purpose #
The p.step.example annotation is used to tag an element as being an example of a step. An example can contain multiple other elements, such as paragraphs, code, or preformatted text. This annotation is similar to p.step.info, but this annotation provides a clear, specific example of the procedure in question.
Examples #
The following is an example of a time where you might want to use the p.step.example annotation:
The following is an example of a rule that will apply p.step.example:
The following is the DITA XML output for the previous rule:
<step>
<cmd>Enter the code for your function.</cmd>
<stepxmp><p>For example:
def sampleFunction(x, y):
 z = x + y
 print(“The sum is “ + str(z))</p><p>For an example of a function without arguments:</p><codeblock>def sampleFunction():
 print(“This is a cool function”)</codeblock></stepxmp>
</step>