* letterhead and signature in odt export
@ 2018-10-30 5:55 Matt Price
2018-10-30 6:54 ` Eric S Fraga
2018-10-30 7:31 ` Christian Moe
0 siblings, 2 replies; 18+ messages in thread
From: Matt Price @ 2018-10-30 5:55 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 6225 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 8517 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 5:55 letterhead and signature in odt export Matt Price
@ 2018-10-30 6:54 ` Eric S Fraga
2018-10-30 12:34 ` Matt Price
2018-10-30 7:31 ` Christian Moe
1 sibling, 1 reply; 18+ messages in thread
From: Eric S Fraga @ 2018-10-30 6:54 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
On Tuesday, 30 Oct 2018 at 01:55, Matt Price wrote:
> in North America it's letter-of-reference season for professors, and I am
> writing a lot of them.
I sympathise fully :)
> 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.
The documentation for odt export suggests that you can specify a style
file. If you create this file in libreoffice with your letterhead &
image, it should work. I've not tested this, mind you.
I use LaTeX, specifically the komascript letter style, but it does
require LaTeX knowledge to create the basic template.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 5:55 letterhead and signature in odt export Matt Price
2018-10-30 6:54 ` Eric S Fraga
@ 2018-10-30 7:31 ` Christian Moe
1 sibling, 0 replies; 18+ messages in thread
From: Christian Moe @ 2018-10-30 7:31 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: odt-styles-test.org --]
[-- Type: text/x-org, Size: 1001 bytes --]
#+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 #3: odt-test-styles.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 25920 bytes --]
[-- Attachment #4: Type: text/plain, Size: 6465 bytes --]
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 6:54 ` Eric S Fraga
@ 2018-10-30 12:34 ` Matt Price
2018-10-30 13:28 ` Eric S Fraga
0 siblings, 1 reply; 18+ messages in thread
From: Matt Price @ 2018-10-30 12:34 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
On Tue, Oct 30, 2018 at 2:54 AM Eric S Fraga <esflists@gmail.com> wrote:
> On Tuesday, 30 Oct 2018 at 01:55, Matt Price wrote:
> > in North America it's letter-of-reference season for professors, and I am
> > writing a lot of them.
>
> I sympathise fully :)
>
> > 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.
>
> The documentation for odt export suggests that you can specify a style
> file. If you create this file in libreoffice with your letterhead &
> image, it should work. I've not tested this, mind you.
>
> I use LaTeX, specifically the komascript letter style, but it does
> require LaTeX knowledge to create the basic template.
>
If you have a template, I'd appreciate seeing it! I had hoped maybe I could
add a filter for these xml fragments, but I don't see wwhich filter would
be relevant!
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
>
[-- Attachment #2: Type: text/html, Size: 1713 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 12:34 ` Matt Price
@ 2018-10-30 13:28 ` Eric S Fraga
2018-10-30 14:29 ` Jeff Filipovits
0 siblings, 1 reply; 18+ messages in thread
From: Eric S Fraga @ 2018-10-30 13:28 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Matt,
I've replied directly to you with some files.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 13:28 ` Eric S Fraga
@ 2018-10-30 14:29 ` Jeff Filipovits
2018-10-30 15:56 ` ckelty ckelty
2018-10-30 21:41 ` Tim Cross
0 siblings, 2 replies; 18+ messages in thread
From: Jeff Filipovits @ 2018-10-30 14:29 UTC (permalink / raw)
To: Matt Price, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
Would you mind sharing them? This is a problem I am trying to figure out as
well.
On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
> Matt,
>
> I've replied directly to you with some files.
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
>
>
[-- Attachment #2: Type: text/html, Size: 568 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 14:29 ` Jeff Filipovits
@ 2018-10-30 15:56 ` ckelty ckelty
2018-10-31 1:26 ` Matt Price
2018-10-30 21:41 ` Tim Cross
1 sibling, 1 reply; 18+ messages in thread
From: ckelty ckelty @ 2018-10-30 15:56 UTC (permalink / raw)
To: Jeff Filipovits; +Cc: emacs-orgmode
I don’t mess around with LibreOffice, but if you want to do it in Org, this is what I do and it works fine. Some of the preamble is superfluous— for various letters I’ve had to add other LaTeX packages….
ck
>
>
>
#+STARTUP: indent
#+LANGUAGE: en
#+OPTIONS: num:nil toc:nil ':t
#+AUTHOR: Your Name Here
#+EMAIL: Your Email Here
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[T1]{fontenc}
#+LATEX_HEADER: \usepackage{graphicx}
#+LATEX_HEADER: \usepackage{float}
#+LATEX_HEADER: \usepackage{wrapfig}
#+LATEX_HEADER: \usepackage{rotating}
#+LATEX_HEADER: \usepackage[normalem]{ulem}
#+LATEX_HEADER: \usepackage{hyperref}
#+LATEX_HEADER: \usepackage{setspace}
#+LATEX_HEADER: \usepackage{libertine}
#+LATEX_HEADER: \usepackage[left=1.5in,right=1.5in]{geometry}
#+LATEX_HEADER: \setlength{\parskip}{1em}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
# Insert your graphic here-- getting the scale right can take some work
\includegraphics[scale=0.145]{Your LetterHead PNG/JPG}
\hfill \today
[ Greeting Here ]
# I use setspace and onehalfspacing to control line spacing
\onehalfspacing
[ Insert Inflated Rhetoric About Here ]
Yours sincerely,\\
# Insert your sig here... ditto on scale.
\includegraphics[scale=0.4]{Your Sig PNG/JPG}
\textbf{Your Name}\\
Illustrious Title\\
Second Illustrious Title\\
Etc.\\
<
<
<
> On Oct 30, 2018, at 7:29 AM, Jeff Filipovits <jrfilipovits@gmail.com> wrote:
>
> Would you mind sharing them? This is a problem I am trying to figure out as well.
>
> On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
> Matt,
>
> I've replied directly to you with some files.
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 14:29 ` Jeff Filipovits
2018-10-30 15:56 ` ckelty ckelty
@ 2018-10-30 21:41 ` Tim Cross
2018-10-31 1:21 ` Matt Price
1 sibling, 1 reply; 18+ messages in thread
From: Tim Cross @ 2018-10-30 21:41 UTC (permalink / raw)
To: Jeff Filipovits; +Cc: emacs-orgmode
I've never delved into the XML nightmare that is ODT and stick with
latex/PDF export.
Here is how I handled needing to have a logo and banner at the top of my
documents. Essentially, it involves using the Latex 'minipage'
environment to setup the layout and the xcolor package to handle
colours. Getting it working is somewhat trial and error, but once you
have it, it is pretty much set and forget.
The below is an early version. I later refined it and put it into my
org-latex-classes variable, but removed it when I left the University
for a new employer. It should be fairly straight-forward to adapt to a
letter head. The only challenge will be if your Uni Marketing/PR are
very rigid re: format. In particular, fonts can be a challenge if they
have selected something unusual.
#+TITLE: XXXXXXXXX
#+AUTHOR: XXXXXXX
#+DATE: \today
#+SUBTITLE: IAM Use Case
#+OPTIONS: ^:nil num:nil toc:nil tags:nil |:t
#+LATEX_CLASS: une-article
#+LATEX-OPTIONS: 12pt,a4paper
#+LATEX_HEADER: \usepackage{xcolor}
#+LATEX_HEADER_EXTRA: \definecolor{unegreen}{HTML}{7AB800}
#+LATEX_HEADER_EXTRA: \definecolor{Black}{HTML}{000000}
#+LATEX_HEADER_EXTRA: \definecolor{White}{HTML}{FFFFFF}
#+LATEX_HEADER_EXTRA: \definecolor{dimgrey}{HTML}{696969}
#+LATEX_HEADER_EXTRA: \makeatletter
#+LATEX_HEADER_EXTRA: \def\@maketitle{
#+LATEX_HEADER_EXTRA: \noindent \begin{minipage}[c][4cm][t]{\linewidth}
#+LATEX_HEADER_EXTRA: \colorbox{Black}{%
#+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{4cm}
#+LATEX_HEADER_EXTRA: \flushleft
#+LATEX_HEADER_EXTRA: \includegraphics{~/Pictures/unelogo_medium.png}
#+LATEX_HEADER_EXTRA: \end{minipage}}
#+LATEX_HEADER_EXTRA: \colorbox{unegreen}{%
#+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{10cm}
#+LATEX_HEADER_EXTRA: \flushright
#+LATEX_HEADER_EXTRA: \Large \textbf{\color{White}{\@title}} \\
#+LATEX_HEADER_EXTRA: \vspace{4pt}
#+LATEX_HEADER_EXTRA: \small \color{White}{\@author} \\
#+LATEX_HEADER_EXTRA: \small \color{White}{\@date}
#+LATEX_HEADER_EXTRA: \end{minipage}}
#+LATEX_HEADER_EXTRA: \end{minipage}}
#+LATEX_HEADER_EXTRA: \makeatother
Jeff Filipovits <jrfilipovits@gmail.com> writes:
> Would you mind sharing them? This is a problem I am trying to figure out as
> well.
>
> On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
>
>> Matt,
>>
>> I've replied directly to you with some files.
>> --
>> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
>>
>>
--
Tim Cross
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 21:41 ` Tim Cross
@ 2018-10-31 1:21 ` Matt Price
2018-11-01 21:11 ` Tim Cross
0 siblings, 1 reply; 18+ messages in thread
From: Matt Price @ 2018-10-31 1:21 UTC (permalink / raw)
To: theophilusx; +Cc: jrfilipovits, Org Mode
[-- Attachment #1: Type: text/plain, Size: 3246 bytes --]
On Tue, Oct 30, 2018 at 5:41 PM Tim Cross <theophilusx@gmail.com> wrote:
>
> I've never delved into the XML nightmare that is ODT and stick with
> latex/PDF export.
>
> Here is how I handled needing to have a logo and banner at the top of my
> documents. Essentially, it involves using the Latex 'minipage'
> environment to setup the layout and the xcolor package to handle
> colours. Getting it working is somewhat trial and error, but once you
> have it, it is pretty much set and forget.
>
> The below is an early version. I later refined it and put it into my
> org-latex-classes variable, but removed it when I left the University
> for a new employer. It should be fairly straight-forward to adapt to a
> letter head. The only challenge will be if your Uni Marketing/PR are
> very rigid re: format. In particular, fonts can be a challenge if they
> have selected something unusual.
>
whew, OK, this is interesting. I guess you have written your own class
somewhere, is that right? And even though your header is defined in
latex_header it still somehow is included inside of \begin{document}?
... and if I turn this into an org latex class, then am I right that I an
simply set that latex_class header at the top of a document and all of this
will be handled for me autmagically on export? That would be fantastic.
Gonna follow up some more in response to ckelty, whose stuff I've been
working with thus far.
>
> #+TITLE: XXXXXXXXX
> #+AUTHOR: XXXXXXX
> #+DATE: \today
> #+SUBTITLE: IAM Use Case
> #+OPTIONS: ^:nil num:nil toc:nil tags:nil |:t
> #+LATEX_CLASS: une-article
> #+LATEX-OPTIONS: 12pt,a4paper
> #+LATEX_HEADER: \usepackage{xcolor}
> #+LATEX_HEADER_EXTRA: \definecolor{unegreen}{HTML}{7AB800}
> #+LATEX_HEADER_EXTRA: \definecolor{Black}{HTML}{000000}
> #+LATEX_HEADER_EXTRA: \definecolor{White}{HTML}{FFFFFF}
> #+LATEX_HEADER_EXTRA: \definecolor{dimgrey}{HTML}{696969}
> #+LATEX_HEADER_EXTRA: \makeatletter
> #+LATEX_HEADER_EXTRA: \def\@maketitle{
> #+LATEX_HEADER_EXTRA: \noindent \begin{minipage}[c][4cm][t]{\linewidth}
> #+LATEX_HEADER_EXTRA: \colorbox{Black}{%
> #+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{4cm}
> #+LATEX_HEADER_EXTRA: \flushleft
> #+LATEX_HEADER_EXTRA: \includegraphics{~/Pictures/unelogo_medium.png}
> #+LATEX_HEADER_EXTRA: \end{minipage}}
> #+LATEX_HEADER_EXTRA: \colorbox{unegreen}{%
> #+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{10cm}
> #+LATEX_HEADER_EXTRA: \flushright
> #+LATEX_HEADER_EXTRA: \Large \textbf{\color{White}{\@title}} \\
> #+LATEX_HEADER_EXTRA: \vspace{4pt}
> #+LATEX_HEADER_EXTRA: \small \color{White}{\@author} \\
> #+LATEX_HEADER_EXTRA: \small \color{White}{\@date}
> #+LATEX_HEADER_EXTRA: \end{minipage}}
> #+LATEX_HEADER_EXTRA: \end{minipage}}
> #+LATEX_HEADER_EXTRA: \makeatother
>
>
>
> Jeff Filipovits <jrfilipovits@gmail.com> writes:
>
> > Would you mind sharing them? This is a problem I am trying to figure out
> as
> > well.
> >
> > On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
> >
> >> Matt,
> >>
> >> I've replied directly to you with some files.
> >> --
> >> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
> >>
> >>
>
>
> --
> Tim Cross
>
[-- Attachment #2: Type: text/html, Size: 4178 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-30 15:56 ` ckelty ckelty
@ 2018-10-31 1:26 ` Matt Price
2018-10-31 1:30 ` Matt Price
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Matt Price @ 2018-10-31 1:26 UTC (permalink / raw)
To: ckelty; +Cc: jrfilipovits, Org Mode
[-- Attachment #1: Type: text/plain, Size: 2913 bytes --]
Hi again Chris!
OK, so I understand a little bit of this. I would like to keep all my
letters in subheadings in a single org doc, and just export once. This
version requires a fair amount of latex in every subtree. It would be nicer
if the exporter just took care of the latex for me and I didn't have to
look at it while I'm composing (I know that's not an issue for you,
Chris).
Is my best option to create an export-derived-backend based on latex (I see
that's what John K has done in scimax)? Or is the preferred method to
create a new latex class (whatever that is -- really I have no idea) and
add the header and closing lines to that?
Also... where should I go to learn more about latex (I have beengoogling,
I've found some places, am wondering what the *best* place is)? It appears
I am approaching adulthood and am ready to learn how to use it, after years
of resisting :-/
m
On Tue, Oct 30, 2018 at 11:56 AM ckelty ckelty <ckelty@gmail.com> wrote:
> I don’t mess around with LibreOffice, but if you want to do it in Org,
> this is what I do and it works fine. Some of the preamble is superfluous—
> for various letters I’ve had to add other LaTeX packages….
>
> ck
>
>
> >
> >
> >
>
> #+STARTUP: indent
> #+LANGUAGE: en
> #+OPTIONS: num:nil toc:nil ':t
> #+AUTHOR: Your Name Here
> #+EMAIL: Your Email Here
> #+LATEX_HEADER: \usepackage[utf8]{inputenc}
> #+LATEX_HEADER: \usepackage[T1]{fontenc}
> #+LATEX_HEADER: \usepackage{graphicx}
> #+LATEX_HEADER: \usepackage{float}
> #+LATEX_HEADER: \usepackage{wrapfig}
> #+LATEX_HEADER: \usepackage{rotating}
> #+LATEX_HEADER: \usepackage[normalem]{ulem}
> #+LATEX_HEADER: \usepackage{hyperref}
> #+LATEX_HEADER: \usepackage{setspace}
> #+LATEX_HEADER: \usepackage{libertine}
> #+LATEX_HEADER: \usepackage[left=1.5in,right=1.5in]{geometry}
> #+LATEX_HEADER: \setlength{\parskip}{1em}
> #+LATEX_HEADER: \setlength{\parindent}{0pt}
>
> # Insert your graphic here-- getting the scale right can take some work
> \includegraphics[scale=0.145]{Your LetterHead PNG/JPG}
>
> \hfill \today
>
> [ Greeting Here ]
>
> # I use setspace and onehalfspacing to control line spacing
> \onehalfspacing
>
> [ Insert Inflated Rhetoric About Here ]
>
> Yours sincerely,\\
>
> # Insert your sig here... ditto on scale.
> \includegraphics[scale=0.4]{Your Sig PNG/JPG}
>
> \textbf{Your Name}\\
> Illustrious Title\\
> Second Illustrious Title\\
> Etc.\\
>
>
> <
> <
> <
>
> > On Oct 30, 2018, at 7:29 AM, Jeff Filipovits <jrfilipovits@gmail.com>
> wrote:
> >
> > Would you mind sharing them? This is a problem I am trying to figure out
> as well.
> >
> > On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
> > Matt,
> >
> > I've replied directly to you with some files.
> > --
> > Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
> >
>
>
[-- Attachment #2: Type: text/html, Size: 3616 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-31 1:26 ` Matt Price
@ 2018-10-31 1:30 ` Matt Price
2018-10-31 3:04 ` Alan L Tyree
2018-10-31 3:50 ` ckelty ckelty
2018-10-31 14:53 ` letterhead and signature in odt export John Kitchin
2 siblings, 1 reply; 18+ messages in thread
From: Matt Price @ 2018-10-31 1:30 UTC (permalink / raw)
To: ckelty, Org Mode
[-- Attachment #1: Type: text/plain, Size: 2196 bytes --]
Oh shoot, I meant to include my sort-of working org text. Not sending the
image file, so you will I guess need to supply your own image in the
corner -- oh, and also the signature file! - but this is what I have. It
sorta works OK and looks at least a little bit like the History Department
letterhead. Which, I realize, is just a bunch of words written i nHelvetica
with a picture of a beaver next to it.
#+STARTUP: indent
#+LANGUAGE: en
#+OPTIONS: num:nil toc:nil ':t
#+AUTHOR: Matt Price
#+EMAIL: Your Email Here
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[T1]{fontenc}
#+LATEX_HEADER: \usepackage{graphicx}
#+LATEX_HEADER: \usepackage{float}
#+LATEX_HEADER: \usepackage{wrapfig}
#+LATEX_HEADER: \usepackage{rotating}
#+LATEX_HEADER: \usepackage[normalem]{ulem}
#+LATEX_HEADER: \usepackage{hyperref}
#+LATEX_HEADER: \usepackage{setspace}
#+LATEX_HEADER: \usepackage{libertine}
#+LATEX_HEADER: \usepackage[left=1.0in,right=1.0in]{geometry}
#+LATEX_HEADER: \setlength{\parskip}{1em}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER:
\newenvironment{temphelvet}{\fontfamily{phv}\selectfont}{\par}
# Insert your graphic here-- getting the scale right can take some work
\begin{minipage}{0.14\textwidth}
\includegraphics[width=1.8cm]{./Pictures/1000020100000107000001CF636AB597708AB63A.png}
\end{minipage}
\begin{minipage}{0.86\textwidth}
\begin{temphelvet}
{\huge University of Toronto}
\vspace{-2pt}
\hrule
\vspace{3pt}
\textbf{\textsc{dept. of history}} \newline
{\small \textsc{ Rm. 2074 sidney smith, 100 st. george street}, TORONTO,
ONTARIO M5S 3G3 CANADA \newline
\textsc{Telephone 416-978-3363 Fax 416-978-4810} }
\end{temphelvet}
\end{minipage}
\hfill \today
[ Greeting Here ]
# I use setspace and onehalfspacing to control line spacing
\onehalfspacing
[ Insert Inflated Rhetoric About Here ]
Yours sincerely,\\
# Insert your sig here... ditto on scale.
\includegraphics[scale=1.0]{/home/matt/Pictures/my-sig-black.png}
\textbf{Your Name}\\
Illustrious Title\\
Second Illustrious Title\\
Etc.\\
* build :noexport:
:PROPERTIES:
:CUSTOM_ID: build
:END:
#+begin_src emacs-lisp
(find-file (org-latex-export-to-pdf))
#+end_src
[-- Attachment #2: Type: text/html, Size: 2505 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-31 1:30 ` Matt Price
@ 2018-10-31 3:04 ` Alan L Tyree
0 siblings, 0 replies; 18+ messages in thread
From: Alan L Tyree @ 2018-10-31 3:04 UTC (permalink / raw)
To: emacs-orgmode
<SNIP>
WARNING: Not entirely on point
You might want to look at exporting to HTML and then using something
like weasyprint to produce the PDF.
I only mention this because I have been helping a friend produce ebooks
using markdown, pandoc and weasyprint. Using a modest amount of CSS
gives very good PDF results.
I haven't tried it with letterheads, but I'm sure it would work well.
Why markdown? It was hard enough getting my friend away from Word!!
Maybe I can get him onto emacs in a year or two.
Alan
--
Alan L Tyree http://www2.austlii.edu.au/~alan
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-31 1:26 ` Matt Price
2018-10-31 1:30 ` Matt Price
@ 2018-10-31 3:50 ` ckelty ckelty
2018-11-01 12:47 ` getting close on latex letterheads [was: letterhead and signature in odt export] Matt Price
2018-10-31 14:53 ` letterhead and signature in odt export John Kitchin
2 siblings, 1 reply; 18+ messages in thread
From: ckelty ckelty @ 2018-10-31 3:50 UTC (permalink / raw)
To: Matt Price; +Cc: jrfilipovits, Org Mode
Matt,
> On Oct 30, 2018, at 6:26 PM, Matt Price <moptop99@gmail.com> wrote:
>
> Hi again Chris!
>
> OK, so I understand a little bit of this. I would like to keep all my letters in subheadings in a single org doc, and just export once. This version requires a fair amount of latex in every subtree.
Unless I am misunderstanding, you should be able to restrict what you export to your subtree with a C-s (C-c C-e C-s l o) and just have one file with the Latex Headers at the top… or you can do what Tim suggested and put it in org-latex-classes variable (but I don’t know how to do that).
> It would be nicer if the exporter just took care of the latex for me and I didn't have to look at it while I'm composing (I know that's not an issue for you, Chris).
>
> Is my best option to create an export-derived-backend based on latex (I see that's what John K has done in scimax)? Or is the preferred method to create a new latex class (whatever that is -- really I have no idea) and add the header and closing lines to that?
You don’t need a new class— everything can be done in article or letter, which are standard LaTeX classes. But if you want to control formatting to any extent, you can’t escape having to learn a bit of LaTeX. Stick with the standard stuff and you won’t have trouble.
>
> Also... where should I go to learn more about latex (I have beengoogling, I've found some places, am wondering what the *best* place is)? It appears I am approaching adulthood and am ready to learn how to use it, after years of resisting :-/
>
Ahhh… that way lies madness. Welcome. I would learn as little LaTeX as necessary and allow org to do the rest. ShareLatex, Overleaf, and StackExchange are all fine starting points
ck
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-31 1:26 ` Matt Price
2018-10-31 1:30 ` Matt Price
2018-10-31 3:50 ` ckelty ckelty
@ 2018-10-31 14:53 ` John Kitchin
2 siblings, 0 replies; 18+ messages in thread
From: John Kitchin @ 2018-10-31 14:53 UTC (permalink / raw)
To: Matt Price; +Cc: jrfilipovits, Org Mode, ckelty
I went down the path of a custom latex style, with custom exporter some
years ago. At the time, I was head of our undergrad committee, and I had
to write a lot of memo style documents on department letterhead. This
setup allowed me to quickly write memos and export them to pdfs. I also
use this for other things like letters of recommendation these days. I
put each one in a separate file.
I defined this skeleton (which you run by typing M-x memo) that makes it
easy to get a memo started:
(define-skeleton memo
"CMU memo template"
nil
"#+LATEX_CLASS: cmu-memo
#+CC:
#+DEPARTMENT: Department of Chemical Engineering
#+FROM: John Kitchin
#+FROMNAME: John Kitchin
#+SIGNATURE-LINES: nil
#+SUBJECT: "_"
#+TO: "@"
#+latex_header: \\usepackage{setspace}
#+latex_header: \\doublespacing
Sincerely,\\\\
\\\\
\\\\
\\\\
John Kitchin
* build :noexport:
[[elisp:(cmu-memo-export-to-pdf-and-open)]]
")
Other solutions include a yasnippet, tempo, ...
I wrote an exporter you can find at
https://github.com/jkitchin/scimax/blob/master/ox-cmu/ox-cmu-memo.el
that uses the keywords to fill in parts of the document template.
Finally, I adapted
http://pi.math.cornell.edu/ADMIN/Computers/latex-letterhead/culetter.sty
to put all the header/logo info in and made it into a latex package. The
main reason for this is that the logo file is in the package, so I don't
have to know its path, worry about moving it, etc.
Knowing what I know now, and now my needs are a little simpler, I guess
you could avoid the sty file and achieve this via the exporter. It
mostly depends on where you want the information to get from org to
latex. Since I have some information in org-format, the exporter is
needed I think.
Regarding where to learn LaTeX, https://en.wikibooks.org/wiki/LaTeX
seems pretty good, but probably it won't help you understand that sty
file! That is written in tex.
There are many ways to get something suitable, I hope this helps!
Matt Price <moptop99@gmail.com> writes:
> Hi again Chris!
>
> OK, so I understand a little bit of this. I would like to keep all my
> letters in subheadings in a single org doc, and just export once. This
> version requires a fair amount of latex in every subtree. It would be nicer
> if the exporter just took care of the latex for me and I didn't have to
> look at it while I'm composing (I know that's not an issue for you,
> Chris).
>
> Is my best option to create an export-derived-backend based on latex (I see
> that's what John K has done in scimax)? Or is the preferred method to
> create a new latex class (whatever that is -- really I have no idea) and
> add the header and closing lines to that?
>
> Also... where should I go to learn more about latex (I have beengoogling,
> I've found some places, am wondering what the *best* place is)? It appears
> I am approaching adulthood and am ready to learn how to use it, after years
> of resisting :-/
>
> m
>
> On Tue, Oct 30, 2018 at 11:56 AM ckelty ckelty <ckelty@gmail.com> wrote:
>
>> I don’t mess around with LibreOffice, but if you want to do it in Org,
>> this is what I do and it works fine. Some of the preamble is superfluous—
>> for various letters I’ve had to add other LaTeX packages….
>>
>> ck
>>
>>
>> >
>> >
>> >
>>
>> #+STARTUP: indent
>> #+LANGUAGE: en
>> #+OPTIONS: num:nil toc:nil ':t
>> #+AUTHOR: Your Name Here
>> #+EMAIL: Your Email Here
>> #+LATEX_HEADER: \usepackage[utf8]{inputenc}
>> #+LATEX_HEADER: \usepackage[T1]{fontenc}
>> #+LATEX_HEADER: \usepackage{graphicx}
>> #+LATEX_HEADER: \usepackage{float}
>> #+LATEX_HEADER: \usepackage{wrapfig}
>> #+LATEX_HEADER: \usepackage{rotating}
>> #+LATEX_HEADER: \usepackage[normalem]{ulem}
>> #+LATEX_HEADER: \usepackage{hyperref}
>> #+LATEX_HEADER: \usepackage{setspace}
>> #+LATEX_HEADER: \usepackage{libertine}
>> #+LATEX_HEADER: \usepackage[left=1.5in,right=1.5in]{geometry}
>> #+LATEX_HEADER: \setlength{\parskip}{1em}
>> #+LATEX_HEADER: \setlength{\parindent}{0pt}
>>
>> # Insert your graphic here-- getting the scale right can take some work
>> \includegraphics[scale=0.145]{Your LetterHead PNG/JPG}
>>
>> \hfill \today
>>
>> [ Greeting Here ]
>>
>> # I use setspace and onehalfspacing to control line spacing
>> \onehalfspacing
>>
>> [ Insert Inflated Rhetoric About Here ]
>>
>> Yours sincerely,\\
>>
>> # Insert your sig here... ditto on scale.
>> \includegraphics[scale=0.4]{Your Sig PNG/JPG}
>>
>> \textbf{Your Name}\\
>> Illustrious Title\\
>> Second Illustrious Title\\
>> Etc.\\
>>
>>
>> <
>> <
>> <
>>
>> > On Oct 30, 2018, at 7:29 AM, Jeff Filipovits <jrfilipovits@gmail.com>
>> wrote:
>> >
>> > Would you mind sharing them? This is a problem I am trying to figure out
>> as well.
>> >
>> > On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
>> > Matt,
>> >
>> > I've replied directly to you with some files.
>> > --
>> > Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
>> >
>>
>>
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 18+ messages in thread
* getting close on latex letterheads [was: letterhead and signature in odt export]
2018-10-31 3:50 ` ckelty ckelty
@ 2018-11-01 12:47 ` Matt Price
2018-11-01 13:58 ` Eric S Fraga
0 siblings, 1 reply; 18+ messages in thread
From: Matt Price @ 2018-11-01 12:47 UTC (permalink / raw)
To: ckelty ckelty; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 5686 bytes --]
OK, so I'm getting close to being able to do this. My almost-working
example doc is at the bottom of this email, I have a question about
suppressing the headline text.
On Tue, Oct 30, 2018 at 11:50 PM ckelty ckelty <ckelty@gmail.com> wrote:
> Matt,
>
>
> > On Oct 30, 2018, at 6:26 PM, Matt Price <moptop99@gmail.com> wrote:
> >
> > Hi again Chris!
> >
> > OK, so I understand a little bit of this. I would like to keep all my
> letters in subheadings in a single org doc, and just export once. This
> version requires a fair amount of latex in every subtree.
>
> Unless I am misunderstanding, you should be able to restrict what you
> export to your subtree with a C-s (C-c C-e C-s l o) and just have one file
> with the Latex Headers at the top… or you can do what Tim suggested and put
> it in org-latex-classes variable (but I don’t know how to do that).
>
> I think I may actually understand this now. See my example below, which
almost works.
>
> >
> > Also... where should I go to learn more about latex (I have
> beengoogling, I've found some places, am wondering what the *best* place
> is)? It appears I am approaching adulthood and am ready to learn how to use
> it, after years of resisting :-/
> >
>
> Ahhh… that way lies madness. Welcome. I would learn as little LaTeX as
> necessary and allow org to do the rest. ShareLatex, Overleaf, and
> StackExchange are all fine starting points
>
> I'm definitely learning something, though yes, I feel a bit like the Mad
Hatter.
So I am pretty close. As you suggested, turns out I can put almost all the
latex in the document header. The only thing that still needs to go into
the letter body is the \mysig command that I have defined in the header.
This works fine if I have no headlines in the letter text, but if I try to
export a subtree, then I guess the headline gets read as a title, and
either org or latex inserts it immediately after my custom \maketitle
command.
It seems to me then that I either have to always set the export_title
property of subheadings to the empty string; add a temporary filter to
ox-latex; or just write my own derived backend that does al lthis work for
me, and maybe add a keybinding for that to make it easier to access (my
export dispatcher is getting pretty crowded...). Setting #+OPTIONS:
title:nil does not seem ot have any effect :-(
Still, maybe some of y'all have ideas on how to improve what I've already
got, which is below. Thanks again!
#+STARTUP: indent
#+LANGUAGE: en
#+OPTIONS: num:nil toc:nil ':t
#+AUTHOR
#+EMAIL: Your Email Here
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[T1]{fontenc}
#+LATEX_HEADER: \usepackage{graphicx}
#+LATEX_HEADER: \usepackage{float}
#+LATEX_HEADER: \usepackage{wrapfig}
#+LATEX_HEADER: \usepackage{rotating}
#+LATEX_HEADER: \usepackage[normalem]{ulem}
#+LATEX_HEADER: \usepackage{hyperref}
#+LATEX_HEADER: \usepackage{setspace}
#+LATEX_HEADER: \usepackage{libertine}
#+LATEX_HEADER: \usepackage[left=1.0in,right=1.0in]{geometry}
#+LATEX_HEADER: \setlength{\parskip}{1em}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER:
\newenvironment{temphelvet}{\fontfamily{phv}\selectfont}{\par}
#+LATEX_HEADER: \makeatletter
#+LATEX_HEADER: \def\@maketitle{
#+LATEX_HEADER: \begin{minipage}{0.14\textwidth}
#+LATEX_HEADER:
\includegraphics[width=1.8cm]{./Pictures/1000020100000107000001CF636AB597708AB63A.png}
#+LATEX_HEADER: \end{minipage}
#+LATEX_HEADER: \begin{minipage}{0.86\textwidth}
#+LATEX_HEADER: \begin{temphelvet}
#+LATEX_HEADER: {\huge University of Toronto}
#+LATEX_HEADER: \vspace{-2pt}
#+LATEX_HEADER: \hrule
#+LATEX_HEADER: \vspace{3pt}
#+LATEX_HEADER: \textbf{\textsc{dept. of history}} \newline
#+LATEX_HEADER: {\small \textsc{ Rm. 2074 sidney smith, 100 st. george
street}, TORONTO, ONTARIO M5S 3G3 CANADA \newline
#+LATEX_HEADER: \textsc{Telephone 416-978-3363 Fax 416-978-4810} }
#+LATEX_HEADER: \end{temphelvet}
#+LATEX_HEADER: \end{minipage}
#+LATEX_HEADER: \hfill}
#+LATEX_HEADER: \makeatother
#+LATEX_HEADER: \newcommand{\mysig}{
#+LATEX_HEADER: Please do not hesitate to contact me with any questions or
concerns.\\
#+LATEX_HEADER: Sincerely,\\
#+LATEX_HEADER: \fromsig{\includegraphics[scale=1]{my-sig.png}} \\
#+LATEX_HEADER: \fromname{Matt Price}
#+LATEX_HEADER: }
#
#+LATEX_HEADER_EXTRA: \maketitle
# #+LATEX_HEADER_EXTRA: \onehalfspacing
* Frankie
I had the pleasure of teaching Frankie Goes To Hollywood in my 4th year
seminar in Spring of 1987. Frankie stood out then as now as one of the
loudest students I had ever encountered. At the same time, Frankie's work
forced me to confront my own inability to *relax*. After years of
psychotherapy, I now believe that that seminar was one of the best parts of
my life. All the "trauma" Frankie caused me turn out to have been
excellent learning experiences.
It is thus with great pleasure that my therapist, I mean I, recommend
Frankie for your stupid fellowship.
\mysig
* Joey
Joey Ramone was a student in my class "School's out for Summer" at /Rock
and Roll High School/ some time in the late 1970's, I can't remember the
year exactly. Since the students burned the school down, and left me
without a job, I really can't see why the would have asked me for a letter
of reference, but I'm so alone and desolate that I agreed to write him one.
However, I really don't have a single good thing to say about him. I know
you're not reading these letters anyway, though, so I suppose I can say
whatever I want here. That Long Island school board still owes me money!
\mysig
[-- Attachment #2: Type: text/html, Size: 6569 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: getting close on latex letterheads [was: letterhead and signature in odt export]
2018-11-01 12:47 ` getting close on latex letterheads [was: letterhead and signature in odt export] Matt Price
@ 2018-11-01 13:58 ` Eric S Fraga
2018-11-02 2:28 ` Matt Price
0 siblings, 1 reply; 18+ messages in thread
From: Eric S Fraga @ 2018-11-01 13:58 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode, ckelty ckelty
Cannot help you on this but I did enjoy reading the references for the
students! :-)
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: letterhead and signature in odt export
2018-10-31 1:21 ` Matt Price
@ 2018-11-01 21:11 ` Tim Cross
0 siblings, 0 replies; 18+ messages in thread
From: Tim Cross @ 2018-11-01 21:11 UTC (permalink / raw)
To: Matt Price; +Cc: jrfilipovits, Org Mode
Matt Price <moptop99@gmail.com> writes:
> On Tue, Oct 30, 2018 at 5:41 PM Tim Cross <theophilusx@gmail.com> wrote:
>
>>
>> I've never delved into the XML nightmare that is ODT and stick with
>> latex/PDF export.
>>
>> Here is how I handled needing to have a logo and banner at the top of my
>> documents. Essentially, it involves using the Latex 'minipage'
>> environment to setup the layout and the xcolor package to handle
>> colours. Getting it working is somewhat trial and error, but once you
>> have it, it is pretty much set and forget.
>>
>> The below is an early version. I later refined it and put it into my
>> org-latex-classes variable, but removed it when I left the University
>> for a new employer. It should be fairly straight-forward to adapt to a
>> letter head. The only challenge will be if your Uni Marketing/PR are
>> very rigid re: format. In particular, fonts can be a challenge if they
>> have selected something unusual.
>>
>
> whew, OK, this is interesting. I guess you have written your own class
> somewhere, is that right? And even though your header is defined in
> latex_header it still somehow is included inside of \begin{document}?
>
Essentially, yes. I defined a new org-latex-class where all the
LATEX_HEADER_EXTRA lines below were put into the [EXTRA] section of the
org-latex-class definition. I then only needed to add the LATEX_CLASS
header line in my document and all would work. Note that there is an
order to how the elements in org-latex-class are processed and you do
have to get that correct - for example, the LATEX_HEADER line needs to
go into the [PACKAGES] section and the rest in the [EXTRA] section to
ensure things are put in the right order.
It will likely take some trial and error to get things correct and it
can be a little fragile i.e. if you had a long title/heading/author etc,
things may not wrap/align correctly. I'm sure someone with even more
Latex experience could do a better definition, but I found it worked
really well for me.
My suggestion would be to use a org template/skeleton file initially so
that it is easier to tweak and then once you have it nailed down, look
at defining a new org-latex-class entry.
I do recall it took me a few goes to really understand the
org-latex-class definition - but that could just be me being a bit slow!
> ... and if I turn this into an org latex class, then am I right that I an
> simply set that latex_class header at the top of a document and all of this
> will be handled for me autmagically on export? That would be fantastic.
>
> Gonna follow up some more in response to ckelty, whose stuff I've been
> working with thus far.
>
>>
>> #+TITLE: XXXXXXXXX
>> #+AUTHOR: XXXXXXX
>> #+DATE: \today
>> #+SUBTITLE: IAM Use Case
>> #+OPTIONS: ^:nil num:nil toc:nil tags:nil |:t
>> #+LATEX_CLASS: une-article
>> #+LATEX-OPTIONS: 12pt,a4paper
>> #+LATEX_HEADER: \usepackage{xcolor}
>> #+LATEX_HEADER_EXTRA: \definecolor{unegreen}{HTML}{7AB800}
>> #+LATEX_HEADER_EXTRA: \definecolor{Black}{HTML}{000000}
>> #+LATEX_HEADER_EXTRA: \definecolor{White}{HTML}{FFFFFF}
>> #+LATEX_HEADER_EXTRA: \definecolor{dimgrey}{HTML}{696969}
>> #+LATEX_HEADER_EXTRA: \makeatletter
>> #+LATEX_HEADER_EXTRA: \def\@maketitle{
>> #+LATEX_HEADER_EXTRA: \noindent \begin{minipage}[c][4cm][t]{\linewidth}
>> #+LATEX_HEADER_EXTRA: \colorbox{Black}{%
>> #+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{4cm}
>> #+LATEX_HEADER_EXTRA: \flushleft
>> #+LATEX_HEADER_EXTRA: \includegraphics{~/Pictures/unelogo_medium.png}
>> #+LATEX_HEADER_EXTRA: \end{minipage}}
>> #+LATEX_HEADER_EXTRA: \colorbox{unegreen}{%
>> #+LATEX_HEADER_EXTRA: \begin{minipage}[t][4cm][c]{10cm}
>> #+LATEX_HEADER_EXTRA: \flushright
>> #+LATEX_HEADER_EXTRA: \Large \textbf{\color{White}{\@title}} \\
>> #+LATEX_HEADER_EXTRA: \vspace{4pt}
>> #+LATEX_HEADER_EXTRA: \small \color{White}{\@author} \\
>> #+LATEX_HEADER_EXTRA: \small \color{White}{\@date}
>> #+LATEX_HEADER_EXTRA: \end{minipage}}
>> #+LATEX_HEADER_EXTRA: \end{minipage}}
>> #+LATEX_HEADER_EXTRA: \makeatother
>>
>>
>>
>> Jeff Filipovits <jrfilipovits@gmail.com> writes:
>>
>> > Would you mind sharing them? This is a problem I am trying to figure out
>> as
>> > well.
>> >
>> > On Tue, Oct 30, 2018, 9:29 AM Eric S Fraga <esflists@gmail.com> wrote:
>> >
>> >> Matt,
>> >>
>> >> I've replied directly to you with some files.
>> >> --
>> >> Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4
>> >>
>> >>
>>
>>
>> --
>> Tim Cross
>>
--
Tim Cross
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: getting close on latex letterheads [was: letterhead and signature in odt export]
2018-11-01 13:58 ` Eric S Fraga
@ 2018-11-02 2:28 ` Matt Price
0 siblings, 0 replies; 18+ messages in thread
From: Matt Price @ 2018-11-02 2:28 UTC (permalink / raw)
To: ckelty ckelty, Org Mode
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
On Thu, Nov 1, 2018 at 9:58 AM Eric S Fraga <esflists@gmail.com> wrote:
> Cannot help you on this but I did enjoy reading the references for the
> students! :-)
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4
>
Having @ckelty on the CC: list inspires me no end.
[-- Attachment #2: Type: text/html, Size: 574 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2018-11-02 2:28 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-30 5:55 letterhead and signature in odt export Matt Price
2018-10-30 6:54 ` Eric S Fraga
2018-10-30 12:34 ` Matt Price
2018-10-30 13:28 ` Eric S Fraga
2018-10-30 14:29 ` Jeff Filipovits
2018-10-30 15:56 ` ckelty ckelty
2018-10-31 1:26 ` Matt Price
2018-10-31 1:30 ` Matt Price
2018-10-31 3:04 ` Alan L Tyree
2018-10-31 3:50 ` ckelty ckelty
2018-11-01 12:47 ` getting close on latex letterheads [was: letterhead and signature in odt export] Matt Price
2018-11-01 13:58 ` Eric S Fraga
2018-11-02 2:28 ` Matt Price
2018-10-31 14:53 ` letterhead and signature in odt export John Kitchin
2018-10-30 21:41 ` Tim Cross
2018-10-31 1:21 ` Matt Price
2018-11-01 21:11 ` Tim Cross
2018-10-30 7:31 ` Christian Moe
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.