On 17/03/17 21:10, Ian Ring wrote:

Hi, sorry if this has been asked before...

Is it possible to pass in header variables in via the CLI?

For example, I would like to pass the copyright date in via a parameter, instead of it being saved in the .LY file.

This can be done in LaTeX, so I hope there is a way to do something similar in lilypond.

Cheers
Ian



You could define a variable on the command line and insert it into the header block of a Lilypond file.

\version "2.18.2"
#(use-modules (guile-user))

\header { copyright = \markup { "©" \year "The Composer" } }

{ c''1 }


lilypond -e '(define-public year "2017")' tmp.ly

See http://lilypond.org/doc/v2.19/Documentation/usage/command_002dline-usage#basic-command-line-options-for-lilypond

--
Timothy Lanfear, Bristol, UK.


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to