[svn r2103] r2161@freebird: fabien | 2006-07-16 12:01:37 -0400
Reprise des feuilles d'impression pour une plus belle présentation.
--- a/masters_print.xsl Mon Jul 17 13:43:11 2006 -0400
+++ b/masters_print.xsl Mon Jul 17 13:43:22 2006 -0400
@@ -8,9 +8,9 @@
<simple-page-master master-name="book"
margin-top="1cm" margin-bottom="1cm"
margin-left="1cm" margin-right="1cm">
- <region-body margin-top="1cm" margin-bottom="1cm"/>
- <region-before extent="1cm" precedence="true"/>
- <region-after extent="1cm" precedence="true"/>
+ <region-body margin-top="20mm" margin-bottom="25mm"/>
+ <region-before extent="15mm" precedence="true"/>
+ <region-after extent="25mm" precedence="true"/>
</simple-page-master>
<page-sequence-master master-name="book-sequence">
<repeatable-page-master-reference master-reference="book"/>
--- a/poetry_print.xsl Mon Jul 17 13:43:11 2006 -0400
+++ b/poetry_print.xsl Mon Jul 17 13:43:22 2006 -0400
@@ -36,8 +36,8 @@
</block>
</static-content>
<static-content flow-name="xsl-region-after">
- <block border-before-style="solid">
- <table width="100%" table-layout="fixed">
+ <block space-before="10mm" border-before-style="solid">
+ <table space-before="2mm" width="100%" table-layout="fixed">
<table-column column-width="proportional-column-width(1)"
number-columns-repeated="2"/>
<table-body>
@@ -59,38 +59,100 @@
<xsl:template match="book">
<root>
<xsl:call-template name="master-set"/>
- <xsl:apply-templates select="section"/>
+ <page-sequence master-reference="book-sequence">
+ <xsl:call-template name="static-content">
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="descendant::title[1]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:variable name="id">
+ <xsl:call-template name="get-id"/>
+ </xsl:variable>
+ <flow flow-name="xsl-region-body">
+ <block id="{$id}"/>
+ <xsl:apply-templates select="*[name(.)!='section']"/>
+ </flow>
+ </page-sequence>
+ <xsl:apply-templates select="section"/>
</root>
</xsl:template>
-<xsl:template match="/book/section">
+<xsl:template
+ match="/book/section|section[poetry]|poetry|/book/addendum">
<page-sequence master-reference="book-sequence">
<xsl:call-template name="static-content">
<xsl:with-param name="title">
- <xsl:apply-templates select="title"/>
+ <xsl:choose>
+ <xsl:when test="name(.)='preambule'">
+ <xsl:text>Préambule</xsl:text>
+ </xsl:when>
+ <xsl:when test="name(.)='addendum'">
+ <xsl:text>Addendum</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="descendant::title[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:with-param>
</xsl:call-template>
+ <xsl:variable name="id">
+ <xsl:call-template name="get-id"/>
+ </xsl:variable>
<flow flow-name="xsl-region-body">
- <xsl:apply-templates select="*[name()!='poetry']"/>
- </flow>
+ <block id="{$id}"/>
+ <xsl:apply-templates select="*[not(poetry)][name(.)!='poetry']"/>
+ <xsl:if test="section[poetry]">
+ <list-block text-indent="15mm" space-before="15pt">
+ <xsl:apply-templates select="section[poetry]" mode="toc"/>
+ </list-block>
+ </xsl:if>
+ </flow>
</page-sequence>
- <xsl:apply-templates select="poetry"/>
+ <xsl:apply-templates select="poetry|section[poetry]"/>
</xsl:template>
-<xsl:template match="poetry">
- <page-sequence master-reference="book-sequence">
- <xsl:call-template name="static-content">
- <xsl:with-param name="title">
- <xsl:apply-templates select="docinfo/title"/>
- </xsl:with-param>
- </xsl:call-template>
- <flow flow-name="xsl-region-body">
- <xsl:apply-templates/>
- </flow>
- </page-sequence>
+<xsl:template match="section|poetry" mode="toc">
+ <list-item>
+ <xsl:call-template name="list-label"/>
+ <list-item-body start-indent="body-start()">
+ <xsl:apply-templates select="." mode="xref"/>
+ <!-- xsl:if test="poetry|section">
+ <list-block
+ text-indent="body-start()"
+ space-before="15pt">
+ <xsl:apply-templates select="poetry|section" mode="toc"/>
+ </list-block>
+ </xsl:if -->
+ </list-item-body>
+ </list-item>
</xsl:template>
-<xsl:template match="section/title">
+<xsl:template match="section">
+ <xsl:variable name="id">
+ <xsl:call-template name="get-id"/>
+ </xsl:variable>
+ <block id="{$id}">
+ <xsl:apply-templates/>
+ </block>
+</xsl:template>
+
+<xsl:template match="preambule">
+ <xsl:variable name="id">
+ <xsl:call-template name="get-id"/>
+ </xsl:variable>
+ <block id="{$id}">
+ <xsl:if test="not(title)">
+ <block xsl:use-attribute-sets="verylarge-title-font">
+ <xsl:attribute name="space-after">5pt</xsl:attribute>
+ <xsl:attribute name="space-before">10pt</xsl:attribute>
+ <xsl:text>Préambule</xsl:text>
+ </block>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </block>
+</xsl:template>
+
+<xsl:template match="book/title|section/title|preambule/title">
<block xsl:use-attribute-sets="verylarge-title-font">
<xsl:attribute name="space-after">5pt</xsl:attribute>
<xsl:attribute name="space-before">10pt</xsl:attribute>
@@ -107,11 +169,11 @@
</xsl:template>
<xsl:template match="nda">
- <block border-top="solid" border-bottom="solid"
- font-size="75%" font-style="italic"
- padding-top="10pt" padding-bottom="10pt"
- space-before="1in" space-before.conditionnaly="discard"
- margin-left=".5in" margin-right=".5in">
+ <block border="solid" padding="5mm"
+ font-size="90%" font-style="italic"
+ space-before="15mm" space-before.conditionnaly="discard"
+ space-after="15mm" space-after.conditionnaly="discard"
+ margin="5mm">
<xsl:apply-templates/>
</block>
</xsl:template>
@@ -145,9 +207,6 @@
<xsl:template match="poem">
<block xsl:use-attribute-sets="standard-block">
- <xsl:attribute name="id">
- <xsl:value-of select="../@id"/>
- </xsl:attribute>
<xsl:apply-templates/>
</block>
</xsl:template>
@@ -177,13 +236,14 @@
<xsl:apply-templates/>
</xsl:template>
-<xsl:template match="poetry" mode="xref">
- <xsl:variable name="href">
+<xsl:template match="poetry|section" mode="xref">
+ <xsl:variable name="id">
<xsl:call-template name="get-id"/>
</xsl:variable>
- <basic-link internal-destination="{$href}">
- <xsl:value-of select="docinfo/title"/>
- (<page-number-citation ref-id="{$href}"/>)
+ <basic-link internal-destination="{$id}">
+ <xsl:value-of select="descendant::title[1]"/>
+ <leader leader-pattern="dots" leader-length.maximum="254mm"/>
+ (<page-number-citation ref-id="{$id}"/>)
</basic-link>
</xsl:template>
--- a/print.xsl Mon Jul 17 13:43:11 2006 -0400
+++ b/print.xsl Mon Jul 17 13:43:22 2006 -0400
@@ -85,7 +85,7 @@
<!-- list processing -->
<xsl:template match="list">
- <list-block>
+ <list-block space-before="24pt">
<xsl:apply-templates/>
</list-block>
</xsl:template>
--- a/story_print.xsl Mon Jul 17 13:43:11 2006 -0400
+++ b/story_print.xsl Mon Jul 17 13:43:22 2006 -0400
@@ -63,7 +63,7 @@
</root>
</xsl:template>
-<xsl:template match="/book/section">
+<xsl:template match="/book/section|/book/preamble|/book/addendum">
<page-sequence master-reference="book-sequence">
<xsl:call-template name="static-content">
<xsl:with-param name="title">
@@ -128,12 +128,14 @@
<!-- dialog template -->
<xsl:template match="dialog">
- <block xsl:use-attribute-sets="standard-block" start-indent="1cm">
+ <block xsl:use-attribute-sets="standard-block"
+ margin-left=".5in" margin-right=".5in">
<xsl:apply-templates/>
</block>
</xsl:template>
<xsl:template match="cite">
- <block xsl:use-attribute-sets="standard-block" font-style="italic">
+ <block xsl:use-attribute-sets="standard-block"
+ font-style="italic">
<xsl:text>"</xsl:text>
<xsl:apply-templates/>
<xsl:text>"</xsl:text>
@@ -142,7 +144,7 @@
<xsl:template match="citation">
<block xsl:use-attribute-sets="standard-block" font-style="italic"
- font-size="75%" margin-left="4in">
+ font-size="90%" margin-left="4in">
<xsl:apply-templates/>
</block>
</xsl:template>
@@ -165,22 +167,3 @@
</xsl:template>
</xsl:stylesheet>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: xml
-sgml-omittag:nil
-sgml-shorttag:nil
-sgml-namecase-general:nil
-sgml-general-insert-case:lower
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:2
-sgml-indent-data:nil
-sgml-parent-document:nil
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-outline-regexp:"<xsl:"
-End:
--->