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]

[docbook] How to mark up inline program listings?


Hi

How would I write the following XHTML 1 fragment in DocBook 4?

<!-- inlne code listing -->
<p>To print out hello "world run" run
<code>print 'Hello world'</code>.</p>

Somehow I can't find an element for inline program listings. This

<!-- invalid -->
<para>To print out hello "world run" run
<inlineprogramlisting>print 'Hello world'</inlineprogramlisting>.</para>

... doesn't exist.

And this

<!-- should be a valid DBX 4 fragment -->
<para>...
  <inlinemediaobject>
    <textobject>
      <phrase>print 'Hello world'</phrase>
    </textobject>
  </inlinemediaobject>.
</para>

... is a bit too verbose for my taste, and doesn't state that the text is code, thus I could just as well use literal, which is just as unspecific, but simpler.

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]