This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]