我正在使用\DeclareCaptionFormat
来定义我自己的格式。但是,我希望它们基于 hang 格式,这样文本就会缩进。到目前为止,我还没能做到这一点。MWE 是:
\documentclass[12pt,a4paper]{article}
\usepackage{subcaption}
\usepackage{setspace}
\DeclareCaptionFormat{customtab}
{\setstretch{0.3}
\textbf{#1#2}\textit{ #3}\hrulefill
}
\captionsetup[table]{format=customtab}
\captionsetup{width=0.9\textwidth}
\begin{document}
\begin{table}[h!]
\centering
\caption[Example of a temperature and strain-dependent behaviour table]{Example of a table which defines temperature and strain-dependent behaviour with MAT\_213}
\input{Mat213}
\label{tab:mat213}
\end{table}
\end{document}
产生
我想要以下内容:
有想法吗?
答案1
我终于可以编译评论了\input{Mat213}
。只需使用挂起格式:
\documentclass[12pt,a4paper]{article}
\usepackage{subcaption}
\usepackage{setspace}
%\DeclareCaptionFormat{customtab}
%{\setstretch{0.3}
%\textbf{#1#2}\textit{ #3}\hrulefill
%}
\captionsetup[table]{format = hang}%{format=customtab}
\captionsetup{width=0.9\textwidth}
\begin{document}
\begin{table}[h!]
\centering
\caption[Example of a temperature and strain-dependent behaviour table]{Example of a table which defines temperature and strain-dependent behaviour with MAT\_213}
%\input{Mat213}
\label{tab:mat213}
\end{table}
\end{document}