emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] ox-koma-letter
Date: Fri, 01 Mar 2013 14:17:26 +0100	[thread overview]
Message-ID: <m2zjynntsp.fsf@polytechnique.org> (raw)
In-Reply-To: <87vc9gkund.fsf@pank.eu>

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}}
\@addtoplength{firstfootvpos}{-2cm}
\setkomavar{firstfoot}{\includegraphics[width=4cm]{another logo}}
\setkomavar{fromemail}{alan.schmitt@...}

\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

  parent reply	other threads:[~2013-03-01 13:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 20:25 [patch] ox-koma-letter Rasmus
2013-02-26  9:50 ` Bastien
2013-02-26 11:53   ` Rasmus
2013-02-26 12:38 ` Michael Strey
2013-02-26 21:14   ` Rasmus
2013-02-27 10:51     ` Michael Strey
2013-02-27 12:13       ` Rasmus
2013-02-27 13:41         ` Sebastien Vauban
2013-02-27 16:48           ` Rasmus
2013-02-28 15:19         ` Michael Strey
2013-03-02 17:53           ` Rasmus
2013-03-01 13:17 ` Alan Schmitt [this message]
2013-03-02 10:26   ` Bastien
2013-03-02 15:50     ` Alan Schmitt
2013-03-02 18:12       ` Bastien
2013-03-02 17:54   ` Rasmus
2013-03-02 17:57   ` Rasmus
2013-03-02 19:21     ` Alan Schmitt
2013-03-02 21:58       ` Rasmus
2013-03-03 16:00         ` Alan Schmitt
2013-03-03 17:25           ` Nicolas Goaziou
2013-03-04  7:19             ` Alan Schmitt
2013-03-04  8:33               ` Nicolas Goaziou
2013-03-04  8:56                 ` Alan Schmitt
2013-03-04 10:38                   ` Rasmus
2013-03-04 20:38                     ` Nicolas Goaziou
2013-03-05  9:08                       ` Alan Schmitt
2013-03-05  9:52                         ` Nicolas Goaziou
2013-03-05 10:51                       ` Michael Strey
2013-03-05 12:23                         ` Rasmus
2013-03-05 13:09                           ` Michael Strey
2013-03-06  9:03                         ` Alan Schmitt
2013-03-06  9:09                           ` Nicolas Goaziou
2013-03-04 10:46               ` Michael Strey
2013-03-04 13:48                 ` Alan Schmitt
2013-03-04 21:20                 ` Rasmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2zjynntsp.fsf@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).