Hi,
Is someone working on producing a clean version of the changes
required to integrate this?
- Carsten
On Jul 28, 2010, at 4:23 PM, Eric Schulte wrote:
Hi Jambunathan,
This looks very useful, and the output of scrlttr2 looks great. I
think
two things can be done to make this more accessible to the wider
Org-mode community.
First it seems (as you mentioned) like the bulk of your changes can be
implemented without any change to the Org-mode core, but rather by
using
existing hooks (e.g. removing newlines in `org-export-latex-final-
hook'
and defining a scrlttr2 class in `org-export-latex-classes').
Second, a set of step-by-step instructions documenting how to
generate a
letter from an Org-mode file using your patch would make this much
more
approachable and would make a good addition to Worg.
I look forward to trying this out.
Thanks -- Eric
Jambunathan K <kjambunat...@gmail.com> writes:
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}
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode