float side by side

Hello everyone. When I want to place float side by side in Lyx,which is shown in the picture, I need to add a float-figure first, then add two box, and a(maybe three)\hfill, which is very inconvenient. Is there a simple way to do this in Lyx, so I can only press one or two bottom?


PS: I don't want to use ERT, I want the method that is simpler than I describe above, and can preview the image in Lyx like in the picture.

Thank you!


2 Answers 2


May be you want this (captions aligned and images top-aligned)?

\usepackage[utf8]{inputenc} %
\usepackage{floatrow, graphicx}


\floatsetup{style=plain, floatrowsep=qquad, heightadjust=object, valign=t, captionskip=2.5ex}
\ffigbox[\FBwidth]{\caption{Float 1 on the left side}\label{flt1}}
\ffigbox[\FBwidth]{\caption{Float 2 on the right side}\label{flt2}}


enter image description here


For example:

    \caption{This float is on the left side}
    \caption{This float is on the right side}


The top alignment is achieved by option t of the minipages together with \kern0pt as first element. Option t aligns at the baseline for the first line/element in the minipage. It would be the symbol and the image, if \kern0pt is not given.

The hanging format of the caption text is realized by package caption with option format=hang.

The width for the minipages are calculated via eTeX's \dimexpr. \linewidth is set to the current line width both inside the float environment and inside the minipages.

  • Thank you, but I am not asking for the LaTeX code, I am asking how to do this IN LYX IN A SIMPLE WAY. Jun 18, 2016 at 10:00
  • 1
    @ZhangZimou AFAIK LaTeX code can be used with LaTeX. I am not familiar with LyX. But the answer shows, that it is at least possible to get the desired result. Jun 18, 2016 at 10:01
  • Thank you any way, but it is not I want. Jun 18, 2016 at 10:06
  • Unless you want to make them two subfigures of the same float figure, the easiest way is probably Ctrl+C, Ctrl+V. Jun 18, 2016 at 10:17

You must log in to answer this question.

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