LATEX多个子图的处理

本文介绍了如何在 LaTeX 中双栏格式下排列四个子图,并提供了两种实现方式,包括设置图形大小、间距以及双语标题的显示。第一种方法未能实现英文子标题,而第二种方法通过调整子图计数器和使用 `subfigure` 实现了双语标题。作者建议遇到问题可咨询 LaTeX 论坛。

我的论文终于通过了编辑的审核,借这个机会也学习了一下latex的排版,下面有些是从论坛上得来的,有些是请教他人得来的。贴在这里方便以后使用。
1.在双栏的格式中实现四个子图的两行、两列排列
首先定义环境如下:
/newenvironment{figurehere}
  {/def/@captype{figure}}
  {}

使用处添加:

/makeatother
/begin{figurehere}
/setlength{/abovecaptionskip}{0pt}% 这个参数保证标题和图形之间没有多大空白
/flushleft
/subfigure[中文子图标题1]{/label{fig:subfigure:2a}%
/includegraphics[width=0.23 /textwidth]{2a.eps}}
 /subfigure[中文子图标题2]
{/label{fig:subfigure:2b}%
/includegraphics[width=0.23 /textwidth]{2b.eps}}
/subfigure[中文子图标题3]{/label{fig:subfigure:2c}%
/includegraphics[width=0.23 /textwidth]{2c.eps}}
/subfigure[中文子图标题3]{/label{fig:subfigure:2d}%
/includegraphics[width=0.23 /textwidth]{2d.eps}}
/bicaption[fig2]{图}{/ 中文标题}{Fig.}{/centering /
/ 英文标题}
/label{fig:subfigure:2}
/end {figurehere}

但是上面我无法实现英文子标题的显示,即子图也为双语标题

下面的例子可以实现双语标题的显示:

/vskip3mm {/centering
/addtocounter{subfigure}{-1}/subfigure[English caption of s

### 在 LaTeX 中排列个子 为了在 LaTeX 文档中有效地排列个子,可以使用 `subfig` 或者更现代的 `subcaption` 宏包来管理子及其标签。下面展示了一个具体的例子,说明如何创建带有独立标题的张子,并使它们按照特定布局呈现。 #### 使用 subcaption 宏包实现子排列 首先,在文档导言区加载必要的宏包: ```tex \documentclass{article} \usepackage[demo]{graphicx} % demo option is just for this example, remove it when using real images. \usepackage{subcaption} % 设置子编号格式为 (a), (b)... \renewcommand{\thesubfigure}{(\alph{subfigure})} ``` 接着定义一个包含四个子的例子,这些子被安排成两行两列的形式: ```tex \begin{figure}[htbp] \centering \begin{subfigure}[t]{0.45\textwidth} \includegraphics[width=\linewidth]{image1.png} \caption{First image description here.} \label{fig:image_1} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \includegraphics[width=\linewidth]{image2.png} \caption{Second image description here.} \label{fig:image_2} \end{subfigure}\\[\baselineskip] \begin{subfigure}[t]{0.45\textwidth} \includegraphics[width=\linewidth]{image3.png} \caption{Third image description here.} \label{fig:image_3} \end{subfigure} \hfill \begin{subfigure}[t]{0.45\textwidth} \includegraphics[width=\linewidth]{image4.png} \caption{Fourth image description here.} \label{fig:image_4} \end{subfigure} \caption{Overall caption describing all four figures together.} \label{fig:four_subfigures_example} \end{figure} ``` 上述代码片段展示了如何通过调整 `\begin{subfigure}` 的宽度参数以及利用 `\hfill` 来控制各子之间的间距[^3]。此外,还设置了整体图形的大标题和各个子的小标题[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值