Multisets in LaTeX

Does anyone know how to make a (pretty) double multi-line musical notation in LaTeX, i.e. something like (\binom{n}{k})where there are two outer brackets instead of 1, as in binomial? You can see an example of what I mean http://en.wikipedia.org/wiki/Multiset under the heading “Multiple Odds” with double brackets.

On Wikipedia, they type it as:

\left(\!\!{n\choose k}\!\!\right)

but although this works well for LaTeX in math mode, with built-in equations the outer bracket becomes much larger than the inner bracket.

I also tried using

\genfrac{((}{))}{0pt}{}{n}{k}

but it has an error with double brackets.

I \binomalso use in my document, so I would like the brackets to be the same for \binomand \multiset.

+3
3

e-TeX \middle :

\newcommand{\multibinom}[2]{
  \left(\!\middle(\genfrac{}{}{0pt}{}{#1}{#2}\middle)\!\right)
}

, AMSmath. , \genfrac , \atop.

(, : , , .)

, googlable, .

+3

\big( \Big( \bigg( or \Bigg(

\! , .

+2

, \tbinom \dbinom ( 4.11.2 amsmath ):

\documentclass{article}
\usepackage{amsmath}

\newcommand{\inlinebnm}[2]{\ensuremath{\big(\!\tbinom{#1}{#2}\!\big)}}
\newcommand{\displybnm}[2]{\bigg(\!\!\dbinom{#1}{#2}\!\!\bigg)}

\begin{document}

Text $\inlinebnm{a}{b}$ text. %% inline

Text \inlinebnm{a}{b} text. %% inline (also ok thanks to ensuremath)

\[
\displybnm{a}{b} %% display-style
\]

\end{document}
+2

Source: https://habr.com/ru/post/1776377/


All Articles