LaTeX forum ⇒ LettersRagged left signature not displayed as expected Topic is solved

Formal letters, Cover letters, Newsletters
erwann
Posts: 73
Joined: Thu Aug 25, 2016 2:24 am

Ragged left signature not displayed as expected

Postby erwann » Thu Sep 06, 2018 12:05 am

It's the signature I wanted ragged left, not the closing statement. How to do it, please?



\documentclass[
  french,
%  paper=letter,
  version=last,
%  fontsize=10pt,
  NF
]{scrlttr2}
\KOMAoptions{
  foldmarks=false,
  backaddress=false, %%window envel
  fromalign=left,
  fromemail=true,
  subject=beforeopening, %%centered, %left %left-justified, %underlined
  %subject=titled,%% Concernant:
  %refline=nodate,
  fromrule=false
}

\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{url}

\makeatletter
\@setplength{sigbeforevskip}{4\baselineskip}
\makeatother

\begin{document}


\setkomavar{fromname}{NOM}
\setkomavar{fromaddress}{ADR}
\setkomavar{fromemail}{EMAIL}
\setkomavar{place}{Paris} %% wiped out by yourref
\setkomavar{subject}{SUJET}
\setkomavar{date}{\today}

\newsavebox\signaturebox
\sbox\signaturebox{%
  \begin{tabular}{@{}c@{}}
     %\smash{\includegraphics[height=4em]{2013_.png}}\\[2pt]
    \usekomavar{fromname}
  \end{tabular}}
\setkomavar{signature}{\usebox{\signaturebox}}%
%\renewcommand*\raggedsignature{\raggedright}
\renewcommand*\raggedsignature{\raggedleft}

\begin{letter}{DEST}

\opening{Madame, Monsieur,}

BLABLABLA

\closing{Restant \`a votre disposition pour toute information compl\'ementaire, veuillez agr\'eer, Madame, Monsieur, l'expression de mes sinc\`eres salutations,}

%\ps PS: 

%\encl{}

%\includepdf[pages={1-}]{fr-watermark.pdf}

\end{letter}

\end{document}
Attachments
Screenshot from 2018-09-05 18-03-41.png
Screenshot from 2018-09-05 18-03-41.png (21.28 KiB) Viewed 11224 times
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

User avatar
Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Sep 06, 2018 7:30 am

Is that what you want?
\documentclass[
      french,
    %  paper=letter,
      version=last,
    %  fontsize=10pt,
      NF
    ]{scrlttr2}
    \KOMAoptions{
      foldmarks=false,
      backaddress=false, %%window envel
      fromalign=left,
      fromemail=true,
      subject=beforeopening, %%centered, %left %left-justified, %underlined
      %subject=titled,%% Concernant:
      %refline=nodate,
      fromrule=false
    }
     
    \usepackage[T1]{fontenc}
    \usepackage[french]{babel}
    \usepackage{graphicx}
    \usepackage{pdfpages}
    \usepackage{url}
     
    \makeatletter
    \@setplength{sigbeforevskip}{4\baselineskip}
    \makeatother
     
    \begin{document}
     
     
    \setkomavar{fromname}{NOM}
    \setkomavar{fromaddress}{ADR}
    \setkomavar{fromemail}{EMAIL}
    \setkomavar{place}{Paris} %% wiped out by yourref
    \setkomavar{subject}{SUJET}
    \setkomavar{date}{\today}
     
    \newsavebox\signaturebox
    \sbox\signaturebox{%
      \begin{tabular}{@{}c@{}}
         \smash{\includegraphics[height=4em]{example-image}}\\[2pt]
        \usekomavar{fromname}
      \end{tabular}}
    \setkomavar{signature}{\hfill\usebox{\signaturebox}}%
    %\renewcommand*\raggedsignature{\raggedleft}
    \renewcommand*\raggedsignature{\raggedright}
     
    \begin{letter}{DEST}
     
    \opening{Madame, Monsieur,}
     
    BLABLABLA
     
    \closing{Restant \`a votre disposition pour toute information compl\'ementaire, veuillez agr\'eer, Madame, Monsieur, l'expression de mes sinc\`eres salutations,}
     
    %\ps PS: 
     
    %\encl{}
     
    %\includepdf[pages={1-}]{fr-watermark.pdf}
     
    \end{letter}
     
    \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

erwann
Posts: 73
Joined: Thu Aug 25, 2016 2:24 am

Postby erwann » Fri Sep 07, 2018 12:30 am

Could you please highlight the change you have made, apart from a dummy image? It has to work without a image in place of the signature, when you want to sign manually.
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

User avatar
Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Sep 07, 2018 6:57 am

\setkomavar{signature}{\hfill\usebox{\signaturebox}}

Note the \hfill.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Letters”

Who is online

Users browsing this forum: No registered users and 3 guests