Setting the date position to the top right in a NF.lco (french style) scrlttr2
With the suggestion below you can still use \setkomavar{date}{...}
and \setkomavar{place}{...}
and you can enable/disable the usage of fromphone
and fromemail
using options fromphone
and fromemail
, respectivly. If variable place
is empty, the place seperator will be removed.
Note, that the contents of variable firsthead
overwrittes both option fromalign
and fromlogo
. To remove the back address you can set option backaddress=false
. Do not change \parskip
manually, use option parskip
instead.
\documentclass[a4paper,11pt,french]{scrlttr2}
\usepackage{palatino}
\usepackage[T1]{fontenc}
\usepackage{babel}
%\usepackage[utf8]{inputenc}% not needed with an uptodate TeX Distribution
\usepackage{eurosym}
\usepackage{geometry}
\usepackage{graphicx}
\geometry{verbose,a4paper,lmargin=3cm,rmargin=3cm}
\KOMAoptions{parskip=half-}%<- do not set \parskip manually
\usepackage{setspace}
\setstretch{1.15}
\usepackage{url}% <- added
\LoadLetterOption{NF}%
\KOMAoptions{%
%fromalign=center% <- no effect because of \setkomavar{firsthead}{...}
,fromphone=true
,fromemail=true
%,fromlogo=true% <- no effect because of \setkomavar{firsthead}{...}
,backaddress=false% <- remove backaddress
,refline=nodate% <- remove date from the refline
,subject=titled% <- use a title for the subject
}
\renewcaptionname{french}{\subjectname}{Objet}% like your lettre version
\addtokomafont{subject}{\normalfont}% <- like your lettre version
\renewcaptionname{french}{\ccname}{C.c.}% like your lettre version
\setkomavar{ccseparator}{}
\setkomavar*{ccseparator}{\llap{\ccname\quad}}% like your lettre version
\setkomavar{placeseparator}{, le }
\setkomafont{fromname}{\scshape}
\setkomafont{fromaddress}{\small}
\setkomavar{emailseparator}[E-Mail]{~:~}% <- like your lettre version
\setkomavar{enclseparator}{ > }
\setkomavar{fromaddress}{7-13 rue dejourney\\ 49000 ANGERS}
\setkomavar{fromemail}{\url{[email protected]}}% <- like your lettre version
\setkomavar{fromname}{Gigiair}
\setkomavar{fromphone}{0123 456 789}
\setkomavar{phoneseparator}[Tél]{.~}% <- like your lettre version
\setkomavar{place}{Angers}
\setkomavar{signature}{\hspace{26em}\includegraphics[width=2.5cm]{example-image}}% <- changed
\setkomavar{subjectseparator}{~:~}% <- like your lettre version
\setkomavar{subject}{Modèle}
\makeatletter
\setkomavar{firsthead}{{%
\usekomafont{fromaddress}%
\parbox[b]{\useplength{firstheadwidth}}{%
{\usekomafont{fromname}\usekomavar{fromname}}
\hfill{\usekomafont{placeanddate}%
\ifkomavarempty{place}{}{\usekomavar{place}\usekomavar{placeseparator}}%
\usekomavar{date}%
}%
\\\usekomavar{fromaddress}%
\medskip% similar to the lettre version
\if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi
\if@mobilephone\\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}\fi%
\if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi
\if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi
\if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi
}}%
}
\makeatother
\begin{document}
\begin{letter}{\`A Madame la centurion\\
Camps de Babaurum\\
Bretagne conquise}
\def\concname{Objet :~}
\opening{Madame la centurion,}
C'est une invitation pour manger du sanglier roti.
\closing{à la tienne !}
\cc{Panoramix et Obleix}
\end{letter}
\end{document}
Result: