Am Montag, 27. Dezember 2010, um 17:53:13 schrieb Dan Eble:
> On 2010-12-27, at 11:11 , Reinhold Kainhofer wrote:
> > I forgot to add that the link itself would then be implemented completely
> > similar to \with-url. So, the only non-trivial thing is really how to get
> > the information about where to place the label (as a DEST pdfmark) into
> > the ps backend.
>
> Thanks. I now have
> \with-page-link #page-no { markup }
> and it actually works (for page-no=1 at least).
>
> Next, to make it use labeled page references...
Thanks, Dan, for your prototype. I have now prepared a patch that includes
your code into the lilypond distribution, and additionally uses it in the TOC
markup (*), so all toc entries automatically link to the corresponding pages.
Here's the patch:
http://codereview.appspot.com/4112042
Please review!
Thanks,
Reinhold
(*) Actually, the link to the corresponding label is currently hardcoded,
because I could not find a way to add the \with-link in the tocItemMarkup. The
main problem seems to be that the label needs to be a symbol, so I can't
retrieve it from the props via \fromproperty (which returns a markup). I have
tried (after adding toc:label to the props in table-of-contents)
tocItemMarkup = \markup \with-link \fromproperty #'toc:label \fill-line {
\fromproperty #'toc:text \fromproperty #'toc:page
}
as well as
tocItemMarkup = \markup \with-link #'toc:label \fill-line {
\fromproperty #'toc:text \fromproperty #'toc:page
}
Both of which don't work: The first because \fromproperty is a markup
function, while \with-link requires the label symbol; and the second because
toc:label is not directly defined as a variable, but rather has to be chain-
assoc-get'ed from the props... Any idea how to solve this and avoid hard-
coding the link?
--
------------------------------------------------------------------
Reinhold Kainhofer, [email protected], http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
_______________________________________________
bug-lilypond mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-lilypond