3

I am creating a LaTeX document with some figures showing musical score that I created in LilyPond.

\documentclass{scrbook}

\begin{document}
Random text
\begin{lilypond}
    \relative c'{ c d e \hide f g a b c}
\end{lilypond}

\end{document}

As you can tell, I would like to hide a notehead with \hide, but when I compile the document with lilypond-book I get:

minimal.lytex:5:20: Fehler: Ungültige Fluchtsequenz: »\hide«
\relative c'{ c d e 
                    \hide f g a b c}
minimal.lytex:5:20: Fehler: syntax error, unexpected STRING
\relative c'{ c d e 
                    \hide f g a b c}
minimal.lytex:5:0: Fehler: Fehler gefunden, musikalischer Ausdruck wird ignoriert

\relative c'{ c d e \hide f g a b c}
schwerer Fehler: gescheiterte Dateien: "29/lily-0ede87a5.ly"
command failed: /usr/bin/lilypond --formats=ps -dbackend=eps  -I  "./lily-snips"  -I  "."  -I  ".." --formats=eps  -deps-box-padding=3.000000  -dread-file-list -dno-strip-output-dir  "/home/username/Dokumente/lily-snips/snippet-names--5826727977308730106.ly"
Child returned 1

I do not understand this error, because the part \relative c'{ c d e \hide f g a b c} will be properly compiled by LilyPond itself, but not by lilypond-book.

3
  • I saved your MWE as minimal.lytex and then ran lilypond-book minimal.lytex and then pdflatex minimal. It compiled fine. This is with version 2.18.2 of Lilypond. Are you using an older version? Oct 10, 2014 at 21:13
  • Welcome to TeX.SX! Thanks for the well-formed question! Oct 10, 2014 at 21:13
  • Hey, thank you very much for the answer; it actually partially answers my question: I have been compiling the code in TeXWorks using the command lilypond-book $fullname --output=./lily-output --latex-program=lualatex. The log file says that it is using LilyPond-Book version 2.16.2 even though I installed LilyPond version 2.18.2. If I compile it in the terminal, it correctly uses v. 2.18.2. and I can afterwards properly compile it with lualatex. So my new question is: Why is TeXWorks using a different version than the terminal, and where is it located? Oct 12, 2014 at 21:45

1 Answer 1

1

Okay, thank you very much to Andrew Cashner and fugenkomponist in the German LilyPond-Forum.

My problem was caused by use of multiple LilyPond versions. I had manually installed LilyPond version 2.18.2 (including lilypond-book) earlier and then unintentionally installed LilyPond v 2.16.2 as a dependency of the editor Frescobaldi (installation via apt-get under Ubuntu).

TeXWorks automatically used the older version that couldn't compile the code, whereas the terminal used the newer version and compiled properly.

So I could solve the problem by uninstalling Frescobaldi and LilyPond via apt-getand then manually installing Frescobaldi without a package manager and without any dependencies.

Now both the terminal and TeXWorks use lilypond-bookversion 2.18.2 and compile the code properly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .