I am working on a Hebrew document, and I want to add margin notes. When I do this in an English document, everything works fine:
\documentclass[a4paper, oneside, 12pt]{book}
\usepackage{geometry}
\usepackage{marginnote}
\geometry{left=0.5cm, right=2.5cm, top=2cm, bottom=2cm, marginparwidth=2cm}
% \reversemarginpar
\begin{document}
\mainmatter
\chapter{Hello}
\marginnote{Hi}
\end{document}
and I get:
When I load babel and add the necessary code to get a Hebrew document, the margin note disappears:
\documentclass[a4paper, oneside, 12pt]{book}
\usepackage[bidi=basic, layout=tabular]{babel}
\babelprovide[main, import, alph=letters, Alph=letters]{hebrew}
\babelprovide[import]{english}
\babelfont[hebrew]{rm}{David CLM}
\babelfont[hebrew]{sf}{David CLM}
\usepackage{geometry}
\usepackage{marginnote}
\geometry{left=0.5cm, right=2.5cm, top=2cm, bottom=2cm, marginparwidth=2cm}
% \reversemarginpar
\begin{document}
\mainmatter
\chapter{שלום}
\marginnote{היי}
\end{document}
The result:
I tried to use \reversemarginpar and it didn't work. I also gave the option showframe to the geometry package to make sure there is enough space for the note, and it looks fine. I can't understand why I can't get the margin note to show correctly in my Hebrew document.


\makeatletter \newif\if@RTL \@RTLtrue \makeatother, see e.g. https://tex.stackexchange.com/a/678054/36296 – samcarter_is_at_topanswers.xyz Jan 16 '24 at 17:06\marginnoteand not\marginpar? – cabohah Jan 16 '24 at 18:24marginnoteallows you to put a note inside things;marginparonly works if you are in regular "outer" paragraph mode. – Thruston Jan 16 '24 at 20:20\marginnoteinstead of\marginpar. And I often see that beginners use\marginnotewhen\marginparwould be sufficient. – cabohah Jan 17 '24 at 06:35