I want to set the font for captions and sub-captions in my Lyx document to 'large'. There is no issues with changing size of captions, but I can't change sub-captions. Here are the preambles I try to use and the errors I get. The errors are not caused by 'caption' package. Here are two preambles that I tried to use.
With subfigure
package:
\usepackage[large]{subfigure}
\usepackage[margin=10pt,font=large,labelfont=bf, labelsep=endash]{caption}
With subcaption
package:
\usepackage[font+=large]{subcaption}
\usepackage[margin=10pt,font=large,labelfont=bf, labelsep=endash]{caption}
In both cases I receive following errors:
\begin{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
\subfloat
[ --- ]{\begin{centering}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
Lyx MWE can be downloaded here.
LaTex verson (I used Lyx option Export-> LaTeX(plain) to create it) can be downloaded here.
Best Answer
The error message you show in your question comes from not loading
subfig
, as it issubfig
that defines\subfloat
. Addingfont=large
as an option tosubfig
should work (requires thecaption
package as well, I think), i.e.And of course, remove the
subfigure
package from the preamble.