Thank you! I have now come to the following scripts which work as desired:

;;;StartBookpart
(let ((tag "StartBookpart")(thetitle ""))
  (d-DirectivePut-movementcontrol-override tag (logior
DENEMO_OVERRIDE_GRAPHIC DENEMO_OVERRIDE_TAGEDIT))
  (disp "checking previous bookpart title ...")
  (if (d-Directive-movementcontrol? tag)
    (set! thetitle (d-DirectiveGet-movementcontrol-data tag)))
  (set! thetitle (d-GetUserInputWithSnippets (_ "Start Bookpart")(_
"Give chapter title::") thetitle))
  (if thetitle
  (begin
    (set! thetitle (car thetitle))
    (disp thetitle)
    (d-DirectivePut-movementcontrol-data tag (scheme-escape thetitle))
    (d-DirectivePut-movementcontrol-prefix tag (string-append "
\\bookpart { %start of bookpart\n  \\header {\n    title = { " thetitle
" }\n  }\n"))
    (d-SetSaved #f)
  )
    (d-InfoDialog "Cancelled")
  )
)

;;;EndBookpart
(let ((tag "EndBookpart"))
  (d-DirectivePut-movementcontrol-override tag (logior
DENEMO_OVERRIDE_GRAPHIC DENEMO_OVERRIDE_TAGEDIT))
  (d-DirectivePut-movementcontrol-postfix tag "\n} %end of bookpart\n")
  (d-SetSaved #f)
)

Andreas

_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel

Reply via email to