emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] letterhead and signature in odt export


From: Christian Moe
Subject: Re: [O] letterhead and signature in odt export
Date: Tue, 30 Oct 2018 08:31:00 +0100
User-agent: mu4e 0.9.19; emacs 24.5.1

You should be able to make a letterhead template by placing the
letterhead in the header, saving it as an ODT styles file and
specifically referencing any images in a list in the ODT_STYLES_FILE
header. See the manual 12.12.5, "Applying custom styles".

When I try it, though, Org fails to parse the odt_styles_file list.

I attach my test files - I'd be obliged if someone else could take a
look, maybe it's just my setup.

Yours,
Christian

#+title: ODT styles test
#+ODT_STYLES_FILE: ("odt-test-styles.odt" ("styles.xml" 
"Pictures/10000201000000A2000000B0A7D655E3F0A97ECF.png"))



Place this Org file in the same directory as the
accompanying file odt-test-styles.odt and export it to ODT.

Expected result: the exported document has a picture of the Org
unicorn in the header.

What I see:

  OpenDocument export failed: Invalid specification of styles.xml
  file: "(\"odt-test-styles.odt\" (\"styles.xml\"
  \"Pictures/10000201000000A2000000B0A7D655E3F0A97ECF.png\"))"

  Use M-x make-directory RET RET to create the directory and its
  parents

The ODT_STYLES_FILE option is set correctly according to
[[info:org#Applying%20custom%20styles][info:org#Applying custom styles]] (info 
"org#Applying custom styles").
It references another ODT document providing the custom styles to
apply to this document, including an image to be used in the header.

However, it seems the value of ODT_STYLES_FILE is not being parsed
correctly as a list.

Attachment: odt-test-styles.odt
Description: application/vnd.oasis.opendocument.text



Matt Price writes:

> in North America it's letter-of-reference season for professors, and I am
> writing a lot of them. These are some of the only documents I still compose
> in libreoffice, because I need to use a letterhead that contains both image
> and text, and I need to insert a .png of my signature near the bottom.  I
> would much prefer to compose these letter in org and them export. In order
> to so I would need to preserve the letterhead and the signature somehow.
> Both these sections in my current letters occur within the
> <office:text>
> </office:text>
>
> section which I guess is always replaced by org on export.  My immediate
> question: Is there a way to preserve some of these contents? More
> generally: do people have template files they are very satisfied with? I
> would be happy to go straight to pdf via latex, if it were easy to
> accomplish the same effect that way I don't use latex at all myself so it
> might not be so easy for me :-/.
>
> For completeness, here is the xml for my letterhead (sorry it's rather
> long):
>
> ---------
> <office:body><office:text><text:sequence-decls><text:sequence-decl
> text:display-outline-level="2" text:separation-character="."
> text:name="Illustration"/><text:sequence-decl
> text:display-outline-level="2" text:separation-character="."
> text:name="Table"/><text:sequence-decl text:display-outline-level="2"
> text:separation-character="." text:name="Text"/><text:sequence-decl
> text:display-outline-level="0" text:name="Drawing"/><text:sequence-decl
> text:display-outline-level="0" text:name="Figure"/><text:sequence-decl
> text:display-outline-level="2" text:separation-character="."
> text:name="Equation"/><text:sequence-decl text:display-outline-level="2"
> text:separation-character="."
> text:name="Listing"/></text:sequence-decls><text:h text:style-name="P6"
> text:outline-level="1"/><table:table table:name="Table1"
> table:style-name="Table1"><table:table-column
> table:style-name="Table1.A"/><table:table-column
> table:style-name="Table1.B"/><table:table-row
> table:style-name="Table1.1"><table:table-cell table:style-name="Table1.A1"
> office:value-type="string"><text:p text:style-name="P5"><draw:frame
> draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char"
> svg:width="1.857cm" svg:height="3.025cm" draw:z-index="0"><draw:image
> xlink:href="Pictures/100041D600001B2F00002FDA8AF7D675B9CA7740.wmf"
> xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
> loext:mime-type="image/x-wmf"/><draw:image
> xlink:href="Pictures/1000020100000107000001CF636AB597708AB63A.png"
> xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
> loext:mime-type="image/png"/></draw:frame></text:p></table:table-cell><table:table-cell
> table:style-name="Table1.A1" office:value-type="string"><text:p
> text:style-name="P5"><text:span text:style-name="T1">University of
> Toronto<text:tab/><text:tab/></text:span><text:span text:style-name="T2">
> <text:s text:c="2"/></text:span></text:p><text:p
> text:style-name="P5"><text:span text:style-name="T3">dept. of
> history</text:span><text:span text:style-name="T4">
> <text:s/></text:span></text:p><text:p text:style-name="P4"><text:span
> text:style-name="T5">Rm-2074 sidney smith, 100 st. george street, TORONTO,
> ONTARIO <text:s/>M5S 3G3 <text:s/>CANADA</text:span></text:p><text:p
> text:style-name="P4"><text:span text:style-name="T5">Telephone 416-978-3363
> <text:s text:c="3"/>Fax 416-978-4810
> <text:s/></text:span></text:p></table:table-cell></table:table-row></table:table><text:h
> text:style-name="P7" text:outline-level="1"><text:bookmark
> text:name="org54567cc"/>
> ------
>
> and here is my signature:
>
> --------
> <office:body><office:text><text:sequence-decls><text:sequence-decl
> text:display-outline-level="2" text:separation-character="."
> text:name="Illustration"/><text:sequence-decl
> text:display-outline-level="2" text:separation-character="."
> text:name="Table"/><text:sequence-decl text:display-outline-level="2"
> text:separation-character="." text:name="Text"/><text:sequence-decl
> text:display-outline-level="0" text:name="Drawing"/><text:sequence-decl
> text:display-outline-level="0" text:name="Figure"/><text:sequence-decl
> text:display-outline-level="2" text:separation-character="."
> text:name="Equation"/><text:sequence-decl text:display-outline-level="2"
> text:separation-character="."
> text:name="Listing"/></text:sequence-decls><text:h text:style-name="P6"
> text:outline-level="1"/><table:table table:name="Table1"
> table:style-name="Table1"><table:table-column
> table:style-name="Table1.A"/><table:table-column
> table:style-name="Table1.B"/><table:table-row
> table:style-name="Table1.1"><table:table-cell table:style-name="Table1.A1"
> office:value-type="string"><text:p text:style-name="P5"><draw:frame
> draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char"
> svg:width="1.857cm" svg:height="3.025cm" draw:z-index="0"><draw:image
> xlink:href="Pictures/100041D600001B2F00002FDA8AF7D675B9CA7740.wmf"
> xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
> loext:mime-type="image/x-wmf"/><draw:image
> xlink:href="Pictures/1000020100000107000001CF636AB597708AB63A.png"
> xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
> loext:mime-type="image/png"/></draw:frame></text:p></table:table-cell><table:table-cell
> table:style-name="Table1.A1" office:value-type="string"><text:p
> text:style-name="P5"><text:span text:style-name="T1">University of
> Toronto<text:tab/><text:tab/></text:span><text:span text:style-name="T2">
> <text:s text:c="2"/></text:span></text:p><text:p
> text:style-name="P5"><text:span text:style-name="T3">dept. of
> history</text:span><text:span text:style-name="T4">
> <text:s/></text:span></text:p><text:p text:style-name="P4"><text:span
> text:style-name="T5">Rm-2074 sidney smith, 100 st. george street, TORONTO,
> ONTARIO <text:s/>M5S 3G3 <text:s/>CANADA</text:span></text:p><text:p
> text:style-name="P4"><text:span text:style-name="T5">Telephone 416-978-3363
> <text:s text:c="3"/>Fax 416-978-4810
> <text:s/></text:span></text:p></table:table-cell></table:table-row></table:table><text:h
> text:style-name="P7" text:outline-level="1"><text:bookmark
> text:name="org54567cc"/>
> --------------------
>
> As you can see, one occurs at the beginning of the <office:text> element,
> and the other at the end. Can I somehow insert them on export?
>
> Thanks as always for your help.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]