The following document infinite-loops:
\documentclass{article}
\usepackage{breqn}
\begin{document}
\newcommand{\allowbreaks}[2][,]{\begingroup
\catcode`#1=\active
\scantokens{%
\edef#1{%
\show\detokenize{#1}%
\detokenize{#1}%
\noexpand\allowbreak
\show0%
}%
#2%
}
\endgroup}
\allowbreaks{$,$}
\end{document}
LaTeX displays
> the character ,.
,->\show ,
,\allowbreak \show 0
l.113 \allowbreaks{$,$}
?
repeatedly.
If I type I\show into it's prompt, it gives me
> the character ,.
,->\show ,,
\allowbreak \show 0
l.113 \allowbreaks{$,$}
That is, the token that it's expanding it a character, not a macro. How is this possible?
If I comment out the breqn line, it works fine. I'm using
pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
