Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
35716594
Commit
35716594
authored
Dec 21, 2016
by
bperraud
Browse files
Add main page layout css rules + rework of hn rank in hdoc_flattenizer.xsl
parent
bdfbaaa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
hdoc_to_pdf/css/main.css
View file @
35716594
...
...
@@ -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"
}
hdoc_to_pdf/xsl/hdoc_flattenizer.xsl
View file @
35716594
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment