在纸上或黑板上书写时,我通常用\bigcup
右叉末端的向上箭头表示上升并集。同样,我用\bigcap
右叉末端的向下箭头表示下降交集。这些符号包含在任何标准包中吗?如果没有,我该如何定义它们?
梅威瑟:
\documentclass{article}
\begin{document}
\[
(0,1)=\bigcup_n \left[\frac1n, 1-\frac1n\right]
\]
\[
\{0\}=\bigcap_n \left(-\frac1n,\frac1n\right)
\]
\end{document}
答案1
\documentclass{article}
\usepackage{stackengine,amsmath}
\stackMath
\DeclareMathOperator*\dcap{{\stackinset{r}{-1.02ex}{c}{-1.9pt}{\downarrow}
{\bigcap}\mkern2mu}}
\DeclareMathOperator*\acup{{\stackinset{r}{-1.02ex}{c}{1.9pt}{\uparrow}
{\bigcup}\mkern2mu}}
\begin{document}
\[
(0,1)=\acup_n \left[\frac1n, 1-\frac1n\right]
\]
\[
\{0\}=\dcap_n \left(-\frac1n,\frac1n\right)
\]
\end{document}
如果您总是在中使用它\displaystyle
,则可以适应它:
\documentclass{article}
\usepackage{stackengine,amsmath}
\stackMath
\DeclareMathOperator*\dcap{{\stackinset{r}{-1ex}{c}{-3.1pt}{\downarrow}
{\displaystyle\bigcap}\mkern2mu}}
\DeclareMathOperator*\acup{{\stackinset{r}{-1ex}{c}{3.1pt}{\uparrow}
{\displaystyle\bigcup}\mkern2mu}}
\begin{document}
\[
(0,1)=\acup_n \left[\frac1n, 1-\frac1n\right]
\]
\[
\{0\}=\dcap_n \left(-\frac1n,\frac1n\right)
\]
\end{document}
答案2
说实话,这些符号看起来更像是路标上的掉头标志。
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\ubigcup}{\DOTSB\mathop{\,\ubigcup@\,}\slimits@}
\DeclareRobustCommand{\dbigcap}{\DOTSB\mathop{\,\dbigcap@\,}\slimits@}
\newcommand{\ubigcup@}{\mathpalette\ubigcup@@\relax}
\newcommand{\ubigcup@@}[2]{%
\begingroup
\sbox\z@{$\m@th#1\bigcup$}%
\sbox\tw@{$\m@th#1\uparrow$}%
\copy\z@
\mkern-6.3mu\ifx#1\scriptscriptstyle\mkern0.3mu\fi
\dimen@=\dimexpr\ht\z@-\ht\tw@
\ifx#1\displaystyle\else
\ifx#1\scriptscriptstyle\advance\dimen@ 0.5pt\else
\advance\dimen@ 1pt
\fi\fi
\raisebox{\dimen@}[0pt][0pt]{\rlap{\copy\tw@}}%
\mkern6.3mu\ifx#1\scriptscriptstyle\mkern-0.3mu\fi
\endgroup
}
\newcommand{\dbigcap@}{\mathpalette\dbigcap@@\relax}
\newcommand{\dbigcap@@}[2]{%
\begingroup
\sbox\z@{$\m@th#1\bigcap$}%
\sbox\tw@{$\m@th#1\downarrow$}%
\copy\z@
\mkern-6.3mu\ifx#1\scriptscriptstyle\mkern0.3mu\fi
\dimen@=\dimexpr\dp\z@-\dp\tw@
\ifx#1\displaystyle\else
\ifx#1\scriptscriptstyle\advance\dimen@ 0.5pt\else
\advance\dimen@ 1pt
\fi\fi
\raisebox{-\dimen@}[0pt][0pt]{\rlap{\copy\tw@}}%
\mkern6.3mu\ifx#1\scriptscriptstyle\mkern-0.3mu\fi
\endgroup
}
\makeatother
\begin{document}
$\displaystyle\ubigcup_{n=1}^{\infty} A_n$
$\displaystyle\bigcup_{n=1}^{\infty} A_n$
$\displaystyle\bigcup_{n=1}^{\infty} A_n$
\bigskip
$\textstyle\ubigcup_{n=1}^{\infty} A_n$
$\scriptstyle\ubigcup_{n=1}^{\infty} A_n$
$\scriptscriptstyle\ubigcup_{n=1}^{\infty} A_n$
\bigskip
$\displaystyle\dbigcap_{n=1}^{\infty} B_n$
$\displaystyle\bigcap_{n=1}^{\infty} B_n$
$\displaystyle\bigcap_{n=1}^{\infty} B_n$
\bigskip
$\textstyle\dbigcap_{n=1}^{\infty} B_n$
$\scriptstyle\dbigcap_{n=1}^{\infty} B_n$
$\scriptscriptstyle\dbigcap_{n=1}^{\infty} B_n$
\end{document}