3

Im tring to reuse the text of subject in the letter so right after \opening{}.

It is predefined like this:

\setkomavar{subject}{MySubjectText}

So im using this line several times in the text again and like to automate the print...

1
  • 1
    Maybe you are looking for \usekomavar{subject}?
    – esdd
    Commented Dec 5, 2016 at 14:52

2 Answers 2

4

With \usekomavar{subject} you can reuse your subject text:

\documentclass{scrlttr2}

\setkomavar{subject}{MySubjectText}

\begin{document}
\begin{letter}{xx}
\opening{Hello}

The subject text can be reused: \usekomavar{subject}

\closing{Regards}
\end{letter}
\end{document}
1

And i found out how to use different parts within the Komavar:

%subject
\newcommand{\presubject}{Appling as }
\newcommand{\subjectmain}{Software Test Engineer }
\newcommand{\subjectend}{(80\%)}

\setkomavar{subjectseparator}{}
\renewcaptionname{english}{\subjectname}{\presubject}
\setkomavar{subject}{\subjectmain\subjectend}

And use just the part of the jobtitle in the letter body like this:

\subjectmain

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .