lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lilypond-book: clean up w/o --output?


From: Florian Hollerweger
Subject: lilypond-book: clean up w/o --output?
Date: Tue, 12 Feb 2013 13:57:17 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Hi all,

Trying to establish a workflow for lilypond-book and LaTeX, I am caught up in a 
conflict between wanting to clean up the small files that lilypond-book 
creates, but not wanting to use its --output flag.

I usually encapsulate my LaTeX-only projects in a single directory containing:
  - pics/:   subdir with graphics, e.g., 'my.png'
  - my.tex:  file with commands such as\includegraphics{pics/my.png}
  - make.sh: custom script that renders output 'my.pdf' in main project dir and 
cleans up any other files created in the process

I'd like to organize projects using lilypond-book in a similar way:
  - pics/:    subdir with graphics, e.g., 'my.png'
  - code/:    subdir with Lilypond files, e.g., 'my.ly'
  - my.lytex: file with \includegraphics{pics/my.png} and 
\lilypondfile{code/my.ly}
  - make.sh:  custom script  that renders output 'my.pdf' in main project dir 
and cleans up any other files created in the process

The desire to clean up temporary files suggests the use of lilypond-book's 
--output flag, as indicated at [1]:

  lilypond-book --output=out my.lytex
  cd out
  pdflatex yourfile.tex
  mv yourfile.pdf ..
  cd ..
  rm -r out/

However, this means I am *changing the directory from which pdflatex is run*, 
so I'd need to change paths to any included files (e.g., graphics) in my.lytex:

  \includegraphics{pics/my.png} -> \includegraphics{../pics/my.png}
  \lilypondfile{code/my.ly}     -> \lilypondfile{../code/my.ly}

A first-world problem, admittedly, but it can be annoying if I start off with a 
LaTeX-only project, to which I later decide to add some Lilypond code.

Any ideas? Might one even dream of a --cleanup flag for lilypond-book? :)

Best,
flo.H


References:
[1] 
http://www.lilypond.org/doc/v2.16/Documentation/usage/invoking-lilypond_002dbook#Command-line-options



reply via email to

[Prev in Thread] Current Thread [Next in Thread]