戏剧家组合将散文和诗歌混合在一起,将演讲者放在不同的位置

戏剧家组合将散文和诗歌混合在一起,将演讲者放在不同的位置

我有一份包含散文和诗歌的文档。使用dramatist包时,说话者位于诗歌上方和散文旁边。我希望它们都位于文本的左侧,类似于第一个答案使用 dramast 包的理由

以下是 MWE:

\documentclass{memoir}    
\usepackage{dramatist}
\usepackage[latin]{babel}
\pagestyle{empty}
\linenumberfrequency{5}

\begin{document}

\Character[Billy Prose]{BILLY}{billy}
\Character[Sally Verse]{SALLY}{sally}

\begin{drama*}

\sallyspeaks I am a poet \\
I know it\\
I like to speak in short lines\\
Like this\\
My cat is gray\\
My fish is dead\\
Because the cat ate it\\
I am\\
A very difficult person\\
To have a conversation with.\
\end{drama*}

\begin{drama}

    \billyspeaks I like to talk like a normal person. Your cat is lame. I have a gerbil named Phil. He sleeps in my dresser. I'm so sorry that my examples sounds insane.

\end{drama}

\end{document}

答案1

你不能drama像 Billy 那样使用环境吗?或者将诗句包装在迷你页面 \begin{drama} 中

\sallyspeaks
    \begin{minipage}[t]{0.75\linewidth}
     I am a poet \\
    I know it\\
    I like to speak in short lines\\
    Like this\\
    My cat is gray\\
    My fish is dead\\
    Because the cat ate it\\
    I am\\
    A very difficult person\\
    To have a conversation with.        \end{minipage}

\end{drama}

在此处输入图片描述

drama*显然,你可以在里面嵌套drama。查看文档,似乎创建自己的 Speaker-verse 环境并不难。以下是尝试了一下的结果:

\documentclass{memoir}    
\usepackage{dramatist}
\usepackage[latin]{babel}
\pagestyle{empty}
\linenumberfrequency{5}
% Make your own nested environment as a work-around
\newenvironment{dramaverse}{\hspace*{\fill}\par\begin{drama*}}
                           {\end{drama*}}
% Define your own version of `drama*` but don't throw the `drversetrue` switch
% Make your own switch.  At most you may have to redefine `\direct` to get
% some possibly desirable effects from there.
\makeatletter
\newif\if@mydrverse
\@namedef{mydrama*}{%
    \@mydrversetrue
    \if@poemscol
        \begin{poem}
        \setcounter{verselinenumber}{\value{storelineno}}
        \setcounter{printlineindex}{\value{storeprintlineindex}}
    \else
        \begin{verse}
    \fi
    \ifx\poemlines\@undefined\else
        \setcounter{poemline}{\value{storelineno}}
    \fi}
\@namedef{endmydrama*}{%
    \ifx\poemlines\@undefined\else
        \setcounter{storelineno}{\value{poemline}}
    \fi
    \if@poemscol
        \end{poem}
        \setcounter{storelineno}{\value{verselinenumber}}
        \setcounter{storeprintlineindex}{\value{printlineindex}}
    \else
        \end{verse}
    \fi
    \@mydrversefalse}
\makeatother
\begin{document}
\Character[Billy Prose]{BILLY}{billy}
\Character[George Prose]{GEORGE}{george}
\Character[Sally Verse]{SALLY}{sally}

\verb=drama*= nested in \verb=drama=
\begin{drama}
    \sallyspeaks
        \begin{drama*}
        I am a poet \\
        I know it\\
        I like to speak in short lines\\
        Like this\\
        My cat is gray\\
        My fish is dead\\
        Because the cat ate it\\
        I am\\
        A very difficult person\\
        To have a conversation with.\\
        \end{drama*}
\end{drama}


Using the new \verb=dramaverse= work-around environment nested inside \verb=drama=.
\begin{drama}
    \georgespeaks
    \begin{dramaverse}
    I am not a poet\\
    I know it\\
    I hate talking in verse\\
    Like this\\
    My dog is white\\
    My Lizard is alive\\
    Because my dog didn't eat\\
    It yet\\
    I am easy\\
    To get along with\\
    \end{dramaverse}
\end{drama}

    \begin{drama}
    \sallyspeaks I knew it!
    \end{drama}

\begin{drama}
    \billyspeaks I like to talk like a normal person. Your cat is lame. I
    have a gerbil named Phil. He sleeps in my dresser. I'm so sorry that my
    examples sounds insane.  You are deranged.
\end{drama}

Using the package's own \verb=drama*= environment.
\begin{drama*}
    \sallyspeaks Silly man, you\\
            Deranged is who?
\end{drama*}

Using your new reworked version of \verb=drama*= called \verb=mydrama*=.
But now I get some unexpected vertical whitespace.
\begin{mydrama*}
    \billyspeaks
    Who's making me\\
    Talk so strange.\\
    I can't believe\\
    You think I'm deranged\\
\end{mydrama*}



\end{document}

在此处输入图片描述

相关内容