\def\makeatother{\catcode`\@=12} \def\makeatletter{\catcode`\@=11} \font\tt=psmcoub %%%% Use \begintt .... \endtt %%%% explicit composing remarks have | as escape character \newskip\ttglue \ttglue=0.5em plus 0.25em minus 0.15em \chardef\other=12 \outer\def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other \catcode`\_=\other \catcode`\^=\other \obeyspaces\obeylines\tt} {\obeyspaces\gdef {\ }} % \obeyspaces now gives \ , not \space \def\begintt{\smallskip\let\par=\endgraf \ttverbatim \parskip=3pt \catcode`\|=0 \leftskip=0pc \ttfinish} {\catcode`\|=0 \catcode`|\=\other %| is temporary escape character |obeylines % End of line is active |gdef|ttfinish#1^^M#2\endtt{#1#2|smallskip|endgroup}} \catcode`\|=\active {\obeylines\gdef|{\ttverbatim\spaceskip=\ttglue\let^^M=\ \let|=\endgroup}} .