字幕对齐

字幕对齐

我知道有几个类似的问题,但该选项justification=justified在我的图表上无法正常工作。除了“图 n:”之外,所有内容都对齐了,因此编号标签没有对齐。 也发生了同样的情况justification=centering。我正在使用选项\captionof{figure},这可能是问题所在吗?

\documentclass[12pt,twoside,titlepage,headinclude]{scrreprt}
\usepackage{graphicx} 
\usepackage[font=small,labelfont=bf,justification=justified]{caption}
\begin{document}

\begin{center}\vspace{1cm}
\includegraphics[width=0.7\linewidth]{Image}
\captionof{figure}[Solar atmosphere temperature-height distribution.]{Solar atmosphere temperature-height distribution as determined by \cite{15}. Height is given in kilometers measured above zero point where $\tau=1$. Regions of line formation are also indicated. From right to left: photosphere, temperature minimum (4,000K), chromosphere, transition region (8,500K) and Lyman valley (20,000K).}
\label{fig:vernazza}
\end{center}\vspace{1cm}

\end{document}

答案1

感谢您发布 MWE。我不确定如何解释您的观察结果

除了“图 n:”以外,所有内容都对齐了,因此编号标签没有对齐。

我假设您试图避免在第一行之后的行上出现标题材料的“悬挂缩进”。如果这种解释正确,您可以通过指定包format=plain的选项来实现所需的效果caption

在此处输入图片描述

\documentclass[12pt,twoside,titlepage,headinclude]{scrreprt}
\usepackage[demo]{graphicx} % remove demo option in real document
\usepackage[font=small,labelfont=bf,
   justification=justified,
   format=plain]{caption} % 'format=plain' avoids hanging indentation
\begin{document}
\begin{center}
\vspace{1cm}
\includegraphics[width=0.7\linewidth]{Image}
\captionof{figure}[Solar atmosphere temperature-height distribution.]{Solar atmosphere temperature-height distribution as determined by \cite{15}. Height is given in kilometers measured above zero point where $\tau=1$. Regions of line formation are also indicated. From right to left: photosphere, temperature minimum (4,000K), chromosphere, transition region (8,500K) and Lyman valley (20,000K).}
\label{fig:vernazza}
\end{center}
\vspace{1cm}
\end{document}

相关内容