Open FannoFlow opened 3 years ago
Great idea! Let's do this.
They could be embedded as animated GIFs, or maybe as real video formats.
First thing to do is figure out what format Matlab's "Export Live Script to LaTeX" dumps them out as. And have a look at what its "Export to HTML" does with them, too; that may support different media formats.
Okay, I added a TODO and an example .mlx
for this: https://github.com/janklab/ExportMlx/commit/94fe644b07b5d6d8604cbc62c23147f158a0ad00.
Hmmm. This might be nontrivial: I think what you're actually seeing when you Run the Live Script is just Matlab progressively updating the preview image upon passes through the loop, and once execution of that code block is finished, what's left is just a static image, not a video of any sorts.
When exporting the mlx to latex with Matlab (R2019b), you get just a static .png
file, and when exporting to HTML, you end up with a PNG embedded inside the HTML file using a <img src="data:image/png;base64,...">
tag.
when plotting code is drawn in a loop, matlab live scripts will covert them to a video playback.
This would be really cool to see exported in markdown. perhaps as a gif?