Velocity just print the tag name if no value was found in VelocityContext, ie, $name in my template file, but there is no value for \"name\" in VelocityContext, so just \"$n
Google around for Velocity ReferenceInsertionEventHandler for a way to do it broadly.
Consider the DisplayTool's alt() method for individual cases (part of the VelocityTools project)