I want to arrange four algorithms set with the algorithm2e
package in two rows and two columns, as shown in the figure below. I've tried the subfigure
package and have also read several related questions and answers, but have so far been unable to produce an output as shown below.
|------------------| |-------------------|
| | | |
| | | |
| | | |
| | | |
|------------------| |-------------------|
(a) ... (b) ...
|------------------| |-------------------|
| | | |
| | | |
| | | |
| | | |
|------------------| |-------------------|
(c) ... (d) ...
Figure 1: ...
Best Answer
You can use the
subfigure
environment from thesubcaption
package as follows.Note that the
subfigure
environment takes the same optional arguments thatminipage
does, so if you find yourself in a situation with different size code snippets you can use (for example)\begin{subfigure}[t]{.5\textwidth}...