problem with alignment of subfigures

Neal Becker ndbecker2 at
Fri Oct 11 17:32:30 UTC 2019

I'm using lyx-2.3.3 and having a problem with subfigures.

I'm placing 4 subfigures in an IEEE 2-column document.  Lyx produces this 
latex code:


\subfloat[ASCMA 12UE]{


}\subfloat[ASCMA 6UE]{



\subfloat[ASCMA 12UE]{\includegraphics[width=0.4\columnwidth]

}\subfloat[ASCMA 6UE]{\includegraphics[width=0.4\columnwidth]

}\caption{Abstraction Performance}


This results in 4 figures in 2x2 grid, but 2nd row of figures is a bit to 
the left of the 1st row of figures.

I've manually edited the latex to this:

\subfloat[ASCMA 12UE]{%
}\subfloat[ASCMA 6UE]{%
\subfloat[ASCMA 12UE]{\includegraphics[width=0.4\columnwidth]
}\subfloat[ASCMA 6UE]{\includegraphics[width=0.4\columnwidth]
}\caption{Abstraction Performance}%

This version works correctly, the 2 rows are aligned.

Is there any way to get lyx to produce a working version with the 2 rows 

Oh, but wait!  I tried to make a minimal test case with only these 4 
figures.  When I do that, the original code works correctly, the figures on 
the 2 rows are aligned correctly.  So now I have no clue.  Any advice?

More information about the lyx-users mailing list