Let me know if you have any questions or suggestions. Jambunathan K. Jambunathan K writes: > This is a follow upon my earlier posts in the following threads: > > [1] 'Composing letters using org-mode and scrlttr2' > [2] Composingletters using Org mode and the LaTeX isodoc clas' > > I am attaching four files > - org-latex-generic.el > - org-letter-utils.el > - org-scrlttr2.el > - org-isodoc.el > > Functionality is easily explained by usage rather than by words. > > Usage Notes: > > 1. Load libraries > - (require 'isodoc) > - (require 'scrlttr2) > > 2. C-x C-f 'sample-letter.scrlttr2' and/or 'sample-isodoc.isodoc'. File > extensions are important and they are indicative of the LaTeX classes > targetted for export. > > 3. You will be offered a Org outline structure. Fill in the same. In the > 'To' address field you have an option just to insert a bbdb link as > opposed to the whole address. > > Remember to fill in the LCO file for scrlttr2 and style file for > isodoc. > > 4. Do a C-c C-e l or C-c C-e d. > > 5. See that your letter is nicely exported. > > 6. YMMV. > > Additional Notes: > > Files have helpful docstring. Core functionality is in > org-latex-generic-sectioning. Rest all are bells and whistles. > > ,----[ C-h f org-latex-generic-sectioning RET ] > | org-latex-generic-sectioning is a Lisp function in > | `org-latex-generic.el'. > | > | (org-latex-generic-sectioning LEVEL HEADING) > | > | Rules for emitting Org headings as LaTeX fragments. > | Currently a heading could be configured to start a LaTeX > | environment, emit a LaTeX command, set optional arguments (with > | heading as key and entry body as value) and mandatory > | arguments. See `org-latex-generic-scrlttr2-sectioning-alist' and > | `org-latex-generic-isodoc-sectioning-alist'. > | > | [back] > `---- > > Watch Out For: > > 1. Have no empty lines in .scrlttr2/.isodoc file. If that doesn't help > remove it from the generated tex file. > > I have a strong reason to believe org-latex.el is generating > extraneous newlines in (org-export-latex-subcontent ...) at line 1029 > or thereabouts. > > 2. Have no commas in the bbdb address field. C-h f > org-letter-utils-bbdb-export is probably not upto the task. > > 3. Remove \date directive in the isodoc tex file. > > 4. Also see FIXME notes in the org-latex-generic.el > > > Implementation Notes: > > The key idea is to mirror the LaTeX commands in terms of Org > headlines. Start with C-h f org-latex-generic-sectioning for further > exploring. Try mapping the headline structure of .scrlttr2/.isodoc file > with the corresponding tex file and compare it against the settings of > of different variables in the org-scrlttr2.el/org-isodoc.el > > Footnotes: > [1] http://lists.gnu.org/archive/html/emacs-orgmode/2010-07/msg01060.html > [2] http://lists.gnu.org/archive/html/emacs-orgmode/2010-09/msg00466.html > > > Jambunathan K. > > > Attachments: