|
From: | John Schlomann |
Subject: | Problem with conditionals in \layout |
Date: | Fri, 1 Dec 2017 14:02:03 -0600 |
I’m have a problem including conditionals in a \layout block. The following code results in error, “syntax error, unexpected OUTPUT_DEF_IDENTIFIER”. \version "2.18.2" #(define conditionalTimeSignature (if #t #{ \layout { \context { \Staff \remove "Time_signature_engraver" } } #} ) ) #(define conditionalBarNumbers (if #t #{ \layout { \context { \Score \remove "Bar_number_engraver" } } #} ) ) \score { { c' e' g' c'' } \layout { \conditionalTimeSignature \conditionalBarNumbers } } If I remove either of the lines from \layout, it compiles without error and functions as expected. I’ve tried a number of variations, including putting the two lines outside the \score block. I either get compile errors or no errors but code that appears to do nothing. Any advice? Thank you. John |
[Prev in Thread] | Current Thread | [Next in Thread] |