[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can we pass in header variables as CLI parameters?
From: |
David Wright |
Subject: |
Re: can we pass in header variables as CLI parameters? |
Date: |
Fri, 17 Mar 2017 23:46:56 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri 17 Mar 2017 at 21:10:29 (+0000), 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.
I'm not sure why that should be. Anyway, if you put some LP code
into a nonce file and then use:
lilypond -dinclude-settings=nonce-filename LP-source-filename
the nonce file will be interpreted first. So I assume any \header
code will be interpreted at top-level.
AFAICT the nonce file should either be in the working directory
or in an --include directory. If you specify it as a full pathname,
that pathname is checked for existence, but the directories appear
to be stripped off by LP. (That might be the normal behaviour for
\include files.)
Cheers,
David.