Newline and centering in subfigure's caption

1,514 views
Skip to first unread message

enzo

unread,
Mar 13, 2011, 2:16:21 PM3/13/11
to LaTeX Users Group
Hello everybody! I am new to this group, and confused/nervous ;)
because of this latex issue:

I have 4 figures in a subfigure, and would like to have a centered
caption of the type:
"kd=0.1
ablablablabalbal
bablababl"

The problem is that if I use \\ inside the caption as:
\subfigure[kd=0.1 \\ ablablablabalbal \\ bablababl]
it gives an error

With \newline instead:
\subfigure[kd=0.1\newline ablablablabalbal \newline bablababl]
it compiles, but the caption is aligned to the left rather than the
center.

Any ides?
Thanks!

Werner Grundlingh

unread,
Mar 13, 2011, 2:34:29 PM3/13/11
to latexus...@googlegroups.com
What package(s) are you using to produce your subfigures?

enzo

unread,
Mar 13, 2011, 2:44:41 PM3/13/11
to LaTeX Users Group
I am calling \usepackage[tight,footnotesize]{subfigure}

Thanks!
Enzo

Werner Grundlingh

unread,
Mar 13, 2011, 3:14:13 PM3/13/11
to latexus...@googlegroups.com
A just read something about the caption package allowing line breaks:
Regardless, I suggest using the subfig package rather than subfigure. You'll notice in the documentation abstract that the former supersedes the latter. As a start, merely include the caption package
  \usepackage{caption}
and see whether it allows line breaks. There are many options to set once this works.

Werner

Oscar Núñez Mori

unread,
Mar 13, 2011, 8:47:16 PM3/13/11
to latexus...@googlegroups.com
I hope this help, Enzo
Regards
Oscar

 \begin{figure}
\begin{center}
\includegraphics[totalheight=1.5in,angle=0]{catedral}
\includegraphics[totalheight=1.5in,angle=0]{Centro_de_Chiclayo}\\
\includegraphics[totalheight=1.5in,angle=0]{Parque_Infantil}
\includegraphics[totalheight=1.5in,angle=0]{muelle}
\caption{Cuatro Acuarelas de mi Ciudad}
\end{center}
\end{figure} 

2011/3/13 enzo <enzod...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.




--
OSCAR NÚÑEZ MORI, Eng., MSc., PhD.(c)
CIP No: 49633
Computer Scientist & Consultant
Ph.: (+511) 734-3080
Cel:  (+51)  979-30-1616
PGP Key ID: 0xE3B4ADE2 DH/DSS 4096/3072  2010-10-11
PGP Fingerprint: CC9A 0125 5F19 EC24 62AE AFF9 811B D988 E3B4 ADE2
Skype: oscar.nunez.mori
E-mail: oscar.nunez.mori AT gmail.com

-------------------------------------------------------------------------
REAL CHANGING LIFE LINKS:
http://www.medjugorje.hr
http://www.medjugorje.org


Reply all
Reply to author
Forward
0 new messages