From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Composing letters using org-mode and scrlttr2 Date: Sat, 21 Aug 2010 06:52:21 +0200 Message-ID: References: <4C4CA9F8.7010006@gmail.com> <4C4DD84C.4060605@gmail.com> <87wrsf4otd.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=49676 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Omg4G-0004m1-58 for emacs-orgmode@gnu.org; Sat, 21 Aug 2010 00:52:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Omg4A-0008F7-5f for emacs-orgmode@gnu.org; Sat, 21 Aug 2010 00:52:31 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:38022) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omg49-0008Ez-Rf for emacs-orgmode@gnu.org; Sat, 21 Aug 2010 00:52:26 -0400 Received: by eyg7 with SMTP id 7so2783976eyg.0 for ; Fri, 20 Aug 2010 21:52:24 -0700 (PDT) In-Reply-To: <87wrsf4otd.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org, Jambunathan K 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 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