software hate / dear lazyweb,
Dec. 3rd, 2006 08:26 pmAnyone who can (a) comprehend what the following bit of mild gobbledygook does, and (b) tell me why my first attempt that used \@ifnextchar instead of \futurelet did not work, will win a fabulous no-prize.
\usepackage{varioref}
\makeatletter
\def\appos#1{\leavevmode\unskip, #1\commaunlesspunct}
\def\commaunlesspunct{\futurelet\@let@token\@commaunlesspunct}
\def\@commaunlesspunct
{\ifx\@let@token\@sptoken,\else
\ifx\@let@token\@xobeysp,\else
\ifx\@let@token\space,\fi\fi\fi}
\makeatother
\renewcommand\reftextafter{\appos{on the next page}}
% ... similar redefinitions for the other reftext macros ...
[EDIT 20 minutes later: This version doesn't work either. AAARGH HELP.]