I have a code where the title and table notes are written with the caption command all-together. I give a snapshot below. How can I center the Table name (first line of the caption), and justify the rest of the text (second line of the caption)? It would be super helpful if anybody could share their insights on below ... Apologies if the question is really simple, I cannot make it work.. Thanks a lot!!!

 \caption{ \newline 
 \hspace{\textwidth} \protect  \small{  Text text text }} \\

1 Answer 1


You can use caption; I recommend using margins for the caption, in order to make it more evident with respect to the context.

\usepackage{lipsum} % just for the example

\DeclareCaptionLabelFormat{center}{\hspace*{\fill}\textbf{#1 #2}\hspace*{\fill}}





\caption{This is a longish caption that should show that
  the text is justified, while the label is centered
  above it. Some more text for filling more lines, hope
  this is sufficient.}




enter image description here

  • This works like magic, thanks so much @egreg! Commented Aug 23, 2016 at 21:39

You must log in to answer this question.

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