docbook message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [docbook] How to mark up inline program listings?
- From: Michael Smith <smith@xml-doc.org>
- To: docbook@lists.oasis-open.org
- Date: Fri, 20 Jun 2003 20:46:36 +0900
Tobias Reif <tobiasreif@pinkjuice.com> writes:
[...]
> So how do I markup inline code in DocBook?
>
> It's no problem for me if the name does not include "programlisting". It
> could be named "code", "inlinecode", "inlineprogram", or etc.
Myself, I would use Literal. If that doesn't meet your need, file an
RFE. But I'd suggest proposing Code and not Inlineprogram.
> XHTML offers the element named "code"
>
> <p>To print out "hello world",
> save the program <code>print "Hello world :)?n"</code>, and
> feed it to Ruby.</p>
>
> ... which fulfills my requirements. I need to do the same in DocBook.
<para>To print out <computeroutput >hello world</computeroutput>,
save the following program and feed it to Ruby.
<programlisting >print "Hello world :)¥n"</programlisting>
</para>
Yeah, I know it's not the same (because it'll render the program listing
as a block and not inline), but it does have the advantage that you
wouldn't need to change your markup if you ended up deciding to use as
an example the somewhat less rare case of a program listing that
actually spans two or more lines.
--Mike
PGP signature
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]