Rules for URL's with spaces?

Are there any special rules when including a URL that contains spaces with in a footnote.

I can cut and paste the URL into my browser (where it replaces each space with %20) and the URL works fine. However, after compilation, clicking on the URL fails.

This is not the first time I’ve run into this, but the first time I thought I’d post the issue. What am I missing?

Any thoughts would be greatly appreciated.

scrive,
:thinking:

I don’t know if this would work but it might: select the URL then choose Format → Preserve Formatting. if it works in inspector footnotes, it should compile without turning %20 into a space.

Mark

2 Likes

You shouldn’t be trying to avoid the %20, if I understand you correctly. That is what a space looks like in a URL. There are a few special characters that need to be encoded like that for it to be a valid URL.

1 Like

Preserving the format of the URL should retain the %20 encoding, not avoiding it.
When Scrivener outputs the URL with spaces, this would qualify as a bug.

1 Like

Thank you all for all your comments, however …

My bad … turns out there was an errant period (.) at the end of my URL that was causing the link to the website that contained the spaces to otherwise fail … my apologies for my error.

But for those who made reference to my attempt to avoid the %20 in the URL, there is a LaTeX compile issue if any \URL{ } contains a %20 (without a leading forward slash). LaTeX interprets any ‘%’ as a comment line, immediately halting the compiler and then displays an error. (Preceding each %20 with a forward slash like I would if there was a # sign in the web link doesn’t work either. It just confuses LaTeX even more.)

The answer when using LaTeX is simple: Use the web link exactly as it exists, including the spaces, within the \URL{ } and the \URL will do the rest. Attempting to include a %20 in place of spaces within the \URL{ } will only cause the compile to fail.

Oh … and watch for those stray periods …

Apologies,
scrive
:thinking: