[texhax] HTML specials with '_' character

Michael M. Tung michael.m.tung at gmail.com
Sun Feb 17 14:10:06 CET 2008


I have problems with my following macro in plain TeX

  \special{html:<a href="mailto:#1">}%
          {\tt #1}

which creates a hyperlink for mailing in the final PDF
file. For standard emails with letters and '@' it works
fine. However such things as

  \mailto{test_user at yahoo.com}

creates an error requiring math mode for '_'.  Defining

outside the macro fixes this (but affects the entire file).

But I would like to use this within the macro having limited
scope. However, putting \catcode... into the macro doesn't
seem to have any effect.

How can I use \catcode inside the macro definition?

Many thanks for any suggestion.
Best, Mike

More information about the texhax mailing list