Thalie,拆分诗句,调整垂直对齐

Thalie,拆分诗句,调整垂直对齐

我正在寻找一种使用包中的 , 命令\pauseverse垂直对齐戏剧文本中拆分的诗句的方法。正如 thalie 的文档所述,该功能通常无法正常工作,因此需要命令来操纵垂直对齐所需的空间。在排版整个剧本时,浏览所有实例并找到手动调整是非常繁琐的。\resumeversethalie\adjustverse

以下是我的案例的 MWE:

\documentclass [12pt, a4paper, pagesize] {scrbook}
\usepackage [UKenglish] {babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{microtype}


\usepackage[characterstyle=imprimerie-prose]{thalie}

\usepackage{hanging}
\renewcommand*{\speakswithoutdirection}[1]{%
    \hangpara{2\parindent}{1}\noindent\textsc{#1}\xspace.%
    }

\begin{document}

\begin{dramatis}[hidden]
    \character[cmd={Buckingham}]{Buckingham}
    \character[cmd={Norfolk}]{Norfolk}
\end{dramatis}

\Buckingham
Good morrow and well met. How have ye done\\Since last we saw in France?\pauseverse

\Norfolk
\resumeverse I thank your grace,\\Healthful, and ever since a fresh admirer\\Of what I saw there.\pauseverse

\Buckingham\resumeverse An untimely ague\\Stayed me a prisoner in my chamber when\\Those suns of glory, those two lights of men,\\Met in the vale of Andres.\pauseverse

\end{document}

两种情况下的对齐方式都大相径庭。我猜正确的间距取决于第一行的长度和第二行开头的字符名称的长度。我尝试使用\predisplaysizewithin modified\pauseverse\resumeverse命令读取这两个长度,以尝试计算所需的正确空白长度;但我一无所获。

所以我的问题是:有没有办法

A)\adjustverse计算每个分割诗句的正确调整长度;或

b)\hspace计算必须使用的正确的\resumeverse,无需调整\adjustverse

答案1

间距没有考虑角色的名称和 TeX 插入的标准 2em。

\documentclass [12pt, a4paper, pagesize] {scrbook}
\usepackage [UKenglish] {babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage[characterstyle=imprimerie-prose]{thalie}
\usepackage{hanging}


\newlength{\brokenverse}
\renewcommand*{\speakswithoutdirection}[1]{%
  \settowidth{\brokenverse}{\textsc{#1}.}%
  \hangpara{2\parindent}{1}\noindent\textsc{#1}.%
}
\makeatletter
\renewcommand{\resumeverse}{%
  \hspace{\@verseadjust}\hspace{\dimexpr\dimen\@ne-\brokenverse-2em}
}
\makeatother

\begin{document}

\begin{dramatis}[hidden]
    \character[cmd={Buckingham}]{Buckingham}
    \character[cmd={Norfolk}]{Norfolk}
\end{dramatis}

\Buckingham
Good morrow and well met. How have ye done\\
Since last we saw in France?\pauseverse

\Norfolk
\resumeverse I thank your grace,\\
Healthful, and ever since a fresh admirer\\
Of what I saw there.\pauseverse

\Buckingham
\resumeverse An untimely ague\\
Stayed me a prisoner in my chamber when\\
Those suns of glory, those two lights of men,\\
Met in the vale of Andres.\pauseverse

\end{document}

在此处输入图片描述

相关内容