Nice thing is that you don't have to depend on the image existing as a separate file that you can refer to. You can embed it like an image in an email - you get the idea. Jupyter takes care of this for you in the .ipynb file.
But, by default, the image is aligned center and is default size. What if you want to set the size? If it were an external file, then you can just resort to standard HTML. But, you want a fully self contained notebook. So?
In one cell, above this one, NOT markdown, but code, have an HTML magic where you specify CSS that applies to this TAG.
In the cell of interest, where you insert the image after doing Edit > Insert Image, change the "alt text" inside the [] to something the CSS style can refer to and you're done
So, (1) looks like :
%%html
<style>
img[alt=bad_pie]{
float : left;
}
</style>
And, the cell with the image, when in edit mode, will look like :

Thanks :
https://stackoverflow.com/questions/255170/markdown-and-image-alignment
Comments
Post a Comment