[Tex/LaTex] Multiple side-by-side signatures in letter

scrlttr2

I am attemting to add three side-by-side signature to a scrlttr2 letter by using a minipage environment in the signature definition. I am getting an error: Extra }, or forgotten \endgroup pointing me to the closing line. The error goes away if i do without the minpages. Here's the MWE:

\documentclass[%
paper=letter,
pagesize,
fontsize=10pt,
standard
]{scrlttr2}

\usepackage{filecontents}
\setkomavar{fromname}{Sender's Name}
\setkomavar{fromaddress}{Some street\\in some town\\with zip code}
\begin{filecontents}{standard.lco}
    \setkomavar{signature}{% 
    \begin{minipage}[b]{0.33\linewidth}
    First name\\
    Position 1
    \end{minipage}
    \begin{minipage}[b]{0.33\linewidth}
    Second name\\
    Position 2
    \end{minipage}
    \begin{minipage}[b]{0.33\linewidth}
    Third name\\
    Position 3
    \end{minipage}
}

\@setplength[1]{sigindent}{0.01\textwidth}
\end{filecontents}


\begin{document}
\begin{letter}{%
Recipient's name,\\
Some position\\
More address info
}

\opening{Dear Recipient}
\lipsum[1-2]

\closing{Sincerely,}

\end{letter}
\end{document}

The document renders correctly, even though the compilation fails. Am I going the right way about this?

Best Answer

Instead of minipages you can use \parboxes:

\documentclass[%
paper=letter,
pagesize,
fontsize=10pt,
standard
]{scrlttr2}
\usepackage[english]{babel}
\usepackage{lipsum}

\newcommand\Sigline[4][t]{%
  \parbox[#1]{.333\linewidth}{\raggedright#2}%
  \parbox[#1]{.333\linewidth}{\raggedright#3}%
  \parbox[#1]{.333\linewidth}{\raggedright#4}%
}

\setkomavar{fromname}{Sender's Name}
\setkomavar{fromaddress}{Some street\\in some town\\with zip code}
\setkomavar{signature}{% 
   \Sigline{First name}{Second name}{Third name} \\
  \Sigline{Position 1}{Position 2}{Position 3} \\
}

\begin{document}
\begin{letter}{%
Recipient's name,\\
Some position\\
More address info
}

\opening{Dear Recipient}
\lipsum[2]

\closing{Sincerely,}

\end{letter}
\end{document}

enter image description here