2

I have written a paper in overleaf and used \subfloat and subfigure environment at the same time. I only included \usepackage{subcaption}. When I wanted to compile it on the local computer, it says: undefined control sequence subfloat. After I searched for this problem, found out that for using \subfloat I should include subfig package and it cannot be included with subcaption package at the same time. How overleaf handles this problem? I have used many times from \subfloat and subfigure environment? Is there any way I can compile the file on my computer?

1
  • 1
    It seems that Overleaf doesn't have installed recent version )(1.3) of the subcaption package. Ask Overleaf support to help you with installation of now already one year old version 1.3 (from 2020/08/24) which support \subfloat as well subfigure environments.
    – Zarko
    Oct 20, 2021 at 0:16

1 Answer 1

3

Since version 1.3 (2019/08/31), the subcaption package also offers a \subfloat command. From the documentation:

enter image description here

Your local installation uses an older version of the subcaption package.

3
  • @luisturcio: As far as I understood, the OP successfully compiled a document using a combination of subfloat and subcaption on overleaf, but got the error message when trying to compile the same document on their local computer. Since it worked on overleaf, but not using the local installation, the latter must be the outdated one.
    – leandriis
    Oct 20, 2021 at 5:25
  • Sorry if I misunderstood the original question Oct 20, 2021 at 11:37
  • Thanks a lot for your answer
    – user137927
    Oct 20, 2021 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .