Following the previous questions on this topic, when you produce a website in LaTeX what is the best way to produce a url that contains a tilde? \verb
produces the upper tilde that does not read well, and $\sim$
does not copy/pase well (adding a space when I do it). Solutions?
It seems like this should be one of those things that has a very easy fix... if it doesn't, why not?
You may ask how one can write a tilde symbol in LaTeX? short answer: writing a tilde in LaTeX over a letter can be achieved easily using the command \tilde{symbol} or as a symbol within the text (or math mode) using \textasciitilde (or $\sim$), respectively.
3. Using the Tilde Symbol Shortcut (Windows and Mac) The keyboard shortcut for Tilde Symbol is Shift + ` for both Windows and Mac. Alternatively, for Windows, use the Alt Code method by pressing down the alt key and typing the alt code of 126 on the numeric keypad.
The meaning of these characters are: ~ (tilde) unbreakable space, use it whenever you want to leave a space which is unbreakable, and cannot expand or shrink, as e.q. in names: A. ~U.
A tilde in a URL usually is followed by a user name and indicates that the files below that URL come from that user's home directory. Show activity on this post. ~ refers to your home directory. If it is in the URL it means that the cpanel is located relative to your home directory.
I'd look at the url
package.
I know this is an old question, but I recently came up with something that, despite a severe lack of elegance, works beautifully.
\catcode`~=11 % make LaTeX treat tilde (~) like a normal character
\newcommand{\urltilde}{\kern -.15em\lower .7ex\hbox{~}\kern .04em}
\catcode`~=13 % revert back to treating tilde (~) as an active character
Now you can use \urltilde inside of a \url tag (even in a .bib file) and: 1) the URL will render perfectly; 2) clicking on the URL will take you to the correct address; and, 3) copy-paste will put the correct address in the clipboard.
This is the only solution I have found that satisfies all three of these requirements. I hope it helps somebody out there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With