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] representing texinfo's @defun in docbook


I asked 3/27 about how to represent GNU texinfo's definiton formats
using docbook.  For example in texinfo one may define a function
(in the Scheme language) named array-rank using this syntax:

@defun array-rank array
Returns the number of dimensions of @var{array}.
@example
(array-rank
  (make-array (shape 1 2 3 4)))
@end example
Returns 2.
@end defun

I now have a patch to the GNU makeinfo program that generates
the following (after reformatting):

<informalfigure>
  <synopsis role="Function">
    <indexterm role="fn"><primary>array-rank</primary></indexterm>
    <function>array-rank</function>
    <replaceable>array</replaceable>
  </synopsis>
<blockquote>
<para>Returns the number of dimensions of
  <replaceable>array</replaceable>.</para>
<screen>
(array-rank
  (make-array (shape 1 2 3 4)))
</screen>
<para>Returns 2.</para>
</blockquote>
</informalfigure>

(I also have some docbook-xsl and css customization for this.)

I plan to submit my patch to the GNU makeinfo maintainers.  Assuming
it is accepted, that would make it the standard way to translate GNU
texinfo documentation into docbook.  So if you think there is a better
way to do it, please let me know.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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