2

After many years of getting great answers here it is time to post my own question. I'm writing my thesis and as I need to write the abstract also in Hebrew I'm using the babel package.

In the body of my thesis I'm using many times subfigures (with the subfig package). In many cases my subfigures have their own caption and the whole "object" has a general caption.

It comes out that the babel package modifies the alignment of the general caption to be centered.

When I tried to call the caption package and by captionsetup align it to the left what I got is the subcaptions are aligned to the left while the general caption is still centered.

Does anyone have a good solution how to keep the subcaption centered while aligning to the left the overall caption?

Here is an example for the code:

\documentclass[a4paper,hebrew,12pt]{article}

\usepackage{graphicx}
\usepackage[margin=1.0in]{geometry}
\usepackage{subfig}

% Hebrew %
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,english]{babel}


% % % %  % % % %
\begin{document}


% % % % % % % % % % % %
\begin{figure} [!t]%
        \begin{center}
        \subfloat[][]{\includegraphics[scale=0.41]{happy}}%
    \qquad
    \subfloat[][]{\includegraphics[scale=0.41]{neutral}}%
    \qquad
    \subfloat[][]{\includegraphics[scale=0.41]{sad}}
    \end{center}%
        %
            \caption{Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla some text that nobody cares about....}
\end{figure}
% % % % % % % % % % % %
% % % % % % % % % % % %



\end{document}

Here is the result:

enter image description here

and when I remove the babel package I'm getting

enter image description here

  • please place the package after documentclass – Ñako Jun 13 at 11:50
1
    \documentclass[a4paper,hebrew,12pt]{article}
    % Hebrew %
    \usepackage[utf8x]{inputenc}
    \usepackage[hebrew,english]{babel}

    \usepackage{graphicx}
    \usepackage[margin=1.0in]{geometry}
    \usepackage{subfig}

    %% Hebrew %
    %\usepackage[utf8x]{inputenc}
    %\usepackage[hebrew,english]{babel}


    % % % %  % % % %
    \begin{document}


    % % % % % % % % % % % %
    \begin{figure} [!t]%
            \begin{center}
            \subfloat[][]{\includegraphics[scale=0.41]{example-image-a}}%
        \qquad
        \subfloat[][]{\includegraphics[scale=0.41]{example-image-a}}%
        \qquad
        \subfloat[][]{\includegraphics[scale=0.41]{example-image-a}}
        \end{center}%
            %
                \caption{Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla some text that nobody cares about....}
    \end{figure}
    % % % % % % % % % % % %
    % % % % % % % % % % % %



    \end{document}

enter image description here

  • Thanks! Problem solved. – Daniel Jun 16 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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