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
    Maybe you are looking for \usekomavar{subject}? – esdd Dec 5 '16 at 14:52
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.