# Problem with the alignment of stage directions when using dramatist

I've been writing scripts using the dramatist package and followed the guide on these forums to make the justification of the names and dialogue nice.

Justification when using the dramatist package

My problem is that when using the solution the stage directions within the drama environment are aligned with respect to the dialogue column of text and not the page. Stage directions outside of the drama environment are aligned to the page as expected.

 \documentclass[a4paper,12pt]{article}

\usepackage{dramatist}
\usepackage{etoolbox,enumitem}

\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[The milkman]{Milkman}{milk}
\settowidth{\speakswidth}{\speaksfont{Milkman}\speaksdel\hspace{\speechskip}}
\Scene{Milkman Arrives}
\StageDir{\begin{center}Some stage directions.\end{center}}
\begin{drama}
\milkspeaks{Some text. Some text. Some text. Some text. Some text. Some text. Some text.}
\StageDir{\begin{center}Some more stage directions.\end{center}}
\end{drama}
\end{document}


Is there a way to fix this?

-

This is actually a "feature" of the dramatist package. The usual definition of \StageDir is equivalent to

\newcommand{\StageDir}[1]{\begin{quote}\em #1\end{quote}}


so it inherits the left margin produced by the drama environment (which is implemented as a list environment), so its horizontal placement will always be slightly to the right of the dialogue line start. With center the centering will be with respect to the dialogue lines.

A way to solve the problem might be to set the stage directions flush right:

\renewcommand{\StageDir[1]{\begin{flushright}\em #1\end{flushright}}


(but an initial \StageDir must go before \begin{drama}). Centering can be obtained with this trick:

\renewcommand\StageDir[1]{%
\centerline{\em #1}


If you want centered multiline stage directions, then

\renewcommand\StageDir[1]{%
\centerline{%
\begin{minipage}{\dimexpr\textwidth-2\leftmargini\relax}
\centering\em\strut#1\strut\end{minipage}}


should do.

-
 The trick is working really well except the margins are no longer defined like the quote environment (it just uses the page margins). How can I reintroduce the wider margins for the stage directions? – Darling Feb 21 '12 at 22:37 Are you meaning that you want multiline stage directions? – egreg Feb 21 '12 at 22:48 Yes, the quote environment increased the margins so when a stage direction went over more than one line it looked tidy. – Darling Feb 21 '12 at 22:55 Thanks for your help. It is looking great now. :) – Darling Feb 21 '12 at 23:54

I modified egreg's answer slightly to get my stage directions flush with the character names using this:

\renewcommand\StageDir[1]{%