I manage style files for an academic journal. A typical article will contain authors' email addresses, which we attempt to obfuscate in order to give some measure of protection against e-mail harvesters.
Our current strategy: We replace the @
and .
in e-mail addresses with bitmapped images of these symbols. (Specifically, we define new commands \imageat
and \imagedot
which print .pdf images of their respective characters; then an email address like me@place.com is typeset as me{\imageat}place{\imagedot}com
.) This has some problems:
- The images don't reflect the font or size of the surrounding text.
- With this solution, our LaTeX distribution must include the .pdf of these images, which can lead to errors and confusion.
What I would like: I would like (you to tell me how) to define two commands \crazyat
and \crazydot
which have the effect of typesetting @
and .
in the current typeface, but appear as non-standard characters in the generated .pdf file. Specifically, I would like to temporarily populate a little used part of the current font with the @
and .
so that they appear correctly, but make no sense to anyone else. (Other suggestions very welcome.)
A few notes about other postings on this (and closely related topics):
- I am aware of the
AccSup
package. It seems very appealing, but only Adobe Acrobat seems to play along. Specifically, the LaTeX lineMy email address is \BeginAccSupp{ActualText={email address}}me@place.com\EndAccSupp{}
produces output that copies and pastes (in)correctly with Adobe Acrobat (giving the intended behavior) but misbehaves (so that copy/paste gives the e-mail address) on other .pdf readers. Anyway, I guess this will not fool an e-mail harvester. (See What can cause generated PDF document whose text are not correctly copyable?.) - I do not want to, e.g., simply replace the @ symbol with the text
[AT]
. I am dead set on this symbol actually appearing correctly in the .pdf document. (See How to redefine @ and . to obfuscate email addresses?.) - There seems to be a way to blow away the "cmap," which I do not understand. However, I would only like to be "locally" destructive–I would like the rest of the document to be well-formed. (See Is it possible to produce a PDF with un-copyable text?.)
Best Answer
To provide PDF files containing the dot and the at in the right font, put this in at.tex
and likewise this in dot.tex
Edit: This solution was actually wrong as I first wrote it. I assumed you can just use the generated PDFs as a neutral vector graphic. You can't; the mail addresses are still easily copy-and-pasted. You can, however, use some software like inkscape to convert the text to a "real" vector graphic and save it as a PDF again. You can then proceed as before. [End of Edit]
Which looks good to my eye: