blog

Creating Deep Links With Hook: A Worked Example

deep links
Source: Unsplash

This blog post contains a tutorial and a worked example to help you experience, first-hand, the benefits of deep linking.

This is a guest post by Luc P. Beaudoin, an adjunct professor of Cognitive Science and Education at Simon Fraser University and the developer of
Hook and
mySleepButton.


0000017f-22e8-dd42-a5ff-eae80aed0000

In a previous blog post, I explained how to create deep links to a PDF using PDFpenPro and Hook. 

Deep links created with Hook don't just direct you to a PDF, they scroll to a specific location within the PDF. This saves you time, because PDFs are often long.

Another advantage of Hook's deep links is that, unlike web links and traditional file links, they continue to work even when the document is moved or renamed.

Understand how deep linking works

We created a tutorial and a worked example to help you experience Hook first-hand. To follow along, you’ll need to have PDFpenPro installed and to follow these steps:

1. Download Hook 

2. Click the gear icon on the top right and choose Preferences

qHAnxfbt92tRkxVK7wtJDfG5UzMuTW88xUBxQlVeJGFF1aD16XlW2KpTQ1fm5WbLIFvly9lp5RnLN2yqcuia7RTiTCKtbkncpbHB_GDGEYkEev72XelJpB_w_Y3XFNT8dvz9gSPj

3. In Hook's General Preferences tab, uncheck Reveal hook://file link targets in Finder (rather than opening them)
to enable the deep links to open

nkpzfXJecJDk4p8Klj-eaKgbYe-DBKnsnFMt4mnpSuHn5AjR5CLhTzyBNc0f_g-unnYZX23xfyfES4yM1R0sAmaQwYWTfLOdxESgFKVgBgQbjn-8HMcjKygq6irESQdP9GIwteVL

4. Download the worked example (zip file) from CogZest 

lm53I4qNIaVRDUkx_9y2vB9SWCX53NCcBWnFxA-eZKvUSgSY02OeTHyq322PuDEJ-GIgD_6VWCIG73FNiZl-PrqTb1AubawglGUCJ2eGLbOW8jkf0CxslpD8IHDPkWqhVeIEJidy

See Hook in action

In this tutorial, we will be hooking (linking) a document to the PDF titled Mental Perturbance.pdf
(included in the zip file you just downloaded). 

To hook the two documents, do the following:

    1.    Open the Mental Perturbance.pdf in PDFpenPro

    2.    Invoke Hook (⇧⌘space)

    3.    Click on the title

    4.    Select Hook to New… from the Title menu.

zDjdsJ26R3q0H0pISxyuP9CueIeODzIkISkHeBcvc_dkkPRfShW9wkwdzuxWWi_fi9qOtDuBv06xpRsI51ba2pSKKiVMCZaOB3gLdFoM59-42CapVDWdZ5Own6QCPG1LdGZ6T_sA

5. Hook will show you note-taking apps on your Mac. For this exercise, choose Pages.

NGVhrI67KG6pezNZTkFgXWo4sCNxVdSyrjJjB9blp0-BYLhpmna1o8qh04Q_6lcvZNrY9uL2UQfPQ-NMDFSGxL646VNo-HA0RE1vuTrahPQdayz3Twat9Y2l9zPYPXTotv5VtlLh

Tip: Alternatively, you can use ⌘N to create a note in your default note app.

Hook will:

    1.    Create a new document

    2.    Name it after the PDF (for example, “Mental Perturbance.pages”)

You can now invoke the PDF from your Pages document via Hook and vice-versa. Through Hook, you can quickly navigate between files.

Note: Hook "hides" after you use it, just like Spotlight on Mac.

Test your deep links:

  • With the original PDF open, invoke Hook (⇧⌘SPACE) and double-click on the hooked link to access the notes document
  • Repeat this step in the linked document

Create deep links for easy access to information

Deep linking helps you identify the key content in a paper, thereby distilling it to its essence. By adding deep links to your notes and flashcards, you make key passages in a PDF easily accessible. 

This saves you time and helps you master the document. In our next post about Hook and PDFpenPro, we’ll dive deeper into how you can use Hook to master the content in PDFs.

To learn more about Hook and deep linking, check out Deep Linking to PDFs With Hook and PDFpenPro.