multicol
我在latex 文章中使用includegraphics
。以下是示例代码:
\documentclass[10pt,a4paper]{article}
\usepackage[margin=0.8in]{geometry}
\usepackage{graphicx}
\usepackage{multicol}
\begin{document}
\begin{figure}
\begin{multicols}{2}
\centering
\fbox{\includegraphics[width=1.5\linewidth]{square}}
\caption{Square Image}
\columnbreak
\fbox{\includegraphics[width=11.4em]{tall}}
\caption{Tall Image}
\end{multicols}
\end{figure}
\end{document}
请注意,图像放置不正确。此外,右边距比左边距大得多。
答案1
有趣的方法multicol
,但是,看看是否tabularx
更适合您的情况:
\documentclass[10pt,a4paper]{article}
\usepackage[margin=0.8in]{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[export]{adjustbox}
\usepackage{showframe}
\begin{document}
\begin{figure}[!ht]
\begin{tabularx}{\linewidth}{>{\hsize=0.75\hsize}X
>{\hsize=0.25\hsize}X}
\includegraphics[width=\hsize,valign=t]{example-image-a}
\caption{Square Image}
& \hfil
\includegraphics[width=11.4em,valign=t]{example-image-b}
\caption{Tall Image}
\end{tabularx}
\end{figure}
or
\begin{figure}[!ht]
\begin{tabularx}{\linewidth}{>{\hsize=0.75\hsize}X
>{\hsize=0.25\hsize}X}
\includegraphics[width=\hsize]{example-image-a}
\caption{Square Image}
& \hfil
\includegraphics[width=11.4em]{example-image-b}
\caption{Tall Image}
\end{tabularx}
\end{figure}
\end{document}