I want to define a new environment, that sets up two \figure side by side. I have already done it manually, but I need to make a shortcut for it, so I can just write "\begin{sidebyside}"+enter to make it appear like normal \figureenvironments do.

This is what i have tried in my Preamble:


        \caption{\protect\raggedright CAPTION FOR THE WHOLE FIGURE}

But it doesn't work. I hope someone can/will help me.



You are using memoir which offers special commands for subcaptions. I've declared a newcommand \sidebyside with six parameters, image left, caption for figure on left, image on right, caption for figure on rigth, general caption and general label.



        \caption{\protect\raggedright #5}

\sidebyside{example-image-a}{test a}{example-image-b}{test b}{general caption}{mylabel}

enter image description here

| improve this answer | |
  • If anyone else needs this with book class (which I need), add \usepackage{subcaption} to the preamble. – Jon Oct 31 '18 at 14:47

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.