Is it possible to create a document with embedded objects like so?
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,
.jpg for pdfLaTeX. The
svg package allows further to include
As to ‘blocks of code’, it can be done through the
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.
For positioning the embedded items with wrapped text, you might also want to check out the