<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass{article}
\usepackage[osf,p,nomath]{libertinus}
\usepackage{microtype}
\usepackage[pdfusetitle,hidelinks]{hyperref}
\usepackage[noend,nofamiliar,noeledsec,series={A}]{reledmac}

\usepackage[bidi=default,english]{babel}
\babelprovide[import=he]{hebrew}
\babelfont{rm}{Libertinus Serif}
\babelfont[hebrew]{rm}{Ezra SIL}
\newcommand{\texthebrew}[2][]{\foreignlanguage{hebrew}{#2}}
\newcommand{\textenglish}[2][]{\foreignlanguage{english}{#2}}
\usepackage{metalogo}
\Xparafootsep{$||$\ }
\Xarrangement{paragraph}
\Xafterlemmaseparator{0.5em}
\Xbeforelemmaseparator{0.25em}

\linenumincrement{1}
\firstlinenum{1}

% Here the reledmac settings for RTL
\Xwrapcontent{\textenglish}
\Xbhookgroup{\textdir TRT}
\Xlemmaseparator{[}%Will be reversed by Ezra SIL font

  \title{Editing right-to-left text}
\date{}
\begin{document}
\maketitle
\begin{abstract}
  In this example, we use Lua\LaTeX.
  After this introduction page, all the document will be in Hebrew, except some notes in English.
  So the apparatus will be typeset right-to-left, except the comment, which will be typeset left-to-right.
\end{abstract}


\newpage
\selectlanguage{hebrew}

\beginnumbering


\pstart
\edtext{×‘Ö°Ö¼×¨Öµ××©Ö´×Ö–×™×ª ×‘Ö¸Ö¼×¨Ö¸Ö£×}{\Afootnote{Some comment (1)}}
×Ö±×œÖ¹×”Ö´Ö‘×™× ×ÖµÖ¥×ª ×”Ö·×©Ö¸Ö¼××žÖ·Ö–×™Ö´× ×•Ö°×ÖµÖ¥×ª ×”Ö¸×Ö¸Ö½×¨Ö¶×¥×ƒ
\edtext{×•Ö°×”Ö¸×Ö¸Ö—×¨Ö¶×¥ ×”Ö¸×™Ö°×ªÖ¸Ö¥×”}{\Afootnote{Some comment (2)}}
\edtext{%
 ×ªÖ¹Ö¨×”×•Ö¼Ö™ ×•Ö¸×‘Ö¹Ö”×”×•Ö¼ ×•Ö°×—Ö¹Ö–×©Ö¶××šÖ° ×¢Ö·×œÖ¾×¤Ö°Ö¼×&nbsp;ÖµÖ£×™ ×ªÖ°×”Ö¹Ö‘×•× ×•Ö°×¨Ö£×•Ö¼×—Ö· ×Ö±×œÖ¹×”Ö´Ö”×™× ×žÖ°×¨Ö·×—Ö¶Ö–×¤Ö¶×ª ×¢Ö·×œÖ¾×¤Ö°Ö¼×&nbsp;ÖµÖ¥×™ ×”Ö·×žÖ¸Ö¼Ö½×™Ö´××ƒ
×•Ö·×™Ö¹Ö¼Ö¥××žÖ¶×¨ ×Ö±×œÖ¹×”Ö´Ö–×™× ×™Ö°×”Ö´Ö£×™ ×Ö¹Ö‘×•×¨ ×•Ö·Ö½×™Ö°×”Ö´×™Ö¾×Ö¹Ö½×•×¨×ƒ%
}{\Afootnote{Some comment on a long lemma (3)}}
×•Ö·×™Ö·Ö¼Ö§×¨Ö°× ×Ö±×œÖ¹×”Ö´Ö›×™× ×Ö¶×ªÖ¾×”Ö¸×Ö¹Ö–×•×¨ ×›Ö´Ö¼×™Ö¾×˜Ö¹Ö‘×•×‘ ×•Ö·×™Ö·Ö¼×‘Ö°×“ÖµÖ¼Ö£×œ ×Ö±×œÖ¹×”Ö´Ö”×™× ×‘ÖµÖ¼Ö¥×™×Ÿ ×”Ö¸×Ö¹Ö–×•×¨ ×•Ö¼×‘ÖµÖ¥×™×Ÿ ×”Ö·×—Ö¹Ö½×©Ö¶××šÖ°×ƒ
\edtext{×•Ö·×™Ö´Ö¼×§Ö°×¨Ö¸Ö¨× ×Ö±×œÖ¹×”Ö´Ö¤×™××€}{\Afootnote{Some comment (4)}}
 ×œÖ¸×Ö¹×•×¨Ö™ ×™Ö¹Ö”×•× ×•Ö°×œÖ·×—Ö¹Ö–×©Ö¶××šÖ° ×§Ö¸Ö£×¨Ö¸× ×œÖ¸Ö‘×™Ö°×œÖ¸×” ×•Ö·Ö½×™Ö°×”Ö´×™Ö¾×¢Ö¶Ö¥×¨Ö¶×‘ ×•Ö·Ö½×™Ö°×”Ö´×™Ö¾×‘Ö¹Ö–×§Ö¶×¨ ×™Ö¹Ö¥×•× ×Ö¶×—Ö¸Ö½×“×ƒ ×¤
 \edtext{×•Ö·×™Ö·Ö¼Ö¤×¨Ö°× ×Ö±×œÖ¹×”Ö´×™×Ö™}{\Afootnote{Some comment (5)}}
 ×Ö¶×ªÖ¾×›Ö¸Ö¼×œÖ¾×Ö²×©Ö¶×Ö£×¨ ×¢Ö¸×©Ö¸×‚Ö”×” ×•Ö°×”Ö´×&nbsp;ÖµÖ¼×”Ö¾×˜Ö¹Ö–×•×‘ ×žÖ°×Ö¹Ö‘×“ ×•Ö·Ö½×™Ö°×”Ö´×™Ö¾×¢Ö¶Ö¥×¨Ö¶×‘ ×•Ö·Ö½×™Ö°×”Ö´×™Ö¾×‘Ö¹Ö–×§Ö¶×¨ ×™Ö¹Ö¥×•× ×”Ö·×©Ö´Ö¼××©Ö´Ö¼Ö½××™×ƒ ×¤

\pend
\endnumbering

\end{document}
</pre></body></html>