I am using scrlttr2
for a formal letter template. I am facing 3 problems:
(1) Logo in the header of the 1st page
I want a header logo on the first page in the top right corner above the header line, as shown on the following image:
This is the way it looks now (the wrong way):
(2) Logo in the footer of ALL pages
- I want the same logo in the footer as well and on the first and on all other pages. It has to look like that:
Now it looks like that (the wrong way):
(3) Logo in the header on all following pages
On all following pages, I want the logo to be still there, but without the contact details. It has to look like that:
Now it's just empty.
That's the code I used now:
\documentclass%%
[fontsize=11pt,
parskip=half,%%
fromalign=right,%%
fromphone=on,%%
fromfax=on,%%
fromrule=aftername,%%
fromemail=on,%%
fromlogo=true,%%
foldmarks=false,%%
firstfoot=true,%%
subject=titled,%%
pagenumber=botright,%%
]{scrlttr2}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{url}
\usepackage{graphicx}
\usepackage{eurosym}
\usepackage{lipsum}
\usepackage{selinput}
\usepackage{newcent}
\usepackage{lipsum}
\SelectInputMappings{
adieresis={ä},
germandbls={ß},
Euro={€},
}
\setkomafont{fromname}{\scshape \LARGE}
\setkomafont{backaddress}{\mdseries}
\makeatletter
\@setplength{firstheadvpos}{7mm}
\@setplength{firstfootvpos}{265mm}%%
\makeatother
\begin{document}
\setkomavar{fromaddress}{
my surname name\\
my streetname 21\\
my example city}
\setkomavar{fromphone}{+99\,(9)999)\,999\,999\,99}
\setkomavar{fromphone}{+99\,(9)999)\,999\,999\,99}
\setkomavar{fromfax}{+99\,(9)999)\,999\,999\,99}
\setkomavar{fromemail}{name@email-address.com}
\setkomavar{backaddressseparator}{ - }
\setkomavar{place}{city}
\setkomavar{signature}{example signature}
\setkomavar{frombank}{IBAN: 9999\,9999\,9999\,9999\,9999\,99\\
BIC: 12341234ABDC\\
example example example\vspace{0.1cm}\\
example example example example\\
example example example, example example example}
\setkomavar{fromlogo}{\includegraphics[scale=.2]{/home/philipp/Dropbox/briefvorlage_example_TechExchange/generic_logo.pdf}}
\setkomavar{firstfoot}{\footnotesize%
\rule[5pt]{472pt}{.3pt}\\
\begin{tabular}[t]{l@{}}%
\usekomavar{fromname}\\
\usekomavar{fromaddress}\\
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
\usekomavar{fromphone}\\
\usekomavar{fromfax}\\
\usekomavar{fromemail}\\
\end{tabular}%
\ifkomavarempty{frombank}{}{%
\hfill
\begin{tabular}[t]{l@{}}%
\usekomavar{frombank}
\end{tabular}%
}%
}%
\renewcaptionname{ngerman}{\enclname}{Anlagen}
\begin{letter}{Mr.\\surname name\\office\\street name\\postal code and city}\vspace{0.3cm}
\setkomavar{subject}{subject: example example example example example example example example example example example example example example example example example example example example example example example example}
\opening{Dear Mr. xxxxx xxxxxxxxxx,}
\lipsum[1-4]
\closing{Regards,}
\setkomavar*{enclseparator}{Enclosure(s):}
\encl{example enclosure}
\end{letter}
\end{document}
I was researching for several hours but without any success. These were the most useful posts I checked, unfortunately without any success: Logo in Briefkopf platzieren (place logo in header), Logo in a LaTeX header, Koma-Script letter class, Header and Footer does not show on second page (scrlttr2).
Any help is highly appreciated.
Best Answer
To solve the three problems you can do:
Logo in the header of the 1st page: to get the logo above the line, followed by the adress etc. the imho best way is to define an own
firsthead
like this:To activate this definition call the option
firsthead=true,
as class option.Logo in the footer of ALL pages: First you have to add the logo to the
firstfoot
like this:Then you need to define the
nextfoot
like this:Logo in the header on all following pages: To get the line and the logo to the header you call the class option
headsepline=true,
and add the following codeThen you get the following complete MWE:
with the following resulting pages:
and page 2:
BTW: in german letters the leading
Betrifft:
is not longer used ...