Publishing pdf manuscripts on the web with emails embedded in the file results in spam.
More generally, I am looking for a way to automate the conversion of a string to an image.
It's quite easy to solve this old problem using \includegraphics
an image (more here). The trouble is that you need a distinct file and typesetting run, and you end up with unnecessary image files that you cannot delete carelessly lest you also delete non-generated images.
Can you think of a way to do this on the fly? It's understood that people will have to type the email addresses if they need to message you, but that's the point.
More briefly/concretely...
With what can one replace #1
\documentclass{article}
\newcommand\showasimage[1]{#1}
\begin{document}
\showasimage{[email protected]}
\end{document}
such that #1
appears as an image?
Edit
It would be really nice if the pdf file remains vectorial.
joe <at> foo <dot> bar
so that people using screen reading software can still email you. If it is an image, there is not much you can do if you can't see it. (Or does PDF have a way to insert this as alternate text in the same way html does? Then you could provide this for screen readers and the image for everyone else.) That said: ctan.org/pkg/randtext will do what you want.randtext
doesn't work here. I get no errors, the output is fine but copy-and-paste is not scrambled at all.