lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to display \" in string without starting/ending "-signs?


From: Thomas Morley
Subject: Re: how to display \" in string without starting/ending "-signs?
Date: Sun, 13 Mar 2016 17:40:10 +0100

2016-03-13 16:52 GMT+01:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> writes:
>
>> Hi all,
>>
>> consider the following string:  "bar\"foo\"buzz"
>> I want to display it like: bar\"foo\"buzz
>
> What for?
[...]
In general, I'm searching a fix for the issue with graphviz reported here:
http://lilypond.1069038.n5.nabble.com/error-while-using-graphviz-td187830.html

More detailed:
(usage follows 
http://www.lilypond.org/doc/v2.19/Documentation/contributor/tracing-object-relationships
)

With the lines:
    (for-each (lambda (n) (format out "~a [label=\"~a\"]\n" (car n) (cdr n)))
              ns)

`graph-write' from graphviz.scm returns (among others):

15 [label="NoteHead\n/home/harm/lilypond-git/lily/font-interface.cc:37\nfont
<- #<Font_metric ("emmentaler-20" . 0.569055118110236"]
which breaks the final pdf-creation, because of unescaped ".signs

Adding there
(newline)(write (cdr n))
returns:

"NoteHead\\n/home/harm/lilypond-git/lily/font-interface.cc:37\\nfont
<- #<Font_metric (\"emmentaler-20\" . 0.569055118110236"

So the exercise is to keep escaped "-signs, but transform \\n into \n.

Additionally, whatever fix it finally might be, I'm not sure _where_ to do it:
very late, i.e. right here in `graph-write'?
or very early, i.e. in `grob-mod' or even before in `truncate-value'
both from graphviz-init.ly


Thanks,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]