我正在创建使用 LaTeX 制作的双语文本样本。所有内容都已完成,文本由三部分组成:英语注释(顶行);希伯来语文本(请注意,它是一种从右到左的语言);以及它们下面的自由翻译。
但对于最终产品,我想在希伯来语行右侧添加一个边注,给出诗节编号。问题是,\marginpar
这两个marginnotes
包都不能很好地与行间环境配合使用,注释出现在环境的顶部或底部。
有哪些解决方案可以使边注与行间文本的中间对齐?
\documentclass[draft, a4paper]{article}
\usepackage[a4paper, left=3.5cm, right=3.5cm, top=2.5cm,bottom=4cm]{geometry}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\linespread{1.1}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\newfontfamily\hebrewfont[Script=Hebrew]{Arial}
\newfontfamily\englishfont[Script=Latin]{Calibri}
\usepackage{expex}
\lingset{everygla=\footnotesize\englishfont\beginL, everyglb=\large\hebrewfont, everyglft=\large\englishfont\beginL,
glwordalign=center,
aboveglftskip=-.15cm,
glspace=1em,
}
\newcommand{\vsd}{\vspace{0.8cm}}
\begin{document}
\setLR
\begin{center} \LARGE
Demonstration of \LaTeX\ Layout
\end{center}
\begin{flushleft}
\section*{Book of Deuteronomy}
\subsection*{ Chapter 8 \textemdash\ The Seven Species of the Land of Israel}
\end{flushleft}
\setRL
\begingl
\gla {And you will keep} {the commandments} {the LORD} {your God} {to walk} {in his ways} {and to fear} him //
\glb וְשָׁמַרְתָּ, אֶת-מִצְוֹת השם אֱלֹהֶיךָ, לָלֶכֶת בִּדְרָכָיו, וּלְיִרְאָה אֹתוֹ //
\glft And you will keep the commandments of the LORD your God, to walk in his ways and to fear him.//
\endgl
\vsd %command for vertical space
\setLR
\section*{Textual Analysis}
\raggedright \large \englishfont
The verses above are taken from the Biblical Book of Deuteronomy.
\end{document}
我想要这样的东西:(通过 PDF 注释插入)。
答案1
注意:我没有 Arial 或 Calibri,所以我使用libertine
在以下示例中。
您需要marginnote
2017 年 4 月 22 日(或更新)的 1.2b 版本。以前的版本不支持从右到左的排版。但从 1.2b 版本开始,以下示例:
\documentclass[draft, a4paper]{article}
\usepackage[a4paper, left=3.5cm, right=3.5cm, top=2.5cm,bottom=4cm]{geometry}
\usepackage{parskip}
%\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\linespread{1.1}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\usepackage{libertine}
\usepackage{expex}
\lingset{everygla=\footnotesize\beginL, everyglft=\large\beginL,
glwordalign=center,
aboveglftskip=-.15cm,
glspace=1em,
}
\newcommand{\vsd}{\vspace{0.8cm}}
\usepackage{marginnote}[2017/04/22]% at least marginnote 1.2b needed
\reversemarginpar
\begin{document}
\setLR
\begin{center} \LARGE
Demonstration of \LaTeX\ Layout
\end{center}
\begin{flushleft}
\section*{Book of Deuteronomy}
\subsection*{ Chapter 8 \textemdash\ The Seven Species of the Land of Israel}
\end{flushleft}
\setRL
\begingl
\gla {And you will keep} {the commandments} {the LORD} {your God} {to walk} {in his ways} {and to fear} him //
\glb\marginnote{6 Verse}וְשָׁמַרְתָּ, אֶת-מִצְוֹת השם אֱלֹהֶיךָ, לָלֶכֶת בִּדְרָכָיו, וּלְיִרְאָה אֹתוֹ //
\glft And you will keep the commandments of the LORD your God, to walk in his ways and to fear him.//
\endgl
\vsd %command for vertical space
\setLR
\section*{Textual Analysis}
\raggedright \large
The verses above are taken from the Biblical Book of Deuteronomy.
\end{document}
结果是:
marginnote
1.2b 已经是 TL 2017 预测试的一部分(但不是 TL 2016)并且可用于 MiKTeX。
如果你无法更新到marginnote
1.2b,请查看我的回答:Unicode RTL 中的边注。