jperon / lyluatex

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

Customization commands #232

Closed jperon closed 5 years ago

jperon commented 5 years ago

This PR includes several tools for customization:

jperon commented 5 years ago

Here is a MWE:

\documentclass{scrartcl}
\usepackage[debug]{lyluatex}

\begin{document}

\lynewenvironment{myly}[1][]{%
    {\centering test \par}
    \begin{ly}[
        include_before_body={foot,foot},
        include_after_body=head,
    ]
}{
    \end{ly}
}

\begin{lysavefrag}{head}
a b c
\end{lysavefrag}

\begin{lysavefrag}{foot}
g a' b
\end{lysavefrag}

\begin{myly}
d e f
\end{myly}

\end{document}
uliska commented 5 years ago

This looks very interesting. I'll look into it, but most probably not today.

uliska commented 5 years ago

I admit I don't really understand the code changes, so I can only state that both the MWE and the manual work with the modified content.

I have applied a few clarifications to the manual because I think people will be confused by a caption argument with the actual content "caption", or with "saved fragments" that are all named like they are keywords.

So from my perspective this can can be merged.