Implementing a counter in markup text: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
This snippet shows how to implement a counter in LilyPond for use in markup texts. Whenever you call the <code>\counter "name"</code> markup function, the counter named <code>name</code> will be increased by one and the new value will be printed as a text markup. The first call will print “1” by default. Example: | This snippet shows how to implement a counter in LilyPond for use in markup texts. Whenever you call the <code>\counter #"name"</code> markup function, the counter named <code>name</code> will be increased by one and the new value will be printed as a text markup. The first call will print “1” by default. Example: | ||
\markup { | \markup { | ||