I have a two-column article, which is still work in progress. In this article, I have to add figures once in a while, which tend to be a little wider than a single column, but two small to be span of the two.
I usually adjust the figures by moving them manually either to the left via \hspace*{-2cm}
or (sometimes) to the right via \hspace*{2cm}
, depending whether the figure is in the left or right column.
Since the article is still work in progress, I add sometimes text above the figures, which in turn might change their current position either from the right to the left column or vice versa. The figures, then, end up covering the text, compare example with mock figures below (please, note the comments within the code).
How can I tell LaTeX
to automatically move the figures without me manually adjusting the figures to the left or right every time I add text above them?
\documentclass[a4paper]{article}
\usepackage{multicol}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{float}
\begin{document}
\begin{multicols}{1}
\lipsum[1-3]
\begin{figure}[H]
\centering
\begin{tikzpicture} % this is how the mock figure does not suppose to be appear in the article
\hspace*{-2cm}\draw circle (2); % hspace here only simulates a wide graph or image (I was otherwise not able to add a picture here)
\end{tikzpicture}
\caption{Figure in two column}
\end{figure}
\lipsum[3-4]
\begin{figure}[H]
\centering
\begin{tikzpicture} % this is how the mock figure suppose to appear in the article
\hspace*{-2cm}\draw circle (2); % hspace only simulates a wide graph or image (see comment above)
\end{tikzpicture}
\caption{Figure in two column}
\end{figure}
\lipsum[5-6]
\end{multicols}
\end{document}