Renaming hyperlinks

Hello!

I am wondering if it’s possible to rename hyperlinks to websites?

E.g. having a link that says Youtube: Explaining Complexity instead of youtubecom/watch?v=cdX6w0W3PSY

I cannot find a way to do this. It is mostly a function I want to use for research purposes, compiling links to different websites and videos in a tidy manner.

Are you referring to the Bookmarks feature, did you drag the link into the Inspector sidebar? If so, it’s F2 on Win and Esc on a Mac to change the name—same as everywhere else, such as renaming something in the binder list.

Otherwise if you just mean ordinary text links you just type normally. It’s editable text, like all other text.

The Bookmarks work great, with an option to add a title to the link.

However, the ‘insert link’ (CTRL+SHIFT+L) feature does not give me an option to add a title to the link

It seems I am not allowed to embed images in my posts, which makes explaning a bit harder.

That’s because you just joined the forum, I’ve granted the “you’re not a spam bot” level to your account. :wink:

Okay, if you’re just using the shortcut without any selected text then it will use the URL as the text as a fall back, but you should still be able to replace the URL text in the editor with whatever you want. What I find more efficient though is to type in the text I want as the link text, select it, and then use the shortcut. Whatever works best for you though!

Thank you for the answer, and for the level up :wink:

Typing in the text, selecting it and then using the shortcut does exactly what I need :1st_place_medal:

There are those URL links that when I drag-and-drop them from my browser into the text of my document (NOT as a bookmark), they form a hybrid link that contains the website title as well as the URL link, e.g.:

IEA underreports contribution of solar and wind to world energy mix

where the title of the article on the website is “IEA underreports contribution of solar and wind to world energy mix” and the URL link (not immediately shown) is “IEA underreports contribution of solar and wind to world energy mix”.

Two questions:

  1. Once the hybrid link is created, I can edit the URL link by right-clicking on it, then selecting ‘Edit Link…’, but how do I edit the title of the hybrid link?

  2. How may I create a hybrid link from scratch, i.e. a link with both a URL and a separate title?

All thoughts and comments appreciated …
scrive
:thinking:

P.S. AmberV

Thank you for moving my post to an earlier one addressing the same subject. Apologies for not noticing the earlier posting.

I noticed in Screenwriter’s posting:

Unfortunately, I am not seeing the same result as Screenwriter when I tried to use the:

shortcut.

What am I missing (likely something that should be obvious to me) when I try to add a title to an existing URL link? Is there a section in the manual that addresses this issue?

Thank you again,
scrive
:thinking:

By accident, while drafting an earlier posting, I discovered something that was a surprise to me, but perhaps obvious to others.

If I dragged a URL link that happened to have a ‘title attribute’ (what I referred to earlier as a ‘hybrid link’, e.g. a URL link with a separate title) , what appeared in the text editing field on the left side of the screen for the posting is the title in brackets [ ] with the URL link immediately following in parenthesis ( ), e.g.:

[Thermochemistry of the formation of fossil fuels](https://www.geochemsoc.org/files/6214/1261/1770/SP-2_271-284_Sato.pdf)

However, what appeared in the posting screen on the right side of the screen was simply the title of the ‘hybrid link’; clicking on the title opens the URL link to the page described by the title, e.g.:

Thermochemistry of the formation of fossil fuels

I tried simulating the above behavior within my Scrivener text to see if I could replicate the same behavior, hoping to create a method whereby I could create and edit a ‘hybrid link’, e.g. a URL link with a separate title, or what (I believe) others refer to as a URL link with a ‘title attribute’,

No such luck …

So, as I am already compiling my code using LaTeX, I looked for a LaTeX solution.

I may have found a LaTeX solution that may even expand on the hybrid link idea with something referred to as a tooltip that can be used with Acrobat Reader et al. to create powerful tooltips with several options.

I have not yet had a chance to test-drive the \tooltip LaTeX code with my sizeable project for conflicts, but initial testing is quite enticing. For example, the basic LaTeX \tooltip code allows a user to ‘tear off’ a tooltip to then move the tooltip elsewhere on the PDF document screen, presumably to keep the tooltip visible while moving to another page within the PDF document. Very interesting.

The link on StackExchange is located at:

I’ll report back what I find after I’ve had a chance to test-drive the above \tooltip LaTeX code.

Just as a reminder, there is a section in the user manual that covers the creation and editing of links, in §15.5.3/Mac, .7.3/Win, on Hyperlinks, including step-by-step checklists for all of this.

It worked … Perfect! Thank you …
scrive
:thinking:

P.S. Sitting here late on a Sunday evening, I am reminded again about my own limited abilities with respect to perspective.

Screenwriter’s initial query on how to ‘rename’ a hyperlink paralleled my own query about how to provide a unique title for a hyperlink. It was not until AmberV provided links in the user manual:

that I realized my perspective was backwards.

The answer was NOT to add or modify a title to a hyperlink, but instead to add a hyperlink, via Edit > Add Link… (⌘K) to ordinary text that I wanted to use as a title for any hyperlink I needed.

It bothers me that it took so long to adjust my perspective. Makes me wonder: What else am I not seeing?

Thank you AmberV,
scrive
:thinking:

V3.1.1.0

If I select text and choose Edit… Add link I can add http, mailto, etc. as invisible (until mouseover or edit).

However, I have not worked out how to replace a hyperlink pasted as-is so as to replace the ugly URL with user-friendly display text, but retain the underlying link.

And is it possible to auto-style? I have created a style to apply, and it would be nice if I didn’t have to perform other actions in the UI to differentiate the link from surrounding text

(Note that I am referring to the appearance of the text in the editor, not as it may appear when compiled)

Thanks to @AmberV for moving this; believe it or not I had searched the manual, but rather like the internet as a whole, sometimes it’s like searching for a straw in a pile of straw :slight_smile: when the terms are “link”, “text”, etc.

That said: yes I can add links to text, but when it comes to editing (now I have the right place in the manual) if I put the cursor inside a piece of linked text (by arrow keys, otherwise I just click the link!), typing a space breaks the link into parts (both of which have the URL) separated by text that does not follow the style either. It’s ok until a space is typed.

Not the end of the world, but I thought I would note it. Perhaps as a suggestion, the link edit box could show the display text as well as the URL, which would also align with common practice in other apps (unless there’s actually a conflict with Scrivener, in which case, probably don’t!)

Currently the only way I know of to do this is to create a new link over the text you want:

  1. Copy the ugly URL into the clipboard.
  2. Type the friendly text that you want, where you want it in the document.
  3. Select & right-click the friendly text.
  4. Choose Edit Link–the URL field should be pre-filled with the URL from the clipboard–press enter.
  5. Delete the existing ugly URL from the document.

Best,
Jim

In the Windows version, there is a bug that causes typing inside of a link range to lose the link formatting, which looks to be making this more difficult than it should be. It should just be a matter of select some text to replace, or placing the cursor and inserting some text. It should also allow for selecting the entire link and replacing it with new text, which currently only works if you select from the left to the right for some reason.

1 Like

Thanks for confirming that approach.