jperon / lyluatex

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

General question: cooperation with 'musicexamples' #26

Closed uliska closed 6 years ago

uliska commented 6 years ago

Having finally looked into lyluatex I think (even more than initially) that lyluatex and my musicexamples package would go together very well, and we should discuss how that could work best.

lyluatex manages LilyPond source code and compilation with suitable dimensions but “only“ integrates them in the final document as images included with \includegraphics or \includepdf. musicexamples provides commands and environments to properly integrate music examples into LaTeX documents but is only able to deal with PDFs generated separately. So actually there is absolutely no overlap currently, and each package implements what the other misses, which makes them ideal companions.

Among the elements musicexamples adds to the mix are


What options do we have?

  1. integrate musicexamples into lyluatex
  2. integrate lyluatex into musicexamples
  3. Don't integrate them but make sure they work together seamlessly (and bring musicexamples to a state where it can be published on CTAN)
  4. as 3. but "use" musicexamples from within lyluatex

I vote for 3. or 4. I would not strictly bind the two together because musicexamples should work with any TeX engine, and I don't think it's a good idea to add luatex as a requirement (although I personally use luatex exclusively). OTOH it would be good to have the functionality available in one single package. Of course it would be possible to wrap the lyluatex functions to only be available when run on luatex, but probably that's overly complicated.

One alternative could be to reimplement lyluatex using pythontex. While this would still add a heavy dependency - Python - it would still allow any TeX engine to be used. Or we could try to reimplement everything in pure (La)TeX, based on the code shared by Knut Petersen (although I'm not sure to what extent this code can be made as maintainable as lyluatex's current one - at least I will not be of much help here).


So my suggestion is to

uliska commented 6 years ago

Showcase document for musicexamples: xmp-Example.pdf

jperon commented 6 years ago

I really think option 3 is the best. Perhaps we could make a mix with 4 by providing an option, so that one could integrate both packages with one \includepackage ; but IMHO, this would be a possible cause of difficult to understand problems for users.

uliska commented 6 years ago

OK, I agree. So let's go for my third suggestion and create two complementary packages that are designed and documented to work together.

I have started reviewing the documentation of musicexamples by throwing out all references to the Python attempts. At the same time I could close five out of 10 issues because lyluatex exactly provides the functionality I was wishing for back in 2014 when I stopped working on it.