[Tex/LaTex] Justification when using the dramatist package

dramatisthorizontal alignment

I'm trying to typset a play using the dramatist package. I'm having difficulty figuring out how I change some settings. I want to ensure that the text that the characters say, is justified, rather than their names being justified.

enter image description here

I would like the words Well, Start and I to be left-justified, and the characters names to be right-justified. Here is an example of the tex that I used to make this demo:

\documentclass[a5paper,11pt]{memoir}    
\usepackage{dramatist}  

\begin{document}

\Character[Wilheim - a person]{Wilheim}{will} % define characters
\Character[Frederico - a person]{Frederico}{fred}

\scene[]

\StageDir{
    \begin{center} Darkness
     \end{center}
}

\begin{drama}

\willspeaks Well, will we - I\dots
\fredspeaks  Start.
\willspeaks I will go on.
\willspeaks Vivamus varius tellus et mi pretium elementum iaculis tellus semper. Donec semper iaculis ante, convallis convallis arcu laoreet vitae. Aliquam id leo ac eros ultrices rhoncus porta sed ipsum. 

\end{drama}

\end{document}

I would like my document to look like the following (which I prepared using the verbatim package) and for this to work for sentences that run over multiple lines:

enter image description here

I received some helpful advice from TeX.SE on starting to use the dramatist package here.

Best Answer

You need to make some surgery on the internal commands of dramatist; the easiest way is to use etoolbox and enumitem:

\documentclass[a5paper,11pt]{memoir}    
\usepackage{dramatist,etoolbox,enumitem}
\usepackage[latin]{babel}
\pagestyle{empty}
\makeatletter
\renewenvironment{drama}
  {\if@lnpa
   \PackageWarning{dramatist}{\lnpwarning{a}}
   \fi
   \if@lnps
   \PackageWarning{dramatist}{\lnpwarning{s}}
   \fi
   \begin{itemize}[labelwidth=\speakswidth,leftmargin=!]} 
  {\end{itemize}}
\patchcmd{\speaker}{\item[#1\speaksdel]}{\item[\speaksfont#1]}{}{}
\patchcmd{\@character}{\item[#1\speaksdel]}{\item[\speaksfont#1]}{}{}
\makeatother
\begin{document}

\Character[Wilheim - a person]{Wilheim}{will} % define characters
\Character[Frederico - a person]{Frederico}{fred}
\settowidth{\speakswidth}{\speaksfont{Frederico}\speaksdel\hspace{\speechskip}}


\scene[]

\StageDir{
    \begin{center} Darkness
     \end{center}
}

\begin{drama}

\willspeaks Vivamus varius tellus et mi pretium elementum iaculis tellus semper. Donec semper iaculis ante, 
convallis convallis arcu laoreet vitae. Aliquam id leo ac eros ultrices rhoncus porta sed ipsum.

\fredspeaks Vivamus varius tellus et mi pretium elementum iaculis tellus semper. Donec semper iaculis ante, 
convallis convallis arcu laoreet vitae. Aliquam id leo ac eros ultrices rhoncus porta sed ipsum.
\willspeaks Vivamus varius tellus et mi pretium elementum iaculis tellus semper. Donec semper iaculis ante, 
convallis convallis arcu laoreet vitae. Aliquam id leo ac eros ultrices rhoncus porta sed ipsum.

\end{drama}

\end{document}

The setting of \speakswidth is best done after all characters are introduced, so that one can choose the widest one. enter image description here

Related Question