答案1
像这样吗?
\documentclass{article}
\usepackage[format=hang]{caption}
% Create a length
\newlength\caphang
% Set length as wanted
\setlength\caphang{2cm}
% caption.sty allows us to create our own format
% note: this version assumes the caption is only one paragraph!
\DeclareCaptionFormat{hangit}{%
\hangindent=\caphang\hangafter=1%
\makebox[\caphang][l]{#1#2}#3\par}
\captionsetup{format=hangit, singlelinecheck=no,
labelfont=sf, % if you want the label a different font, etc.
}
\def\dummytext{A figure or table caption mainly consists of three
parts: the caption label, which says if this object is a ‘Figure’ or
‘Table’ and what number is associated with it, the caption text
itself, which is normally a short description of contents, and the
caption separator which separates the text from the label.}
\begin{document}
\dummytext
\begin{figure}[h]
\caption{\dummytext}
\end{figure}
\setcounter{figure}{123}
\begin{figure}[h]
\caption{\dummytext}
\end{figure}
\begin{table}[h]
% \begin{tabular}{ll}
% one & two\\
% \end{tabular}
\caption{\dummytext}
\end{table}
\dummytext
\end{document}