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.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}}
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
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 %
}
LoadLetterOption{DINmtext}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage[T1]{fontenc}
usepackage[scaled=.92]{helvet}
%------------------- It's all about this part -----------------------
newcommand{unquad}{hskip-1.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}} % This is the icon I want to use
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
makeatother
%-------------------------------------------------------------------
usepackage{blindtext}
setkomavar{subject}{$leftarrow$ There should appear the icon glqq Spiel_Start.jpggrqq{}}
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
koma-script includegraphics scrlttr2
add a comment |
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.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}}
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
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 %
}
LoadLetterOption{DINmtext}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage[T1]{fontenc}
usepackage[scaled=.92]{helvet}
%------------------- It's all about this part -----------------------
newcommand{unquad}{hskip-1.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}} % This is the icon I want to use
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
makeatother
%-------------------------------------------------------------------
usepackage{blindtext}
setkomavar{subject}{$leftarrow$ There should appear the icon glqq Spiel_Start.jpggrqq{}}
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
koma-script includegraphics scrlttr2
What do you mean with "how the reference for the subject is called in sclttr2"?
– Kurt
Feb 25 at 10:53
I mean somthing like the "seccountformat" in scrartcl
– Michael Schmid
Feb 25 at 11:05
add a comment |
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.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}}
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
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 %
}
LoadLetterOption{DINmtext}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage[T1]{fontenc}
usepackage[scaled=.92]{helvet}
%------------------- It's all about this part -----------------------
newcommand{unquad}{hskip-1.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}} % This is the icon I want to use
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
makeatother
%-------------------------------------------------------------------
usepackage{blindtext}
setkomavar{subject}{$leftarrow$ There should appear the icon glqq Spiel_Start.jpggrqq{}}
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
koma-script includegraphics 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.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}}
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
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 %
}
LoadLetterOption{DINmtext}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage[T1]{fontenc}
usepackage[scaled=.92]{helvet}
%------------------- It's all about this part -----------------------
newcommand{unquad}{hskip-1.3emrelax}
DeclareRobustCommand{picturetodisplay}{includegraphics{Bilder/Spiel_Start.jpg}} % This is the icon I want to use
makeatletter
def@seccntformat#1{unquadunquadpicturetodisplayquad}
makeatother
%-------------------------------------------------------------------
usepackage{blindtext}
setkomavar{subject}{$leftarrow$ There should appear the icon glqq Spiel_Start.jpggrqq{}}
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
koma-script includegraphics scrlttr2
koma-script includegraphics scrlttr2
edited Feb 25 at 10:56
Kurt
38.5k848162
38.5k848162
asked Feb 25 at 10:21
Michael SchmidMichael Schmid
30517
30517
What do you mean with "how the reference for the subject is called in sclttr2"?
– Kurt
Feb 25 at 10:53
I mean somthing like the "seccountformat" in scrartcl
– Michael Schmid
Feb 25 at 11:05
add a comment |
What do you mean with "how the reference for the subject is called in sclttr2"?
– Kurt
Feb 25 at 10:53
I mean somthing like the "seccountformat" in scrartcl
– Michael Schmid
Feb 25 at 11:05
What do you mean with "how the reference for the subject is called in sclttr2"?
– Kurt
Feb 25 at 10:53
What do you mean with "how the reference for the subject is called in sclttr2"?
– Kurt
Feb 25 at 10:53
I mean somthing like the "seccountformat" in scrartcl
– Michael Schmid
Feb 25 at 11:05
I mean somthing like the "seccountformat" in scrartcl
– Michael Schmid
Feb 25 at 11:05
add a comment |
2 Answers
2
active
oldest
votes
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 %
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
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:

Thank You, Kurt. I added some hspace*{-3em}include.... hspace*{0.7em} .....To make the start of the subjects text aligning with the rest of the body
– Michael Schmid
Feb 25 at 11:03
add a comment |
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,%
subject=titled % <- added
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
setkomavar{subjectseparator}{makebox[0pt][r]{includegraphics[width=1.5em]{example-image}enskip}}% <- added
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).
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476569%2ficon-at-subject-line-scrlttr2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 %
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
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:

Thank You, Kurt. I added some hspace*{-3em}include.... hspace*{0.7em} .....To make the start of the subjects text aligning with the rest of the body
– Michael Schmid
Feb 25 at 11:03
add a comment |
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 %
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
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:

Thank You, Kurt. I added some hspace*{-3em}include.... hspace*{0.7em} .....To make the start of the subjects text aligning with the rest of the body
– Michael Schmid
Feb 25 at 11:03
add a comment |
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 %
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
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 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 %
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
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:

answered Feb 25 at 10:53
KurtKurt
38.5k848162
38.5k848162
Thank You, Kurt. I added some hspace*{-3em}include.... hspace*{0.7em} .....To make the start of the subjects text aligning with the rest of the body
– Michael Schmid
Feb 25 at 11:03
add a comment |
Thank You, Kurt. I added some hspace*{-3em}include.... hspace*{0.7em} .....To make the start of the subjects text aligning with the rest of the body
– Michael Schmid
Feb 25 at 11:03
Thank You, Kurt. I added some hspace*{-3em}include.... hspace*{0.7em} .....To make the start of the subjects text aligning with the rest of the body
– Michael Schmid
Feb 25 at 11:03
Thank You, Kurt. I added some hspace*{-3em}include.... hspace*{0.7em} .....To make the start of the subjects text aligning with the rest of the body
– Michael Schmid
Feb 25 at 11:03
add a comment |
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,%
subject=titled % <- added
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
setkomavar{subjectseparator}{makebox[0pt][r]{includegraphics[width=1.5em]{example-image}enskip}}% <- added
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).
add a comment |
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,%
subject=titled % <- added
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
setkomavar{subjectseparator}{makebox[0pt][r]{includegraphics[width=1.5em]{example-image}enskip}}% <- added
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).
add a comment |
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,%
subject=titled % <- added
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
setkomavar{subjectseparator}{makebox[0pt][r]{includegraphics[width=1.5em]{example-image}enskip}}% <- added
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).
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,%
subject=titled % <- added
}
LoadLetterOption{DINmtext}
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.jpggrqq{}}
setkomavar{subjectseparator}{makebox[0pt][r]{includegraphics[width=1.5em]{example-image}enskip}}% <- added
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).
answered Feb 25 at 12:00
esddesdd
59.5k34691
59.5k34691
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476569%2ficon-at-subject-line-scrlttr2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do you mean with "how the reference for the subject is called in sclttr2"?
– Kurt
Feb 25 at 10:53
I mean somthing like the "seccountformat" in scrartcl
– Michael Schmid
Feb 25 at 11:05