TransWikia.com

smaller subcaption

TeX - LaTeX Asked on September 29, 2021

I want a smaller subcaption so I used the following:

usepackage{subcaption}
setkomafont{captionlabel}{sffamilybfseries}
setkomafont{subcaption}{scriptsize}

But this doesn’t change anything except the captionlabel is thick.

Can someone help me?

2 Answers

captionsetup[subfigure]{font=scriptsize,labelfont=scriptsize}

after begin{figure}

Answered by js bibra on September 29, 2021

If you load caption, which is the case when you load subcaption, it takes over KoMa-script features.

In order to change the font size in subcaptions, you need to set the size key.

documentclass{scrartcl}
usepackage{subcaption}

captionsetup{labelfont={sf,bf}}
captionsetup[subfigure]{size=scriptsize}

begin{document}

begin{figure}
centering

begin{subfigure}{5cm}
centering
fbox{rule{0pt}{3cm}rule{3cm}{0pt}}
caption{Subfigure}
end{subfigure}qquad
begin{subfigure}{5cm}
centering
fbox{rule{0pt}{3cm}rule{3cm}{0pt}}
caption{Subfigure}
end{subfigure}

caption{A caption}

end{figure}

end{document}

The default value for size is smaller, which means that it uses one size smaller than the font size in main captions.

enter image description here

Answered by egreg on September 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP