1

Eyal's babel incompatibility of the week... this time a question due to H.R. on the IVRITEX mailing list.

The babel is incompatible with the subfig package. If you add a subfig with a caption:

\documentclass[english,hebrew]{article}
\usepackage{babel}
\usepackage{subfig}


\begin{document}
   \begin{figure}[tbph]
      \subfloat[\L{A sub-figure}]{\L{The subfigure}}
      \caption{\L{A figure caption}}
   \end{figure}

\end{document}

The sub-figure is numbered; the numbering uses Hebrew letters (Aleph, Bet, Gimel; in this case, Aleph - א). The numbering is enclosed in parentheses, but due to direction issues, the parentheses are in the opposite directions of where they should be:

rendering

Is there a workaround for this problem? A minimal workaround with no additional package dependencies is preferred.

Note: You don't see this problem with Arabic instead of Hebrew (and the \L's removed) since when it's Arabic, you get a left-to-right float and Latin enumeration. Maybe it manifests in some other way with Arabic.

1 Answer 1

1

H.R.'s own workaround uses the caption package: He replaces

\usepackage{subfig}

with

\usepackage{caption}
\DeclareCaptionLabelFormat{hebparens}{)#2(}
\usepackage[labelformat=hebparens,labelsep=space]{subfig}

which resolves the issue; apparently subfig loads caption anyway, so, I guess this solves it.

6
  • Since this does not seem to represent an answer, you should include it in your original post.
    – Werner
    Jul 10, 2013 at 15:59
  • @Werner: Tweaked the question, now this is a bona fide, though sub-optimal, answer :-)
    – einpoklum
    Jul 10, 2013 at 19:44
  • 1
    @einpoklum You say this is not what you are looking for, so it still seems to be part of the question rather than an answer.
    – Joseph Wright
    Jul 13, 2013 at 4:58
  • @JosephWright: I no longer say that... I should have been more exact in phrasing the question. The problem is the flipping. The solution with caption does solve the problem, but I would prefer another solution - just like you might with any other question on TeX.SX which has some solution provided...
    – einpoklum
    Jul 13, 2013 at 12:04
  • subfig uses caption as part of the package. So, using a solution that "loads caption" is perfectly fine. Do you still require a solution that doesn't load caption verbatim?
    – Werner
    Jul 14, 2013 at 20:20

You must log in to answer this question.

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