![我该如何将 lettrine 与 parallel 结合使用?还是应该使用其他东西?](https://linux22.com/image/370999/%E6%88%91%E8%AF%A5%E5%A6%82%E4%BD%95%E5%B0%86%20lettrine%20%E4%B8%8E%20parallel%20%E7%BB%93%E5%90%88%E4%BD%BF%E7%94%A8%EF%BC%9F%E8%BF%98%E6%98%AF%E5%BA%94%E8%AF%A5%E4%BD%BF%E7%94%A8%E5%85%B6%E4%BB%96%E4%B8%9C%E8%A5%BF%EF%BC%9F.png)
我正在尝试并排设置两个版本的文本,并研究了如何使用并行来完成。
我还想在第一行使用首字下沉。
但是,当我这样做时,并行似乎停止了该段落的工作。这是我正在尝试的代码,它首先正确设置,然后设置不正确:
\documentclass[11pt]{book}
\usepackage{parallel,lettrine}
\begin{document}
\begin{Parallel}{}{}
\ParallelLText{\noindent\emph{Wycliffe Bible}, 1382}
\ParallelRText{\noindent\emph{Green's Literal Translation}, 1993}
\ParallelPar
\ParallelLText{In the bigynnyng God made of nouyt heuene and erthe.}
\ParallelRText{In the beginning God created the heavens and the earth;}
\ParallelPar
\ParallelLText{$^{2}$Forsothe the erthe was idel and voide, and derknessis weren on the face of depthe; and the Spiryt of the Lord was borun on the watris.}
\ParallelRText{$^{2}$and the earth being without form and empty, and darkness on the face of the deep, and the Spirit of God moving gently on the face of the waters,}
\ParallelPar
\end{Parallel}
\vspace{2 cm}
\begin{Parallel}{}{}
\ParallelLText{\noindent\emph{Wycliffe Bible}, 1382}
\ParallelRText{\noindent\emph{Green's Literal Translation}, 1993}
\ParallelPar
\ParallelLText{\lettrine{I}{n} the bigynnyng God made of nouyt heuene and erthe.}
\ParallelRText{\lettrine{I}{n} the beginning God created the heavens and the earth;}
\ParallelPar
\ParallelLText{$^{2}$Forsothe the erthe was idel and voide, and derknessis weren on the face of depthe; and the Spiryt of the Lord was borun on the watris.}
\ParallelRText{$^{2}$and the earth being without form and empty, and darkness on the face of the deep, and the Spirit of God moving gently on the face of the waters,}
\ParallelPar
\end{Parallel}
\end{document}
此示例的结果如下:
谁能告诉我我哪里错了?
答案1
\linewidth
(由 所使用\lettrine
)没有正确的值。
\documentclass[11pt]{book}
\usepackage{parallel}
\usepackage{lettrine}
\begin{document}
\begin{Parallel}{}{}
\ParallelLText{\noindent\emph{Wycliffe Bible}, 1382}
\ParallelRText{\noindent\emph{Green's Literal Translation}, 1993}
\ParallelPar
\ParallelLText{In the bigynnyng God made of nouyt heuene and erthe.}
\ParallelRText{In the beginning God created the heavens and the earth;}
\ParallelPar
\ParallelLText{$^{2}$Forsothe the erthe was idel and voide, and derknessis weren on the face of depthe; and the Spiryt of the Lord was borun on the watris.}
\ParallelRText{$^{2}$and the earth being without form and empty, and darkness on the face of the deep, and the Spirit of God moving gently on the face of the waters,}
\ParallelPar
\end{Parallel}
\vspace{2 cm}
\begin{Parallel}{}{}
\ParallelLText{\noindent\emph{Wycliffe Bible}, 1382}
\ParallelRText{\noindent\emph{Green's Literal Translation}, 1993}
\ParallelPar
\ParallelLText{\setlength{\linewidth}{\hsize}\lettrine{I}{n} the bigynnyng God made of nouyt heuene and erthe. }
\ParallelRText{\setlength{\linewidth}{\hsize}\lettrine{I}{n} the beginning God created the heavens and the earth;}
\ParallelPar
\ParallelLText{$^{2}$Forsothe the erthe was idel and voide, and derknessis weren on the face of depthe; and the Spiryt of the Lord was borun on the watris.}
\ParallelRText{$^{2}$and the earth being without form and empty, and darkness on the face of the deep, and the Spirit of God moving gently on the face of the waters,}
\ParallelPar
\end{Parallel}
\end{document}
答案2
一种手动解决方法,使用minipage
s。
\documentclass[11pt]{book}
\usepackage{parallel,lettrine}
\begin{document}
\begin{Parallel}{}{}
\ParallelLText{\noindent\emph{Wycliffe Bible}, 1382}
\ParallelRText{\noindent\emph{Green's Literal Translation}, 1993}
\ParallelPar
\ParallelLText{In the bigynnyng God made of nouyt heuene and erthe.}
\ParallelRText{In the beginning God created the heavens and the earth;}
\ParallelPar
\ParallelLText{$^{2}$Forsothe the erthe was idel and voide, and derknessis weren on the face of depthe; and the Spiryt of the Lord was borun on the watris.}
\ParallelRText{$^{2}$and the earth being without form and empty, and darkness on the face of the deep, and the Spirit of God moving gently on the face of the waters,}
\ParallelPar
\end{Parallel}
\vspace{2 cm}
\begin{Parallel}{}{}
\ParallelLText{\noindent\emph{Wycliffe Bible}, 1382}
\ParallelRText{\noindent\emph{Green's Literal Translation}, 1993}
\ParallelPar
\ParallelLText{\noindent\begin{minipage}[t]{2.4in}\lettrine{I}{n}
the bigynnyng God made of nouyt heuene and erthe.\end{minipage}}
\ParallelRText{\noindent\begin{minipage}[t]{2.4in}\lettrine{I}{n}
the beginning God created the heavens and the earth;\end{minipage}}
\ParallelPar
\ParallelLText{$^{2}$Forsothe the erthe was idel and voide, and derknessis weren on the face of depthe; and the Spiryt of the Lord was borun on the watris.}
\ParallelRText{$^{2}$and the earth being without form and empty, and darkness on the face of the deep, and the Spirit of God moving gently on the face of the waters,}
\ParallelPar
\end{Parallel}
\end{document}
答案3
编辑:我明白了
手册lettrine
中给出了解决方法的提示(第 4 页)
如果必须在以“lettrine”开头的段落中包含列表,则必须
\parshape=0
在列表结束后立即添加该命令。
简单写作
\ParallelLText{\lettrine{I}{n} the bigynnyng God made of nouyt heuene and erthe.\parshape=0}
这看起来更像是 中的一个错误lettrine
,与 无关parallel
,因为parshape=0
在普通用法中,添加会将首字下沉放在边距中(并且lhang
会忽略设置parshape=0
):
\lettrine{T}{est} this is some long text that should wrap onto a second line. It will end with \texttt{parshape=0}. \parshape=0
\lettrine{T}{est} this is some long text that should wrap onto a second line. It \emph{does not} end with \texttt{parshape=0}.
相反,我们创建了两个新命令:\ParallelLtextL
和,\ParallelRTextL
它们接受 3 个参数:2 个用于\Lettrine
和其余的并行文本。还有一个新长度,\LWidth
用于保存首字下沉的宽度。
\newlength{\LWidth}
\newcommand{\ParallelLTextL}[3]{\settowidth{\LWidth}{\LettrineFont{#1}}%
\ParallelLText{\lettrine{#1}{#2}#3\parshape=1 \LWidth \dimexpr\ParallelLWidth - \ParallelMainMidSkip\relax}%
}
\newcommand{\ParallelRTextL}[3]{\settowidth{\LWidth}{\LettrineFont{#1}}%
\ParallelRText{\lettrine{#1}{#2}#3\parshape=1 0pt \dimexpr\ParallelRWidth - \LWidth\relax}%
}
我们的使用方法如下:
\ParallelLTextL{I}{n}{ the bigynnyng God made of nouyt heuene and erthe.}
\ParallelRTextL{I}{n}{ the beginning God created the heavens and the earth;}