Could one create a package that invokes lilypond (an external command) and embeds the result?

What would it take to create a package that provides a lilypond function that invokes the lilypond command and automatically embeds the resulting output? Are there any packages that do something similar?

Impossible at the moment. A package cannot call an external command.

If you want to do that for your personal project, you have to make a custom build script that first runs lilypond, puts the output somewhere, and then renders the Typst document (which includes the lilypond output somewhere).

1 Like

Hi @AlexHarter, I have changed your post’s title to bring it in line with the question guidelines and thus make it easier to understand from the title:

Good titles are questions you would ask your friend about Typst.

Fortunately the nicely formulated question in your post made my job easy :slight_smile: Be sure to use a question for your title next time :wink:

This recent answer may interest you: