[Tex/LaTex] Enclose a custom quote environment in quotes from csquotes

beamercsquotesquoting

I am using the following aquote environment, to create quotes that also place an author name at the bottom right of the quote (in beamer). This macro is used because the Author name can be 'squished up' into the space on the previous line if there is some.

My latex skills are limited. Is it possible to redefine this environment to also \enquote{} the text within the quote? I am having trouble working out how to do it.

\documentclass{beamer}

\usepackage[style=british]{csquotes}

\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip1em
  \hbox{}\nobreak\hfill #1%
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{aquote}[1]
  {\savebox\mybox{#1}\begin{quote}}
  {\vspace*{1mm}\signed{\usebox\mybox}\end{quote}}

\begin{document}

\begin{frame}
      Example:
      \begin{aquote}{Author Name}
      This is an example with some text that goes across more than one line.    
      \end{aquote}

\end{frame}

\end{document}

This macro I am using is based on an original one posted on this site for articles, but was customised slightly to work with beamer. If I can find the original example on this site I will link it below.

enter image description here

Best Answer

Here's a solution you maybe have to adjust according to your fonts (the \hspace).

example quote

\documentclass{beamer}

\usepackage[style=british]{csquotes}

\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip1em
  \hbox{}\nobreak\hfill #1%
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{aquote}[1]
  {\savebox\mybox{#1}\begin{quote}\openautoquote\hspace*{-.7ex}}
  {\unskip\closeautoquote\vspace*{1mm}\signed{\usebox\mybox}\end{quote}}

\begin{document}

\begin{frame}
      Example:
      \begin{aquote}{Author Name}
      This is an example with some text that goes across more than one line.    
      \end{aquote}

\end{frame}

\end{document}