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
38191260
Commit
38191260
authored
Dec 26, 2016
by
bperraud
Browse files
Transformation of list bullets to euro dash
parent
6294391a
Changes
4
Show whitespace changes
Inline
Side-by-side
hdoc_to_pdf/css/main.css
View file @
38191260
...
...
@@ -63,19 +63,33 @@ 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"
}
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"
}
/* Global lists styling */
ul
>
li
>
p
,
ol
>
li
>
p
{
ul
>
li
p
,
ol
>
li
p
{
text-indent
:
0
;
}
ul
{
list-style-type
:
none
;
}
ul
>
li
{
position
:
relative
;
}
ul
>
li
::before
{
position
:
absolute
;
left
:
-5mm
;
content
:
"\2013"
;
}
/* Title formatting */
...
...
hdoc_to_pdf/xsl/hdoc_flattenizer.xsl
View file @
38191260
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
version=
"2.0"
xpath-default-namespace=
"http://www.w3.org/1999/xhtml"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns=
"http://www.w3.org/1999/xhtml"
>
<xsl:output
method=
"xml"
indent=
"yes"
/>
<xsl:template
match=
"node()|@*"
>
...
...
@@ -16,12 +14,14 @@
</xsl:copy>
</xsl:template>
<!-- Ajout de l'attribut lang -->
<xsl:template
match=
"html"
>
<html
lang=
"fr"
>
<xsl:apply-templates/>
</html>
</xsl:template>
<!-- Ajout de la référence au CSS -->
<xsl:template
match=
"head"
>
<head>
<xsl:apply-templates
select=
"node()|@*"
/>
...
...
@@ -34,6 +34,7 @@
</head>
</xsl:template>
<!-- "Aplatissement" des sections en div avec numérotation correcte des hn -->
<xsl:template
match=
"section"
>
<xsl:variable
name=
"level"
select=
"count(ancestor::section) + 2"
/>
<div>
...
...
hdoc_to_pdf/xsl/last_transformer.xsl
View file @
38191260
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
version=
"2.0"
x
mlns:xs
=
"http://www.w3.org/
2001/XMLSchema
"
xpath-default-namespace
=
"http://www.w3.org/1999/xhtml"
>
x
path-default-namespace
=
"http://www.w3.org/
1999/xhtml
"
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<xsl:output
method=
"xml"
indent=
"yes"
/>
...
...
@@ -13,6 +13,7 @@
</xsl:copy>
</xsl:template>
<!-- Traitement du titre et des auteurs du document -->
<xsl:template
match=
"body"
>
<body>
<h1><xsl:value-of
select=
"/html/head/title"
/></h1>
...
...
@@ -22,6 +23,7 @@
</body>
</xsl:template>
<!-- Cleaning des footers vides -->
<xsl:template
match=
"footer[not(node())]"
/>
...
...
hdoc_to_pdf/xsl/ns_remover.xsl
View file @
38191260
...
...
@@ -27,4 +27,3 @@
<xsl:template
match=
"processing-instruction()"
priority=
"1"
/>
</xsl:stylesheet>
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