8

I am looking for a 'double' brace symbol (aka Blackboard or Doublestroke) like this - but for curly braces instead of square brackets.

The symbol is used to denote the average in discontinuous Galerkin methods.

(I have tried de-texify and can't identify it)

It should look similar to:

$$\{\hspace{-4.9pt}\{ u_x \}\hspace{-5pt}\}$$
GCon
  • 183

2 Answers2

10

this is U+2983 U+2984 and \lBrace, \rBrace in stix or unicode-math packages

enter image description here

\documentclass{article}
\usepackage{stix}

\begin{document}

\[\lBrace zzz \rBrace\]

\end{document}
David Carlisle
  • 757,742
  • Very fast indeed, but no dice, I already saw that question. I am looking for a double brace, as in two braces. – GCon Jun 28 '15 at 12:01
  • @GCon It wasn't clear from the original description:-) I think that is the nearest there is in Unicode. Just use \{\!\{ ? – David Carlisle Jun 28 '15 at 12:11
10

My eyes bleed, but here it is:

\documentclass{article}
\usepackage{xparse}

\NewDocumentCommand{\dgal}{sO{}m}{%
  \IfBooleanTF{#1}
    {\dgalext{#3}}
    {\dgalx[#2]{#3}}%
}

\NewDocumentCommand{\dgalext}{m}{%
  \sbox0{%
    \mathsurround=0pt % just for safety
    $\left\{\vphantom{#1}\right.\kern-\nulldelimiterspace$%
  }%
  \sbox2{\{}%
  \ifdim\ht0=\ht2
    \{\kern-.625\wd2 \{#1\}\kern-.625\wd2 \}%
  \else
    \left\{\kern-.7\wd0\left\{#1\right\}\kern-.7\wd0\right\}%
  \fi
}

\NewDocumentCommand{\dgalx}{om}{%
  \sbox0{\mathsurround=0pt$#1\{$}%
  \sbox2{\{}%
  \ifdim\ht0=\ht2
    \{\kern-.625\wd2 \{#2\}\kern-.625\wd2 \}%
  \else
    \mathopen{#1\{\kern-.7\wd0 #1\{}
    #2
    \mathclose{#1\}\kern-.7\wd0 #1\}}
  \fi
}


\begin{document}

\def\test#1{#1|xxx}

$\dgal*{\test{}}$
$\dgal*{\test{\big}}$
$\dgal*{\test{\Big}}$
$\dgal*{\test{\bigg}}$
$\dgal*{\test{\Bigg}}$

$\dgal{xxx}$
$\dgal[\big]{xxx}$
$\dgal[\Big]{xxx}$
$\dgal[\bigg]{xxx}$
$\dgal[\Bigg]{xxx}$

\end{document}

enter image description here

If I change .625 into .45 and .7 into .5, the result seems better:

\documentclass{article}
\usepackage{xparse}

\NewDocumentCommand{\dgal}{sO{}m}{%
  \IfBooleanTF{#1}
    {\dgalext{#3}}
    {\dgalx[#2]{#3}}%
}

\NewDocumentCommand{\dgalext}{m}{%
  \sbox0{%
    \mathsurround=0pt % just for safety
    $\left\{\vphantom{#1}\right.\kern-\nulldelimiterspace$%
  }%
  \sbox2{\{}%
  \ifdim\ht0=\ht2
    \{\kern-.45\wd2 \{#1\}\kern-.45\wd2 \}%
  \else
    \left\{\kern-.5\wd0\left\{#1\right\}\kern-.5\wd0\right\}%
  \fi
}

\NewDocumentCommand{\dgalx}{om}{%
  \sbox0{\mathsurround=0pt$#1\{$}%
  \sbox2{\{}%
  \ifdim\ht0=\ht2
    \{\kern-.45\wd2 \{#2\}\kern-.45\wd2 \}%
  \else
    \mathopen{#1\{\kern-.5\wd0 #1\{}
    #2
    \mathclose{#1\}\kern-.5\wd0 #1\}}
  \fi
}


\begin{document}

\def\test#1{#1|xxx}

$\dgal*{\test{}}$
$\dgal*{\test{\big}}$
$\dgal*{\test{\Big}}$
$\dgal*{\test{\bigg}}$
$\dgal*{\test{\Bigg}}$

$\dgal{xxx}$
$\dgal[\big]{xxx}$
$\dgal[\Big]{xxx}$
$\dgal[\bigg]{xxx}$
$\dgal[\Bigg]{xxx}$

\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks! I will use this option, I just hope that the journal will accept it for printing. – GCon Jun 28 '15 at 14:16