
% the stuff below is used to define commands which disable LaTeX interpretation 
% of special characters.

% first thing to know: there is a special internal definition in the latex kernel:
% \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&\do\#\do\^\do\_\do\%\do\~}

% this command (uncatcodespecials) re-defines the \do command used above to 
% pass its arguments to \catcode`[arg]=12.  thus calling the command
% uncatcodespecials essentially iteratively sets the catcode for all of those
% special characters to be catcode 12 (which just prints the character)

\def\uncatcodespecials{\def\do##1{\catcode`##1=12}\dospecials}%

% this line inhibits Spanish ligatures ?` and !` of \tt font
{\catcode`\`=\active\gdef`{\relax\lq}}

\def\setupc@de % see TeX Book, p. 381
    {\spaceskip=0pt \xspaceskip=0pt
     \catcode`\`=\active
     \uncatcodespecials \obeyspaces
     \catcode`\{=1\catcode`\}=2
    }%
\def\SETUPC@DE % see TeX Book, p. 381
    {
     \spaceskip=0pt \xspaceskip=0pt
     \catcode`\`=\active
     \uncatcodespecials \obeyspaces
    }%

\def\d@code#1{\texttt{#1}\endgroup}%
\def\D@CODE#1{\def\next##1\texttt{#1}{##1\endgroup}\next}%

\def\code{\begingroup\setupc@de\d@code}%
\def\CODE{\begingroup\SETUPC@DE\D@CODE}%
\def\nocode#1{#1}

% this is a good choice:
\def\IPPstageEND#1{\textsc{#1}\endgroup}%
\def\IPPstage{\begingroup\setupc@de\IPPstageEND}%

\def\IPPdbtableEND#1{\textit{#1}\endgroup}%
\def\IPPdbtable{\begingroup\setupc@de\IPPdbtableEND}%

\def\IPPdbcolumnEND#1{\textit{\textbf{#1}}\endgroup}%
\def\IPPdbcolumn{\begingroup\setupc@de\IPPdbcolumnEND}

\def\IPPprogEND#1{\texttt{#1}\endgroup}%
\def\IPPprog{\begingroup\setupc@de\IPPprogEND}

\def\IPPmiscEND#1{\texttt{#1}\endgroup}%
\def\IPPmisc{\begingroup\setupc@de\IPPmiscEND}

% stage -> small-caps
% program -> tt
% dbtable -> it
% dbcolumn -> bf
% misc -> san-serif

% specify encoding so we are guaranteed to get a
% set of fonts with _ defined correctly

% \textrm - roman
% \textsf - sans serif
% \texttt - typewriter

% \textmd - medium
% \textbf - boldface
% \textup - upright

% \textit - italic
% \textsl - slated
% \textsc - small caps
