Re: tmpl/ to xml/ without DOCTYPE front matter



On Thu, 2006-09-28 at 07:22 +0200, David Nečas (Yeti) wrote:
> On Wed, Sep 27, 2006 at 08:55:33PM -0400, Philip Kovacs wrote:
> > 
> > Great.  The only thing I need to change in my descriptions
> > is my use of c-style comments (/* */) in my code examples.  
> > Looks like I need to create xml entity references for these 
> > in my -docs.sgml because the compiler doesn't like nested 
> > comments.
> 
> Well, I'd rather calls entities abused than used for this
> purpose, XInclude does directly what one needs...
> 
> Anyway, C style comment are possible.  A couple of basic
> embedded code samples tricks:
> 
> /**
>  * ...
>  * <informalexample><programlisting>
>  * GtkWidget *w;
>  * <!-- Make an empty line avoiding autoparagraphization -->

You can just use an extra space here for an empty line, e.g. " *  ".

>  * w = gtk_tree_view_new<!-- -->();  <!-- Prevent linkification -->
>  * /<!-- -->* Insert a C comment to the example *<!-- -->/

I just use &ast; here.

>  * ...
>  * </programlisting></informalexample>
>  **/
> 
> And thanks to the fact DocBook processing is typically set
> not to preserve comments, the resulting HTML does not
> contain any of this rubbish, it only clutters the source
> code.

I created a little script to convert C code to make it ready to go into
gtk-doc comments. I've attached it here.

Maybe I should add it to gtk-doc.

Damon

Attachment: makeexamplecode
Description: Perl program



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]