%%% ====================================================================
%%%  @LaTeX-file{
%%%     author          = "American Mathematical Society",
%%%     version         = "1.2beta",
%%%     date            = "1994/12/13",
%%%     time            = "13:19:34 EST",
%%%     filename        = "romref.dtx",
%%%     copyright       = "Copyright (C) 1994 American Mathematical Society,
%%%                        all rights reserved.  Copying of this file is
%%%                        authorized only if either:
%%%                        (1) you make absolutely no changes to your copy,
%%%                        including name; OR
%%%                        (2) if you do make changes, you first rename it
%%%                        to some other name.",
%%%     address         = "American Mathematical Society,
%%%                        Technical Support,
%%%                        Electronic Products and Services,
%%%                        P. O. Box 6248,
%%%                        Providence, RI 02940,
%%%                        USA",
%%%     telephone       = "401-455-4080 or (in the USA and Canada)
%%%                        800-321-4AMS (321-4267)",
%%%     FAX             = "401-331-3842",
%%%     checksum        = "46244 99 456 4065",
%%%     email           = "tech-support@math.ams.org (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "latex, amslatex, ams-latex, cross references",
%%%     supported       = "yes",
%%%     abstract        = "This file is part of the AMS-\LaTeX{} package.
%%%                        It is a package that provides printing of
%%%                        \cn{\ref}s in an upright font even if the
%%%                        current context is italic or slanted.",
%%%     docstring       = "The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%  }
%%% ====================================================================
%
% \iffalse
%    The following section of code makes this file self-printable.
%    \begin{macrocode}
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\documentclass{amsdtx}
\begin{document}
\title{The \pkg{romref} package}
\author{American Mathematical Society\\Michael Downes}
\date{Version \fileversion, \filedate}
\hDocInput{romref.dtx}
\end{document}
%</driver>
%    \end{macrocode}
% \fi
%
% \maketitle
%
% \section{Introduction}
%    The \pkg{romref} package changes the \cn{ref} command so that it
%    will always print the resulting reference number in an upright font
%    \emph{even if the surrounding text is italic or slanted}. Avoiding
%    the use of italic for document-structural numbers is standard
%    practice for some publishers, including the AMS. This feature was
%    default in \cls{amsart} version 1.1. Starting with version 1.2 it
%    must be loaded by \verb'\usepackage{romref}' after the
%    \cn{documentclass} command.
%
% \StopEventually{}
%
% \section{Implementation}
%    Standard declaration of package name and date.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{romref}[1994/12/13 v1.2beta]
%    \end{macrocode}
%
%    If the current fontshape is italic or slanted, we want to switch to
%    upright/roman for printing the number of a \cn{ref}. This requires
%    changing the \cs{@setref} command.
%    \begin{macrocode}
\def\@setref#1#2#3{\ifx#1\relax
    \protect\G@refundefinedtrue
    \nfss@text{\reset@font\bfseries ??}%
    \@latex@warning{Reference `#3' on page \thepage\space undefined}%
  \else
    \protect\textup{\expandafter#2#1\null}%
  \fi}
%    \end{macrocode}
%
%    The usual \cs{endinput} to ensure that random garbage at the end of
%    the file doesn't get copied by \fn{docstrip}.
%    \begin{macrocode}
\endinput
%    \end{macrocode}
%
% \CheckSum{21}
% \Finale
