rosros <rosros2...@gmail.com> writes: > I would like to recover the value of the lilypond version statement to insert > it in the tagline. > > With "\simple #(lilypond-version)" I can recover the current lilypond > version which is not necessarily the same string. > > Is there a solution other than hard-coding it?
Looking at the code in lexer.ll (and elsewhere), the answer is quite definitely "no". The version number never leaves the bowels of the tokenizer and is never stored anywhere in any form. Since it is a reserved word, you cannot even redefine the \version statement. It would be a reasonable extension to store the version number in version-seen but at the current moment it is merely set to #t when the \version statement is encountered. You can write ver = "2.18.0" \version #ver ... and output #ver at some point of time. That's probably the best you can currently hope for. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user