# Icon at Subject-line scrlttr2

I want to add a small icon right left of the Subject line in a scrlttr2 file. I already managed this for a scrartcl file, but don't now how to do this in a letter. Can you help me?

The code from the scrartcl.cls is:

\newcommand{\unquad}{\hskip-1.3em\relax}
\DeclareRobustCommand{\picturetodisplay}{\includegraphics{Bilder/Spiel_Start.jpg}}
\makeatletter
\makeatother


Does anyone know, how the reference for the subject is called in scrlttr2?

MWE

\documentclass[a4paper, fontsize=10pt, DIV 14]{scrlttr2}
\KOMAoptions{%
locfield=wide, %
fromalign=left,%
fontsize=10pt, %
parskip=half   %
}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[scaled=.92]{helvet}

\DeclareRobustCommand{\picturetodisplay}{\includegraphics{Bilder/Spiel_Start.jpg}} % This is the icon I want to use
\makeatletter
\makeatother
%-------------------------------------------------------------------

\usepackage{blindtext}

\setkomavar{subject}{$\leftarrow$ There should appear the icon \glqq Spiel\_Start.jpg\grqq{}}
\begin{document}
\setkomavar{fromname}{Me}
\begin{letter}{Jon Doe}
\opening{Hey,}
\blindtext

\closing{Thank You. Over and out}

\end{letter}

\end{document}


The hacked scrartcl sections look like this:

Thank you Michael

• I mean somthing like the "seccountformat" in scrartcl – Michael Schmid Feb 25 at 11:05

You can simply add \includegraphics[width=1cm]{example-image-a} at the point where you want to get the icon. Because I do not have your used image I simply used image example-image-a.jpg frpm package MWE (which must be installed but not called!).

See the complete code (I deleted your code of the code snippet because it is not needed/used here):

\documentclass[a4paper, fontsize=10pt, DIV 14]{scrlttr2}
\KOMAoptions{%
locfield=wide, %
fromalign=left,%
fontsize=10pt, %
parskip=half   %
}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[scaled=.92]{helvet}
\usepackage{graphicx}

\usepackage{blindtext}

\setkomavar{subject}{\includegraphics[width=1cm]{example-image-a}$\leftarrow$ There should appear the icon \glqq Spiel\_Start.jpg\grqq{}}

\begin{document}
\setkomavar{fromname}{Me}
\begin{letter}{Jon Doe}
\opening{Hey,}
\blindtext

\closing{Thank You. Over and out}

\end{letter}

\end{document}


and the resulting pdf:

You could use variable subjectseparator:

\documentclass[a4paper, fontsize=10pt, DIV=14]{scrlttr2}% <- syntax changed: DIV=14
\KOMAoptions{%
locfield=wide, %
fromalign=left,%
fontsize=10pt,%
parskip=half,%
}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[scaled=.92]{helvet}
\usepackage{graphicx}

\usepackage{blindtext}

\setkomavar{subject}{$\leftarrow$ There should appear the icon \glqq Spiel\_Start.jpg\grqq{}}

\begin{document}
\setkomavar{fromname}{Me}
\begin{letter}{Jon Doe}
\opening{Hey,}
\blindtext
\closing{Thank You. Over and out}
\end{letter}
\end{document}


Result:

Additional remark regarding your scrartcl hack: if you use a KOMA-Script class, avoid the redefinition of an internal command. You could redefine \sectionlinesformat or maybe \sectionformat (depending on the desired result).