Hi Aaron,

Going back to the original function posted, if the output is meant to be a book that is more-or-less immutable and ready for printing, one could just do the following instead:

%%%%
\version "2.19.82"

test = #(define-void-function (suffix) (string?)
  (print-book-with-defaults #{
    \book {
      \bookOutputSuffix #suffix
      \score { d4 }
    } #}))

\test "surname"
%%%%

Am I missing a subtlety that the original function is trying to address?

No - I think that's perfect. Thanks much - I didn't find a procedure for "just printing" a book.

What I was trying to achieve here: I have a document with theory exercises which come in several guises - figured bass, figured bass with given melody, only bass and melody, and so on -, richly adorned with \tag'ging. Since there are various chapters/sections, interspersed texts etc., they do not fit into one \score.

I wanted to have a convenient way to generate all various combinations; hence a function that receives a filename suffix and (omitted in my examples) a list of tags that should be removed.

The book now is defined using

create = #(define-void-function (omitTags suffix) (list? string?) (print-book-with-defaults #{
 \book {
    \bookOutputSuffix #suffix
     ...
  } #}))

and each story contains a \removeWithTag #omitTags. Hence by just issuing

\create #'() "complete"
\create #'(middleVoices bcFigures) "OuterVoices"
\create #'(upperVoices) "bc"
\create #'(upperVoices bcFigures) "BassOnly"

I get four files with completely different versions of a whole book containing multiple \score's and interspersed \markup's.

Works like a charm now - thanks much!

Best
Lukas


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to