Template for projects that combine LaTeX
and lilypond
in one document using the lyluatex
package.
Pushing new commits to a repository created from this starter template will trigger a workflow which produces pdf-files as artifacts.
Simply run the command latexmk
in the root folder of this repository to build locally. If you change the name of document.tex
, modify .latexmkrc
accordingly, e.g. if the file to be compiled is main-project.tex
, then change the corresponding line to:
@default_files = ('main-project.tex');
For more detailed information about using lyluatex
, consult the readme file in the lyluatex repo or (even better and more detailed) the following pdf-documenation.
The following is a little summary:
\lilypondfile[staffsize=17]{PATH/TO/THE/FILE}
The optional argument staffsize
changes the size of the score.
You can change the size for all subsequent scores in a document by
placing the following command before your first include statement:
\setluaoption{ly}{staffsize}{24}
Insertion mode can be controlled with the insert
option, whose valid values are systems
(default),
fullpage
, inline
, and bare-inline
. For more info on these options, please consult the pdf-documenation on page 8 and following.
\begin{lilypond}
\relative c' { c d e f g a b c }
\end{lilypond}
One can use \lily
or \lilypond
—both seem to have the same effect:
Some text here... Lorem ipsum etc. and the motive
that reads \lily[staffsize=12]{c' d' g'} returns
again in the recapitulation in a new form, etc.
etc. lorem ipsum.
Important: The \lily
command does not support blocks of LilyPond
code with explicit \score
blocks. Such code must be included with the
lilypond
environment or as a separate file.
This starter template is licensed under the BSD Zero Clause License (0BSD). However, the software being used therein, such as lilypond
, lyluatex
, etc. themselves are licensed under their respective licenses, e.g. the lyluatex
package is licensed under the MIT license, whereas lilypond
is licensed under GPL.