How can I get HTML links to look like regular text?

Hi guys,

tried the manual and the forums and couldn’t find anything, so now I have to ask.

I’m about to hand in my PhD dissertation. Final touches. And one of them is that HTML links shouldn’t be blue and underlined. This is what I did so far:

  1. I unticked in Word 2011 under ‘Autoformat as you type’ ‘Internet and network paths with hyperlinks’. That works fine for my Endnote bibliography which I’m adding in Word itself. But the rtf file is created by Scrivener, so any link that exists in Scrivener exists in Word. The downside is that the links aren’t clickable anymore using this Word option (but would be nice to have in the final PDF that will be distributed electronically).

  2. I ticked in Scrivener under Compile -> Transformations ‘Remove text color’. Links are black now but still underlined in blue. I need them not underlined at all.

I would like to keep the hyperlinks in the Word file, just have them look like regular text. But if the only way to get there is to remove all clickable links, that’s OK. Any ideas?

Oh and by the way, something Word-related I googled everywhere for but couldn’t find anything satisfying. Maybe somebody here knows a solution: is there a way to get links to not jump to the next line if they’re too long for the current line but have them fill the current line to the very end and then continue in the next line? There are A LOT of hyperlinks in my bibliography and the current behaviour creates a bit of a mess.

Not sure about your compile question, but there is a (convoluted) work around for manually inserting a line break in a web address in Word:
First, copy your web address, in full.
Paste that copy somewhere (in your Word file, in a scrap file, anywhere).
Insert the line break in the desired location using Shift-Return (using shift forces a new line without including a paragraph break).
Select the web address, including the line break, and copy it.
Now right click (or Ctrl-Click) on your original hyperlink and select “Hyperlink… -> Edit Hyperlink”
Paste your copied hyperlink, with the line break, in the “Display” field
Click OK

Thanks for the tip. But if I understand it right, I’d have to find the best spot in the link manually and hope that it will fill the line. Which means I might have to give every link several tries before I get it right. And I have HUNDREDS of links. And then worst case uni will require me to change the formatting somehow and I’ll have to do it again.

But regarding the coloured/underlined links again, I found this in the manual but it says it only applies to PDFs and printouts:

D.4.5 Invisible Links in PDFs and Printouts
When generating a PDF or printing via Compile, hyperlinks (this does not apply to Scrivener links) will always be printed in standard underscored blue. If you would prefer them to be invisible, you can set the following preference:
defaults write com.literatureandlatte.scrivener2 \ SCRDoNotFormatHyperlinksForPrinting 1

Any way I can do the same for RTFs?

I didn’t say it was ideal, Word is a Microsoft application after all. If you need to force a line break in URLs in Word, this is the only way I know. As for where to insert a line break, APA style guidelines instruct line breaks within a URL to placed prior to punctuation.

You have 3 options: (1) accept the line breaks that Word automatically generates; (2) manually enter line breaks in a place that you prefer; or (3) don’t use Word.

If you want to maintain the URL as an active hyperlink, but also want to remove the underline, then you can select the URL and then click Clear formatting under the Edit menu. Again, a time consuming manual process, but if it is important to you then at least you know it can be done.

Aren’t you going to have to do a galley level proof of this at some point anyway? That’s a laborious task in and of itself, but it’s for precisely this type of stuff; things you can’t really anticipate until every character is committed and ready to roll. Only then can you know how it will fit on the page.

But to answer your original question, I believe this to be an oversight. For example, with the HTML and e-book formats you can opt to disable Scrivener Links and hyperlinks. I feel the word processor formats should have the same options as that limits your usage of links to only that which should be visible in the end product. The option should be open to keeping Scrivener Links an available authorial tool for nothing more than your own benefit while in composition. I’ve sent a note to Keith about this, so we’ll see what he has to say on the matter. I know that isn’t quite what you were asking for, but I think an option to just turn of links is more important than one to turn off styling for links, and having options for both is on the side of overkill.

Thanks again to both of you.

Yes, I will have to check everything thoroughly in the end, but a big selling point about Scrivener is to me that I can specify as many things as possible, so that after I compile an RTF I have to worry about less. Gives me the flexibility to remember something, adjust it once, and have it replicated throughout the final document. And since I can adjust so many formatting aspects on so many levels, I just thought hyperlinks would be possible as well.
And yes, I agree that Keith has to decide what is overkill and what not. I would obviously vote for this option, but he’s the one who has an overall vision for Scrivener that he has realized really well so far.

And nom, I’ve found a way to wrap links that works quite well after you set it up once. It’s faster than copying and pasting and it retains the clickability. You have to create a simple ‘Zero Width Space’ macro in Word and set up a shortcut for it. This allows you to insert an invisible space into a URL and undo it if you want it in a different spot and then try again. Not what I was looking for, but the quickest way I have found. That’s the macro:

Sub InsertZeroWidthSpace()
Selection.InsertAfter ChrW(8203)
Selection.Collapse Direction:=wdCollapseEnd
End Sub

But anyway, I think I found the easiest possible way for me (although the easiest would of course be for Scrivener to allow me to adjust hyperlink formatting and Word allow me to wrap URLs better):

  1. adjust the Hyperlink style in Word to look the way I want it (in my case like normal text),
  2. make sure that in Scrivener all links are correct,
  3. compile,
  4. use advanced find and replace in Word to replace current hyperlink formatting with the new style,
  5. at the very end of the formatting process, go through my bibliography in Word and insert Zero Width Spaces where appropriate.

If anybody can think of a way to make this easier, please tell me.
And if anybody finds a way to automatically wrap links at the end of a line in Word, I would be grateful for that. I found a macro that inserts a Zero Width Space after a ‘/’ but that’s not really it either.

Cheers!

Also, I finally found a way to not auto-create clickable links in Scrivener under Scrivener->Preferences->Corrections->Automatically detect web addresses

This nearly became my option of choice (the result of my current solution is nicer but more work, I might stick with it anyway), but I didn’t know how to retroactively apply this to existing documents. Does anybody know if that’s possible?