how to add figure and table toc in PDF dita OT 1.5

79 views
Skip to first unread message

Rahul H

unread,
Jul 11, 2017, 1:40:29 PM7/11/17
to DITA-OT Users
Hi Developers,

Is there any way to add figure and topic title TOC in front page?.

Thanks
Rahul

Julio Vazquez

unread,
Jul 12, 2017, 10:43:16 AM7/12/17
to DITA-OT Users
Does your bookmap contain a figlist and tablelist element in the booklists element?

Rahul H

unread,
Jul 12, 2017, 12:41:37 PM7/12/17
to DITA-OT Users
Hi Julio,

Thank you for the reply.

There is no figlist or tablelist in all topics.

Thanks
Rahul

Rahul H

unread,
Jul 12, 2017, 2:48:17 PM7/12/17
to DITA-OT Users
Hi,

Sorry for the misunderstanding. In bookmap I have not used booklist and tablelist in bookmap.

Thanks
Rahul

Rahul H

unread,
Jul 13, 2017, 6:34:57 AM7/13/17
to DITA-OT Users
Hi,

I have added <figurelist/> in bookmap and published but figure toc is not appearing.

Thanks
Rahul

Julio Vazquez

unread,
Jul 13, 2017, 9:26:31 PM7/13/17
to DITA-OT Users
Can you post your coding up to the first chapter?

Rahul H

unread,
Jul 16, 2017, 11:42:36 AM7/16/17
to DITA-OT Users
Hi,

Below is my code

<xsl:variable name="id.lof" select="'ID_LOF_00-0F-EA-40-0D-4D'"/>
 <xsl:template name="createLOFHeader">
        <fo:block xsl:use-attribute-sets="__lotf__heading" id="{$id.lof}">
          <fo:marker marker-class-name="current-header">
            <xsl:call-template name="insertVariable">
              <xsl:with-param name="theVariableID" select="'List of Figures'"/>
            </xsl:call-template>
          </fo:marker>
        </fo:block>
   
  </xsl:template>
     <xsl:template match="ot-placeholder:figurelist" mode="toc" name="figurelist">
        <xsl:if test="//*[contains(@class, ' topic/fig ')]/*[contains(@class, ' topic/title ' )]">
            <fo:block>
                <fo:block >
                    <fo:basic-link internal-destination="{$id.lof}" xsl:use-attribute-sets="__toc__link">
                        <fo:inline xsl:use-attribute-sets="__toc__title">
                            <xsl:call-template name="insertVariable">
                                <xsl:with-param name="theVariableID" select="'List of Figures'"/>
                            </xsl:call-template>
                        </fo:inline>
                        <fo:inline xsl:use-attribute-sets="__toc__page-number">
                            <fo:leader xsl:use-attribute-sets="__toc__leader"/>
                            <fo:page-number-citation ref-id="{$id.lof}"/>
                        </fo:inline>
                    </fo:basic-link>
                </fo:block>
            </fo:block>
        </xsl:if>
    </xsl:template>

I called this template in root-processing.xsl

<xsl:if test="//*[contains(@class, ' bookmap/booklists ')]/*[contains(@class, ' bookmap/figurelist ')]">
    <fo:block><xsl:call-template name="figurelist"/></fo:block>
    </xsl:if>
Reply all
Reply to author
Forward
0 new messages