
我正在創建使用 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 中的邊距註釋。