Page 1 of 1

LI with bullet

Posted: Mon Jul 21, 2014 11:13 am
by Le Basque
Hi,

Is it possible to change the bullet LI tags for levels two, three etc..
Currently whatever the level is the same bullet

Thank you

Re: LI with bullet

Posted: Mon Jul 21, 2014 1:22 pm
by sorin_ristache
Hi,

Your request is not clear. Do you want to change the marker for list items of an unordered list from the default character, which is a bullet, to a different character? Where do you want to change it: in Oxygen Author editing mode, in PDF output, in XHTML output, etc?


Regards,
Sorin

Re: LI with bullet

Posted: Mon Jul 21, 2014 4:36 pm
by Le Basque
No i want to change the marker for different level of imbrication list.
I found a solution :
I calculate level of ul and define variable in en.xml for differente level

Code: Select all

<variable id="Unordered List bullet L2">&#x25AA;</variable>
<variable id="Unordered List bullet L3">&#x2023;</variable>
Thank you

Re: LI with bullet

Posted: Wed Feb 25, 2015 10:03 pm
by cjbcjb
I need to do the same thing. I found the section in en.xml to select the Unordered List bullet variable, but how do you select a different variable for each level?

Code: Select all

    <xsl:template match="*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]">
<fo:list-item xsl:use-attribute-sets="ul.li">
<fo:list-item-label xsl:use-attribute-sets="ul.li__label">
<fo:block xsl:use-attribute-sets="ul.li__label__content">
<fo:inline>
<xsl:call-template name="commonattributes"/>
</fo:inline>
<xsl:call-template name="insertVariable">
<xsl:with-param name="theVariableID" select="'Unordered List bullet'"/>
</xsl:call-template>
</fo:block>
</fo:list-item-label>

<fo:list-item-body xsl:use-attribute-sets="ul.li__body">
<fo:block xsl:use-attribute-sets="ul.li__content">
<xsl:apply-templates/>
</fo:block>
</fo:list-item-body>

</fo:list-item>
</xsl:template>

Re: LI with bullet

Posted: Thu Feb 26, 2015 10:17 am
by sorin_ristache
cjbcjb wrote:I found the section in en.xml to select the Unordered List bullet variable, but how do you select a different variable for each level?
This distinction is not made in the DITA PDF transformation. You will need to customize that DITA-OT\plugins\org.dita.pdf2\xsl\fo\lists.xsl stylesheet file to handle also nested ul/li/ul/li elements. I recommend adding a new template like the following for the nested ul/li/ul/li structures:

Code: Select all

  <xsl:template match="*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]/*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]">
<fo:list-item xsl:use-attribute-sets="ul.li.ul.li">
<fo:list-item-label xsl:use-attribute-sets="ul.li.ul.li__label">
<fo:block xsl:use-attribute-sets="ul.li.ul.li__label__content">
. . .
You should start from the following file with your DITA PDF customization:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\Customization\README.txt