答案1
答案2
另一种方法是使用\widebar
@Hendrik Vogt 的宏我可以不使用 mathabx 包来获得 \widebar 吗?。结果如下。
\documentclass[a4paper,12pt]{article}
\usepackage{mathtools,amssymb}
\usepackage{braket}
\makeatletter % using \widebar macro Hendrik Vogt: https://tex.stackexchange.com/questions/16337/can-i-get-a-widebar-without-using-the-mathabx-package/60253#60253
\newcommand*\rel@kern[1]{\kern#1\dimexpr\macc@kerna}
\newcommand*\widebar[1]{%
\begingroup
\def\mathaccent##1##2{%
\rel@kern{0.8}%
\overline{\rel@kern{-0.8}\macc@nucleus\rel@kern{0.2}}%
\rel@kern{-0.2}%
}%
\macc@depth\@ne
\let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar
\mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}%
\macc@set@skewchar\relax
\let\mathaccentV\macc@nested@a
\macc@nested@a\relax111{#1}%
\endgroup
}
\makeatother
\begin{document}
\[\widebar{\Set{x_1 x_2 \colon \exists i \, x_i = 0}}\]
\end{document}
该\Set
命令与包一起使用braket
,在左侧和右侧提供空白空间。