Am 02.09.2008 um 09:42 schrieb Jürgen Spitzmüller:
Joachim Kreimer-de Fries wrote:
Sorry, I tried to find out the version by searching "koma-script"
...
You can find it e.g. in $TEXMF/tex/latex/koma-script/scrartcl.cls:
[EMAIL PROTECTED]/12/24 v2.98 KOMA-Script}%
OK, lets have a look, there are 2 scrartcl.cls on my HD with
different items:
1. in /usr/local/texlive/2007/texmf-dist/tex/latex/koma-script/
scrartcl.cls
- it has: [EMAIL PROTECTED]/07/30 v2.95b KOMA-Script}%
which seems outdatet, BUT
2. in home ~/Library/texmf/tex/latex/koma-script/scrartcl.cls
- that says: [EMAIL PROTECTED]/12/24 v2.98 KOMA-Script}%
You can add \listfiles to the preamble, then the version numbers
will appear
at the end of you LaTeX log file.
==> Result: the first entries are:
scrlttr2.cls 2007/12/24 v2.98 KOMA-Script document class (letter)
scrkbase.sty 2007/12/24 v2.98 KOMA-Script package (basics and
keyval use)
So I hopefully suppose that LyX/LaTeX use(s) the newer v2.98 KOMA-
Script version, but nevertheless my koma-letter2.lyx template does
not run and should be corrected. It seems to me, that, in this
template, Class Options mostly begin with a comma (,) - in order to
get the options - even after different out- and uncommenting by the
user - within the \KOMAoptions{} command comma-seperated, but my
given template
=> in ~/Library/Application Support/LyX-1.5/templates/default
the first option (not commented out in the template) begins with a
comma:
,fromalign=center% alignment of the address
and causes the latex-error.
As another workarround (after the first aid of Jürgen) I uncommented
the "pagenumber=..." option two lines before in the template -
interesting: the first one of the outcommented options without a
comma before (because uncommenting it was the first intention of the
template authors?)! -This gives anyway a good solution, because
nevertheless the pagenumber will only be typesetted if the letter has
more than one page (and then only beginning with page 2), and in that
case it normally should be wanted by the author of a letter.
Now, also in LyX this part of my KOMA-letter2 template preamble looks
like
%% THE CLASS OPTIONS
%% Remove preceeding '%' to uncomment an item
\KOMAoptions{%
%,headsepline=true% separate the header with a line on page >1
%,footsepline=true% separate the footer with a line on page >1
%pagenumber=botcenter% position of the page number (see docu)
%,parskip=false% Use indent instead of skip (more options cf. docu)
,fromalign=center% alignment of the address
,fromrule=aftername% separate the address with a line?
,fromphone=true% print sender phone number
%,fromfax=true% print sender fax number
%, and so on and so forth...
}
With this, the template works as it is (so that everytime I call it
with "file | new from template ..." I am free to choose other options.
Bad luck: only after working on this answer I detected that in the
KOMA-letter2.lyx template within the LyX-application packet (in: /
Applications/LyX.app/Contents/Resources/templates/
there is a functioning KOMA-letter2-template. "pagenumber=" is still
commented out, but the first uncommented option (here: "fromalign=")
begins without comma. So, this template would work too. Might be that
I, after upgrading LyX, had missed/failed to copy the templates newly
into my home-template-folder. Perhaps I should test this with other
disfunctioning lyx templates, too (when needed)...
Howsoever, the KOMA-letter2.lyx template now works correct on my
computer!
joachim
Kreimer-de Fries, Berlin
/Applications/LyX.app/Contents/Resources/templates/koma-letter2.lyx:
\KOMAoptions{%
%,headsepline=true% separate the header with a line on
page >1
%,footsepline=true% separate the footer with a line on
page >1
%pagenumber=botcenter% position of the page number (see docu)
%,parskip=false% Use indent instead of skip (more options
cf. docu)
fromalign=center% alignment of the address
,fromrule=aftername% separate the address with a line?
% etc. etc.
}