I am pretty sure someone will come up with something much better...
Basically in the lco file you show above frommobilephone is defined but not used anywhere. So I went along and defined a \newkomavar{mobile}
and used it in a redefinition of firsthead (\setkomavar{firsthead}{...}
). I am fairly sure there is a better way of doing it that does not involve hard-coding of \Telefon
and \Mobilefone
in this definition but I was not able to figure that out straight away.
\documentclass[fromphone,]{scrlttr2}%
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=guillemets]{csquotes}
\usepackage[T1]{fontenc}
\usepackage{marvosym} % Fuer Telefon-, Handy- und Briefsymbol
\newkomavar[\Mobilefone]{mobile}
\setkomavar{mobile}{(01\,79)~1\,23\,45\,6}
\setkomavar{fromname}{Michael~Ebner}
\setkomafont{fromname}{\bfseries\large}%
\setkomavar{signature}{Michael~Ebner}
\setkomavar{fromaddress}{Strasse~1\\37000~G\"ottingen}
\setkomavar{backaddress}{Michael~Ebner,~Strasse~1,~37000~G\"ottingen}
\setkomavar{place}{G\"ottingen}
\setkomavar{fromphone}{(05\,51)~1\,23\,45\,67}
\setkomavar{mobile}{(01\,79)~1\,23\,45\,67}
\setkomavar{fromemail}{a@b.de}
\setkomavar{date}{\today}
\setkomavar{subject}{Betref}
\setkomavar*{enclseparator}{Anlagenn}
\setkomavar{firstfoot}{} % no bank information
\setkomavar{firsthead}{%
\noindent
\parbox[b]{\useplength{firstheadwidth}}{%
\noindent%
\raggedleft%
{\bfseries\large\usekomavar{fromname}}\\%
\rule{\useplength{firstheadwidth}}{1pt}\\%
\usekomavar{fromaddress}\\%
\Telefon\enskip\usekomavar{fromphone}\\%
\Mobilefone\enskip\usekomavar{mobile}\\%
\Email\enskip\usekomavar{fromemail}
}%
}%
\begin{document}
\begin{letter}%
{Musterfirma \\ Musterbereich \\ Herr Hans Mustermann \\ Musterstrasse \\ 55555 Musterhausen}
\opening{Sehr geehrte Damen und Herren,}
\closing{Mit freundlichen Grüßen}
\enlargethispage{6\baselineskip}\medskip
\noindent Anlagen
\end{letter}
\end{document}
Not a direct answer to the initial question. However, kind of a working solution, by hardcoding distances (which is, of course, not what is asked for).
Corrections and hints to improve the outlook more than welcome. For example, how to correctly place the signature at the footer's location.
custom_AsymTypB.lco
% Custom Template for an Invoice (Letter)
% Based on:
% asymTypB.lco
% Copyright 2008 Markus Kohm
% Metadata about this file
\ProvidesFile{asymTypB.lco}%
[2011/09/20 v0.2 unsupported LCO-file]%
% DIN 676 B
\LoadLetterOption{DINmtext}%
% Place letter body to the left
\setlength{\oddsidemargin}{\useplength{toaddrhpos}}%
\addtolength{\oddsidemargin}{-2.54cm}%
% Again... ?
\AfterCalculatingTypearea{%
\setlength{\oddsidemargin}{\useplength{toaddrhpos}}%
\addtolength{\oddsidemargin}{-2.54cm}%
}%
\activateareas
% Head
\@setplength{firstheadvpos}{0pt}%
\@setplength{firstheadwidth}{\paperwidth}%
% Foot
\@setplength{firstfootvpos}{\paperheight}%
\@addtoplength[-]{firstfootvpos}{\useplength{toaddrvpos}}%
% Reference
\@addtoplength{refvpos}{-1.5\baselineskip}%
% New variable(s) here!
\newkomavar{company}%
\newkomavar{professiona}%
\newkomavar{professionb}%
\newkomavar{fromvatin}%
\newkomavar{fromlinkedin}%
% New variables that concern the client here!
\newkomavar*[Your VAT\,in]{yourvatin}%
% Set pseudo-length for infocol
\@newplength{infocolwidth}%
\ifdim \textwidth<0.666\paperwidth% How is this supposed to work?
\@setplength{infocolwidth}{.2\paperwidth}%
\else
\@setplength{infocolwidth}{.21\paperwidth}%{0.1667\paperwidth}%
\fi
% Set Head first... ?
\setkomavar{firsthead}{%
\fontsize{9}{10}\sffamily% Font size(s)
\hspace*{\fill}%
\begin{picture}(0,0)%
% Logo?
\put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
\vspace{\useplength{toaddrvpos}}%
\usekomavar{fromlogo}%
}%
}%
% Date only
\put(-224,0){\parbox[t]{2.45\useplength{infocolwidth}}{%
\flushright
\vspace{\useplength{refvpos}}%
\vspace{\useplength{refaftervskip}}%
\usekomavar{place}\\%
\usekomavar{date}%
}
}
% Main block of Info-Column
\put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
\raggedright%
\vspace{\useplength{refvpos}}%
\vspace{\useplength{refaftervskip}}
\vspace{8\baselineskip}%
\usekomavar{fromname}\\[\baselineskip]%
\ifkomavarempty{company}{}{%
\\
\usekomavar{company}\\%
}%
\usekomavar{professiona}\\[\baselineskip]%
\usekomavar{professionb}\\[\baselineskip]%
\usekomavar{fromaddress}\\[\baselineskip]%
\usekomavar*{fromphone}\usekomavar{fromphone}\\[\baselineskip]%
\ifkomavarempty{fromfax}{}{%
\\
\usekomavar*{fromfax}\usekomavar{fromfax}%
}%
\usekomavar{fromemail}\\[\baselineskip]%
%\usekomavar{fromurl}\\%
\usekomavar{fromlinkedin}\\[\baselineskip]%
\usekomavar[\textbf{\textcolor{lightgray06}{VAT\,in}}\\]{fromvatin}%
}%
}%
% Banking information
\put(-200,0){\parbox[t]{2.45\useplength{infocolwidth}}{%
\flushright
\vspace{\useplength{firstfootvpos}}%
\vspace{-\footskip}%
\usekomavar{frombank}%
}%
}%
\end{picture}%
\hspace*{\useplength{infocolwidth}}%
}%
\KOMAoption{refline}{nodate}
\setkomavar{nexthead}{%
\@tempswatrue
\if@twoside\ifodd\number\value{page}\else
\@tempswafalse
\fi\fi
\if@tempswa
\makebox[0pt][l]{%
\hspace*{-\oddsidemargin}\hspace{-1in}%
\hspace{\paperwidth}%
\hspace{-\useplength{infocolwidth}}%
\normalfont\fontsize{7}{8}\sffamily
\begin{picture}(0,0)
\put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
\vspace*{-\topmargin}\vspace{-1in}%
\vspace{-\headheight}%
\vspace{\useplength{toaddrvpos}}%
\begin{tabular}{@{}c@{}}
\usekomavar{fromlogo}\\
\usekomavar{company}\\
\end{tabular}%
}%
}%
\end{picture}%
}%
\fi
}%
\pagestyle{headings}%
\endinput
custom_invoice_template.tex
% custom invoice template -- Minimal Working Example
% Based on:
% brieftemplate.tex
% Copyright 2008 Markus Kohm
\RequirePackage{fix-cm}
% \usepackage{mathpazo}
\usepackage[LGR,T1]{fontenc} % Also for ``Greek'' Content?
\usepackage[latin9]{inputenc}
\usepackage{babel}
\usepackage{geometry}
\geometry{verbose,tmargin=0cm,bmargin=0cm}
\setlength{\parskip}{\smallskipamount}
% No indentation at all!
\setlength{\parindent}{0pt}
% Colors
\usepackage{color}
\usepackage{xcolor}
% define marine blue
\definecolor{marineblue}{rgb}{0.05,0.1,0.4}
\definecolor{marineblue2}{rgb}{0.05,0.1,0.5}
% define lightgray
\definecolor{lightgray08}{gray}{0.8}
\definecolor{lightgray06}{gray}{0.6}
\definecolor{lightgray04}{gray}{0.4}
\definecolor{lightgray02}{gray}{0.2}
\usepackage{array}
\usepackage{textcomp}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{charter}
\usepackage[scaled]{helvet}
\usepackage[scaled=0.87]{luximono}
% \usepackage[scaled=0.92]{frutigernext}% Does not play nice!
%
\usepackage{setspace}
\setstretch{1.15}
% hyperref
\usepackage[%
pdftitle={PDF-Title},
pdfauthor={Author},
pdfsubject={PDF-Subject},
pdfkeywords={keyword1, keyword2, keyword3},
linkcolor=magenta,
urlcolor=marineblue2,
citecolor=blue,
pdfstartview={FitH},
hyperfootnotes=false,
unicode=true,
bookmarks=false,
breaklinks=false,
pdfborder={0 0 0},
backref=false,
colorlinks=true]{hyperref}
% \providecommand{\SetSize}{%
% \AtBeginDvi{\special{papersize=210mm,210mm}}%
% \AtBeginDocument{%
% \ifpdfoutput{%
% \pdfpagewidth=210mm
% \pdfpageheight=210mm
% }{}%
% }%
% }
% \SetSize
%
\makeatletter
% Martin Vogels Symbols
\usepackage{marvosym}
\usepackage{ocr}
%% Remove preceeding '%' to uncomment an item
\KOMAoptions{%
DIV=last%
,headsepline=true% separate the header with a line on page >1
%,footsepline=true% separate the footer with a line on page >1
%pagenumber=botcenter% position of the page number (see docu)
,parskip=full-% Use indent instead of skip (more options cf. docu)
%,fromalign=center% alignment of the address
,fromrule=aftername% separate the address with a line?
,fromphone=true% print sender phone number
,fromfax=false% print sender fax number
,fromemail=true% print sender e-mail address
,fromurl=true% print sender URL
,fromlogo=true% print a logo (position depends on fromalign)
%,addrfield=false% print an address field?
% ,backaddress=false% print the back address?
,subject=centered%,titled% alternative subject layout and position
%,locfield=narrow% width of the (extra) location field
,foldmarks=true% print foldmarks?
% ,numericaldate=true% date layout
,refline=narrow% layout of the refline
}
%% Customize Separators
\setkomavar{placeseparator}{~}%\setkomavar{placeseparator}{ -- }
\setkomavar{backaddressseparator}{ $\cdot$ }
%\setkomavar{emailseparator}{ --> }
\setkomavar{enclseparator}{ > }
%\setkomavar{faxseparator}{ --> }
%\setkomavar{phoneseparator}{ --> }
%\setkomavar{subjectseparator}{ >>> }
%% Customize fonts
%% Use LaTeX's standard font commands
%% Modify with \setkomafont or \addtokomafont
%% (see KOMA documentation)
% \setkomafont{backaddress}{\rmfamily}
%\setkomafont{descriptionlabel}{}
% \setkomafont{fromaddress}{\small}
\setkomafont{fromname}{\scshape}
%\setkomafont{pagefoot}{}
%\setkomafont{pagehead}{}
%\setkomafont{pagenumber}{}
%\setkomafont{title}{}
\addtokomafont{title}{\color{lightgray04}}
%\setkomafont{subject}{}
\addtokomafont{subject}{\color{lightgray06}}
\addtokomafont{foldmark}{\color{lightgray08}}
% Place, Location
% \setkomavar{placeseparator
\setkomavar{place}{\textcolor{lightgray04}{SomePlace, SomeCountry}}
% \setkomavar{location}
% Logo
\setkomavar{fromlogo}{\includegraphics[clip,width=3cm,height=3cm,bb = 0 0 200 100, draft, type=eps]{qr_coded_mecard}\\
{\scriptsize{\textcolor{lightgray}{MECARD}\hfill{}}}}
% Name
\setkomavar{fromname}{\textcolor{lightgray04}{\textsc{FirstName \textbf{LastName}}, Title}}
% Signature
\setkomavar{signature}{\includegraphics[width=84mm,height=24mm,keepaspectratio,bb = 0 0 200 100, draft, type=eps]{signature}\\
{\small{Fisrt & Last Name}}}
% Professional Identity / Company
\setkomavar{company}{\textcolor{lightgray04}{Company}}
% Professional Identities
\setkomavar{professiona}{\textcolor{lightgray06}{Profession A}}
\setkomavar{professionb}{\textcolor{lightgray04}{Profession B}\\%
\textcolor{lightgray06}{Profession B Related Info}}
% VATin
\setkomavar{fromvatin}{\textcolor{lightgray04}{\ocr{XX\,111\,222\,333}\\Financial Service\\SomePlace, SomeCountry}}
% Address(es)
\setkomavar{fromaddress}{{\large\textcolor{lightgray06}{\Letter}}~\\{\color{lightgray04}{Street Nr.\\Postal\,Code City\\Country}}}
\setkomavar{fromzipcode}{Postal\,Code}
\setkomavar{backaddress}{Name\\Street Nr.\\Postal\,Code City\\Country}
% Phone
\setkomavar{fromphone}[]{{\large\textcolor{lightgray06}{\Mobilefone}}\\{\textcolor{lightgray04}{\ocr{+00\,1122\,333\,444}}}}
% FAX
% \setkomavar{fromfax}[]
% e-Mail
\setkomavar{fromemail}{{\large\textcolor{lightgray04}{\Email}}\\{\href{mailto:userid@domain.name}{userid\,@\,domain.name}}}
% Web
\setkomavar{fromurl}{{\Info}~\href{web:websitename}{websitename}}
\setkomavar{fromlinkedin}{\includegraphics[width=0.25cm,height=0.25cm]{linkedin.png}\\{\href{http://xx.linkedin.com/pub/account-name}{linkedin.com/pub/account-name}}}
% Banking
\setkomavar{frombank}{\color{lightgray06}{Account holder}\\%
\textcolor{lightgray04}{\ocr{NAME LASTNAME}}\\[\smallskip]%
IBAN\\%
\textcolor{lightgray04}{\ocr{XX0123456789012345678901234}}\\[\smallskip]%
SWIFT\,-\,BIC\\%
\textcolor{lightgray04}{\ocr{QQQQQQQQ}}}%
custom_invoice_mwe.tex
%% custom invoice template -- Minimal Working Example
%% Based on:
% briefwbk.tex
% Copyright 2008 Markus Kohm
\documentclass[%
english,
custom_asymTypB,
DIV=8,
fontsize=11pt]{scrlttr2}
% Structure and Basic Information
\input{custom_invoice_template.tex}
% What, Where, When?
\setkomavar{title}{Quotation - Invoice}
\setkomavar{subject}{Quotation for... \textbf{yyy}}
% \setkomavar{toname}
% \setkomavar{toaddress}
% \setkomavar{customer}
% \setkomavar{refname}
% \setkomavar{refvalue}
% \setkomavar{invoice}
\setkomavar{myref}{Project: yyy}
% Place, Location
\setkomavar{place}{Place}
% \setkomavar{placeseparator}
% \setkomavar{location}{Location}
% Date
\setkomavar{date}{\today}
\begin{document}
\begin{letter}{Mr. xxx xxx\\
Institution\\
Description\\
Address Line 1\\
Address Line 2\\
Country}
\opening{Dear xxx,}
\begin{flushleft}
herewith I am sending you a quotation...
\end{flushleft}
\closing{Sincerely yours,}
\encl{Enclosures}
\cc{}
\end{letter}
\end{document}
Result
Best Answer
With the current version of KOMA-script you get package
scrletter
which is is still in beta. It provides the ability to write letters with the with the article, report or book class of KOMA-script. Hence, it defines the mechanism you want.In the following a simple example to set the page header with the name.