* Remove \maketitle from scrlttr2 latex export
@ 2011-07-30 14:14 Peter de Jong
2011-07-30 20:24 ` Jambunathan K
[not found] ` <811ux6zkoh.fsf@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Peter de Jong @ 2011-07-30 14:14 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]
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?
With kind regards and much thanks in advance,
Peter de Jong
[-- Attachment #2: org-isodoc.el --]
[-- Type: application/octet-stream, Size: 1349 bytes --]
(require 'org-latex-generic)
(require 'org-letter-utils)
;; An isodoc file starts in org-latex-generic-mode
(setq auto-mode-alist (append '(("\\.isodoc$" . org-latex-generic-mode))
auto-mode-alist))
;; Register sectioning structure for isodoc class. For now use the
;; generic routine.
(add-to-list
'org-export-latex-classes
'("isodoc" "\\documentclass{isodoc}" org-latex-generic-sectioning) t)
(defcustom org-latex-generic-isodoc-setup
"
#+LaTeX_CLASS: isodoc
#+LATEX_HEADER: \\usepackage{mystyle}
#+OPTIONS: toc:nil
#+TITLE:
"
"Meta lines for isodoc class. Insert your own stylesheet."
:group 'org-letter-isodoc
:type 'string)
(defvar org-latex-generic-isodoc-template
'("letter"
("options"
("date" "to" "opening" "subject" "closing" "enclosures"))
("body"))
"Outline structure for isodoc file."
)
(defcustom org-latex-generic-isodoc-sectioning-alist
'(("letter" . cmd-with-opt)
("options" . optarg)
("date" . option)
("to" . option)
("opening" . option)
("subject" . option)
("closing" . option)
("enclosures" . option)
("body" . arg))
"Common LaTeX commands and Environment for use with isodoc class."
:group 'org-letter-isodoc
:type org-latex-generic-sectioning-config)
(provide 'org-isodoc)
[-- Attachment #3: org-latex-generic.el --]
[-- Type: application/octet-stream, Size: 3833 bytes --]
(require 'org)
(require 'org-latex)
(defvar org-latex-classes nil)
(defvar org-latex-generic-sectioning-config
'(alist :tag "Org LaTeX Generic Known Headings"
:key-type
(string :tag "heading")
:value-type
(choice
(const :tag "environment" env)
(const :tag "var" var)
(const :tag "command" cmd)
(const :tag "command-with-options" cmd-with-opt)
(const :tag "options" optarg)
(const :tag "option" option)
(const :tag "arg" arg)
(const :tag "text" text))))
(define-minor-mode org-latex-generic-mode
"Fill an empty file with Org outline tree for easy editing.
The extension of the file serves as an indication of the target
LaTeX class."
nil " LaTex Generic" nil
(org-mode)
(let ((class (file-name-extension buffer-file-name)))
;; FIXME: These should be buffer local variables for various
;; generic classes to coexist. For now have them as global.
;; The main problem is that sectioning callback happens with tex
;; file as current buffer and not the original org file in which
;; these variables are set.
(setq org-latex-generic-class class
org-latex-generic-setup
(symbol-value
(intern (format "org-latex-generic-%s-setup" class)))
org-latex-generic-template
(symbol-value
(intern (format "org-latex-generic-%s-template" class)))
org-latex-generic-sectioning-alist
(symbol-value
(intern (format "org-latex-generic-%s-sectioning-alist" class))))
(when (= (point-min) (point-max))
(insert org-latex-generic-setup)
(org-latex-generic-insert-template))))
(defun org-latex-generic-insert-template (&optional template level)
"Inserts an Org outline structure for the user to fill in.
See `org-latex-generic-isodoc-template' and
`org-latex-generic-scrlttr2-template' for example."
(interactive)
(setq template (or template org-latex-generic-template))
(goto-char (point-max))
(setq level (or level 1))
(dolist (e template)
(if (not (listp e))
(insert "\n" (make-string level ?*) " " e "\n")
(org-latex-generic-insert-template e (+ level 1)))))
(defun 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'. "
(let* ((heading (replace-regexp-in-string "\\s-+" "" heading))
(pair (assoc-string heading org-latex-generic-sectioning-alist t))
open close)
(when pair
(cond
((eq (cdr pair) 'env)
(setq open (format "\\begin{%s}\n" (car pair))
close (format "\\end{%s}" (car pair))))
((eq (cdr pair) 'var)
(setq open (format "\n\\setkomavar{%s} {" (car pair))
close "}"))
((eq (cdr pair) 'cmd)
(setq open "\n\\%s {"
close "}"))
((eq (cdr pair) 'cmd-with-opt)
(setq open "\n\\%s"
close ""))
((eq (cdr pair) 'optarg)
(setq open "[" close "]"))
((eq (cdr pair) 'option)
(setq open (format "%s =" (car pair)) close ","))
((eq (cdr pair) 'arg)
(setq open " {" close "}"))
((eq (cdr pair) 'text)
(setq open "" close ""))))
(remove-list-of-text-properties 0 (length heading) '(target) heading)
(list heading open close open close)))
(provide 'org-latex-generic)
[-- Attachment #4: org-letter-utils.el --]
[-- Type: application/octet-stream, Size: 853 bytes --]
(require 'org-bbdb)
(org-add-link-type "bbdb" 'org-bbdb-open 'org-letter-utils-bbdb-export)
(defun org-letter-utils-bbdb-export (path desc format)
"Convert a BBDB link to an address.
Customized for Indian style. Commas are a strict No No for
now. Make this sit nicely with `bbdb-format-address' and
friends."
(when (eq format 'latex)
(let* ((name path) (separator " \\\\\n")
(indent 2) (prefix (make-string indent ? ))
(addr (car (bbdb-record-addresses (bbdb-search-simple name nil)))))
(concat
prefix name separator
(mapconcat (lambda (line) (concat prefix line))
(bbdb-address-streets addr) separator) separator
prefix (bbdb-address-city addr) " - " (bbdb-address-zip addr) separator
prefix (bbdb-address-state addr)))))
(provide 'org-letter-utils)
[-- Attachment #5: org-scrlttr2.el --]
[-- Type: application/octet-stream, Size: 1236 bytes --]
(require 'org-latex-generic)
(require 'org-letter-utils)
;; An scrlttr2 file starts in org-latex-generic-mode
(setq auto-mode-alist (append '(("\\.scrlttr2$" . org-latex-generic-mode))
auto-mode-alist))
;; Register sectioning structure for Scrlttr2 class. For now use the
;; generic routine.
(add-to-list
'org-export-latex-classes
'("scrlttr2" "\\documentclass{scrlttr2}" org-latex-generic-sectioning) t)
(defcustom org-latex-generic-scrlttr2-setup
"
#+LaTeX_CLASS: scrlttr2
#+LaTeX_CLASS_OPTIONS: [DIN]
#+OPTIONS: toc:nil
"
"Meta lines for scrlttr2 class. Plug in your LCO file."
:group 'org-scrlttr2
:type 'string)
(defvar org-latex-generic-scrlttr2-template
'("letter"
("to" "subject" "opening" "body" "encl" "closing"))
"Outline structure for scrlttr2 file."
)
(defcustom org-latex-generic-scrlttr2-sectioning-alist
'(("letter" . env)
("to" . arg)
("subject" . var)
("opening" . cmd)
("body" . text)
("encl" . cmd)
("closing" . cmd))
"Common LaTeX commands and Environment for use with scrlttr2 class."
:group 'org-letter-scrlttr2
:type org-latex-generic-sectioning-config)
(provide 'org-scrlttr2)
[-- Attachment #6: _emacs --]
[-- Type: application/octet-stream, Size: 276 bytes --]
;; load path
;(add-to-list 'load-path "~/emacs/")
;; load loader
;(require 'conf-loader)
;; load path
(add-to-list 'load-path "~/emacs/contrib/org-7.7/lisp")
(add-to-list 'load-path "~/emacs/contrib/scrlttr2")
;; scrlttr2 support
(require 'org-isodoc)
(require 'org-scrlttr2)
[-- Attachment #7: brief.scrlttr2 --]
[-- Type: application/octet-stream, Size: 400 bytes --]
#+LaTeX_CLASS: scrlttr2
#+LaTeX_CLASS_OPTIONS: [pdj]
#+OPTIONS: toc:nil
#+TITLE:
#+AUTHOR:
#+DATE:
#+BIND: org-export-latex-title-command ""
* letter
** to
Bla
** subject
Composing letters using scrlttr2
** opening
Friends
** body
I would like to share with you a little utility that helps me
compose formal letters within Org mode. Would you like to try it?
** closing
Thanks
[-- Attachment #8: pdj.lco --]
[-- Type: application/octet-stream, Size: 290 bytes --]
\setkomavar{fromname}[Afzender]{Peter de Jong}
\setkomavar{fromemail}{p.de.jong@gmail.com}
\setkomavar{fromphone}{555-1337}
\setkomavar{fromzipcode}{0000 XX}
\setkomavar{signature}{\usekomavar{fromname}}
\setkomavar{fromaddress}{Somewhere\\Nederland}
\setkomavar{subject}{Onderwerp}
[-- Attachment #9: brief.pdf --]
[-- Type: application/pdf, Size: 42702 bytes --]
[-- Attachment #10: brief.tex --]
[-- Type: application/x-tex, Size: 779 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remove \maketitle from scrlttr2 latex export
2011-07-30 14:14 Remove \maketitle from scrlttr2 latex export Peter de Jong
@ 2011-07-30 20:24 ` Jambunathan K
2011-07-31 11:55 ` Peter de Jong
[not found] ` <811ux6zkoh.fsf@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2011-07-30 20:24 UTC (permalink / raw)
To: Peter de Jong; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]
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].
[-- Attachment #2: org-latex-scrlttr2.patch --]
[-- Type: text/plain, Size: 490 bytes --]
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"))
[-- Attachment #3: Type: text/plain, Size: 1983 bytes --]
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.
| <to be read again>
| \par
| l.50
|
| ! Extra }, or forgotten \endgroup.
| l.57 }
|
| Runaway argument?
| {
| ! Paragraph ended before \closing was complete.
| <to be read again>
| \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}<C:/Program Files/MiKTeX 2.8/fonts/type1/urw/
| helvetic/uhvr8a.pfb><C:/Program Files/MiKTeX 2.8/fonts/type1/urw/times/utmr8a.p
| fb>
| 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.
--
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Remove \maketitle from scrlttr2 latex export
2011-07-30 20:24 ` Jambunathan K
@ 2011-07-31 11:55 ` Peter de Jong
2011-07-31 12:30 ` Jambunathan K
0 siblings, 1 reply; 5+ messages in thread
From: Peter de Jong @ 2011-07-31 11:55 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 5369 bytes --]
Perhaps this is indeed a latex issue related to the scrlttr2 class.
I have reverted back to Jambu's original .scrlttr2 file, added the
BIND, changed [jambu] to [pdj] for the LCO, removed the *encl section.
I also applied the patch to org-latex.el.
No maketitle appears in the .tex, but from the commandline i also have errors:
/----
| (c:\Users\pjo16137\Dropbox\Organizer\export\brief.aux)
| ("C:\Program Files (x86)\MiKTeX\tex\latex\base\ts1cmr.fd")
| ! Undefined control sequence.
| \select@language ... \@empty }\languageshorthands
| {none}\babel@beginsave \cs..
| l.24 \begin{document}
|
| ?
\----
Maybe this error results in the blank first page with "none".
This issue has not much to do anymore with org-mode, I'll try to find
some Latex help.
Thanx Jambu for the help.
2011/7/30 Jambunathan K <kjambunathan@gmail.com>:
>
> 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].
>
>
>
>
> 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.
> | <to be read again>
> | \par
> | l.50
> |
> | ! Extra }, or forgotten \endgroup.
> | l.57 }
> |
> | Runaway argument?
> | {
> | ! Paragraph ended before \closing was complete.
> | <to be read again>
> | \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}<C:/Program Files/MiKTeX 2.8/fonts/type1/urw/
> | helvetic/uhvr8a.pfb><C:/Program Files/MiKTeX 2.8/fonts/type1/urw/times/utmr8a.p
> | fb>
> | 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.
>
> --
>
>
--
Met vriendelijke groet,
Peter de Jong
[-- Attachment #2: brief.tex --]
[-- Type: application/x-tex, Size: 786 bytes --]
[-- Attachment #3: brief.scrlttr2 --]
[-- Type: application/octet-stream, Size: 373 bytes --]
#+BIND: org-export-latex-title-command ""
#+LaTeX_CLASS: scrlttr2
#+LaTeX_CLASS_OPTIONS: [pdj]
#+OPTIONS: toc:nil
* letter
** to
Bla
** subject
Composing letters using scrlttr2
** opening
Friends
** body
I would like to share with you a little utility that helps me
compose formal letters within Org mode. Would you like to try it?
** closing
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remove \maketitle from scrlttr2 latex export
2011-07-31 11:55 ` Peter de Jong
@ 2011-07-31 12:30 ` Jambunathan K
0 siblings, 0 replies; 5+ messages in thread
From: Jambunathan K @ 2011-07-31 12:30 UTC (permalink / raw)
To: Peter de Jong; +Cc: emacs-orgmode
Peter de Jong <p.de.jong@gmail.com> writes:
> Perhaps this is indeed a latex issue related to the scrlttr2 class.
> I have reverted back to Jambu's original .scrlttr2 file, added the
> BIND, changed [jambu] to [pdj] for the LCO, removed the *encl section.
> I also applied the patch to org-latex.el.
You can add the #+BIND line to the following variable.
,----[ C-h v org-latex-generic-scrlttr2-setup RET ]
| org-latex-generic-scrlttr2-setup is a variable defined in `org-scrlttr2.el'.
| Its value is
| "\n#+LaTeX_CLASS: scrlttr2\n#+LaTeX_CLASS_OPTIONS: [DIN]\n#+OPTIONS: toc:nil\n"
|
| Documentation:
| Meta lines for scrlttr2 class. Plug in your LCO file.
|
| You can customize this variable.
|
| [back]
`----
> No maketitle appears in the .tex, but from the commandline i also have errors:
> /----
> | (c:\Users\pjo16137\Dropbox\Organizer\export\brief.aux)
> | ("C:\Program Files (x86)\MiKTeX\tex\latex\base\ts1cmr.fd")
> | ! Undefined control sequence.
> | \select@language ... \@empty }\languageshorthands
> | {none}\babel@beginsave \cs..
> | l.24 \begin{document}
> |
> | ?
> \----
>
> Maybe this error results in the blank first page with "none".
I am using MikTex as well. With following changes your brief.tex, the
file compiles fine for me and things are OK (I see NO "none" page)
,----
| Replace \documentclass[pdj]{scrlttr2} with \documentclass[jambu]{scrlttr2}
|
| Remove the following packages (which I don't have installed )
| \usepackage{marvosym}
| \usepackage{wasysym}
| \usepackage{latexsym}
`----
I am pretty sure that "none" page has something to do with your pdj.lco
file or how you have installed the scrlttr2 class.
FWIW, my lco file begins with the following lines followed by lots of
komavars.
,----
| \ProvidesFile{jambu}[10 letter-class-option]
|
| \usepackage{times} \usepackage[utf8]{inputenc}
| \usepackage[T1]{fontenc}
| \usepackage[english]{babel}
| \usepackage{url}
|
| \LoadLetterOption{DIN}
`----
ISTM (and I am not latex user in even remote sense of the word)
including babel package with appropriate langauge would set the things
right for you. Also I am using the "D1N" as the base LCO file. You may
also want to check the base LCO file picked by your setup.
Jambunathan K.
>
> This issue has not much to do anymore with org-mode, I'll try to find
> some Latex help.
>
> Thanx Jambu for the help.
>
> 2011/7/30 Jambunathan K <kjambunathan@gmail.com>:
>>
>> 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].
>>
>>
>>
>>
>> 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.
>> | <to be read again>
>> | \par
>> | l.50
>> |
>> | ! Extra }, or forgotten \endgroup.
>> | l.57 }
>> |
>> | Runaway argument?
>> | {
>> | ! Paragraph ended before \closing was complete.
>> | <to be read again>
>> | \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}<C:/Program Files/MiKTeX 2.8/fonts/type1/urw/
>> | helvetic/uhvr8a.pfb><C:/Program Files/MiKTeX 2.8/fonts/type1/urw/times/utmr8a.p
>> | fb>
>> | 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.
>>
>> --
>>
>>
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remove \maketitle from scrlttr2 latex export
[not found] ` <CAH-FKQbp-p+AtJuNQP7y1tk=rWc0k4vXpL_QT6tHMQT+h=NMqA@mail.gmail.com>
@ 2011-08-01 11:05 ` Peter de Jong
0 siblings, 0 replies; 5+ messages in thread
From: Peter de Jong @ 2011-08-01 11:05 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
Adding [dutch]{babel} package to the LCO file fixed the issue. I'm
very pleased with the result!
Thank you again.
2011/7/31 Peter de Jong <p.de.jong@gmail.com>:
> Yup, it's the way to go, i agree.
>
> 2011/7/31 Jambunathan K <kjambunathan@gmail.com>:
>>
>> Peter
>>
>> (Sorry about spamming you)
>>
>> Does the example here work for you
>> http://en.wikibooks.org/wiki/LaTeX/Letters
>>
>> Atleast you can isolate the issue to your lco file this way.
>>
>> Jambunathan K.
>>
>
>
>
> --
> Met vriendelijke groet,
>
> Peter de Jong
>
--
Met vriendelijke groet,
Peter de Jong
[-- Attachment #2: brief.pdf --]
[-- Type: application/pdf, Size: 78972 bytes --]
[-- Attachment #3: pdj.lco --]
[-- Type: application/octet-stream, Size: 399 bytes --]
\ProvidesFile{pdj.lco}[]
\usepackage[dutch]{babel}
\setkomavar{fromname}[Afzender]{Peter de Jong}
\setkomavar{fromemail}{p.de.jong@gmail.com}
\setkomavar{fromphone}{+31-(0)XI-XXXXXXXX}
\setkomavar{fromzipcode}{XXXX XX}
\setkomavar{signature}{\usekomavar{fromname}}
\setkomavar{fromaddress}{Blaheerd 8X\\XXXX XX Stad\\Nederland}
\setkomavar{fromlogo}{\includegraphics*[width=34mm]{pdj}}
[-- Attachment #4: pdj.pdf --]
[-- Type: application/pdf, Size: 33974 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-01 11:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-30 14:14 Remove \maketitle from scrlttr2 latex export Peter de Jong
2011-07-30 20:24 ` Jambunathan K
2011-07-31 11:55 ` Peter de Jong
2011-07-31 12:30 ` Jambunathan K
[not found] ` <811ux6zkoh.fsf@gmail.com>
[not found] ` <CAH-FKQbp-p+AtJuNQP7y1tk=rWc0k4vXpL_QT6tHMQT+h=NMqA@mail.gmail.com>
2011-08-01 11:05 ` Peter de Jong
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).