Skip to content

Template for combining LaTeX and lilypond into one project using the lyluatex package

License

Notifications You must be signed in to change notification settings

musicmichaelc/lyluatex-music-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaTeX/lyluatex text & music starter template

Template for projects that combine LaTeX and lilypond in one document using the lyluatex package.

Typeset document

Github workflow pre-configured

Pushing new commits to a repository created from this starter template will trigger a workflow which produces pdf-files as artifacts.

latexmk pre-configured for local builds

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');

Usage

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:

Including lilypond .ly files

\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.

Including short snippets directly

1. With the lilypond environment

\begin{lilypond}
\relative c' { c d e f g a b c }
\end{lilypond}

2. Inlining very short snippets with \lily

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.

Legal

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.

About

Template for combining LaTeX and lilypond into one project using the lyluatex package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • LilyPond 84.9%
  • TeX 14.0%
  • Perl 1.1%