OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] space-before toc entry


On Wednesday 31 May 2006 09:53, Sean Wheller wrote:
> I want to bold toc entries for parts and apply a space before of 1 cm.
>
> I customized toc.line template, adding:
> <xsl:choose>
>         <xsl:when test="self::part">
>           <xsl:attribute name="font-weight">bold</xsl:attribute>
>         </xsl:when>
>       </xsl:choose>
>
> Works great.
>
> Now I need to introduce a space of 1cm before the part entry in the toc,
> but I am not sure how?


Well seems i solved it for myself. Dunno if it is the correct way to do it, 
but it works :-) 

Here is the customized toc.line template, hope it helps somebody

<fo:block text-align-last="justify"
			end-indent="{$toc.indent.width}pt"
			last-line-end-indent="-{$toc.indent.width}pt">
			<xsl:choose>
				<xsl:when test="self::part">
					<xsl:attribute name="space-before">1cm</xsl:attribute>
				</xsl:when>
			</xsl:choose>
			<fo:inline keep-with-next.within-line="always">
				<xsl:choose>
					<xsl:when test="self::part">
						<xsl:attribute name="font-weight">bold</xsl:attribute>
					</xsl:when>
				</xsl:choose>
				<fo:basic-link internal-destination="{$id}">
					<xsl:if test="$label != ''">
						<xsl:copy-of select="$label"/>
						<xsl:value-of select="$autotoc.label.separator"/>
					</xsl:if>
					<xsl:apply-templates select="." mode="title.markup"/>
				</fo:basic-link>
			</fo:inline>
			<fo:inline keep-together.within-line="always">
				<xsl:text> </xsl:text>
				<fo:leader leader-pattern="dots"
					leader-pattern-width="3pt"
					leader-alignment="reference-area"
					keep-with-next.within-line="always"/>
				<xsl:text> </xsl:text>
				<fo:basic-link internal-destination="{$id}">
					<fo:page-number-citation ref-id="{$id}"/>
				</fo:basic-link>
			</fo:inline>
		</fo:block>
	</xsl:template>
-- 
Ask me about the Monkey.

Sean Wheller
Technical Author
sean@inwords.co.za
+27-84-854-9408
http://www.inwords.co.za


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]