I'm writing a report and have 5 images that need to be placed on it. When adding the aforementioned images to the report, the first two are placed at the top of the text on the first page, the other two are placed on either column on the second page, and then the fifth is placed on a third page, even though the second page is empty (besides the other two images). We're only allowed to use a maximum of two pages with two columns each, so this presents a big problem even if I disregard the formatting issue.
I've tried using the float
package's [H]
specifier to force the images exactly where I put them in the .tex
file, but all that does is create massive gaps in the columns.
If I use the [p]
specifier, the images only fill the left column of each page before moving on to the next, starting with the second page..
The [h]
specifier basically combines the two above: it creates large gaps in the text and the last few images fill out a single column before moving on to the next page.
This is the best I could do for a MWE (first time attempting one). I have as many \item
as in the original document, but with filler text. I also took out the specifiers because I'm not sure how I'd represent multiple different specifiers without simply copy/pasting everything several times.
\documentclass[aps,pre,twocolumn,showpacs,amsmath,amssymb]{revtex4-1}
\usepackage{graphicx}
\usepackage{color}
\usepackage{bm}
\usepackage{float}
\usepackage{pgfplots}
\usepackage{blindtext}
\pgfplotsset{compat=1.16}
\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\hfuzz 1pt
\vfuzz 1pt
\setlength{\parskip}{\baselineskip}
\begin{document}
\begin{itemize}
%
\item \blindtext
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
xlabel={$x$},
ylabel={$y$},
xmin=0, xmax=10,
ymin=0, ymax=10,
legend pos=north east,
]
\addplot[mark=none, domain=0:10,samples=2]{x};
\addlegendentry{$y = x$}
\end{axis}
\end{tikzpicture}
\caption{Stuff}
\label{fig:image1}
\end{figure}
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
xlabel={$x$},
ylabel={$y$},
xmin=0, xmax=10,
ymin=0, ymax=10,
legend pos=north east,
]
\addplot[mark=none, domain=0:10,samples=2]{x};
\addlegendentry{$y = x$}
\end{axis}
\end{tikzpicture}
\caption{Stuff}
\label{fig:image2}
\end{figure}
\item \blindtext
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
xlabel={$x$},
ylabel={$y$},
xmin=0, xmax=10,
ymin=0, ymax=10,
legend pos=north east,
]
\addplot[mark=none, domain=0:10,samples=2]{x};
\addlegendentry{$y =x$}
\end{axis}
\end{tikzpicture}
\caption{Stuff}
\label{fig:image3}
\end{figure}
\item \blindtext
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
xlabel={$x$},
ylabel={$y$},
xmin=0, xmax=10,
ymin=0, ymax=10,
legend pos=north east,
]
\addplot[mark=none, domain=0:10,samples=2]{x};
\addlegendentry{$y = x$}
\end{axis}
\end{tikzpicture}
\caption{Stuff}
\label{fig:image4}
\end{figure}
\item \blindtext
\item \blindtext
\begin{figure}
\begin{tikzpicture}
\begin{axis}[
xlabel={$x$},
ylabel={$y$},
xmin=0, xmax=10,
ymin=0, ymax=10,
legend pos=north east,
]
\addplot[mark=none, domain=0:10,samples=2]{x};
\addlegendentry{$y = x$}
\end{axis}
\end{tikzpicture}
\caption{Stuff}
\label{fig:image5}
\end{figure}
%
\end{itemize}
\end{document}
TL;DR: Images aren't being displayed properly in a two-column format. What am I doing wrong?
[(.. ....)]
. AlsopiValueN.dat
is not included in your MWE, so we can't test it. – Zarko Oct 29 '19 at 11:45blindtext
package for the sake of privacy and the plots with a function. – Orion Oct 29 '19 at 12:35