emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [patch] ox-koma-letter


From: Alan Schmitt
Subject: Re: [O] [patch] ox-koma-letter
Date: Fri, 01 Mar 2013 14:17:26 +0100
User-agent: mu4e 0.9.9.5-dev6; emacs 24.2.1

Hi,

Sorry for not replying earlier, I've been in a mode where I let my
orgmode mail accumulate.

Rasmus writes:

> I have changed the following objects:
>
>   1. Make keys sane; no reason why open pdf is O rather than o and why
>      k is used in place of l (as in the tex exporter).

Yes, it's nice to be consistent with the other exporters. Keys were
chosen when latex export was not hierarchic, so keys had to be disjoint.

>   2. Added AFTER_CLOSING and AFTER_LETTER keywords for arbitrary code
>      after \closing{.} and \end{letter}, respectively.
>      a. A weird bug I don't understand is why I cannot have
>         #+AFTER_CLOSING{\ps{ps:}}
>      b. Would it be better to have a dedicated, say, PS and ENCL rather
>         than the generic AFTER_CLOSING?

As the order matters, as said in some replies, I prefer the
AFTER_CLOSING approach.

>   3. Added from-bank, invoice and other keywords like that.  Still
>      many to go, but some of them would probably need some thought.
>      For instance firstfoot should work differently depending on
>      whether it is given a NAMEd table or a string.  Any though? 

I rely on an lco for that. To give you an idea of my setup, here it is.

A letter starts like this:

#+BEGIN_SRC org
#+latex_class: my-letter-fr
#+lco: InriaRennesFR
#+title: Lettre de Recommandation pour ...
#+opening: ~
#+closing: ~

blah blah
#+END_SRC

My latex class looks like this:

#+BEGIN_SRC elisp
(add-to-list 'org-latex-classes
             '("my-letter-fr"
               "\\documentclass\[%
  DIV=14,
  fontsize=10pt,
  parskip=half,
  subject=untitled,
  backaddress=true,
  fromalign=right,
  fromemail=true,
  fromphone=false\]\{scrlttr2\}
  \[DEFAULT-PACKAGES]
  \[PACKAGES]
  \[EXTRA]"))
#+END_SRC

(I realize writing this that it is ugly: some should go in the lco
file. I just hacked this until it worked.)

Finally, my lco file

#+BEGIN_SRC latex
\ProvidesFile{InriaRennesFR.lco}

\usepackage[french]{babel}
\usepackage{xltxtra}

\setkomavar{fromname}{Alan Schmitt}
\setkomavar{fromaddress}{Projet ...\\Company}
\setkomavar{place}{blab bla}
\setkomavar{date}{le \today}

\setkomavar{signature}{\includegraphics[width=2.5cm]{AlanSig}\\Alan Schmitt}

\KOMAoptions{fromlogo=true,foldmarks=off,subject=left,addrfield=false}
\setkomavar{fromlogo}{\includegraphics[width=59mm]{somelogo}}
address@hidden
\setkomavar{firstfoot}{\includegraphics[width=4cm]{another logo}}
address@hidden

\endinput
#+END_SRC

I found that with this setup I can quickly write a letter. If someday
I need letters with a different setup, I just need to change the lco.

Alan



reply via email to

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