我正在寻找一个“双”括号符号(又名黑板或双击),例如这- 但使用花括号而不是方括号。
该符号用于表示不连续伽辽金方法中的平均值。
(我尝试过 de-texify 但无法识别它)
它看起来应该类似于:
$$\{\hspace{-4.9pt}\{ u_x \}\hspace{-5pt}\}$$
答案1
我的眼睛流血了,但事实就是如此:
\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}
如果我改成.625
并将.45
改成.7
,.5
结果似乎更好:
\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}
答案2
这是 U+2983 U+2984 和\lBrace
,\rBrace
在stix
或unicode-math
包中
\documentclass{article}
\usepackage{stix}
\begin{document}
\[\lBrace zzz \rBrace\]
\end{document}