Sub Articulo 89.0
For some program listings that are set in Helvetica (don't ask why), I'm
having to import the ' and " characters from another font in order to get
them upright rather than slanted. (OT1 encoding in Helvetica apparently
doesn't provide upright quotes, and we're too far along in the project to
switch to LY1 encoding.)
This works correctly:
\begin{listing} % defined elsewhere
\catcode`"=\active
\def"=\textrm{\char34}
...
the listing
...
\end{listing}
However, if I try to move the \catcode and \def commands into the definition
of the "listing" environment, they don't work. Apparently TeX has to
*execute* the \catcode before it can correctly *read* the \def. What do I
need to do?