Next in thread →
Next in month →
Re: [docbook-apps] How to indicate code snippets in Docbook?
--- Bob Foster <> wrote:
> Sorry for this newbie question. I'm trying to learn
> this stuff as I
> write. I'm a bit stumped on how to specify inline
> code snippets and
> set-apart (separate "paragraph") code examples.
>
> In HTML, I would use <code>a[i]</code> and
>
> <pre>
> public void foo() {
> }
> </pre>
>
> for these roles. What's the nearest Docbook
> equivalent?
For inline, as with your first example, you may use:
... <parameter class="function">a</parameter><option
class="option">[i]</option> ...
To set-apart code use programlisting
<programlisting>
public void foo() {
}
</programlisting>
You may also wrap the code snippet in CDATA within the
programlisting.
Sean Wheller
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
Next in thread →
Next in month →