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: John Kitchin
Subject: Re: [O] letterhead and signature in odt export
Date: Wed, 31 Oct 2018 10:53:21 -0400
User-agent: mu4e 1.0; emacs 25.3.1

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 <address@hidden> 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 <address@hidden> 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 <address@hidden>
>> 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 <address@hidden> 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



reply via email to

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