[Tex/LaTex] Subcaption not in the centre in subfigure package

subcaptionsubfloats

In LaTeX, everything works fine with subfigure package, only one trouble is coming;
The subcaptions are placed a little towards left from the centre of two figures side by side, which doesnt loook good,,, I have tried everything using nooneline, hang , centrelast etc. but no desired result is coming . Kindly suggest me how could i move either the captions towards centre of figures or the figures such that subcaptions comes in centre.

Best Answer

This seems to work just fine for me:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{subfloat}
\usepackage{subcaption}
\usepackage{caption}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}
    \begin{subfigure}[b]{.5\linewidth}
        \centering
            \includegraphics[scale=1]{demo}
            \caption{Skeletal}
        \label{fig:SkeletalTissue}
    \end{subfigure}
    \begin{subfigure}[b]{.5\linewidth}
        \centering
            \includegraphics[scale=1]{demo}
            \caption{Cardiac}
        \label{fig:CardiacTissue}
    \end{subfigure}
    \caption{Types of Muscular Tissue}
    \label{fig:MuscularTissue}
\end{figure}
\end{document}

This is the result. Is this what you were looking for?enter image description here

Related Question