Commit e978707d authored by bperraud's avatar bperraud

Fix visual bug with ToC

parent dfae5242
...@@ -113,6 +113,15 @@ ul.toc { ...@@ -113,6 +113,15 @@ ul.toc {
padding-left: 0; padding-left: 0;
} }
ul.toc.level2 {
width: 107mm;
}
ul.toc > li {
display: block;
position: relative;;
}
ul.toc > li::before { ul.toc > li::before {
left: 0; left: 0;
position: absolute; position: absolute;
...@@ -127,11 +136,20 @@ ul.toc.level5 > li {padding-left: 15mm;} ...@@ -127,11 +136,20 @@ ul.toc.level5 > li {padding-left: 15mm;}
ul.toc.level6 > li {padding-left: 17mm;} ul.toc.level6 > li {padding-left: 17mm;}
ul.toc > li > a::after { ul.toc > li > a::after {
content: leader(dotted) target-counter(attr(href), page); content: leader(dotted);
text-decoration: none; text-decoration: none;
color: black; color: black;
} }
ul.toc > li > span {
position: absolute;
right: -10mm;
}
ul.toc > li > span::after {
content: target-counter(attr(href), page);
}
/* Main Title formatting */ /* Main Title formatting */
h1 { h1 {
...@@ -162,7 +180,5 @@ img { ...@@ -162,7 +180,5 @@ img {
/* Widows and orphans processing */ /* Widows and orphans processing */
h2, h3, h4, h5, h6 { h2, h3, h4, h5, h6 {
/*page-break-before: auto;*/
page-break-after: avoid; page-break-after: avoid;
/*page-break-inside: avoid;*/
} }
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template name="toc-a"> <xsl:template name="toc-a">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
...@@ -115,6 +115,12 @@ ...@@ -115,6 +115,12 @@
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="."/> <xsl:value-of select="."/>
</a> </a>
<span>
<xsl:attribute name="href">
<xsl:text>#</xsl:text>
<xsl:value-of select="./@id"/>
</xsl:attribute>
</span>
</xsl:template> </xsl:template>
......
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