2

I need to use XeLaTeX with the bidi package in my document. However, after long testing, it turned out that bidi somehow allows setspace to modify the line spacing of the footnotes, but keeps the spacing between footnotes the same, thus creating uneven spacing. See my example below with a picture:

\documentclass[a4paper,12pt]{article}
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum}
\usepackage{bidi}
\begin{document}
\lipsum[1]\footnote{\lipsum[4]}

\lipsum[2]\footnote{\lipsum[3]}
\end{document}

Uneven spacing

How would it be possible to restore the original spacing in the footnotes?

1 Answer 1

2

The setspace package inserts the following into \@footnotetext to ensure that footnotes are single spaced:

\def\baselinestretch{\setspace@singlespace}

We can use hooks provided by bidi to do the same for it's three kinds of footnotes.

MWE

\documentclass[a4paper,12pt]{article}
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum}
\usepackage{bidi}
\makeatletter
\renewcommand*{\bidi@@footnotetext@font}{%
  \def\baselinestretch{\setspace@singlespace}%
  \footnotesize}
\renewcommand*{\bidi@@LTRfootnotetext@font}{%
  \def\baselinestretch{\setspace@singlespace}%
  \footnotesize}
\renewcommand*{\bidi@@RTLfootnotetext@font}{%
  \def\baselinestretch{\setspace@singlespace}%
  \footnotesize}
\makeatother

\begin{document}
\lipsum[1]\footnote{\lipsum[4]}

\lipsum[2]\footnote{\lipsum[3]}
\end{document}
2
  • If you load setspace after bidi you overwrite the special \@footnotetext definition of bidi. Mar 13, 2019 at 7:53
  • @UlrikeFischer, hmm. Good call. As I look more closely, bidi includes a helpful hook that can be used to set the spacing pretty easily. I'll change my answer. Mar 13, 2019 at 12:55

You must log in to answer this question.

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