Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
Since this does not seem to represent an answer, you should include it in your original post. –  Werner Jul 10 '13 at 15:59
    
@Werner: Tweaked the question, now this is a bona fide, though sub-optimal, answer :-) –  einpoklum Jul 10 '13 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 '13 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 '13 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 '13 at 20:20
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.