答案1
我认为没有什么真正的困难:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\fallingfactorial}[1]{%
^{\underline{#1}}%
}
\begin{document}
\[
x\fallingfactorial{n}={\overbrace{x(x-1)\dots(x-n+1)}^{\text{$n$ factors}}}
\]
\end{document}
添加后
\usepackage[euler-digits]{eulervm}
你得到
gkpmac.tex
顺便说一下,这正是在(用于排版“具体数学”的宏文件)中实现的。
\input gkpmac
$$
x\_{n}\qquad x\_^{n}
$$
\bye
宏:
\def\_#1{\def\next{#1}%
\ifx\next\risingsign\expandafter\rising\else^{\underline{#1}}\fi}
\def\risingsign{^}
\def\rising#1{^{\overline{#1}}}
可能的改进:
\documentclass{article}
\usepackage{amsmath}
\usepackage[euler-digits]{eulervm}
\newcommand{\fallingfactorial}[1]{%
^{\mspace{2mu}\underline{\mspace{-2mu}#1\mspace{-2mu}}\mspace{2mu}}%
}
\newcommand{\raisingfactorial}[1]{%
^{\mspace{2mu}\overline{\mspace{-2mu}#1\mspace{-2mu}}\mspace{2mu}}%
}
\begin{document}
\[
x\fallingfactorial{n}={\overbrace{x(x-1)\dots(x-n+1)}^{\text{$n$ factors}}}
\]
\[
x\raisingfactorial{n}={\overbrace{x(x+1)\dots(x+n-1)}^{\text{$n$ factors}}}
\]
\end{document}