Featured Book

LaTeX Beginners Guide

Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 7 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

subfigure | Format of wrapped Captions Topic is solved

Add tags Information and discussion about graphics, figures & tables in LaTeX documents.

subfigure | Format of wrapped Captions

Postby daviddoria on Wed Nov 16th, 2011

Is there a way to change the wrapping in a subfigure caption? E.g. in this figure: http://daviddoria.com/Uploads/BlackWhiteSequence.png I don't like how the word "filled" in subfigure a) is not aligned with the word "Image".

Here is another example:

Code: Select all  •  Open in writeLaTeX
\documentclass[10pt]{article}
\usepackage{subfigure}
\usepackage{graphicx}
\usepackage{float
} % to use [H] placement

\begin{document}
\section{Test Graphics}

In Figure \ref{fig:subfigureExample} we show three things. In \subref{fig:subfig1} we show the first thing, in \subref{fig:subfig2} we show the second thing, and in \subref{fig:subfig3} we show the third thing. In \ref{fig:subfig1
} we do something.
%multiple figures
\begin{figure}[ht!]
\centering
\subfigure[Caption of subfigure 1]{
\fbox{\rule{0pt}{2in} \rule{0.2\linewidth}{0pt}
}%box
%\includegraphics[width=0.4\linewidth]{Soldier}%actual image
\label{fig:subfig1}
}
\subfigure[Caption of subfigure 2]{
\fbox{\rule{0pt}{2in} \rule{0.2\linewidth}{0pt}}
\label{fig:subfig2}
}
\subfigure[Caption of subfigure 3]{
\fbox{\rule{0pt}{2in} \rule{0.2\linewidth}{0pt}}
\label{fig:subfig3}
}
\caption[Optional caption for list of figures]{Caption of subfigures \subref{fig:subfig1}, \subref{fig:subfig2} and \subref{fig:subfig3}}
\label{fig:subfigureExample}
\end{figure}


\end{document
}
 


Any thoughts on how to make this look better?

David
Last edited by daviddoria on Wed Nov 16th, 2011, edited 1 time in total.
daviddoria
 
Posts: 60
Joined: Tue Sep 30th, 2008

Re: subfigure | Format of wrapped Captions  Topic is solved

Postby sommerfee on Wed Nov 16th, 2011

daviddoria wrote:I don't like how the word "filled" in subfigure a) is not aligned with the word "Image".


Take a peek at the subfigure documentation, I'm quite sure there is a package option like "hang" or similar.
User avatar
sommerfee
 
Posts: 493
Joined: Mon Apr 9th, 2007

Re: subfigure | Format of wrapped Captions

Postby daviddoria on Wed Nov 16th, 2011

Ah, hanging indent, that is the word I was looking for. None of my searches found 'hang' haha.

\usepackage[hang]{subfigure}

does the trick, thanks.

David
daviddoria
 
Posts: 60
Joined: Tue Sep 30th, 2008

Re: subfigure | Format of wrapped Captions

Postby localghost on Wed Nov 16th, 2011

Don't use the obsolete subfigure package [1]. Replace it with the subfig package from the same author (or other alternatives).
Code: Select all  •  Open in writeLaTeX
\documentclass[10pt]{article}
\usepackage[T1]{fontenc}
\usepackage[format=hang]{subfig}

\begin{document}
  \section{Test Graphics}
    In Figure \ref{fig:subfigureExample} we show three things. In \subref{fig:subfig1} we show the first thing, in \subref{fig:subfig2} we show the second thing, and in \subref{fig:subfig3} we show the third thing. In \ref{fig:subfig1} we do something.

  \begin{figure}[!ht]
    \centering
    \subfloat[Caption of subfigure 1\label{fig:subfig1}
]{%
      \rule{0.2\linewidth}{2in}
    }
    \subfloat[Caption of subfigure 2\label{fig:subfig2}
]{%
      \rule{0.2\linewidth}{2in}
    }
    \subfloat[Caption of subfigure 3\label{fig:subfig3}
]{%
      \rule{0.2\linewidth}{2in}
    }
    \caption[Optional caption for list of figures]{Caption of subfigures \subref{fig:subfig1}, \subref{fig:subfig2} and \subref{fig:subfig3}}\label{fig:subfigureExample}
  \end{figure}
\end{document
}


[1] View topic: Obsolete Packages and Document Classes — Avoid Usage!


Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: subfigure | Format of wrapped Captions

Postby jane on Tue Nov 27th, 2012

This is exactly what I was looking for! Thank you so much!
jane
 
Posts: 1
Joined: Tue Nov 27th, 2012


Return to Graphics, Figures & Tables

Who is online

Users browsing this forum: No registered users and 7 guests