From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Remove \maketitle from scrlttr2 latex export Date: Sun, 31 Jul 2011 01:54:27 +0530 Message-ID: <81bowb8qkk.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnG5R-0007ui-2v for emacs-orgmode@gnu.org; Sat, 30 Jul 2011 16:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnG5P-0006aT-OW for emacs-orgmode@gnu.org; Sat, 30 Jul 2011 16:24:41 -0400 Received: from mail-pz0-f49.google.com ([209.85.210.49]:51946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnG5P-0006aL-5Y for emacs-orgmode@gnu.org; Sat, 30 Jul 2011 16:24:39 -0400 Received: by pzk33 with SMTP id 33so7375214pzk.8 for ; Sat, 30 Jul 2011 13:24:38 -0700 (PDT) In-Reply-To: (Peter de Jong's message of "Sat, 30 Jul 2011 16:14:02 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Peter de Jong Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello Peter Thanks for your interest in scrlttr2. > Hi, > > Since a few days i use the scrlttr2 org-mode implementation of > Jambunathan. His work was posted in this list: > http://lists.gnu.org/archive/html/emacs-orgmode/2010-09/msg01264.html > http://lists.gnu.org/archive/html/emacs-orgmode/2010-09/msg01266.html > > His 4 .el files are placed in ~/emacs/contrib/scrlttr2 and are loaded > in _emacs (commented out my own configuration). > I then start emacs, open brief.scrlttr2, Ctrl-c Ctrl-e d opens the > attached pdf file. I included the intermediate brief.tex. > > As the pdf shows, there is a for the most blank first page with "none" > from the \maketitle statement. Whatever i do, this statement keeps > getting generated. > > How can I remove this? > >From my end, I am seeing that \maketitle is no longer produced. Did you revert the org/scrlttr2 file after adding the following line? ,---- | #+BIND: org-export-latex-title-command "" `---- As an alternative you can also do a C-c C-c on the above line and you will find yourself being questioned with: ,---- | Allow BIND values in this buffer? (y or n) y `---- The generation of above query is controlled by the following variable ,----[ C-h v org-export-allow-BIND RET ] | org-export-allow-BIND is a variable defined in `org-exp.el'. | Its value is confirm | | Documentation: | Non-nil means allow #+BIND to define local variable values for export. | This is a potential security risk, which is why the user must confirm the | use of these lines. | | You can customize this variable. | | [back] `---- You may also want to check that variable. On export to scrlttr2, Org creates a "*Org PDF LaTeX Output*" buffer that contains some errors [1]. Inspite of this a pdf file is produced. The errors are because of extra newlines in \encl and \closing commands. The attached "patch" to org-latex.el removes this extra newline. If there is some interest from maintainer's side I can create a formal patch for org-latex.el[2]. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=org-latex-scrlttr2.patch Content-Description: org-latex-scrlttr2.patch diff --git a/lisp/org-latex.el b/lisp/org-latex.el index bd9c113..7196499 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1252,7 +1252,7 @@ numbered sections and lower levels as unnumbered sections." (setq start (if num (car sec) (cdr sec)))) (insert (format start (if main-heading main-heading heading) (or sub-heading ""))) - (insert "\n") + ;; (insert "\n") (when label (insert (mapconcat (lambda (l) (format "\\label{%s}" l)) label-list "\n") "\n")) --=-=-= Content-Type: text/plain As a side note, if the "to" section of the scrlttr2 file contains a bbdb link as below ,---- | ** to | [[bbdb:Richard%20Stallman][bbdb:Richard Stallman]] `---- and you have BBDB entry with the address for the above person as shown below ,---- | Richard Stallman - Free Software Foundation | Office: 51 Franklin St | Boston, MA 02110 | US | net: rms@gnu.org `---- then org-scrlttr2 is intelligent enough to expand the snail mail address automagically. Jambunathan K. Footnotes: [1] Dump of error lines while compiling tex file generated by scrlttr2. Note the reference to paragraphs in \encl and \closing lines. ,---- | Overfull \hbox (142.92982pt too wide) in paragraph at lines 43--43 | $[]$ | Location field: empty | Reference line: only place and date | Title: no | Subject: before opening | Runaway argument? | { | ! Paragraph ended before \encl was complete. | | \par | l.50 | | ! Extra }, or forgotten \endgroup. | l.57 } | | Runaway argument? | { | ! Paragraph ended before \closing was complete. | | \par | l.60 | | ! Extra }, or forgotten \endgroup. | l.62 } | | [1{C:/Documents and Settings/kjambunathan/Local Settings/Application Data/MiKTe | X/2.8/pdftex/config/pdftex.map}] | ("c:\Documents and Settings\kjambunathan\My Documents\My Data\tmp-orgmode\scrlt | tr2\sample-scrlttr2.aux") ) | (see the transcript file for additional information){C:/Program Files/MiKTeX 2. | 8/fonts/enc/dvips/fontname/8r.enc} | Output written on sample-scrlttr2.pdf (1 page, 26984 bytes). | Transcript written on sample-scrlttr2.log. `---- [2] scrlttr2 is a hack. Nevertheless a clean patch can be applied to org-latex.el by moving the "\n" to the sectioning options of org-export-latex-classes. -- --=-=-=--