2

I want to have an indent at figure captions but not at table captions. I already read the caption documentation but did not find an optional argument to just set this indent for figures. A web search wasn't successful, too. I add a MWE below. Thanks for your help!

\documentclass[a4paper, 12pt]{report}

\usepackage[ngerman]{babel}
\usepackage{caption}
\usepackage{blindtext}

\newlength\myindention

\DeclareCaptionLabelFormat{figure}{\hspace*{\myindention}{#1} {#2}}
\setlength\myindention{\parindent}


\captionsetup[figure]{labelfont={sl}, textfont={small}, format=plain, labelsep=period, justification=justified, aboveskip=0.5em, belowskip=0.3cm}

\captionsetup[table]{labelfont={normal}, textfont={small, sl}, format=plain, labelsep=newline, justification=raggedright, singlelinecheck=false, aboveskip=0.5em, belowskip=0.3cm}

\captionsetup{labelformat=figure}

\begin{document}
\blindtext
\begin{figure}
\caption{This is a figure caption with a long text to show the indent which is defined by a parindent in front of the figure label}
\end{figure}%I want to have the indent in front of the label here
\begin{table}
\caption{This is a table caption}%The indent should be deleted here in front of the label
\end{table}
\end{document}

EDIT

At the moment it looks like this:

enter image description here

But I want the indent in front of "Tabelle" to be removed:

enter image description here

  • You can't obtain it this way: captions are centred by default. What does ‘indented’ mean in this case, and what do you want to achieve exactly? – Bernard Aug 10 '16 at 12:21
  • Well, I want to have an parindent in front of the figure caption which works fine. But I don't want to have the same indent for table captions. Here, I want to have no indent and have it completely flushedleft. – SeRe Aug 10 '16 at 12:37
  • Do you mean at the left margin of the page or at the left margin of the table? – Bernard Aug 10 '16 at 13:25
  • I think the left margin of the page. Caption flushedleft, table itself centered. – SeRe Aug 10 '16 at 13:47
5

Just write:

\captionsetup[figure]{labelformat=figure}
  • Oh, that was dumb -.- – SeRe Aug 10 '16 at 14:12

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.