Page 1 of 1

<ul>/<ol> lists configuration

Posted: Wed Nov 14, 2012 7:16 pm
by yiyi_vivi
I want to increase the space between the list number and the list content, and also I want to make the list number normal, not in bold.

I almost modified every number in list-attr.xsl, but nothing happened.

Code: Select all

<!--Ordered list-->
<xsl:attribute-set name="ol" use-attribute-sets="common.block">
<xsl:attribute name="provisional-distance-between-starts">50mm</xsl:attribute>
<xsl:attribute name="provisional-label-separation">1mm</xsl:attribute>
<xsl:attribute name="margin-left">36pt</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="ol.li">
<xsl:attribute name="space-after">1.5pt</xsl:attribute>
<xsl:attribute name="space-before">36pt</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="ol.li__label">
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
<xsl:attribute name="end-indent">label-end()</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="ol.li__label__content">
<xsl:attribute name="text-align">start</xsl:attribute>
<!-- <xsl:attribute name="font-weight">bold</xsl:attribute> -->
</xsl:attribute-set>

<xsl:attribute-set name="ol.li__body">
<xsl:attribute name="start-indent">body-start()</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="ol.li__content">
</xsl:attribute-set>
Any help appreciate.

Thanks,
Ivy

Re: <ul>/<ol> lists configuration

Posted: Wed Nov 14, 2012 8:34 pm
by yiyi_vivi
Oh, actually I made the changes in common-attr-custom.xsl, it works.

But is it supposed to work if I made changes in lists-attr-custom.xsl?

Thanks,
Ivy

Re: <ul>/<ol> lists configuration

Posted: Thu Nov 15, 2012 2:00 pm
by sorin_ristache
Hello,

For a customization in the DITA PDF output usually you create a new XSLT stylesheet with your customized attribute values, named for example common-attr-custom.xsl, which you import in the transformation by specifying it in the [Oxygen-install-dir]/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/cfg/catalog.xml file. For example if the catalog.xml file says:

Code: Select all

  <uri name="cfg:fo/attrs/custom.xsl" uri="fo/attrs/custom.xsl"></uri>
then you should import your custom stylesheet in fo/attrs/custom.xsl:

Code: Select all

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="2.0">

<xsl:import href="common-attr-custom.xsl"/>

</xsl:stylesheet>

Regards,
Sorin

Re: <ul>/<ol> lists configuration

Posted: Thu Nov 15, 2012 11:28 pm
by yiyi_vivi
Hi Sorin,

Thanks a lot. What you said is what I did. And my question at this point is: Can I create a new XSLT stylesheet for lists only, named lists-attr-cumstom.xsl, and import this customized stylesheet in fo/attrs/custom.xsl? I think this should be work also. However it didn't.

Re: <ul>/<ol> lists configuration

Posted: Mon Nov 19, 2012 7:15 pm
by sorin_ristache
Hi,

Yes, it works if the FO processor applies correctly the attributes which you set in lists-attr-custom.xsl. The problem is that the Apache FOP processor seems to not apply always correctly the attribute provisional-label-separation, but if I set both provisional-distance-between-starts and provisional-label-separation attributes they are applied. For example if you set XEP instead of Apache FOP on the FO Processor tab then these attributes are applied correctly in the PDF output.

For example are these 2 attributes applied correctly on your computer when Apache FOP is used (the default FO processor in the DITA PDF transform) if you have the following in lists-attr-custom.xsl?

Code: Select all

    <xsl:attribute-set name="ol" use-attribute-sets="common.block">
<xsl:attribute name="provisional-distance-between-starts">15mm</xsl:attribute>
<xsl:attribute name="provisional-label-separation">15mm</xsl:attribute>
</xsl:attribute-set>
If not, you may send us a zip archive with your customization files (please send the entire directory [Oxygen-install-dir]/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/cfg) and we will look at it.


Regards,
Sorin