如何在行首添加空格?

如何在行首添加空格?

我的論文中的圖下面有這個標題: 在此輸入影像描述

如何縮排第二行?

答案1

article假設您使用與以下相容的LaTeX 文件類別(例如以下範例程式碼中使用的類別)標題包,我可以想出兩種方法來實現你的格式化目標。

如果懸掛縮排應該從標題的左邊緣開始,包括標籤“Figure”和相關號碼,我建議你運行

\captionsetup{format=plain,hangindent=5mm}

在此輸入影像描述

相反,如果懸掛縮排應該僅適用於標題文字本身,我建議您運行

\captionsetup{format=hang,indention=5mm}

在此輸入影像描述


\documentclass{article} % or some other class that's compatible with the caption package

\usepackage{caption}
%% uncomment one of the next two lines:
\captionsetup{format=plain,hangindent=5mm} 
%\captionsetup{format=hang,indention=5mm}

\usepackage{lipsum}  % filler text

\begin{document}
\begin{figure}[ht]
\caption{\lipsum[1][1-3]} % three sentences of filler text
\end{figure}
\end{document}

相關內容