[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Book with Denemo
From: |
Andreas Schneider |
Subject: |
Re: [Denemo-devel] Book with Denemo |
Date: |
Sun, 8 May 2016 08:10:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 |
I have written the following code, borrowing parts from other commands:
;;;StartBookpart
(let ((tag "StartBookpart")(thetitle ""))
(d-DirectivePut-movementcontrol-override tag (logior
DENEMO_OVERRIDE_GRAPHIC DENEMO_OVERRIDE_TAGEDIT))
(set! thetitle (d-GetUserInputWithSnippets (_ "Start Bookpart")(_
"Give chapter title::") thetitle))
(disp thetitle)
(if thetitle
(begin
(d-DirectivePut-movementcontrol-prefix tag (string-append "
\\bookpart { %start of
bookpart\n \\header {\n title = {" thetitle "}\n }\n"))
(d-SetSaved #f)
)
(d-InfoDialog "Cancelled")
)
)
However, if I insert, e.g., Titletext in the dialog, it returns
(Titletext . \line\large{Titletext}
)
(this is what (disp thetitle) outputs), and (string-append ) gives an
error that that is not a string. How can I access the unprocessed input?
Moreover, when the user calls StartBookpart a second time I want to fill
the input field with the previous title. To this end, the clean title
has to be saved somewhere (or the generated code has to be parsed). How
can that be done?
Andreas
Am 06.05.2016 um 15:32 schrieb Richard Shann:
> On Thu, 2016-05-05 at 22:22 +0100, Richard Shann wrote:
>> without having time to look at this tonight, it would seem clear that
>> you could write
>>
>> (d-DirectivePut-movementcontrol-prefix tag "\\bookpart { %start of
>> bookpart\n\\header { whatever is needed }\n")
>>
>>
>> filling in "whatever is needed".
>
>
> Having read that up, it looks like what you want is already do-able in
> the way I described above. To make a nice system of commands for
> handling the chapters in the book without the user seeing the underlying
> LilyPond syntax would require some work however. I can help if you want
> to do that.
- [Denemo-devel] Book with Denemo, Andreas Schneider, 2016/05/04
- Re: [Denemo-devel] Book with Denemo, Richard Shann, 2016/05/05
- Re: [Denemo-devel] Book with Denemo, Andreas Schneider, 2016/05/05
- Re: [Denemo-devel] Book with Denemo, Richard Shann, 2016/05/05
- Re: [Denemo-devel] Book with Denemo, Richard Shann, 2016/05/06
- Re: [Denemo-devel] Book with Denemo,
Andreas Schneider <=
- Re: [Denemo-devel] Book with Denemo, Richard Shann, 2016/05/08
- Re: [Denemo-devel] Book with Denemo, Richard Shann, 2016/05/08
- Re: [Denemo-devel] Book with Denemo, Andreas Schneider, 2016/05/08
- Re: [Denemo-devel] Book with Denemo, Richard Shann, 2016/05/08
- Re: [Denemo-devel] Book with Denemo, Andreas Schneider, 2016/05/09
- Re: [Denemo-devel] Book with Denemo, Richard Shann, 2016/05/10