Commit 363330a2 authored by Eva Huet's avatar Eva Huet
Browse files

TEI : planches

parent e4a35316
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -1488,3 +1488,18 @@ pre {
code {
    font-size: 0.9rem;
}

/* planches */

.left-contents figure header h1:not(div.boxed-text *) {
    margin-bottom: 0;
    padding-bottom: 0;
}

figure > figure + figure {
    margin-top: 0em;
} 

section.body figure[role="group"] figure + p:not(div.boxed-text *, .caption, .credits, .stage, details *, .front-matter *) {
    margin-top : -1em;
}
+74 −13
Original line number Diff line number Diff line
@@ -1717,6 +1717,53 @@
            <xsl:apply-templates select="child::tei:formula"/>
        </xsl:if>
        <xsl:if test="not(@rend='inline')">
            <xsl:choose>
                <xsl:when test="child::tei:figure"> <!-- planches -->
                    <figure role="group">
                        <xsl:attribute name="aria-labelledby">
                            <xsl:value-of select="concat('planche-',count(preceding::tei:figure[child::tei:figure]) +1 )"/>
                        </xsl:attribute>
                        <xsl:if test="child::tei:p[@rend='caption' or @rend='credits']">
                            <xsl:attribute name="aria-describedby">
                                <xsl:if test="tei:p[@rend='caption']">
                                    <xsl:value-of select="concat('planche-',count(preceding::tei:figure[child::tei:figure]) +1,'-legende' )"/>
                                </xsl:if>
                                <xsl:if test="tei:p[@rend='caption'] and tei:p[@rend='credits']">
                                    <xsl:text> </xsl:text>
                                </xsl:if>
                                <xsl:if test="tei:p[@rend='credits']">
                                    <xsl:value-of select="concat('planche-',count(preceding::tei:figure[child::tei:figure]) +1,'-credits' )"/>
                                </xsl:if>
                            </xsl:attribute>
                        </xsl:if>
                        <header>
                            <h1>
                                <xsl:attribute name="id">
                                    <xsl:value-of select="concat('planche-',count(preceding::tei:figure[child::tei:figure]) +1 )"/>
                                </xsl:attribute>
                                <xsl:apply-templates select="child::tei:head/node()"/>
                            </h1>                
                        </header>
                        <xsl:apply-templates select="child::tei:figure"/>
                        <xsl:if test="child::tei:p[@rend='caption']">
                            <p>
                                <xsl:attribute name="id">
                                    <xsl:value-of select="concat('planche-',count(preceding::tei:figure[child::tei:figure]) +1,'-legende' )"/>
                                </xsl:attribute>
                                <xsl:apply-templates select="child::tei:p[@rend='caption']/node()"/>
                            </p>
                        </xsl:if>
                        <xsl:if test="child::tei:p[@rend='credits']">
                            <p>
                                <xsl:attribute name="id">
                                    <xsl:value-of select="concat('planche-',count(preceding::tei:figure[child::tei:figure]) +1,'-credits' )"/>
                                </xsl:attribute>
                                <xsl:apply-templates select="child::tei:p[@rend='credits']/node()"/>
                            </p>
                        </xsl:if>
                    </figure>
                </xsl:when>
                <xsl:otherwise>
            <figure>
                <xsl:attribute name="id">
                    <xsl:text>main-</xsl:text>
@@ -1767,12 +1814,18 @@
                                <xsl:apply-templates select="tei:head"/>
                                <xsl:apply-templates select="tei:graphic"/>
                                <xsl:apply-templates select="tei:table"/>
                                <xsl:if test="child::tei:p[@rend='caption' or @rend='credits']">
                                    <figcaption>
                                        <xsl:apply-templates select="tei:p[@rend='caption' or @rend='credits']"/>
                                    </figcaption>
                                </xsl:if>
                                <xsl:apply-templates select="tei:floatingText[@type='description']"/>
                            </xsl:when>
                            <xsl:otherwise/>
                        </xsl:choose>
                    </figure>   
                </xsl:otherwise>
            </xsl:choose>
        </xsl:if>
    </xsl:template>

@@ -1781,7 +1834,11 @@
            <xsl:apply-templates select="tei:head" mode="panel"/>
            <xsl:apply-templates select="tei:graphic" mode="panel"/>
            <xsl:apply-templates select="tei:figDesc" mode="panel"/>
            <xsl:if test="child::tei:p[@rend='caption' or @rend='credits']">
                <figcaption>
                    <xsl:apply-templates select="tei:p[@rend='caption' or @rend='credits']" mode="panel"/>
                </figcaption>
            </xsl:if>
        </figure>
    </xsl:template>

@@ -1790,7 +1847,11 @@
            <xsl:apply-templates select="tei:head" mode="panel"/>
            <xsl:apply-templates select="tei:graphic" mode="panel"/>
            <xsl:apply-templates select="tei:figDesc" mode="panel"/>
            <xsl:if test="child::tei:p[@rend='caption' or @rend='credits']">
                <figcaption>
                    <xsl:apply-templates select="tei:p[@rend='caption' or @rend='credits']" mode="panel"/>
                </figcaption>
            </xsl:if>
        </figure>
    </xsl:template>