Oscar <[EMAIL PROTECTED]> writes:
> Andre Berger wrote:
> >
> > My own letter layout is still unfinished (better: unfurbished) yet
> > because I don't really understand the LyX concept. I'd like to add an
> > item to a letter layout, like "\closing" (you know what I mean),
> > called "\Anlagenzahl". It should do a "\renewcommand". Taken the
> >
> > # Closing style definition
> > Style Closing
> > CopyStyle Letter
> > LatexType Command
> > LatexName closing
> > KeepEmpty 0
> > TopSep 1.5
> > BottomSep 1.5
> > ParSep 1.5
> > Align Left
> > AlignPossible Left
> > LabelString "Grussformel:"
> > End
> >
> > how can I put a "\renewcommand{\Anlagenzahl}{What the user fills in}" into
> > this construction?
>
> I am not pretty sure if I correctly understand your problem because I
> don't really know what the command Anlagenzahl does, but anyway. The
> following style allows you to redefine the command Anlagenzahl to output
> some unformatted text #1, when you use this style after the label
> Grussformel you must put the text that you want to display in the output
>
> # Closing style definition
> Style Closing
> CopyStyle Letter
> LatexType Anlagenzahl
> LatexName closing
> KeepEmpty 0
> TopSep 1.5
> BottomSep 1.5
> ParSep 1.5
> Align Left
> AlignPossible Left
> LabelString "Grussformel:"
> Preamble
> \renewcommand{\Anlagenzahl}[1]{#1}
> EndPreambl
> End
Thank you. I made my own .cls for a multi-user purpose. It'ss a very
dirty hack of scrlettr.cls, and I'm forced to use a certain document
structure.
\input{briefkopfAndre}%user's letter head
\input{briefMain}%compute width of minipage for From
\renewcommand{\Anrede}{Herrn/Frau/Firma}%To the german pendant of Mr.,
Mrs. etc (in english; not in koma-script)
\renewcommand{\AnlagenZahl}{0}%number of enclosures, ifthen use \AnlagenNamen
\renewcommand{\AnlagenNamen}{Name1 \newline Name2}
\input{briefMisc}%Compute USING THE RENEW'd COMMANDS
...
So to point it out, I'm obliged to use the \renewcommand at a certain
point, which is not in the preamble. The structure itself work in LyX
if I use the TeX style. But this looks ugly esp. in LyX, so I'd like
to create input fields for \Anrede, \AnlagenZahl, and \AnlagenNamen.
Sorry to not have been clear enough.
Andre