Deep Annotation & Highlight links

Hi.

The new annotation and text linking in version 3.9 is fantastic - I’ve been hoping this would be added for ages. Also, the fact that summarising highlights in a document includes a link to the annotation itself is great.

One query/request for a further feature, which the app Highlights has managed (but now Highlights’ annotations links are inferior as they do not link to the coordinates of the annotation, just the page): can an annotation of an image in a pdf, such as a box around that image, be reproduced in the rich text summary of the annotations, along with a link to it? I see in the list of annotations of the document, in the inspector, that there is a link to such a box, with the coordinates, but neither the link, nor an image, is created in the rich text summary of annotations.

Overall though, a fantastic addition.

Thanks!

Thanks for the nice feedback.

That seems a little odd… if a annotation shape was included in the summary, there’d be no context. It would be… here’s a rectangle on this page, at some location. Doesn’t say much about what the rectangle relates to.
Thoughts?

Thanks for your reply.

Sorry I wasn’t clear with my post: what Highlights does is copy the image you annotated, and creates a link to the page. I’ve attached a screenshot which shows the DT manual in Highlights, with some text highlighted, then an image highlighted: on the right is that text with a link,


and the image with a link, which can then be exported.

If this isn’t possible, it still might be helpful to have just the link to the annotation box with no image, as it would at least remind you that there’s another annotation to have a look at, even if its not visible in the list of annotations.

Thanks!

You’re welcome.

So what would it show if you create a rectangle over some text? (Sorry but I’m updating my Mac with Highlights on it right now so I can’t check for myself :wink: )

It would create an image of what’s inside the box - so the text would show, but a non-searchable image. I’d use it for handwriting etc.

Hello,
I hope that it’s okay to use this topic because I want to avoid opening a new topic:

  1. I found out that the new “Copy Selection Link” is not in the edit menu, where “Copy Item Link” and “Copy Page Link” is. It is nowhere. Are you going to implement it? I would like to create a Shortcut with CustomShortcuts.
  2. Somehow “Insert Summary” does not work for me despite having highlighted the PDF. Do I miss some requirements?
  3. Are you planning to implement the “Copy Selection Link” for markdown files too? Currently, I’m considering converting my markdown files to PDF because of the feature. :slight_smile:

And thanks for implementing the new features.

  1. We don’t make any promises but the request is noted.
  2. Doesn’t work in what way? The menu item is disabled, it doesn’t insert a summary, …? Please be specific.
  3. The request is noted.
1 Like

The next release will support this.

Markdown supports only section (not selection) links.

1 Like

To 2:
Somehow it does work now… Before I only got a sound indicating that it does not work. Strange. If I can replicate it, I’ll let you know. Or it does work now flawlessly in the future :slight_smile:

Regarding the markdown selections:
I thought that you might just use only the search operator to find the text in the PDF, so I assumed that would be possible with MD, too. But now I see that the link contains more than that. Would it be possible to use that without the “page”, “start” and “length” operators? It’s not ideal and not real deep linking, but better than nothing?

But I think I’ll convert all my md archiving sources into PDFs. The two new deep linking features are wonderful, and the only disadvantage for me are the bigger file sizes.
Nice work!

1 Like

Item links using only the search parameter are supported for all kinds of text documents. However, these links can easily break as soon as the linked document gets modified.

This is also scriptable, see this simple example:

tell application id "DNtp"
	if exists think window 1 then
		set theWindow to think window 1
		set selText to (selected text of theWindow) as string
		if selText is not "" then
			set theItemLink to reference URL of content record of theWindow
			set escapedText to do JavaScript "encodeURIComponent(\"" & selText & "\");" in theWindow
			set theItemLink to theItemLink & "?search=" & escapedText
			set the clipboard to theItemLink
		end if
	end if
end tell

Ah, make sense.

Unfortunately, I belong to the people who do not have any scripting skills and often do not know how to use that, in case someone posts code.
Are there any resources for learning AppleScript using DT?

Scripting DEVONthink is more or less like scripting any other Mac app, therefore any generic introduction to AppleScript or JXA should be fine. Afterwards the script suite description (just drop DEVONthink onto the Script Editor.app’s Dock or Finder icon to view it) makes a lot more sense.

2 Likes

Why do you say this is “not real deep linking” ?

Okay, you’ve got me there. It is deep linking, but not a good one. I think robustness is an important condition for the usage of deep linking, but it isn’t in the definition of deep linking. I referred to the argument of @cgrunenberg that in MD you are inclined to change text, or it is easier to modify the text than in PDFs.

It is deep linking, but not a good one. I think robustness is an important condition for the usage of deep linking, but it isn’t in the definition of deep linking.

There is no standard in deep linking so robustness can’t be guaranteed unless you are staying within the confines of one application’s method (and even then, there is no guarantee).

Deep linking is only reliable if it’s a proprietary document format (which DEVONthink doesn’t use), if the document format is static or if the document format on its own supports deep links. PDF at least partially fulfils conditions #2 & #3.

2 Likes

Hi. Love the …AddLink (DeepLink) ability of the latest version and it could not have come at a better time for me. Studying for a test where I have in DT a .pdf table-of-contents (TOC) ocr’d and corresponding content in Brain Thoughts, where I copy/paste the Thought ID to a matching item on the TOC. So if the .pdf TOC lists ‘red-car’ I paste there the Thought ID for the thought ‘red-car’. So that I can call a specific Thought based on clicking the TOC. So far it is all awesome.

But I one thing missing is a box or some indication on the .pdf that I have set a Link. The indicator needs to be created at the same instant that I paste the Link text. By way of annotations I am able add text or a box but that is a series of additional steps that I have to think about when creating the link, and it slows me down…or worse, I will not know where there is a link. When I paste a deep-link to a .pdf, it should set the link plus create an indication that there is a link over the location where the link was placed.

Any suggestions on how to automate?
A feature request?

A small icon in the item list shows that another item in the opened databases links to a document. But of course DEVONthink can’t detect whether its links are used in other apps or documents outside DEVONthink.

My request is only for a visual indicator at the place where the deep link was set.