When I try to put non-breaking space before citations, Latex does not show the symbol tilde (~) before the citations in rendered pdf.
Here is what I would like to see: According to xx (2013)~[refID]
According to xx (2013)~\cite{xx}
According to xx (2013)\nobreakspace\cite{xx}
However, what I get after using the codes above: According to xx (2013) [refID]
Minimal Working Example:
\documentclass{article}
\begin{filecontents}{\jobname.bib}
@book{key,
author = {Author, A.},
year = {2001},
title = {Title},
publisher = {Publisher},
}
\end{filecontents}
\begin{document}
According to xx\textasciitilde{}\cite{key}, ...
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
The MWE above produces the following output:

The problem is the space after the tilde. How can I remove that?


~in LaTeX-syntax denotes a non-breaking-space:a~bmeans to placea<horizontal space>binto the .pdf-output-file so that a linebreak will not occur betweenaandbbuta<horizontal space>bwill always be on the same line. If you want a tilde, use the control sequence\textasciitilde. – Ulrich Diez Jul 12 '21 at 16:37 renders as a space in HTML. It would look very odd to have a~in the typeset result. – David Carlisle Jul 12 '21 at 16:44~means a non-breaking space in LaTeX, I'm wondering whether you've misinterpreted some instructions for how to write citations. – Don Hosek Jul 12 '21 at 18:21