![我想将图片的宽度设置为我的文章三列中的两列](https://linux22.com/image/346865/%E6%88%91%E6%83%B3%E5%B0%86%E5%9B%BE%E7%89%87%E7%9A%84%E5%AE%BD%E5%BA%A6%E8%AE%BE%E7%BD%AE%E4%B8%BA%E6%88%91%E7%9A%84%E6%96%87%E7%AB%A0%E4%B8%89%E5%88%97%E4%B8%AD%E7%9A%84%E4%B8%A4%E5%88%97.png)
我正在写一篇包含三栏的文章,我使用的代码
\usepackage{multicol}
\begin{multicols}{3}
\end{multicols}
现在我想插入一张占据两列大小的图片。我该如何实现?
答案1
multicol
不支持浮动,但您可以手动定位图像,在跨越的列中留出空间;
\documentclass{article}
\usepackage{capt-of}
\usepackage{multicol}
\def\a{\stepcounter{enumi}\Roman{enumi}: \roman{enumi} one two three (\theenumi) four five. }
\def\b{\a\a Green yellow black white. \a\a\a}
\def\c{\b\b\par Apple pear orange. \b\par}
\begin{document}
\begin{multicols}{3}
\c\b\b
\rlap{\begin{minipage}{\dimexpr2\columnwidth+\columnsep}
\centering
\begin{picture}(100,100)
\put(50,95){\line(1,-3){25}}
\put(50,95){\line(-1,-3){25}}
\put(25,20){\line(1,0){50}}
\put(45,20){\line(0,-1){15}}
\put(55,20){\line(0,-1){15}}
\thicklines
\put(20,5){\line(1,0){60}}
\end{picture}
\captionof{figure}{A Christmas Tree}
\end{minipage}}
\c
\columnbreak
\vspace*{11\baselineskip}\c\c
\end{multicols}
\end{document}