[docbook-css] css enhancements for function prototypes
Gaetano Giunta
giunta.gaetano at sea-aeroportimilano.it
Mon Feb 26 13:42:05 UTC 2007
Hello
I have been doing a bit more tweaking to the css used tio style function definitions.
I solved the problem of adding line breaks to inline elements by switching thos elements to display-block
here's the new version of the css for funcsynopsis and funcprototye:
funcsynopsis>* {
margin-left:10%;
margin-right:10%;
}
funcprototype {
display: block;
text-align: justify;
font-family:monospace;
}
The docbook 'chunk' for testing is:
<funcsynopsis>
<funcprototype>
<funcdef>$myVal = new <function>xmlrpcval</function></funcdef>
<void />
</funcprototype>
<funcprototype>
<funcdef>$myVal = new <function>xmlrpcval</function></funcdef>
<paramdef><type>string</type><parameter>$stringVal</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>$myVal = new <function>xmlrpcval</function></funcdef>
<paramdef><type>mixed</type><parameter>$scalarVal</parameter></paramdef>
<paramdef><type>string</type><parameter>$scalartyp</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>$myVal = new <function>xmlrpcval</function></funcdef>
<paramdef><type>array</type><parameter>$arrayVal</parameter></paramdef>
<paramdef><type>string</type><parameter>$arraytyp</parameter></paramdef>
</funcprototype>
</funcsynopsis>
I use it inside a sect2 > sect 1 > chapter
Bye
Gaetano
> -----Original Message-----
> From: docbook-css-bounces at lists.badgers-in-foil.co.uk
> [mailto:docbook-css-bounces at lists.badgers-in-foil.co.uk]On Behalf Of
> David Holroyd
> Sent: Thursday, September 21, 2006 12:05 PM
> To: docbook-css at lists.badgers-in-foil.co.uk
> Subject: Re: [docbook-css] css enhancements for function prototypes
>
>
> Hi there!
>
> On Thu, Sep 14, 2006 at 02:38:12PM +0200, Gaetano Giunta wrote:
> > I just tried the 0.4 css available on
> http://www.badgers-in-foil.co.uk/projects/docbook-css/ on the
> docbook I use for the php-xmlrpc project documentation.
> >
> >
> > I found it to be lacking in the formatting of
> "funcprototype" elements, so i added a custom set of rules,
> with the goal of having function prototypes looking as
> similar as possible to the results of applying the stock xslt
> transforms.
> >
> > Some of these rules will only be shown by Opera or Mozilla,
> since they depend on :before and ;after pseudo-selector,
> which IE6 does not support.
> >
> > Feel free to test out these additions and incorporate them
> into the main distribution.
>
> I will do. Thank you!
>
> I just need to add your example to the set of test files.
>
>
> > Note that i still have a problem with multiple
> funcprototype elements inside a funcsynopsis: i would like
> these to appear on multiple lines, while by default they all
> appear on the same line.
> > I tried setting funcprototype to display:block, but this
> has the drawback of loosing the vertical aligment with the
> surrounding sections. I was hoping for something like
> funcprototype:after { content: "\A" } but it looks like only
> Opera currently supports this...
>
> Not much time to look into it right not, I'm afraid. Certainly things
> are better than they where for the addition of these styles, so I will
> add them as they are.
>
>
> > ps: There is an oldish msg in the list mentioning the css moving to
> > the official sf.net docbook site. has it happened? is it planned?
>
> The stylesheets are now officially hosted in the DB sf.net Subversion
> repository. I've not made a release since the move happened though.
>
> http://svn.sourceforge.net/viewvc/docbook/trunk/css/xml/docbook/
>
> Not been working with any docbook stuff these last many months :(
>
>
> ta,
> dave
>
> --
> http://david.holroyd.me.uk/
>
> _______________________________________________
> docbook-css mailing list
> docbook-css at lists.badgers-in-foil.co.uk
> http://lists.badgers-in-foil.co.uk/mailman/listinfo/docbook-css
>
More information about the docbook-css
mailing list