Is it possible to create a document with embedded objects like so?

enter image description here

  • 2
    The media9 package allows to embed video or sound files. Images are no problem with graphicx. As to ‘block of code’, I'm unsure of what you mean, but I suppose listings should do it.
    – Bernard
    Sep 20, 2016 at 22:02
  • 1
    Is this significantly different from your earlier question, tex.stackexchange.com/questions/330505/… ?
    – cfr
    Sep 20, 2016 at 23:23
  • Perhaps you should look at the answers in this question to get an idea of what can be done in LaTeX. The ConTeXt are also usually quite interesting.
    – jon
    Sep 21, 2016 at 1:17
  • @Bernard This is what I wanted to know, If you post it as an answer I'll choose it. @_cfr I believe so. @_jon This is interesting, thanks.
    – Rtsne42
    Sep 21, 2016 at 6:07

2 Answers 2


The media9 package allows to embed video or sound files. Beamer also has a multimedia package, which allows for inclusion of animations or sound files.

Images are no problem with graphicx. Supported formats are .eps for LaTeX, .pdf, .png and .jpg for pdfLaTeX. The svg package allows further to include .svg images.

As to ‘blocks of code’, it can be done through the listings package.


If you're specifically looking for code to help get you started, there are some short examples on Overleaf (full disclosure - I'm one of the founders) which show you how you can set this up for e.g. media9:


and listings:


For positioning the embedded items with wrapped text, you might also want to check out the wrapfig package:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .