Hello all,
I am just now learning how to use labels and \page-ref to retrieve the page 
number where a label is located.
I would like to use the value returned by \page-ref to do simple math in 
Scheme. I am able to pass the label to a markup command, but I can't figure out 
how to get it into a number format so I can manipulate it. Any tips? Here is my 
tiny example:

\version "2.24"

{ 
  \label #'myLabel
  c4 c c
}

#(define-markup-command 
  (page-number-calculations layout props label) (markup?)
  ; Throws error "Wrong type argument in position 1"
  (interpret-markup layout props (+ label 1))
)

myLabel = \markup { \page-ref #'myLabel "0" "?" }
\markup \page-number-calculations \myLabel


Reply via email to