Another question related to my university's odd ToC style requirements. Regular chapters in the ToC need to have all-caps titles, and appendices need regular-case titles. I have a perfectly elegant etoolbox solution
\documentclass{memoir}
\makeatletter
\usepackage{etoolbox}
\patchcmd{\@chapter}%
{\addcontentsline{toc}{chapter}}%
{\let\f@rtocold\f@rtoc%
\def\f@rtoc{\uppercase\expandafter{\f@rtocold}}%
\addcontentsline{toc}{chapter}}%
{\typeout{Chapter Patch Succeeded}}%
{\typeout{Chapter Patch Failed}}
\makeatother
\begin{document}
\tableofcontents*
\chapter{One}
This is chapter 1.
\appendix
\chapter{Alpha}
This is appendix A.
\end{document}
but it seems PCTeX 6 doesn't have e-TeX support built in (waiting on registration at the PCTeX forums so I can ask about that directly). I don't use it myself, but some people here do, and I'd like to avoid having them change TeX systems if possible.
I can't use memoir's built-in \patchcommand, since \@chapter has delimited arguments. I've tried using \Substitute* from ted, but no success yet. Replacing the commands between \makeatletter and \makeatother above with the following:
\usepackage{ted}
\Substitute*[\renewcommand{\@chapter}]{\@chapter}%
{\addcontentsline{toc}{chapter}}%
{\let\f@rtocold\f@rtoc%
\def\f@rtoc{\uppercase\expandafter{\f@rtocold}}%
\addcontentsline{toc}{chapter}}
I get Use of \@chapter doesn't match its definition. How can I convince \Substitute* to modify a command with arguments?