Graphics, Figures & Tablessubfigure caption formating

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

subfigure caption formating

Post by dmuthu_cse »

Hello friends,

I got a problem with subfigure package. The caption of the subfigure package, is not according to my wish,

I need the caption to be as "1a". But it is showing as "1(a)". In enclosing the example for your reference.

Code: Select all

\documentclass[10.5pt,english]{book}
\usepackage{fancybox,array,amsmath,amssymb}
\usepackage{txfonts}
\usepackage[centering,
  headheight=14pt,
  headsep=10pt,
  includehead,
  papersize={5.5in,8.5in},
  text={4in,6.7in},
  dvips=false,
  pdftex=false,
  vtex=false]{geometry}

\usepackage[cam,a4,center,dvips]{crop}
\usepackage{graphicx,colortbl,wrapfig}
\usepackage{fancyhdr,setspace,babel}
\usepackage{ltxtable,tabularx,booktabs}


% caption formatting %
\usepackage[font=small,format=plain,labelfont=bf,up,labelsep=space]{caption}

\usepackage{subfig}
\renewcommand{\thesubfigure}{\thefigure(\alph{subfigure})}
\captionsetup[subfloat]{font=footnotesize,
labelformat=simple,labelsep=space}


\begin{document}

\begin{figure}[!h]
\centering
\subfloat[]{
\label{fig:first}
\includegraphics{2-1a.eps}}
\quad
\subfloat[]{
\label{fig:second}
\includegraphics{2-1b.eps}}
\quad
\subfloat[]{
\label{fig:third}
\includegraphics{2-1c.eps}}
\end{figure}

\end{document}
Thank you in advance,

Regards,
Muthu

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

subfigure caption formating

Post by gmedina »

Hi Muthu,

in your code, replace

Code: Select all

\usepackage{subfig}
\renewcommand{\thesubfigure}{\thefigure(\alph{subfigure})}
\captionsetup[subfloat]{font=footnotesize,
labelformat=simple,labelsep=space}
with

Code: Select all

\usepackage{subfig}
\renewcommand{\thesubfigure}{\thefigure\alph{subfigure}}
\captionsetup[subfloat]{font=footnotesize,
labelformat=simple,labelsep=space}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

Re: subfigure caption formating

Post by dmuthu_cse »

Hello gmedina,

That's really interesting...

I tried with caption package options... Now it is looking fine.

Regards,
Muthu :)
Post Reply