[Tex/LaTex] Typeseeting a multiset with double curly braces

math-mode

I like to typeset a multi set with double curly braces, i.e., $\{\{A,B,C\}\}$. Unfortunalty, I think the space between two braces are too large and I could not find a special symbol in symbols.

Any suggestions?

Best Answer

The space between the delimiter symbols can be reduced by negative space, e.g. via \!:

\documentclass{article}
\begin{document}
$\{\{A, B, C\}\!\}$

$\{\!\{A, B, C\}\!\}$

$\{\!\!\{A, B, C\}\!\!\}$
\end{document}

Result

\! is defined as:

\def\!{\mskip-\thinmuskip}

and \thinmuskip has the value:

\thinmuskip=3mu

Example:

\documentclass{article}
\newcommand*{\ldblbrace}{\{\mskip-5mu\{}
\newcommand*{\rdblbrace}{\}\mskip-5mu\}}
\begin{document}
$\ldblbrace A, B, C \rdblbrace$
\end{document}

Result

Package stix defines braces with vertical lines. However, the package does change many math symbols.

\documentclass{article}
\usepackage{stix}
\begin{document}
$\lBrace A, B, C\rBrace$
\end{document}

Result stix

Version, which only imports \lBrace and \rBrace from stix without changing other symbols:

\documentclass{article}
%\usepackage{stix}

\makeatletter
\@ifpackageloaded{stix}{%
}{%
  \DeclareFontEncoding{LS2}{}{\noaccents@}
  \DeclareFontSubstitution{LS2}{stix}{m}{n}
  \DeclareSymbolFont{stix@largesymbols}{LS2}{stixex}{m}{n}
  \SetSymbolFont{stix@largesymbols}{bold}{LS2}{stixex}{b}{n}
  \DeclareMathDelimiter{\lBrace}{\mathopen} {stix@largesymbols}{"E8}%
                                            {stix@largesymbols}{"0E}
  \DeclareMathDelimiter{\rBrace}{\mathclose}{stix@largesymbols}{"E9}%
                                            {stix@largesymbols}{"0F}
}
\makeatother

\begin{document}
$\lBrace A, B, C\rBrace$
\end{document}

Result with \lBrace, \rBrace from stix