Hi (again).
I've set up a float and have put a couple of subfigures with cross-reference labels in it as documented on the LyX wiki. The trouble is that one of the pictures is fairly small, but has a long associated caption. For some reason, it seems the default behaviour is to limit the width of the caption to the width of the picture, which means my caption takes up a lot of vertical space.
Is there an option to set the width of the caption to a specific width?
LyX ⇒ subfigures - large captions, small images
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
subfigures - large captions, small images
Hi,
perhaps the subfigure documentation gives the answer to your question.
By the way it is recommended to use the newer subfig package instead of subfigure.
Stefan
perhaps the subfigure documentation gives the answer to your question.
By the way it is recommended to use the newer subfig package instead of subfigure.
Stefan
LaTeX.org admin
subfigures - large captions, small images
It doesn't, I've flicked through it and there doesn't seem to be anything helpful in that respect.Stefan_K wrote:perhaps the subfigure documentation gives the answer to your question.
As I said, I'm following the instructions on the LyX wiki, although if subfig supports what I want to do I'll happily switch to that, given that I'm doing subfigures in ERT anyway. Does it?Stefan_K wrote:By the way it is recommended to use the newer subfig package instead of subfigure.
Also, is it possible to centre the caption for normal figures? \centering and \begin{center} \end{center} wrapped around the figure text don't seem to make any difference.
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
subfigures - large captions, small images
Hi,
Concerning subfigure and subfig I would have to read the documentation too. But not today, I have to go offline soon.
Stefan
That's easy with the caption package, it has a lot of features (including centering) and is very well documented.paradigm wrote: Also, is it possible to centre the caption for normal figures? \centering and \begin{center} \end{center} wrapped around the figure text don't seem to make any difference.
Concerning subfigure and subfig I would have to read the documentation too. But not today, I have to go offline soon.
Stefan
LaTeX.org admin
subfigures - large captions, small images
Thanks for the centering tip, that fixed centering figure captions for me nicely 
I managed to get the functionality I wanted for subfigures with plenty of ERT - the trick was to use the subfigure environment defined in the package subcaption, rather than the subfigure package itself. This meant I could set the subfigures to have width \linewidth, so the captions spread the entire line.
\begin{subfigure}{\linewidth} \centering
<picture goes here>
\caption{ablah blah blah blah}
<label goes here>
\end{subfigure}
where the code in red is LyX ERT.

I managed to get the functionality I wanted for subfigures with plenty of ERT - the trick was to use the subfigure environment defined in the package subcaption, rather than the subfigure package itself. This meant I could set the subfigures to have width \linewidth, so the captions spread the entire line.
\begin{subfigure}{\linewidth} \centering
<picture goes here>
\caption{ablah blah blah blah}
<label goes here>
\end{subfigure}
where the code in red is LyX ERT.