我有以下 LaTeX 代码:
\documentclass{book}%
\usepackage[margin=0.75in, paperwidth=6in, paperheight=9in]{geometry}
\usepackage{parskip}
\usepackage{marginnote}
\newcommand{\VS}[1]{{\marginnote{#1}}}
\reversemarginpar
\begin{document}
\VS{1} Lorem ipsum dolor sit amet, consectetur adipiscing elit,
consectetur adipiscing elit. consectetur adipiscing elit.
\VS{2} Nulla erat nibh, elementum non laoreet a, euismod fermentum, euismod
fermentum, euismod fermentum.
\VS{3} Proin sapien nibh, dapibus a enim blandit, finibus scelerisque
lorem.
\VS{4} Vestibulum vitae tincidunt lorem.
\begin{verse}
\VS{5} Roses are red\\
Violets are blue\\
\VS{6} All my base\\
Are belong to you.
\end{verse}
\VS{7} Praesent nibh lacus, tincidunt in tempus a, feugiat nec nibh.
\end{document}
我希望诗句编号出现在内页边距(朝向书脊)。这很好用——除了!marginnote
段落(或诗行)开头的 a 的基线明显高于它所引用的文本行的基线。谢谢!
答案1
你可以使用reledmac
自动对行进行编号。在这种情况下,每个普通段落必须用 \pstart
...括起来\pend
,对于诗句,您可以使用\stanza
... \&
。
\documentclass{book}
\usepackage{reledmac}
\setcounter{firstlinenum}{1}
\setcounter{linenumincrement}{1}
\setstanzaindents{0,1}
\setcounter{stanzaindentsrepetition}{1}
\linenummargin{inner}
\renewcommand{\numlabfont}{\normalfont\normalsize}
\begin{document}
\beginnumbering
\pstart
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nulla erat nibh, elementum non laoreet a, euismod fermentum.
\pend
\pstart
Proin sapien nibh, dapibus a enim blandit, finibus scelerisque lorem.
Vestibulum vitae tincidunt lorem.
\pend
\stanza
Roses are red&
\skipnumbering Violets are blue&
All my base&
\skipnumbering Are belong to you.
\&
\pstart
Praesent nibh lacus, tincidunt in tempus a, feugiat nec nibh.
\pend
\endnumbering
\end{document}
这也比手动编号行更为强大……