I ran across a strange warning when trying to use the math command \choose
inside the amsmath
package's \align*
environment:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
{n \choose k}
\end{align*}
\end{document}
Package amsmath Warning: Foreign command \atopwidthdelims; \frac or \genfrac should be used instead
The document still compiles and produces perfectly fine output. But what is causing this warning? And is there a way to get rid of it?
\choose
is short for\atopwithdelims()
, and\atopwithdelims
is a TeX primitive. So in that light the word ‘foreign‘ seems quite strange; after all, amsmath, like any other TeX macro package, is built on TeX primitives.\choose
that doesn't fit with the standard syntax of LaTeX commands.\atopwithdelims
…”.\choose
that triggers the warning, but only\atopwithdelims
. All the part dealing with this warning should be rewritten if it wanted to cope with a variety of foreign commands.:-D
even though you just said it in perfect form in the previous comment: “doesn't fit with the standard syntax of LaTeX commands”.