  \'{E}.\~Ghys proved that the linking numbers of modular knots and the
"missing" trefoil $K_{2,3}$ in $S^3$ coincide with the values of a highly
ubiquitous function called the Rademacher symbol for ${\rm SL}_2\mathbb{Z}$. In
this paper, we replace ${\rm SL}_2\mathbb{Z}=\Gamma_{2,3}$ by the triangle
group $\Gamma_{p,q}$ for any coprime pair $(p,q)$ of integers with $2\leq p<q$.
We invoke the theory of harmonic Maass forms for $\Gamma_{p,q}$ to introduce
the notion of the Rademacher symbol $\psi_{p,q}$, and provide several
characterizations. Among other things, we generalize Ghys's theorem for modular
knots around any "missing" torus knot $K_{p,q}$ in $S^3$ and in a lens space.
