I'm trying to draw a coloured horizontal line at the beginning of an ODT file (OpenDocumentText for LibreOffice/OpenOffice) obtained by conversion from a md
(Markdown text) file by using pandoc
.
First I get the default template:
pandoc -D odt > template_odt.xml
I am able to draw a black horizontal line by typing <text:p text:style-name="Horizontal_20_Line" />
, for example at this location in template_odt.xml
:
...
$endif$
<text:p text:style-name="Horizontal_20_Line" />
$for(include-before)$
...
But how to attribute a color to this line? The style Horizontal_20_line
is defined in the styles.xml
file:
<style:style style:name="Horizontal_20_Line"
style:display-name="Horizontal Line" style:family="paragraph"
style:parent-style-name="Standard"
style:next-style-name="Text_20_body" style:class="html">
<style:paragraph-properties fo:margin-top="0in"
fo:margin-bottom="0.1965in" style:contextual-spacing="false"
style:border-line-width-bottom="0.0008in 0.0138in 0.0008in"
fo:padding="0in" fo:border-left="none" fo:border-right="none"
fo:border-top="none" fo:border-bottom="1.11pt double #808080"
text:number-lines="false" text:line-number="0"
style:join-border="false" />
<style:text-properties fo:font-size="6pt"
style:font-size-asian="6pt" style:font-size-complex="6pt" />
</style:style>
So :
Can I add an attribute direclty in
template_odt.xml
, like :<text:p text:style-name="Horizontal_20_Line" line-color="red"?????/>
Or should I modify the style
Horizontal_20_line
, and how? I don't know where is the defaultstyles.xml
file and I don't know how to define a style intemplate_odt.xml
(all my naive attempts have failed).