# Subcaption not in the centre in subfigure package

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.

• Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Marco Daniel Jun 9 '13 at 12:04

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?

• I copied ur script and added my figure file in it. But i still got the same result. I have added link of the result i have recieved..... tinypic.com/r/2v1wvo1/5 – user2467143 Jun 9 '13 at 16:20
• Dear @user2467143, your captions are centered, but are centered to the whole figure. This means the part of the axis where "amplitude m/s^2" is written is also part of the graphic. For tweaking your captions you can add \hspace*{5mm}\caption{Your caption}. 5mm have been selected arbitrary, but you can choose as much space as you see fit. – Mario S. E. Jun 9 '13 at 16:53

I have had the same problem with my master thesis and think I found a solution! The problem is that you have too much white "waste" around the figure. You can adjust the position of the image by for instance using \hline{-10pt}.

You need to use packages graphicx, float, and subcaption

Here is one example where four subfigures are located in 2x2, and the v-space is for obtaining some vertical "air" between the figures:

\documentclass[pdftex,10pt,b5paper,twoside]{book}
\usepackage{graphicx}
\usepackage{float}
\usepackage{subcaption}

\begin{document}
\begin{figure}[H]
\begin{subfigure}[t]{0.45\linewidth}
\hspace{-10pt}
\includegraphics[scale=0.3]{figure1}
\subcaption{A loooooooooooooooooooooooooooooooooooooooooooooooooooooong text over several lines!!} \vspace{1cm}} %\vspace is for obtaining some vertical "air" between the figures.
\end{subfigure}
\begin{subfigure}[t]{0.45\linewidth}
\hspace{-10pt}
\includegraphics[scale=0.3]{figure2}
\subcaption{A loooooooooooooooooooooooooooooooooooooooooooooooooooooong text over several lines!!}
\end{subfigure}
\\ %for changing line to next 2 figures
\begin{subfigure}[t]{0.45\linewidth}
\hspace{-10pt}
\includegraphics[scale=0.3]{figure3}
\subcaption{A loooooooooooooooooooooooooooooooooooooooooooooooooooooong text over several lines!!}
\end{subfigure}

• Please have a look at tex.stackexchange.com/questions/13625/… subfigure package is really archaic and problematic so it is already a solution just using subcaption but adjusting manual spacing is not the way to go. The package offers various customization possibilities. – percusse May 4 '14 at 17:09
• @percusse - The user is not using the subfigure package. I agree with you, though, that all these manual spacing adjustments aren't the way to go. – Mico May 4 '14 at 17:18
• @Mico Right. My wording is not that good. I meant that subcaption is much more than replacing subfigure but apparently failed to reflect that. . – percusse May 4 '14 at 17:23