0

I have a style for Fig caption like below.

\def\fnum@figure{\small\it\bf\figurename{} \thefigure.}

This style change the caption and caption number bold. But I need bold and italic numbering and only italic for caption like below.

Fig 1.3: This is my caption

Any solution?

I have a style file and this file has a command like below.

\captionsetup{compatibility=false}

So \captionsetup[figure]{font={it,bf}} not worked.

In this style file there is a command \newcommand{\captionfonts}{\normalfont}

Can I edit this command and how?

@Werner I have tried your solution it works at a new document, but in my exist document its not work :( No any change.

5

2 Answers 2

1

You need to use

\captionsetup[figure]{
  font = it,
  labelfont = bf
}

which sets the entire caption font in italics, adding boldface only to the labelfont (which contains the float type, number and separator).

enter image description here

\documentclass{article}

\usepackage{caption}
\captionsetup{
  compatibility = false
}

% Set up caption options for figures
\captionsetup[figure]{
  font = it,
  labelfont = bf
}

\begin{document}

\begin{figure}
  \caption{A figure caption.}
\end{figure}

\end{document}

Of course, this only works if you are using a \documentclass that is patchable by caption.

1

Why not simply load the caption package and use

\captionsetup[figure]{font=it, labelfont+=bf} ?

You must log in to answer this question.

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