1

I am writing an article in two column and I am using the minipage environment. The problem is that in the column where there is the minipage any text fills the white space ? Why this happens ? I tried to reduce the height of the minipage but I couldn't do it. I tried also with \vfill

\begin{figure}[!htbp]
    \begin{minipage}[c][6cm][t]{0.49\textwidth}
        \centering
        \resizebox{0.9\linewidth}{!}{
            \begin{tikzpicture}[]
                \node[draw=none,fill=none,scale=1.0] at (0,0)  {\input{figures/case1_macro.tikz}};
                \node[draw=none,fill=none,scale=0.4] at (0,-4) {\includegraphics[]{figures/case1_macro.pdf}};
            \end{tikzpicture}
        }
        \captionof{figure}{\label{fig:case_1}Example of a beam subjected to flexion solved with the FE$^2$ multi-scale method.}
    \end{minipage}
    \begin{minipage}[c][6cm][t]{0.49\textwidth}
        \vspace{1.5cm}
        \centering
        \resizebox{0.9\linewidth}{!}{
            \begin{tikzpicture}[]
                \node[draw=none,fill=none,scale=1.0] at (0,0)  {\input{figures/case1_micro.tikz}};
                \node[draw=none,fill=none,scale=0.2] at (0,-3) {\includegraphics[]{figures/case1_micro.pdf}};
            \end{tikzpicture}
        }
        \captionof{figure}{\label{fig:case_1}Example of a beam subjected to flexion solved with the FE$^2$ multi-scale method.}
    \end{minipage}
    \vfill
\end{figure}

enter image description here

3
  • You should have a look at wrapfigure.
    – user156344
    Apr 8, 2019 at 15:40
  • thanks @JouleV ! good Idea, I tried something simpler, only changing the figure arguments to \begin{figure}[!h] ... has work. I will post that solution.
    – gagiuntoli
    Apr 8, 2019 at 15:47
  • don't use \resizebox here it is not needed to scale the tikz and just scales the caption to an inconsistent font size. Apr 8, 2019 at 18:07

2 Answers 2

1

Specify [t] floating, but also set the layout parameters so LaTeX will allow "top" floats to mostly fill the column, leaving very little text:

\renewcommand\topfraction{.9}
\renewcommand\textfraction{.1}% 1-\topfraction

The default parameters are unusually restrictive.

Using [h] placement leads to hassle where you have to keep manually editing the document to make the figure come out right.

0

The problem was the figure arguments. Setting :

\begin{figure}[!h] ... \end{figure}

Solves the problem.

enter image description here

1
  • 2
    [!h] almost always generates a warning and latex changes it to [!ht] to give itself a chance. Looking at your image I suspect that is what happened here and that you got a top float setting so it would be better to use [t] Apr 8, 2019 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .