我正在使用 minipage 和 wrapfig 选项让文本环绕几个单词。我无法正确对齐希伯来语。它应该对齐到右边。
\documentclass[14pt]{octavo}
\usepackage[fontsize=14pt]{fontsize}
\usepackage[
paperwidth=160mm, paperheight=240mm,
%layoutsize={110mm, 180mm},
%layoutoffset={5mm, 10mm},
textheight=18cm,
textwidth=10.5cm,
inner=2.5cm,
%marginparwidth=20pt,
]
{geometry}
\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage[babel=true]{microtype}%%%
%MULTIPLE COLUMNS
\usepackage{paracol}
\twosided
\footnotelayout{m}
\columnsep=0.05\textwidth
\columnratio{0.5}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{ebgaramond}
\setdefaultlanguage{italian}
\setotherlanguage{hebrew}
\newfontfamily{\hebrewfont}{New Peninim MT}
\begin{document}
\begin{wrapfigure}{r}{0.4\textwidth}
\begin{minipage}{0.27\linewidth}
{\fontsize{46pt}{46pt}\selectfont \vspace{3pt} \texthebrew{אלה} \vspace{1pt}
\noindent
\texthebrew{הדברים}}
\vspace{5pt}
\end{minipage}\end{wrapfigure}
\lipsum[1-2]
\end{document}
答案1
按照@DavidCarlisle 的建议,\selectlanguage{hebrew}
改用\texthebrew{}
\documentclass[14pt]{octavo}
\usepackage[fontsize=14pt]{fontsize}
\usepackage[
paperwidth=160mm, paperheight=240mm,
%layoutsize={110mm, 180mm},
%layoutoffset={5mm, 10mm},
textheight=18cm,
textwidth=10.5cm,
inner=2.5cm,
%marginparwidth=20pt,
]
{geometry}
\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage[babel=true]{microtype}%%%
%MULTIPLE COLUMNS
\usepackage{paracol}
\twosided
\footnotelayout{m}
\columnsep=0.05\textwidth
\columnratio{0.5}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{ebgaramond}
\setdefaultlanguage{italian}
\setotherlanguage{hebrew}
\newfontfamily{\hebrewfont}{New Peninim MT}
\begin{document}
\begin{wrapfigure}{r}{0.4\textwidth}
\selectlanguage{hebrew}
\begin{flushright}
{\fontsize{46pt}{46pt}\selectfont אלה \\ הדברים
}
\end{flushright}
\vspace{5pt}
\end{wrapfigure}
\lipsum[1-2]
\end{document}