0

I'm using two column environment with dblfloatfix package. But my figures are moving to the next page. How to exactly fix it at the top or bottom of the page. Beside I'm using {figure*} environment. I have read that twocolumn environment can not fix this problem. Is it so?What should I do. I need to wrire down paper in two column environment.

`\documentclass[twocolumn, 11pt]{article}`
\usepackage{dblfloatfix}
\usepackage{caption, subcaption}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{fancyhdr}
\pagestyle{fancy}
\rhead{\thepage}
%\usepackage{float}
\usepackage{amsmath}
\begin{figure*}[!tbp]
\includegraphics[width=0.49\textwidth]{1000.PNG}
%\hspace{0.0005\textwidth}
\includegraphics[width=0.49\textwidth]{10.PNG}
%\\[.5\baselineskip]
\smallskip
\includegraphics[width=0.49\textwidth]{500.PNG}
%\hspace{0.0005\linewidth}
\includegraphics[width=0.49\textwidth]{0.PNG}
\caption{Figures}
\end{figure*}`
  • That is the normal behaviour if you insert the figure* environment at a position in the code where the page has already started: by default it goes to the top of the following page. You may try loading the stfloats package: it allows for the optional [t] or [b] ìn two column mode. Or you insert your environment previously in the code. – Bernard Jun 12 at 9:30
  • I'm getting this warning.Package dblfloatfix Error: Don't use the stfloats package!You're in big trouble now... \begin{document}. – jerry Jun 12 at 9:35
  • I have already inseted dblfloatfix, float and stfloat package – jerry Jun 12 at 9:36
  • And adding the optional argument does nothing? – Bernard Jun 12 at 9:42
  • 1
    You can't include both dblfloatfix and stfloat. With the latter, it works fine. – Bernard Jun 12 at 10:25
1

What about using the multicols package instead of the twocolumn option:

\documentclass{article}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{subfig}
\usepackage{graphicx}
\begin{document}
\begin{multicols}{2}
\lipsum[1-1]
\end{multicols}
\begin{figure}[h]
    \centering
    \subfloat[Caption of a]{\label{fig:a}\includegraphics[width=0.4\linewidth]{example-image-a}}\qquad
    \subfloat[Caption of b]{\label{fig:b}\includegraphics[width=0.4\linewidth]{example-image-b}}\\
    \subfloat[Caption of c]{\label{fig:c}\includegraphics[width=0.4\textwidth]{example-image-c}}\qquad%
    \subfloat[Caption of a]{\label{fig:d}\includegraphics[width=0.4\textwidth]{example-image-a}}%
    \caption{Caption of figure}
    \label{fig:myfig}
\end{figure}
\begin{multicols}{2}
\lipsum[3-4]
\end{multicols}
\end{document}

enter image description here

Or using the same example with the ltxgrid package:

\documentclass{article}
\usepackage[latin]{babel}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{ltxgrid}
\usepackage{lipsum}

\columnsep1.5em
\begin{document}
    \onecolumngrid
        \begin{figure*}[tb]
        \centering
        \subfloat[Caption of a]{\label{fig:a}\includegraphics[width=0.45\linewidth]{example-image-a}}\qquad
        \subfloat[Caption of b]{\label{fig:b}\includegraphics[width=0.45\linewidth]{example-image-b}}\\
        \subfloat[Caption of c]{\label{fig:c}\includegraphics[width=0.45\textwidth]{example-image-c}}\qquad%
        \subfloat[Caption of a]{\label{fig:d}\includegraphics[width=0.45\textwidth]{example-image-a}}%
        \caption[Caption]{Caption of figure}
        \label{fig:myfig}
    \end{figure*}
    \twocolumngrid
    \lipsum[1-2]
    \lipsum*[3]
\end{document}

enter image description here

  • But In muticolomns environment I have to specifically mention the beginning and end of multi column. I only want to specify whether figure should be at the top or the bottom of the page. – jerry Jun 12 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.