% ptmr: Times Roman 
% ptmro: Times Oblique 
% ptmri: Times Italic 
% ptmre: Times Extended 
% ptmrn: Times Narrow 
% ptmrc: Times Roman Caps and Small Caps 
% ptmb: Times Bold 
% ptmbo: Times Bold Oblique 
% ptmbi: Times Bold Italic 
% ptmbc: Times Bold Caps and Small Caps 
% psyr: Times Symbol (Greek letters, etc.) 
% psyro: Times Symbol Oblique 

\newif\iftxidone
\def\fontprefix{ptm}
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
% #3 is the font's design size, #4 is a scale factor
\def\txisetfont#1#2#3#4{
\txidonefalse
\def\rmshape{r}       \ifx\rmshape#2    \font#1=ptmr  scaled #4 \txidonetrue \fi
\def\rmbshape{bx}     \ifx\rmbshape#2   \font#1=ptmb  scaled #4 \txidonetrue \fi
\def\bfshape{b}       \ifx\bfshape#2    \font#1=ptmb  scaled #4 \txidonetrue \fi
\def\bxshape{bx}      \ifx\bxshape#2    \font#1=ptmb  scaled #4 \txidonetrue \fi
\def\ttshape{tt}      \ifx\ttshape#2    \font#1=pcrrc  scaled #4 \txidonetrue \fi
\def\ttbshape{tt}     \ifx\ttbshape#2   \font#1=pcrb  scaled #4 \txidonetrue \fi
\def\ttslshape{sltt}  \ifx\ttslshape#2  \font#1=pcrro scaled #4 \txidonetrue \fi
\def\itshape{ti}      \ifx\itshape#2    \font#1=ptmri scaled #4 \txidonetrue \fi
\def\itbshape{bxti}   \ifx\itbshape#2   \font#1=ptmbi scaled #4 \txidonetrue \fi
\def\slshape{sl}      \ifx\slshape#2    \font#1=ptmro scaled #4 \txidonetrue \fi
\def\slbshape{bxsl}   \ifx\slbshape#2   \font#1=ptmbo scaled #4 \txidonetrue \fi
\def\sfshape{ss}      \ifx\sfshape#2    \font#1=phvr  scaled #4 \txidonetrue \fi
\def\sfbshape{ss}     \ifx\sfbshape#2   \font#1=phvb  scaled #4 \txidonetrue \fi
\def\scshape{csc}     \ifx\scshape#2    \font#1=ptmrc scaled #4 \txidonetrue \fi
\def\scbshape{csc}    \ifx\scbshape#2   \font#1=ptmbc scaled #4 \txidonetrue \fi
\iftxidone\else
\font#1=ptm#2 scaled #4
\fi
}
