This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: [docbook] How to mark up inline program listings?
- From: steven dot cogorno at sun dot com (Steven Cogorno)
- To: Tobias Reif <tobiasreif at pinkjuice dot com>
- Cc: docbook at lists dot oasis-open dot org, Michael Smith <smith at xml-doc dot org>
- Date: Fri, 20 Jun 2003 09:55:28 -0700 (PDT)
- Subject: Re: [docbook] How to mark up inline program listings?
- Reply-to: steven dot cogorno at sun dot com (Steven Cogorno)
Tobias Reif said:
> spe142> echo 'print "Hello world :)\\n"' > hw.rb
> spe142> cat hw.rb
> print "Hello world :)\n"
> spe142> ruby hw.rb
> Hello world :)
> spe142>
Tobias,
I would still consider that <screen>, not </programlisting>.
This is how it would be marked up at Sun:
<screen>
spe142> <userinput>echo 'print "Hello world :)\\n"' > hw.rb</userinput>
spe142> <userinput>cat hw.rb</userinput>
print "Hello world :)\n"
spe142> <userinput>ruby hw.rb</userinput>
Hello world :)
spe142>
</screen>
> <p>To print out "hello world",
> save the program <code>print "Hello world :)\n"</code>, and
> feed it to Ruby.</p>
We would use <literal> for that case.
Steve Cogorno
Sun Microsystems
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org