jperon / lyluatex

Alternative à lilypond-book pour lualatex
MIT License
58 stars 12 forks source link

Provide "raw pdf" for use in other packages #152

Closed uliska closed 6 years ago

uliska commented 6 years ago

Merges #50, #57, #58

In order to have other package use lyluatex I thought it would be good to provide an option that causes scores to be returned in a very "bare" format, basically a raw pdf name or a list of such names.

This is useful at least for fullpage and for inline scores, less so for system-by-system scores.

Use case: lilyglyphs I want to create a macro that allows the user to specify arbitrary LilyPond code to be used in a lilyglyphs command. This will basically invoke \lilypond[bare-inline], probably with a custom staffsize and wrap the output in the usual lilyglyphs interface. For this to work it would be practical not to use the regular output of lyluatex but the bare pdf filename. The same is true for fullpage scores that musicexamples treats differently than lyluatex. Basically I'd like to write the whole wrapper and \includepdf in musicexamples and only get the pdf filename back from lyluatex.

For system-by-system scores it makes much less sense since there is protrusion and the inter-system macros that don't translate well to being included separately. So I think in most cases (at least those that I can think of) the current behaviour of lyluatex will be the one that is desired. But for consistency we could also offer a "bare pdf" option that returns a comma-separated list of pdf filenames.

I suggest adding an option raw-pdf that of course defaults to false. There is probably no need to have a separate option to control the behaviour for insert=systems (as we have added inline-staffsize because this will usually not be handled by document authors but by macros in other packages or style files.

I would like to include that feature in the release and not postpone it. But I won't start any coding work until this proposal has been discussed and approved, and until the code maintenance has been completed.

jperon commented 6 years ago

I think it's a very good idea.

Moreover, for interaction with other packages, #153 greatly improves the usability of ly.

uliska commented 6 years ago

Merged with #154