LaTeX forum ⇒ LaTeX Beginner's GuideHow can I put two images next to each other? Topic is solved

Questions and answers about the LaTeX Beginner's Guide

How can I put two images next to each other?  Topic is solved

Postby Reader » Thu Oct 07, 2021 1:15 pm

In Chapter 6, Inserting images, in the section Arranging several images, I see that there are several packages for placing images next to each other or above each other.

Which one of the mentioned packages shall I choose?

Can you show an simple code example?

Recommended reading 2021: • •

LaTeX Beginner's Guide Exclusive June 2024 offer: Additional Free LaTeX eBook for LaTeX Cookbook Readers

User avatar
Stefan Kottwitz
Site Admin
Posts: 10191
Joined: Mon Mar 10, 2008 9:44 pm

How can I put two images next to each other?

Postby Stefan Kottwitz » Mon Oct 18, 2021 6:45 pm

I prefer using the subcaption package, since it's the perfect companion to the excellent caption package by the same author.

Here is a quick example:

  \subcaptionbox*{First subfigure}[.45\linewidth]{%
  \subcaptionbox*{Second subfigure}[.45\linewidth]{%
  \caption{Two images}

This gives us:

subfigures.png (19.92 KiB) Viewed 47978 times

There are further examples in the LaTeX Cookbook, Chapter 4, Working with Images.


Last bumped by Anonymous on Mon Oct 18, 2021 6:45 pm. admin

Return to “LaTeX Beginner's Guide”

Who is online

Users browsing this forum: No registered users and 5 guests