9

I need to write a topology expression involving the interior of the closure of a set. For the interior of a (not simple) set I'm using the macro \widering from yhmath package and it works fine if I write the closure with \overline. But I'd like to use instead \bar if the set involved is simple.

Here are a couple of examples. What I want to achieve is an expression like the left ones, but using \bar or anything that draws a shorter line over the simple set. Or another package (or macro) that provides a \widering version that not cause this issues. Any idea will be welcome.

\documentclass{article}
\usepackage   {amssymb}
\usepackage   {yhmath} % \widering

\begin{document}
My problem is the second expression:
\[ 
  E \setminus \widering{\bigcup_{n\in\mathbb{N}} \overline{A}_n} \ne % all good
  E \setminus \widering{\bigcup_{n\in\mathbb{N}} \bar{A}_n}.         % not so good
\]

Another simpler example:
\[
  \widering{A\overline{B}C} \ne
  \widering{A\bar{B}C}.
\]
\end{document}

And here you can see what happens: enter image description here

1 Answer 1

8

The definition of \widering is not really good, because it puts the ring too high.

Also, nested accents always give problems, if the outer accent has to be placed over complex formulas.

Here's a proposal for a fixed \widering, that also complies with the requirement for the nested accents.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[nowidering]{yhmath} % \widering

\makeatletter
\newcommand{\widering}[1]{\mathpalette\widering@{#1}}
\newcommand{\widering@}[2]{%
  \begingroup
  \sbox\z@{$\m@th#1#2$}%
  \sbox\tw@{$\m@th#1\wideparen{\copy\z@}$}%
  \mathring{\copy\tw@}%
  \endgroup
}
\makeatother

\begin{document}

My problem is the second expression:
\[ 
  E \setminus \widering{\bigcup_{n\in\mathbb{N}} \overline{A}_n} \ne % all good
  E \setminus \widering{\bigcup_{n\in\mathbb{N}} \bar{A}_n}.         % not so good
\]

Another simpler example:
\[
  \widering{A\overline{B}C} \ne
  \widering{A\bar{B}C}.
\]

\end{document}

enter image description here

1
  • Now it works perfect, thanks!!! :-D Dec 14, 2021 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .