4

I have a LaTex file. I need to write figure captions italic but table captions normal. I was able to make all captions Italic with the commands below but I should preserve table captions in normal font. How can I do that?

\usepackage{caption}
\DeclareCaptionLabelFormat{italic}{\textit{#1 #2}}
\captionsetup{labelformat=italic}

1 Answer 1

6

I suggest the following:

\usepackage{caption}
\captionsetup[figure]{font=it}

enter image description here

\documentclass{article} 
\usepackage{caption}
\captionsetup[figure]{font=it}

\begin{document} 
\begin{table}[h]  \caption{A table}  \end{table}
\begin{figure}[h] \caption{A figure} \end{figure}
\end{document}
0

You must log in to answer this question.

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