大小写相关缩进

大小写相关缩进

我想在图片标题处缩进,但不在表格标题处缩进。我已经阅读了标题文档,但没有找到一个可选参数来为图片设置此缩进。网络搜索也没有成功。我在下面添加了一个 MWE。谢谢你的帮助!

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

编辑

目前它看起来是这样的:

在此处输入图片描述

但我想删除“Tabelle”前面的缩进:

在此处输入图片描述

答案1

写吧:

\captionsetup[figure]{labelformat=figure}

相关内容