How to produce formal Indian-style Letters using Org-mode and OpenDocument exporter

A letter is unlike a text document

Lately, I have been interacting with many Government Departments, submitting applications forms for one reason or the other. In many instances, these applications had to be accompanied by a Cover Letter.

A formal letter is unlike a text document, and type-setting a letter poses a different type of challenge.

The components that make up the letter—the sender, the reciever, the subject line, the reference line, salutation, sign-off, place and date, signature—all have to be placed in specific positions on the paper, and the positions themselves depend on the culture one lives in.

In other words, while producing letters, the relative positioning of elements on the paper becomes a challenge.

That a letter is a beast which is unlike a a text document can be inferred from availability of packages like scrlttr2 – Koma-Script ‘letter’ class, and its Org-counterpart ox-koma-letter.el — KOMA Scrlttr2 Back-End for Org Export Engine.

As I have remarked elsewhere, most Emacs users use LaTeX for typesetting, and they have no need for using OpenDocument Format or LibreOffice. So, I couldn’t find any Emacs Lisp package that will help me author letters using LibreOffice; there are no counterparts to scrlttr2 or ox-koma-letter.el in LibreOffice-world. This meant that I had to scour the web, specifically the Emacs Stack Exchange, for a possible solution. Fortunately, I wasn’t disappointed.(1)

I outline here a quick recipe for how you may produce a formal Indian-style letter using Org-mode and The enhanced OpenDocument Exporter. This recipe is a slightly simplified version of the recipe shared on Emacs Stack Exchange. The solution relies on using a special-type of table, a Trascluded Table, for achieving the desired layout. A Transcluded Table is a type of table that is exclusive to the unofficial OpenDocument exporter . I have written about these tables in How to create a Table with multi-paragraph content & spanned cells using Emacs Org mode.

An Indian-style Letter

An Indian-style Letter


An Org recipe for producing the above letter

#+odt_preferred_output_format: png

#+ATTR_ODT: :target "extra_styles"
#+begin_src nxml
<style:style style:name="OrgVerse"
  <style:paragraph-properties fo:background-color="transparent"
                              style:shadow="none" />

#+ATTR_ODT: :widths "3,2,3"
|         |   | [fn:from] |
| [fn:to] |   |           |

Sir / Madam,

_*Sub*_:  /*Officia dolore excepteur velit sint*/\\
/*Pariatur aliquip magna proident,*/\\

Reprehenderit culpa excepteur pariatur aliquip dolore nulla irure
commodo nisi duis do qui culpa reprehenderit ullamco.  Amet, aliqua
nostrud dolore sunt dolore dolore voluptate labore deserunt ipsum eu
laboris id fugiat do nulla id exercitation et.  Incididunt qui duis
commodo mollit enim velit reprehenderit veniam,.  Minim aliquip id
magna sed ipsum in qui duis enim.  Aute ullamco sunt duis qui aliquip
enim nulla.

Officia voluptate do dolore lorem est velit elit, est cupidatat.
Exercitation cillum do cupidatat irure ipsum culpa laboris.

Thanking You,

|                     |   | [fn:sign-off]           |
|                     |   |                         |
| [fn:place-and-date] |   | [fn:name-and-signature] |

* Footnotes


# From

548 Market St
PMB 57274
San Francisco, California
94104-5401 US

May 13, 2023



  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110


Your Sincerely,

*Place*: San Francisco\\
*Date*: May 13, 2023


*The Linux Foundation*

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close