1 2 3 4 5 6 7 8 | <p>A few of my favorite albums</p> <ul> <li>A Love Supreme</li> <li>Remain in Light</li> <li>London Calling</li> <li>The Indestructible Beat of Soweto</li> <li>The Joshua Tree</li> </ul> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <fo:block>A few of my favorite albums</fo:block> <fo:list-block provisional-distance-between-starts="0.2cm" provisional-label-separation="0.5cm" space-after="12pt" start-indent="1cm"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block>•</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> A Love Supreme </fo:list-item-body> </fo:list-item> ... <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block>•</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> The Joshua Tree </fo:list-item-body> </fo:list-item> </fo:list-block> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | <xsl:template match="ul"> <fo:list-block provisional-distance-between-starts="1cm" provisional-label-separation="0.5cm"> <xsl:attribute name="space-after"> <xsl:choose> <xsl:when test="ancestor::ul or ancestor:l"> <xsl:text>0pt</xsl:text> </xsl:when> <xsltherwise> <xsl:text>12pt</xsl:text> </xsltherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="start-indent"> <xsl:variable name="ancestors"> <xsl:choose> <xsl:when test="count(ancestor:l) or count(ancestor::ul)"> <xsl:value-of select="1 + (count(ancestor:l) + count(ancestor::ul)) * 1.25"/> </xsl:when> <xsltherwise> <xsl:text>1</xsl:text> </xsltherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="concat($ancestors, 'cm')"/> </xsl:attribute> <xsl:apply-templates select="*"/> </fo:list-block> </xsl:template> <xsl:template match="ul/li"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block>•</fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <xsl:apply-templates select="*|text()"/> </fo:block> </fo:list-item-body> </fo:list-item> </xsl:template> |
1 2 3 | <p>To run the FOP program, you must make sure your <var>classpath</var> variable is set correctly.</p> |
1 2 3 4 5 6 7 8 | <xsl:template match="var"> <fo:inline font-style="italic" font-family="monospace"> <xsl:apply-templates select="*|text()"/> </fo:inline> </xsl:template> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |