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] 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/


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