jperon / lyluatex

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

\lyuseoption as wrapper to Opts:use_option #261

Closed uliska closed 4 years ago

uliska commented 5 years ago

I've come to the conclusion that it's a courtesy to the user to reduce the need to use \directlua wherever possible ...

Use case: In a document preamble it is with this patch possible to write

\RequirePackage[%
    left=\lyuseoption{my_opts}{layout_left},%
    right=\lyuseoption{my_opts}{layout_right},%
]{geometry}

rather than having to call `my_opts:use_option(layout_left)` in a `\directlua` clause
uliska commented 5 years ago

I will also add this to luaoptions but only close this PR when I've done so.