In trying to implement the idea of a tag set, I came up with the following:

%%%%%%%%%%%%%
\version "2.19.53"

gender = #'male  % manually set to male, female, neutral

#(define test 0)

heshe = \lyricmode {
  \tag #'male { he #(set! test 1) }
\tag #'female { she #(if (eqv? test 1) (error "more then one pronoun") (set! test 1)) } \tag #'neutral { he/she #(if (eqv? test 1) (error "more then one pronoun") (set! test 1)) }
  #(set! test 0)
}

hisher = \lyricmode {
  \tag #'male { his #(set! test 1) }
\tag #'female { her #(if (eqv? test 1) (error "more then one pronoun") (set! test 1)) } \tag #'neutral { his/her #(if (eqv? test 1) (error "more then one pronoun") (set! test 1)) }
  #(set! test 0)
}

global = { \key c \major }

verse = \lyricmode {
  Filled with the Spir -- it, by \hisher earth -- ly la -- bours,
  Brought to your peo -- ple heal -- ing and com -- pas -- sion;
  Rais -- ing the fal -- len, re -- con -- cil -- ing sin -- ners,
  Glad -- ly \heshe served them.
}

music = {
  c' c' c' c' c' c' c' c' c' c' c'
  c' c' c' c' c' c' c' c' c' c' c'
  c' c' c' c' c' c' c' c' c' c' c'
  c' c' c' c' c'
}

\new Staff \keepWithTag \gender
<<
   \new Voice = "mel" { \global \music }
   \new Lyrics \lyricsto "mel" { \verse }
>>
%%%%%%%%%%

This, however, raises errors when it's not supposed to (i.e. when \keepWithTag \gender is present). GUILE is indicating that something is wrong with the scheme, but I don't know what, as the applicable scheme runs as expected when entered by itself in the guile interpreter in the LilyPond app. Is something like this even possible, and if so what am I doing wrong?
--
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to