latex插图(会议论文)

本文介绍在LaTeX文档中并排插入图像的方法,包括共享标题、各自标题及子标题的情况,通过具体实例展示了如何使用figure环境和subfig宏包实现图像布局。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

并排插入两幅图像

参考

1、并排摆放,共享标题

当我们需要两幅图片并排摆放,并共享标题时,可以在 figure 环境中,使用两个 \includegraphics 命令:

\begin{figure}[htbp]
\centering
\includegraphics{left}
\includedegraphics{right}
\caption{标题}
\end{figure}

2、并排摆放,各有标题

如果想要两幅并排的图片各有自己的标题,可以在 figure 环境中使用,两个 minipage 环境,每个环境里插入一个图。

\begin{figure}[htbp]
\centering
  \begin{minipage}[t]{0.3\textwidth}
    \centering
    \includegraphics{left}
    \caption{清明}
  \end{minipage}

  \begin{minipage}[t]{0.3\textwidth}
    \centering
    \includegrapgics{right}
    \caption{反复}
  \end{minipage}
\end{figure}

3、并排摆放,共享标题,各有子标题

如果想要两幅并排的图片共享一个标题,并各有自己的子标题,可以使用 subfig 宏包提供的 \subfloat 命令。subfloat 命令缺少宽度参数。虽然我们可以用 \hspace 命令调整子图的距离,子标题却只能和子图本身一样宽,就会出现折行。

为了避免子标题折行,我们可以在 \subfloat 里再嵌套个 minipage,因为后者是有宽度的。

\begin{figure}[htb]  
\centering 
\subfloat[清明]{ 
\label{fig:improved_subfig_a} 
  \begin{minipage}[t]{0.3\textwidth} 
    \centering 
    \includegraphics{left} 
  \end{minipage} 
  } 
  \subfloat[反复]{ 
  \label{fig:improved_subfig_b} 
  \begin{minipage}[t]{0.3\textwidth} 
    \centering 
    \includegraphics{right} 
  \end{minipage} 
  } 
\caption{反清复明} 
\end{figure}

实例:

\begin{figure}[htp]   %h表示当前位置,t为top,b为bottom,htb指定图片放置优先位置
\centering
    \begin{minipage}[b]{0.45\linewidth}
    \includegraphics[width=1.5in]{fig/The_working_principle_of_optiacl_tactile_sensors_1.png}
    \caption{Happy Smiley}  %子标题
    \label{fig:minipage1}
    \end{minipage}
\quad
    \begin{minipage}[b]{0.45\linewidth}
    \includegraphics[width=1.5in]{fig/The_working_principle_of_optiacl_tactile_sensors_2.png}
    \caption{Sad Smiley}  %子标题
    \label{fig:minipage2}
    \end{minipage}
\end{figure}

一篇关于latex插图的文章

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值