Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including Lilypond in LaTeX

Tags:

lilypond

It states here, that i have to include Lilypond into LaTeX like this:

\documentclass[a4paper,10pt]{report}
\usepackage[utf8x]{inputenc}

\begin{document}
\begin{lilypond}
\relative c'' {
\time 4/4

< a e' a >2 
< a e' a >4
< a e' a >8
< a e' a >8 

} 
\end{lilypond}
\end{document}

But this is not working, as command \begin{lilypond} isn't reckognized, so i end up with nothing. Do i have to include any packages or what? That tutorial is so sloppy...

like image 451
71GA Avatar asked Jan 16 '23 22:01

71GA


1 Answers

The .tex file with the lilipond environments must be compiled with lilipond-book, for example with the command lilypond-book -f latex --psfonts --output OUTPUT TEX_FILE.tex

This is explained in a different part of the lilipond documentation: http://lilypond.org/doc/v2.12/Documentation/user/lilypond-program/Invoking-lilypond_002dbook#Invoking-lilypond_002dbook

like image 183
thundersteele Avatar answered Apr 20 '23 13:04

thundersteele