I got the definition below after some tinkering. It seems to look fine at any size.
\documentclass[a4paper,12pt]{article}
\pagestyle{empty}
\usepackage{mathtools}
\def\multiset#1#2{\ensuremath{\left(\kern-.3em\left(\genfrac{}{}{0pt}{}{#1}{#2}\right)\kern-.3em\right)}}
\begin{document}
Consider an inline multiset, \multiset{n}{k}, or a displayed one,
\[ \multiset{n}{k}, \]
or perhaps even a displayed one with something big up- and downstairs,
\[\multiset{
{\displaystyle \sum_{j=1}^n n^j}}
{{\displaystyle \sum_{j=1}^n (-1)^j n^j}}_{n \text{ even}}.
\]
\end{document}

Here's another solution using TiKZ which gets you a look more or less as you describe.
Preamble
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\tikzset{
grouping/.style={inner sep=2pt, baseline=0ex, left delimiter={[}},
grouplabel/.style={anchor=west, yshift=0.125\baselineskip}
}
\newlength\groupinglength
\setlength\groupinglength{\textwidth}
\def\BEGIN #1 \END{%
\bgroup
\addtolength\groupinglength{-1ex}%
\hspace*{1.5ex}%
\tikz \node [grouping] {\hspace{-0.5ex}\parbox{\groupinglength}{#1}};%
\egroup
}
\newcommand\labelledgroup[3]{%
\begin{tikzpicture}[every left delimiter/.style={yshift=-0.1\baselineskip}]
\addtolength\groupinglength{-1ex}%
\node [grouping, inner ysep=0.5\baselineskip] (block) {%
\parbox{\groupinglength}{#2}%
};
\node [grouplabel] at (block.north west) {#1};
\node [grouplabel] at (block.south west) {#3};
\end{tikzpicture}%
}
\newcommand\IF[2]{\labelledgroup{if #1}{#2}{}}
\newcommand\ELSE[1]{\\[-0.6\baselineskip]\labelledgroup{else}{#1}{end}}
These definitions define macros to produce code blocks, which have a uniformly customizable delimiter on the left. Each distinct line of code, or code block, should be ended with an end-of-line. We define the \IF
and \ELSE
block in terms of a generic code block, which starts off (and conceivably ends, as well) with some label aligned with the top of the delimiter. You could use similar code to define a repeat ... until code block, or a procedure ... return block. The various dimensions were picked more or less arbitrarily, except for the cases of 0.5\baselineskip
.
Document body
\begin{document}
\BEGIN
Get the height of the box \texttt{hBox} \\
Get the width of the box \texttt{wBox} \\
Get the length of the box \texttt{lBox} \\
$\texttt{vol} = \texttt{hBox} \times \texttt{wBox} \times \texttt{lBox}$ \\
\IF {$\texttt{vol} > 10$}%
{Display \textit{``Your box is too big''}}
\ELSE
{Display \textit{``Your box is right-sized''}} \\
\END
\end{document}
As it's currently defined, \BEGIN ... \END
will complain if there's a blank line. There are a few ways to get around that (e.g. simply by using different syntax); I've written it in this way instead to keep things simpler and to emulate some of the syntax for existing algorithm/pseudocode packages.
Result

Edit the code (e.g. remove the "end" in the definition of \ELSE
) and define other blocks (perhaps things like \FOR
and \WHILE
) to get the sort of algorithm presentation that you want.
Best Answer
Yes, there is: