5

I'm using Emacs to typeset a document which has English as its main language but which will use Hebrew and Greek as well.

You can see on my screenshot how the \footnote command shows two open brackets as opposed to the correct open and close brackets.

{\footnoteA{This is a Hebrew related footnote

as opposed to the correct way

\footnoteA{This is a Hebrew related footnote}

The end result however, on the PDF is correct.

Incorrect handling of left-to-right text within a right-to-left paragraph

This is a MWE:

\documentclass{article}
\usepackage{reledmac}
\usepackage{reledpar}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{greek, hebrew}
\setmainfont{SBL BibLit}
\begin{document}
\begin{pairs}
\begin{Leftside}
\beginnumbering
\begin{hebrew}
  \pstart

בְּרֵאשִׁ֖ית\footnoteA{This is a Hebrew related footnote} בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃

  \pend
\end{hebrew}
\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\begin{greek}
  \pstart
  Ἐν ἀρχῇ\footnoteA{This is a Greek related footnote} ἐποίησεν ὁ
  θεὸς τὸν οὐρανὸν καὶ τὴν γῆν.
  \pend
\end{greek}
\endnumbering
\end{Rightside}
\end{pairs}
\Column
\end{document}

Note how the text a line of Hebrew with mixed English characters is rendered correctly when edited using TextEdit (i.e. test editor that comes with MacOS)

enter image description here

  • I thought that inserting `LEFT-TO-RIGHT MARK` and `RIGHT-TO-LEFT MARK` (see https://www.gnu.org/software/emacs/manual/html_node/elisp/Bidirectional-Display.html) would have helped, but I can't make it work. For the record, this problem appears with most TeX editors, including TeXstudio, Texmaker, TeXworks, but not with `vi` which is able to correctly render the text out-of-the-box, oops. – giordano Jan 20 '16 at 18:26
  • A follow up on this. To make it work we warp the phrase with LEFT-TO-RIGHT MARK (on both ends). After that is done the visual display corrects itself. It works beautifully! – filipeamoreira Jan 25 '16 at 15:29
  • Please answer your own question, so other people can benefit from this solution `;-)` – giordano Jan 25 '16 at 19:52

1 Answers1

4

I've since find out that wrapping the phrase on both ends with the LEFT-TO-RIGHT MARK gives the desired result. To do that position your cursor appropriately and C-x 8 RET LEFT-TO-RIGHT MARK. The visual display will fix itself and the text will be shown correctly.