标题和图片下方的说明

标题和图片下方的说明

我希望我的图表有一个标题,标题下方有一个较长的标题,字体较小。请参见图片以了解所需格式的示例。但是,标题不必像图片中那样加粗。较长的标题也应左对齐。如能得到任何帮助,我将不胜感激。

所需字幕格式

答案1

您可以使用caption和定义自己的命令。

\documentclass{article}
\usepackage{caption}
\usepackage{graphicx}

\captionsetup{
  singlelinecheck=false,
  labelsep=newline,
  labelfont=bf,
  justification=raggedright,
}

\newcommand{\captiondesc}[2]{\caption[#1]{\textbf{#1}\\#2}}


\begin{document}

\listoffigures

\vspace{2cm}

\begin{figure}[htp]
\centering

\includegraphics[width=0.8\textwidth,height=1cm]{example-image}

\captiondesc{Aggregate SKRISK by industry}{The figure shows the plot of
aggregate SKRISK between January~2005 and December~2012. Aggregate
SKRISK is layered by financial industry group. The industry groups are
(from top to bottom) Others, Insurance, Depositories, and Broker-Dealers.
The solid vertical line marks the Lehmans Brothers bankruptcy.}

\end{figure}


\end{document}

在此处输入图片描述

使用 来justification=justified代替:

在此处输入图片描述

使用较小的字体:

\documentclass{article}
\usepackage{caption}
\usepackage{graphicx}

\captionsetup{
  singlelinecheck=false,
  labelsep=newline,
  labelfont=bf,
  justification=justified,
}

\newcommand{\captiondesc}[2]{%
  \caption[#1]{%
    \textbf{#1}\par\smallskip
    \footnotesize#2%
  }%
}

\begin{document}

\listoffigures

\vspace{2cm}

\begin{figure}[htp]
\centering

\includegraphics[width=0.8\textwidth,height=1cm]{example-image}

\captiondesc{Aggregate SKRISK by industry}{The figure shows the plot of
aggregate SKRISK between January~2005 and December~2012. Aggregate
SKRISK is layered by financial industry group. The industry groups are
(from top to bottom) Others, Insurance, Depositories, and Broker-Dealers.
The solid vertical line marks the Lehmans Brothers bankruptcy.}

\end{figure}

\end{document}

在此处输入图片描述

相关内容