Version: 0.6.80 (using 4.00.80 (KDE 4.0.80 >= (KDE 4.1 Beta1), Kubuntu packages) Compiler: gcc OS: Linux (i686) release 2.6.24-18-generic Hello, I'm writing music with lilypond and get pdf's with textedit-URIs at every note and other musical expressions. The behavier, I would wish, is called 'point and click'. So a click on this link would lead to the point at the sourcecode. Here's the page in the lilypond documentation about this subject: http://lilypond.org/doc/v2.11/Documentation/user/lilypond-program/Point-and-click May be there's a way to get this to work between ocular and kate? Regards, Chrisch
Could you please attach a sample document with this feature?
Created attachment 25247 [details] Sample document with textedit-URIs on noteheads and text Yes, here's the sample PDF with textedit-URIs on noteheads and the text "C Major scale". When my cursor fly over a notehead the textedit-URI is shown as hint. For example (first note): 'textedit:///home/test/ocular-test/point-and-click.ly:6:1:8' This referred to my source file 'point-and-click.ly'. I'm going to post it in a minute.
Created attachment 25248 [details] Lilypond source file This is the Lilypond source file. You can get the PDF out of it with lilypond installed and on konsole lilypond point-and-click.ly Eventually you would like to do this to correct the URIs for your system.
SVN commit 863572 by pino: Make Okular able to distinguish the LilyPond "Point and click" links, and make them act as source references when activated. FEATURE: 163569 M +7 -0 action.cpp M +8 -0 document.cpp M +37 -1 sourcereference.cpp A sourcereference_p.h [License: GPL (v2+)]
Unaware of this bug (but right now stumbling upon this code in core/document.cpp), I created a solution for the original problem outside of Okular, by creating a textedit.protocol file defining a helper protocol for textedit:// urls (as those created by LilyPond), and a small helper application, ktexteditservice, that is called to act upon the textedit url. These protocol file and helper application are part of my lilypond-kde4 package, that lives in SVN on http://lilykde.googlecode.com/. My ktexteditservice has a more advanced approach: it reads the user's preferences to get the preferred editor for LilyPond files (the text/x-lilypond mimetype). How the preferred editor is started with the correct arguments is determined by a (user editable) config file, ktexteditservicerc. Many known editors are already included in the config file. It can also call directly via DBus into running applications to open a .ly document and set the cursor position, if those applications set a special environment variable. My LilyPond editor Frescobaldi uses this approach (see below). So it is maybe better to handle textedit:// urls outside of Okular, so that they can be handled more advanced and more configurable and they would also work in other PDF viewers that use KDE to resolve clickable links. (My ktexteditservice works in Acrobat too.) Please have a look to my code. I also wrote an editor for LilyPond files that embeds Okular to preview with point and click support. The editor is called Frescobaldi and has also its code in googlecode's svn at http://lilykde.googlecode.com/ and its own website at http://www.frescobaldi.org/ . I look forward to discuss this further (just subscribed to Okular-devel). Many thanks, Wilbert Berendsen