获取与文本同一行的数学表达式

获取与文本同一行的数学表达式

我正在尝试用二项分布在乳胶上写一行

...is equally likely to be one of the $\begin{pmatrix}\begin{pmatrix}
n \\ 2 \end{pmatrix}\\ m\end{pmatrix}$ graphs with $m$ edges, and for such a distribution $p=\frac{m}{n(n-1)}$.

这导致矩阵比文本更大。

在此处输入图片描述

如何让数学表达式的文本大小与

在此处输入图片描述

答案1

\documentclass{article}
\usepackage{amsmath}
\begin{document}
...is equally likely to be one of the $\binom{\binom{n}{2}}{m}$ graphs with $m$ edges, and for such a distribution $p=\frac{m}{n(n-1)}$.

...is equally likely to be one of the $\dbinom{\binom{n}{2}}{m}$ graphs with $m$ edges, and for such a distribution $p=\frac{m}{n(n-1)}$.
\end{document}

在此处输入图片描述

答案2

我建议您使用包提供的smallmatrix和环境。我还将用内联样式的分数表达式替换表达式。psmallmatrixmathtools\fracp

在此处输入图片描述

\documentclass{article}
\usepackage{mathtools} % for smallmatrix and psmallmatrix environments
\begin{document}

\dots is equally likely to be one of the 
$\smash[b]{\Bigl( \!
  \begin{smallmatrix}
    \begin{psmallmatrix} n \\ 2 \end{psmallmatrix} \ 
   m
  \end{smallmatrix}\! \Bigr)}$ 
graphs with $m$ edges, and for such a distribution $p=m/(n(n-1))$.

\end{document}

相关内容