Commit 35716594 authored by bperraud's avatar bperraud

Add main page layout css rules + rework of hn rank in hdoc_flattenizer.xsl

parent bdfbaaa4
......@@ -37,9 +37,32 @@
@page {
size: A4 portrait;
margin: 2cm;
margin-left: 44mm;
margin-right: 44mm;
margin-top: 20mm;
margin-bottom: 40mm;
@bottom-center { content: counter(page) }
}
* {
font-family: "CMU Serif";
}
p {
text-align: justify;
text-indent: 2em;
hyphens: auto;
}
body {counter-reset: h2}
h2 {counter-reset: h3}
h3 {counter-reset: h4}
h4 {counter-reset: h5}
h5 {counter-reset: h6}
h2:before {counter-increment: h2; content: counter(h2) ".\0000a0\0000a0"}
h3:before {counter-increment: h3; content: counter(h2) "." counter(h3) ".\0000a0\0000a0"}
h4:before {counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4) ".\0000a0\0000a0"}
h5:before {counter-increment: h5; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ".\0000a0\0000a0"}
h6:before {counter-increment: h6; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ".\0000a0\0000a0"}
......@@ -17,7 +17,7 @@
</xsl:template>
<xsl:template match="html">
<html>
<html lang="fr">
<xsl:apply-templates/>
</html>
</xsl:template>
......@@ -35,7 +35,7 @@
</xsl:template>
<xsl:template match="section">
<xsl:variable name="level" select="count(ancestor::section) + 1"/>
<xsl:variable name="level" select="count(ancestor::section) + 2"/>
<div>
<xsl:element name="h{$level}">
<xsl:value-of select="header/h1"/>
......@@ -48,7 +48,7 @@
</xsl:template>
<xsl:template match="h6">
<xsl:variable name="level" select="count(ancestor::section) + 1"/>
<xsl:variable name="level" select="count(ancestor::section) + 2"/>
<xsl:element name="h{$level}">
<xsl:value-of select="."/>
</xsl:element>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment