[Tex/LaTex] How does one create, caption, label and refer to a subfigure

captionscross-referencingsubfloats

So its a fairly simple question to a problem people normally experience. I have a rough idea of what to do, but I am looking for the correct way of doing things. So in the solution I will include what would be the bare minimum requirements I think would get this problem solved. I am looking for feedback and corrections though.

So please tell me, how does one go about creating subfigures within a figure. After that, caption it. Then label it for reference and then refer to it in the text?

Best Answer

You can use the subfig package for this. For a brief guide on how to use it, including captioning, labeling and referencing, have a look at the excellent LaTeX WikiBook section covering it.