0

I am writing a book where I use covington for linguistic Arabic examples in transcription and I use marginnote and babel to have the examples in Arabic script in the margin. I am facing some strange issues.

  1. Placeing the marginnote at the beginning of the first glossing line makes the example number and the fist glossing line misaligned, and this seems to increase across exampples (a-c).

  2. The marginnote does not align with the first line but is to low. I can adjust this with \marginnotevadjust but they are unaligned by different lengths, so I can't find a set value for this.

  3. Addign the marginnote after \item seems more stable alignwise but introduces a new paragraph for some reason (d).

  4. Adding the marginnote anywhere but at the beginning of the line in the glossing has odd effects on the label number (e). (Perhaps a directionality issue?)

\documentclass{article}

\usepackage{marginnote}
\usepackage[english]{babel}
\babelfont[arabic]{rm}{Lateef}
\usepackage{bidi}
\usepackage{covington}
\renewcommand*\covsubexnumber[1]{#1.}

\reversemarginpar

\newcommand{\arnote}[1]{%
  \marginnote{%
    \sloppy
    \upshape
    \footnotesize
    \RL{\foreignlanguage{arabic}{#1}}%
    }%
    }

\begin{document}

\begin{subexamples}

\item
\digloss
  {\arnote{كرة القدم}kurat al-qadam}
  {ball \textsc{def}-foot}
  {football}

\item

\digloss
  {\arnote{كرة القدم}kurat al-qadam}
  {ball \textsc{def}-foot}
  {football}

\item

\digloss
  {\arnote{كرة القدم}kurat al-qadam}
  {ball \textsc{def}-foot}
  {football}


\item\arnote{كرة القدم}
\digloss
  {kurat al-qadam}
  {ball \textsc{def}-foot}
  {football}

\item
\digloss
  {kurat al-qadam\arnote{كرة القدم}}
  {ball \textsc{def}-foot}
  {football}

\end{subexamples}

\end{document}

enter image description here

What are the problems here and is there a better approach to get the desired result?

EDIT: Compiling with xelatex.

4
  • XeTeX or LuaTeX? Anyway, see the manual for the proper setup with babel (there is no bidi option when the package is loaded, for example). See also latex3.github.io/babel/guides/locale-arabic.html . Apr 23, 2022 at 11:39
  • @JavierBezos I am compiling with XeTeX.
    – Andreas
    Apr 24, 2022 at 21:39
  • I’m getting a somewhat different result, but anyway I removed all the settings related to directionality and the problems persisted, so I presume it’s related to the way covington is used (which, sadly, I don’t use). May 2, 2022 at 9:34
  • Right. Thanks for trying this out.
    – Andreas
    May 4, 2022 at 12:17

1 Answer 1

0

Somewhat hacky:

    \documentclass{article}
    
    \usepackage{marginnote}
    \usepackage[english]{babel}
    \babelfont[arabic]{rm}{Scheherazade}
    \usepackage{bidi}
    \usepackage{covington}
    \renewcommand*\covsubexnumber[1]{#1.}
    
    \reversemarginpar
    
    \newcommand{\arnote}[1]{%
        \marginnote{%
            \sloppy
            \upshape
            \footnotesize
            \RL{\foreignlanguage{arabic}{#1}}%
        }%
    }
    
    \newcommand*{\arnotesx}[1]{%
        \refstepcounter{enumi}\theenumi.%
        \arnote{#1}%
    }
    
    \begin{document}
        
        \begin{subexamples}[preamble={\arnote{كرة القدم}\vspace*{-1.6\baselineskip}}]
            
            \item%[\arnote{كرة القدم}]
            \digloss
            {kurat al-qadam}
            {ball \textsc{def}-foot}
            {football}
            
            \item[\arnotesx{كرة القدم}]
            \digloss
            {kurat al-qadam}
            {ball \textsc{def}-foot}
            {football}
            
            \item[\arnotesx{كرة القدم}]
            \digloss
            {kurat al-qadam}
            {ball \textsc{def}-foot}
            {football}
            
            \item[\arnotesx{كرة القدم}]
            \digloss
            {kurat al-qadam}
            {ball \textsc{def}-foot}
            {football}
            
            \item[\arnotesx{كرة القدم}]
            \digloss
            {kurat al-qadam}
            {ball \textsc{def}-foot}
            {football}
            
        \end{subexamples}
        
    \end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .