[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Composing letters using org-mode and scrlttr2
From: |
Jambunathan K |
Subject: |
[Orgmode] Re: Composing letters using org-mode and scrlttr2 |
Date: |
Tue, 27 Jul 2010 00:17:40 +0530 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1 |
With reference to my earlier post,
(http://lists.gnu.org/archive/html/emacs-orgmode/2010-07/msg01060.html)
I would like to add the following clarification.
> #+LaTeX_CLASS_OPTIONS:
> [a4paper,parskip=full,backaddress=off,foldmarks=off,jambu]
All the styling and context-specific information comes from 'jambu' in
the LaTeX_CLASS_OPTIONS line. In this case, jambu is 'an lco file'
that in turn loads DIN.lco. (The later file comes with the standard
distribution)
The patch as such doesn't bother with the styling elements but merely
transforms content from org to scrlttr2 form. To illustrate,
* subject
Composing letters using org-mode and scrlttr2
section in org gets transformed in the final letter into the following
TeX form.
\setkomavar{subject} {
\label{sec-2}
Sub:- Composing letters using org-mode and scrlttr2
}
This is done as part of org-scrlttr2-sectioning defun in my earlier
patch.
Jambunathan K.
---> Input Org file <---
#+TITLE:
#+AUTHOR:
#+EMAIL:
#+LANGUAGE:
#+TEXT:
#+LaTeX_CLASS_OPTIONS:
[a4paper,fromalign=right,pagenumber=headmiddle,parskip=full,fromphone=true,fromfax=false,fromrule=false,fromemail=true,subject=afteropening,backaddress=off,foldmarks=off,jambu]
#+OPTIONS: toc:nil
#+LaTeX_CLASS: scrlttr2
* letter
Org Mode User Group \\
World Wide Web
* subject
Sub:- Composing letters using org-mode and scrlttr2
* opening
Dear Org Mode Users
* body
Lately, I have been composing formal letters using KOMA script's
sscrlttr2. I found it convenient to have them composed from within
org-mode.
I am enclosing the initial set of changes needed to compose some
simple letters as this one.
The only change that is too 'intrusive' seems to be an extra newline
which gets added immediately after the emission of labels. These
extra newlines trigger syntax errors in the closing{} and encl{}
directives.
I think rest of the changes could be squeeed in through existing
hooks.
#+BEGIN_EXAMPLE
- (insert (mapconcat (lambda (l) (format "\\label{%s}" l))
- label-list "\n") "\n"))
+ (insert (mapconcat (lambda (l) (format "\\label{%s}" l))
+ label-list "\n")))
#+END_EXAMPLE
If there is some general interest, I could work on making a formal
patch available.
* closing
Yours Truly
* encl
Patch from my work-area.
---> Output Tex file <---
% Created 2010-07-26 Mon 23:19
\documentclass[a4paper,fromalign=right,pagenumber=headmiddle,parskip=full,fromphone=true,fromfax=false,fromrule=false,fromemail=true,subject=afteropening,backaddress=off,foldmarks=off,jambu]{scrlttr2}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage{pdfpages}
\providecommand{\alert}[1]{\textbf{#1}}
\title{}
\author{}
\date{26 July 2010}
\begin{document}
\begin{letter} {
\label{sec-1}
Org Mode User Group \\
World Wide Web
}
\setkomavar{subject} {
\label{sec-2}
Sub:- Composing letters using org-mode and scrlttr2
}
\opening {
\label{sec-3}
Dear Org Mode Users
}
\label{sec-4}
Lately, I have been composing formal letters using KOMA script's
sscrlttr2. I found it convenient to have them composed from within
org-mode.
I am enclosing the initial set of changes needed to compose some
simple letters as this one.
The only change that is too `intrusive' seems to be an extra newline
which gets added immediately after the emission of labels. These
extra newlines trigger syntax errors in the closing\{\} and encl\{\}
directives.
I think rest of the changes could be squeeed in through existing
hooks.
\begin{verbatim}
- (insert (mapconcat (lambda (l) (format "\\label{%s}" l))
- label-list "\n") "\n"))
+ (insert (mapconcat (lambda (l) (format "\\label{%s}" l))
+ label-list "\n")))
\end{verbatim}
If there is some general interest, I could work on making a formal
patch available.
\closing {
\label{sec-5}
Yours Truly
}
\encl {
\label{sec-6}
Patch from my work-area.
}
\end{letter}
\end{document}