使用 dramatist 包输入戏剧剧本,如何让第一幕和第一场显示全字母数字?以及如何使其仅适用于第一幕和第一场,其他幕和场应保留罗马数字。
举个例子
\documentclass{article}
\usepackage{dramatist}
\begin{document}
\act
Lorem ipsum
\scene
Lorem ipsum
\scene
Lorem ipsum
\act
Lorem ipsum
\scene
Lorem ipsum
\end{document}
应呈现:
Act one
Lorem ipsum
Scene one
Lorem ipsum
Scene II
Lorem ipsum
Act II
Lorem ipsum
Scene one
Lorem ipsum
答案1
更改计数器act
和的表示形式scene
。我还进行了更改,\printscenenum
以便它仅打印场景编号。
\documentclass{article}
\usepackage{dramatist}
\renewcommand{\theact}{%
\ifnum\value{act}=1 one\else\roman{act}\fi
}
\renewcommand{\thescene}{%
\ifnum\value{scene}=1 one\else\roman{scene}\fi
}
\renewcommand{\printscenenum}{\scenenumfont\thescene}
\begin{document}
\act
Lorem ipsum
\scene
Lorem ipsum
\scene
Lorem ipsum
\act
Lorem ipsum
\scene
Lorem ipsum
\end{document}
答案2
这是一个解决方案,但在将此步骤确定为已解决之前,我仍然要求进行任何改进。
\documentclass{article}
\usepackage{dramatist}
\usepackage{ifthen} % To test if a scene is the first one
\newcounter{allwaysone}
\stepcounter{allwaysone} % This counter is just here to make the test in the \makeactfullleteriffirst command
\newcommand\makeactfullletteriffirst[1]{%
% Command for testing if the act is the first one then return “one”. If not return the input value.
\ifthenelse{\equal{#1}{\actnumfont \roman{allwaysone}}}%
{%
one%
}%
{%
#1%
}%
}%
\makeatletter
\renewcommand\m@ke@cthead[1]{%
\actheadstart
{\parindent \z@
\ifnum\c@secnumdepth>\m@ne
\printactname \printsep \makeactfullletteriffirst{\printactnum} % here is the relevant line
\fi
\printacttitle{#1}
\afteract}
}
\makeatother
\begin{document}
\act
Lorem ipsum
\scene
Lorem ipsum
\scene
Lorem ipsum
\act
Lorem ipsum
\scene
Lorem ipsum
\end{document}