3

There is a useful Python solution here to put two images side by side in the notebook, but is there a language agnostic way that does the trick using only Jupyter's own markdown? Something like

![](path/to/image1) # insert magic here # ![](path/to/image2)

that displays the images side by side?

This would be useful in my case cause I would prefer not to break a markdown cell into two and put code in between, but I also would find this helpful in case the notebook is not running Python. I personally run Julia quite a lot.

rodrigolece
  • 1,039
  • 2
  • 13
  • 19

1 Answers1

2

A possible solution would be using img tags with the same align attribute:

<img src="path/to/image1" align="left"/><img src="path/to/image2" align="left"/>
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
  • No, that doesn't seem to do the trick, my images still appear one below the other. – rodrigolece Apr 26 '18 at 13:00
  • @rodrigolece Are you sure that your images are small enough? Try to provide a small `width` such as 100. – Tamás Sengel Apr 26 '18 at 13:04
  • If you want to return to having markdown text after using the align tag without needing to make a new cell you can follow [here](https://owlcation.com/stem/how-to-align-images-side-by-side) and put `

    ` to clear the aligning to left. Also with the addition of `style="margin-right: 1%;"` to the `img` tag of the first you can add spacing between the two.

    – Wayne Mar 08 '20 at 18:34