I have a case where I need to create separate output files using the \book block.  I would like to reuse the \paper block in each of the blocks.

I have found the \paper block can be put in a variable and the variable reuses successfully. However for some if I use the variable then the book suffix is ignored.

Attached is a trimmed down sample.


\version "2.24.2"

sc = \score { \relative c' { c4 d e f } }

pay = \paper { annotate-spacing = ##t }

% I would like to create multiple books that uses the same
% \paper block defintion. A variable holding the \paper
% would be acceptable.

% This is the primary question I have.
% this uses the paper setting in the pay variable
%but ignores the suffix
\book {
  \bookOutputSuffix "One"
  \sc
  \pay
}

% This uses the suffix but ignores
% \paper that is defined outside the book
\book {
  \bookOutputSuffix "Two"
  \sc
}

% This uses the suffix and pays attention to the internal
% \paper block
\book {
  \bookOutputSuffix "Three"
  \sc
  \paper { annotate-spacing = ##t }
}

\paper { annotate-spacing = ##t }
\version "2.24.2"

sc = \score { \relative c' { c4 d e f } }

pay = \paper { annotate-spacing = ##t }

% I would like to create multiple books that uses the same
% \paper block defintion. A variable holding the \paper
% would be acceptable.

% This is the primary question I have.
% this uses the paper setting in the pay variable
%but ignores the suffix
\book {
  \bookOutputSuffix "One"
  \sc
  \pay
}

% This uses the suffix but ignores
% \paper that is defined outside the book
\book {
  \bookOutputSuffix "Two"
  \sc
}

% This uses the suffix and pays attention to the internal
% \paper block
\book {
  \bookOutputSuffix "Three"
  \sc
  \paper { annotate-spacing = ##t }
}

\paper { annotate-spacing = ##t }

Reply via email to