|
From: | Urs Liska |
Subject: | Re: Is it possible to replace a number with variable inside a pair? |
Date: | Thu, 26 Jul 2018 09:39:47 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Am 26.07.2018 um 09:35 schrieb Risto
Vääräniemi:
You need a technique known as quasi-quoting. In your code #'( means that you have a pair of literal symbols, i.e. a symbol "thickness" and a symbol "#lineThickness". The straight single quote tells Lily to "quote" everything inside the brackets. What you need is to write the pair as #`(a . b) with a backtick instead of a straight single quote. This allows you to "unquote" individual elements with a comma: lineThickness = 5 \markup \override #`(thickness . ,lineThickness) \draw-hline See https://scheme-book.ursliska.de/scheme/quoting/ for some more info HTH Urs
|
[Prev in Thread] | Current Thread | [Next in Thread] |