While it does not solve your use case, others here might find it interesting: I built a domain-specific language for designing slides (https://github.com/ruuda/pris#readme). It is superficially similar to LaTeX/Beamer/TikZ, but it has first-class graphics that are reusable. More motivation in this blog post: https://ruudvanasseldonk.com/2017/04/27/a-language-for-desig.... It is still basic, but I have used it a few times to do slides nonetheless.