Graphics, Figures & Tables ⇒ Can't justify caption with subfig package
Can't justify caption with subfig package
When I use subfig package the captions do not full justify. According to documentation captions should full justify by default, but instead they are centered.
When I use the command \captionsetup{justification=justified} captions are centered. However If I change the to raggedright, raggedleft or any other options they work. Only justified doesn't work.
Can someone help?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Can't justify caption with subfig package
That's not completely true, they only get justified when they are longer than one single line. Otherwise they got centered by default.monkey wrote:When I use subfig package the captions do not full justify. According to documentation captions should full justify by default, but instead they are centered.
If you want to switch the extra handling of "short" captions off, you could do so with
Code: Select all
\captionsetup{singlelinecheck=off}
Code: Select all
\captionsetup[subfloat]{singlelinecheck=off}
HTH,
Axel
Re: Can't justify caption with subfig package
Re: Can't justify caption with subfig package
Would it be possible to post a small but complete LaTeX document which shows the problem?
Axel
Can't justify caption with subfig package
Code: Select all
\documentclass[]{revtex4-1}
\usepackage{graphicx}% Include Fig. files
\usepackage{subfig}
\begin{document}
\begin{figure}
\includegraphics[trim = 0 0 0 0, clip, width=\linewidth]{fig.eps}
\caption[]{This is aaaaaaa aaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa long caption ......... .......... ............ ............ ............. ............. ....... ........... ........... ........... ........... .......... ........ .......... ............}
\label{fig:label}
\end{figure}
\end{document}
Can't justify caption with subfig package
Code: Select all
Package caption Warning: Unsupported document class (or package) detected,
(caption) usage of the caption package is not recommended.
See the caption package documentation for explanation.
Code: Select all
\documentclass[]{revtex4-1}
\usepackage[demo]{graphicx}% Include Fig. files
\usepackage[caption=false]{subfig} % <=== "caption=false" added
\begin{document}
\begin{figure}
\includegraphics[trim = 0 0 0 0, clip, width=\linewidth]{fig.eps}
\caption[]{This is aaaaaaa aaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa long caption ......... .......... ............ ............ ............. ............. ....... ........... ........... ........... ........... .......... ........ .......... ............}
\label{fig:label}
\end{figure}
\end{document}
Re: Can't justify caption with subfig package
sumesh