# Adjust the caption

As you know that the caption can \flushright or \flushleft by this command

\captionsetup{justification=raggedright, singlelinecheck=off}


Right now I want to make the caption of figure is in center and caption of table is in the right in the same paper. How can I do it?

The \captionsetup[<type>]{<options>} macro takes an optional argument for specifying the float <type> that should have their settings changed:

\documentclass{article}

\usepackage{caption,showframe}
\captionsetup[figure]{justification=centering, singlelinecheck=off}
\captionsetup[table]{justification=raggedleft, singlelinecheck=off}
\begin{document}

\begin{figure}[t]
\caption{A figure caption}
\end{figure}

\begin{table}[t]
\caption{A table caption}
\end{table}

Some text.

\end{document}