我正在使用我大学的乳胶模板,如果我尝试导入任何子图包(如、subcaption
或),它就会中断,所以我必须尽力管理。minipage
subfigure
subfig
例如,如果我有以下内容:
\begin{figure}[tb]
(a) \hfil (b) \hfil (c)\\
\includegraphics[width=0.14\linewidth]{figs/repressionA.png} \hfil
\includegraphics[width=0.22\linewidth]{figs/repressionC.png} \hfil
\includegraphics[width=0.15\linewidth]{figs/repressionD.png}\\
\caption[Model Abstractions]{Model abstractions permited when sensor proteins are available in abundance. (a) Schematic showing a sensor protein that represses a sensor promoter. (b) A small molecule (input) that represses the sensor protein. (c) Model abstraction where the small molecule can be considered to activate the sensor promoter.}
\figlabel{Sensor Molecules}
\end{figure}
如您所见,所有内容都没有正确对齐,水平和垂直方向均未对齐。我可以使用任何有用的命令来使其更漂亮一些吗?
答案1
使用minipages
:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[tb]
\begin{minipage}[b]{.14\linewidth}
\centering
(a)
\includegraphics[width=\linewidth]{example-image}
\end{minipage}
\hfill
\begin{minipage}[b]{.22\linewidth}
\centering
(b)
\includegraphics[width=\linewidth]{example-image}
\end{minipage}
\hfill
\begin{minipage}[b]{.14\linewidth}
\centering
(c)
\includegraphics[width=\linewidth]{example-image}
\end{minipage}
\caption[Model Abstractions]{Model abstractions permited when sensor proteins are available in abundance. (a) Schematic showing a sensor protein that represses a sensor promoter. (b) A small molecule (input) that represses the sensor protein. (c) Model abstraction where the small molecule can be considered to activate the sensor promoter.}
\label{Sensor Molecules}
\end{figure}
\end{document}