我想每 5 行编号一次,保存每个场景的第一行。这是我目前所做的:
只是为了澄清,我正在使用\usepackage[lnps]{dramatist}
。
我的 MWE:
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[english]{babel}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{lipsum}
\usepackage[lnpa]{dramatist}
\usepackage{sectsty}
\allsectionsfont{\centering \normalfont\scshape}
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead{}
\fancyfoot[L]{}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\setlength{\headheight}{13.6pt}
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}
\title{
\horrule{0.5pt} \\[0.4cm]
\Huge \emph{Octavia} \\
\horrule{2pt} \\[0.5cm]
\normalfont \normalsize
\textsc{a play in three acts} \\ [25pt]}
\author{---The Authors---}
\date{}
\begin{document}
\maketitle
\Character[\textbf{Octavia}---The Main Heroine]{Octavia}{Octa}
\Character[\textbf{Marc Antony}---Octavia's Husband]{Antony}{Marc}
\Character[\textbf{Cleopatra}---Queen of Ptolemaic Egypt and Lover of Marc Antony]{Cleopatra}{Cleo}
\Character[\textbf{Octavian}---Octavia's Brother]{Octavian}{Oct}
\Character[\textbf{Caesarion}---Cleopatra's Son with Julius Caesar]{Caesarion}{Caesar}
\Character[\textbf{Servius}---Octavia and Antony's Servant]{Servius}{Serve}
\Character[\textbf{Children}---Cleopatra's Children with Antony]{Children}{Child}
\Character[\textbf{Chorus}---Both Octavia's Handmaidens and the People of Egypt]{Chorus}{Chorus}
\Character[\textbf{Senator 1}---Member of the Roman Senate]{Senator 1}{1}
\Character[\textbf{Senator 2}---Member of the Roman Senate]{Senator 2}{2}
\Character[\textbf{Senator 3}---Member of the Roman Senate]{Senator 3}{3}
\settowidth{\speakswidth}{\speaksfont{Frederico}\speaksdel\hspace{\speechskip}}
\DramPer
\Act{}
\Scene{Octavia's Bedchambers}
\StageDir{
\begin{center} Darkness
\end{center}
}
\StageDir{Octavia Sits, Reclined on a Couch. Chorus of Handmaidens Listens, Half-Intently}
\begin{drama}
\Octaspeaks Years ago, Barely widowed, I was informed of my marriage to Antony. It was a hasty patch of a ruined relationship. My brother Octavian had never gotten along with Antony, and rather than kindness, he gave him his sister. Our relationship may have been political in its reasoning, (which marriages aren't, after all) but I can't complain. Most women envy me for his power and riches, but I don't see the reason in that. I guess you could say we fell in love. Many of my fondest memories were when we walked together, confidently through the forum. I had no need to worry with Antony by my side. I recall one instance in particular, which I found quite humorous: we were taking our mid-day stroll, when we bumped into my brother in the Forum. Antony tensed up, as did Octavian, seemingly wanting to throw a fist or two. But I, I stepped in between the two of them and grabbed Antony by the waist, pressing his lips against mine. My brother was mortified! By then, we had even drawn quite a crowd with the people, and they burst into laughter at the sight of my brother's face. Even Antony, still begrudging the loss of a fight with Octavian, couldn't help but chuckle a bit.
I do not hate my brother, no. We get along quite nicely, as a matter of fact. When Antony was here, though, I did not meet up with him nearly as often as I do now. It is strange, watching your little brother slowly gain power over the Roman world. I have had my qualms with his politics, but he \emph{is} my brother; I grew up with him! I put up with his bullshit every day! Now that he is older, he has become more rational, and I do agree with his views a bit more. Though I still wish he and Antony would just get along! Oh, Octavian can be a fickle soul, and he once loved Antony as much as I do now.
\end{drama}
\StageDir{Enter Servius}
\begin{drama}
\Servespeaks Madam, a letter for you just arrived earlier this morning.
\Octaspeaks Please, from whom is this letter? Is it my beloved Antony? I need to know!
\end{drama}
\StageDir{Servius clears his throat}
\begin{drama*}
\Servespeaks A letter from Antony, yes, this is.
\end{drama*}
\end{document}
我希望行号位于散文的右侧,大约在侧面 3 或 4 个空格处。我还希望诗句的行号位于同一列中。
答案1
在戏剧环境中,编号的lnps
和lnpa
选项无效。要获取编号,您可以使用lineno
包,对\modulolinenumbers[5]
每五行进行编号;您可以激活编号 invokink \linenumbers
(或包提供的其他形式的编号命令);您还可以控制数字的位置;使用您当前的设置的一个小例子:
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[english]{babel}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{lipsum}
\usepackage{dramatist}
\usepackage{sectsty}
\usepackage[right]{lineno}
\modulolinenumbers[5]
\allsectionsfont{\centering \normalfont\scshape}
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead{}
\fancyfoot[L]{}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\setlength{\headheight}{13.6pt}
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}
\title{
\horrule{0.5pt} \\[0.4cm]
\Huge \emph{Octavia} \\
\horrule{2pt} \\[0.5cm]
\normalfont \normalsize
\textsc{a play in three acts} \\ [25pt]}
\author{---The Authors---}
\date{}
\begin{document}
\maketitle
\Character[\textbf{Octavia}---The Main Heroine]{Octavia}{Octa}
\Character[\textbf{Marc Antony}---Octavia's Husband]{Antony}{Marc}
\Character[\textbf{Cleopatra}---Queen of Ptolemaic Egypt and Lover of Marc Antony]{Cleopatra}{Cleo}
\Character[\textbf{Octavian}---Octavia's Brother]{Octavian}{Oct}
\Character[\textbf{Caesarion}---Cleopatra's Son with Julius Caesar]{Caesarion}{Caesar}
\Character[\textbf{Servius}---Octavia and Antony's Servant]{Servius}{Serve}
\Character[\textbf{Children}---Cleopatra's Children with Antony]{Children}{Child}
\Character[\textbf{Chorus}---Both Octavia's Handmaidens and the People of Egypt]{Chorus}{Chorus}
\Character[\textbf{Senator 1}---Member of the Roman Senate]{Senator 1}{1}
\Character[\textbf{Senator 2}---Member of the Roman Senate]{Senator 2}{2}
\Character[\textbf{Senator 3}---Member of the Roman Senate]{Senator 3}{3}
\settowidth{\speakswidth}{\speaksfont{Frederico}\speaksdel\hspace{\speechskip}}
\DramPer
\Act{}
\Scene{Octavia's Bedchambers}
\StageDir{
\begin{center} Darkness
\end{center}
}
\StageDir{Octavia Sits, Reclined on a Couch. Chorus of Handmaidens Listens, Half-Intently}
\begin{drama}
\linenumbers
\Octaspeaks Years ago, Barely widowed, I was informed of my marriage to Antony. It was a hasty patch of a ruined relationship. My brother Octavian had never gotten along with Antony, and rather than kindness, he gave him his sister. Our relationship may have been political in its reasoning, (which marriages aren't, after all) but I can't complain. Most women envy me for his power and riches, but I don't see the reason in that. I guess you could say we fell in love. Many of my fondest memories were when we walked together, confidently through the forum. I had no need to worry with Antony by my side. I recall one instance in particular, which I found quite humorous: we were taking our mid-day stroll, when we bumped into my brother in the Forum. Antony tensed up, as did Octavian, seemingly wanting to throw a fist or two. But I, I stepped in between the two of them and grabbed Antony by the waist, pressing his lips against mine. My brother was mortified! By then, we had even drawn quite a crowd with the people, and they burst into laughter at the sight of my brother's face. Even Antony, still begrudging the loss of a fight with Octavian, couldn't help but chuckle a bit.
I do not hate my brother, no. We get along quite nicely, as a matter of fact. When Antony was here, though, I did not meet up with him nearly as often as I do now. It is strange, watching your little brother slowly gain power over the Roman world. I have had my qualms with his politics, but he \emph{is} my brother; I grew up with him! I put up with his bullshit every day! Now that he is older, he has become more rational, and I do agree with his views a bit more. Though I still wish he and Antony would just get along! Oh, Octavian can be a fickle soul, and he once loved Antony as much as I do now.
\end{drama}
\StageDir{Enter Servius}
\begin{drama}
\linenumbers
\Servespeaks Madam, a letter for you just arrived earlier this morning.
\Octaspeaks Please, from whom is this letter? Is it my beloved Antony? I need to know!
\end{drama}
\StageDir{Servius clears his throat}
\begin{drama*}
\Servespeaks A letter from Antony, yes, this is.
\end{drama*}
\end{document}