3

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?

1 Answer 1

4

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

enter image description here

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.