Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
I cannot reproduce the error by copying/pasting the preambles you've tried. Please provide a minimum working example. –  juliohm Oct 12 '13 at 15:08
1  
@juliohm, link to MWE added to the question. –  SS_Rebelious Oct 12 '13 at 15:25
    
Can you add a link to the .tex file for those like me that don't have Lyx? –  karlkoeller Oct 12 '13 at 16:00
    
@karlkoeller, a link added in question. –  SS_Rebelious Oct 12 '13 at 16:36
    
@SS_Rebelious You can't use both subfig and subcaption. By the way, the centering environment doesn't exist; one should only say \centering. –  egreg Oct 12 '13 at 22:45

1 Answer 1

up vote 3 down vote accepted

The error message you show in your question comes from not loading subfig, as it is subfig that defines \subfloat. Adding font=large as an option to subfig should work (requires the caption package as well, I think), i.e.

\usepackage[font=large]{subfig}

And of course, remove the subfigure package from the preamble.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.