OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

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?


Michael Smith wrote:


> Your example looks like Userinput to me, not a program listing.


Believe me, it's a complete program, and I need to mark it up as such.

spe142> echo 'print "Hello world :)\\n"' > hw.rb
spe142> cat hw.rb
print "Hello world :)\n"
spe142> ruby hw.rb
Hello world :)
spe142>


> I speculate that the reason there's no element for inline program
> listings is maybe that "program listing' implies multi-line block
> content of program source code -- something different that a string
> that you're instructing a user to input/enter.


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.

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.


Tobi


-- 
http://www.pinkjuice.com/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]