I am writing a URL in a web reference in latex. The link contains this special character ~ that when I compile the tex file to PDF, it disappear. The link becomes invalid.
How can I add the special character (~) to my URL in latex reference file (.bib)?
EDIT:
The solution of using \url{} will not work with me as this is not a text URL but a bibliography. Here is the script. I use IEEE conference template.
\documentclass[compsoc, conference, letterpaper, 10pt, times]{IEEEtran}
\begin{document}
\title{Test}
\maketitle
This is \cite{citeme}.
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,ref}
\end{document}
The ref file is:
%%
%% WinShell 3.3.2.6
%% http://www.winshell.org/
%%
% Strings
% Preamble
% BibTeX Entries
@misc{citeme,
author = {MyName},
title = {XYZ},
url = {https://www.xxx/~vvv},
year = {2014},
}
The output as shown below does not include the ~ sign in the URL which make it unreachable link when clicked from the PDF.

urlpackage, and use\url{...}. – Bernard Jan 07 '18 at 00:43miscas a type of the reference. I used\url{...}in the url field. I got the URL correct with the special character. However, the\url{}appears in the copiled version in the PDF surrounding the URL. Where should I place the\url{myurl}? – Jan 07 '18 at 01:43biblatex? It defines theonlinereference type, loadsurland is easier to customise. – Bernard Jan 07 '18 at 01:53\url{}in aurlfield if you're using a suitable style and encoding etc. Biblatex is easiest, as @Bernard says, but there are BibTeX styles which can handle aurlfield correctly. However, we don't currently know anything about your code except that it doesn't do what you want. So it is hard to say much. Posting an MWEB would probably get you more effective help. – cfr Jan 07 '18 at 01:56urlfield. But you didn't load the package. So add\usepackage{url}to your preamble. If you want it to be clickable, addhyperrefinstead. – gusbrs Jan 07 '18 at 19:08IEEEabrvin your\bibliographycall, that would be a\bibliographystyle. – gusbrs Jan 07 '18 at 19:11IEEEabrvis actually a .bib file with journal abbreviations, so\bibliographyis just fine. – samcarter_is_at_topanswers.xyz Jan 07 '18 at 22:34