Latex中的caption

一般而言图片的题注会加在图片下方。如果想要使题注位于图片上方,只需要 \caption{caption-content} 置于命令 \includegraphics[options]{picture-file} 之前即可。下面是一个例子。

\begin{figure}[h!]
  \caption{A picture of a gull.}
  \centering
  \includegraphics[width=0.5\textwidth]{atom_in_cavity.jpg}
\end{figure}

\begin{figure}[h!]
  \centering
      \reflectbox{%
         \includegraphics[width=0.5\textwidth]{atom_in_cavity.jpg}}
      \caption{A picture of the same gull
           looking the other way!}
\end{figure}

有的时候我们还可能希望题注出现在图片的右面。这可以通过两种方法实现。

第一,在figure环境中嵌套小页(minipage)环境来实现。

第二,使用sidecap宏包中的SCfigure环境。下面例子中我们分别使用了这两种方法实现了题注的侧置。

\begin{figure}
  \begin{minipage}{0.5\textwidth} 
    \includegraphics[width=\textwidth]{atoms_in_cavity.jpg}
  \end{minipage}% 
  \begin{minipage}{0.5\textwidth}
    \caption{A picture of a gull.}
  \end{minipage}
\end{figure}

\begin{SCfigure}
  \centering
  \includegraphics[width=0.5\textwidth]{atoms_in_cavity.jpg}
  \caption{A picture of a gull}
\end{SCfigure}

下面是一个例子:

\begin{figure}[htpb]
  \centering
  \noindent\makebox[\textwidth][c] { 

   % 因为两个0.55\texwidth的图片横向宽度 大于 \texwidth,所以要看做一个整体

    \begin{minipage}{0.55\textwidth}
    \includegraphics[width=\textwidth]{figure/spinPic/mtxPic/spin1D_ee_Matrix.png} 

    %图片的宽度实际为:0.55*1\texwidth
    \end{minipage}
    \begin{minipage}{0.55\textwidth}
    \includegraphics[width=\textwidth]{figure/spinPic/mtxPic/spin1D_mm_Matrix.png}
    \end{minipage}
  }
   \noindent\makebox[\textwidth][c] {
    \begin{minipage}{0.55\textwidth}
    \includegraphics[width=\textwidth]{figure/spinPic/mtxPic/spin1D_em_Matrix.png}
    \end{minipage}
    \begin{minipage}{0.55\textwidth}
    \caption{Response matrices from the SM MC sample for different channels ($\ee$, $\mumu$ and $\emu$).}

    \label{fig:smMatrix}  % label要放在caption 之后,否则在引用过程中会出现引用错误。
    \end{minipage}
  }
\end{figure}

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值