I am writing a document that will involve dozens of snippets of LilyPond. Seeking the simplest way of doing this, I have hit upon lilypond-Book and lyLuaTeX. Not knowing which is ultimately simpler, I have arbitrarily chosen lyLuaTeX, but I am not yet committed to this choice. I have three closely related questions about the use of lyLuaTeX. My questions are boldface.
Is lilypond-book simpler to use than lyLuaTeX?
Page 5 of the lyLuaTeX documentation (https://ctan.math.illinois.edu/support/lyluatex/lyluatex.pdf#page=5) says that lyLuaTeX requires that LuaLaTeX be
started with the --shell-escape command line option to enable the execution of arbitrary shell commands, which is necessary to let LilyPond compile the inserted scores on-the-fly and to perform some auxiliary shell operations. However, this opens a significant security hole, and only fully trusted input files should be compiled. You may mitigate (but not totally remove) this security hole by adding lilypond and gs to shell_escape_commands, and using --shell-restricted instead of --shell-escape: look at the documentation of your TEX distribution.
Are Overleaf and lyLuaTeX compatible?
How do I use the --shell-escape command line option? For example, must I go to a particular place in the Command Prompt (I'm using Windows) before using this option? If so, how do I go there? Once there, what do I do? (As must be obvious by now, I know little about the command line.)
I also considered asking: What are arbitrary shell commands? What risks are associated with enabling such arbitrary shell commands? How do I "[add] lilypond and gs to shell_escape_commands and [use] --shell-restricted instead of --shell-escape"? but I don't want to overload potential answerers with questions.
The author of the question How to use lyLuaTeX? seems to have successfully proceeded beyond the point of needing help with what I am asking about. Therefore, I don't think that my question is a duplicate.
lualatex --shell-escape myfile. – musarithmia Jul 06 '23 at 14:34