1

I prefer \bar over \overline because of two reasons: \overline

  1. places the line too far below, consider for example \overline{r}.
  2. has a thicker line than \bar, possibly it's even a different font.

But one disadvantage of \bar is the length of the line, which is often too short, consider for example \bar{M}. However, I've come across this wonderful solution, which I think uses the same font/thickness and almost the same placement as \bar: https://tex.stackexchange.com/a/16344/136549

But even so, the line of \widebar{x+y} is still too short. How can I make it long enough while using the style of \bar?

Consider the equation \overline{r}=\overline{x+y}. I want the lines to be a bit higher and thinner like in \bar{r} = \bar{x+y}, where the line on the right side is merely too short. The solution \widebar{r} = \widebar{x+y} is not bad, but the line is still not long enough.

Can the style and the placement of \overline be modified so that it behaves like \bar (but draws long lines)? This would allow me to combine the respective advantages of both commands.

6
  • Did you try with mathabx?
    – Bernard
    Commented Feb 7, 2022 at 22:06
  • Yes, the same. The code of \widebar I'm using so far and to which my link refers is precisely an extract from mathabx.sty and mathabx.dcl.
    – Thrash
    Commented Feb 7, 2022 at 22:11
  • What's so bad about $\overline{x+y\mathstrut}$?
    – Mico
    Commented Feb 7, 2022 at 23:16
  • Consider the equation \overline{r}=\overline{x+y}. I want the lines to be a bit higher and thinner like in \bar{r} = \bar{x+y}, but stretch the line on the right side of the latter.
    – Thrash
    Commented Feb 7, 2022 at 23:20
  • If you want the line drawn by \overline to be placed a bit higher up, give $\overline{x+y\vphantom{k}}$ a try. It won't address the line thickness issue, though.
    – Mico
    Commented Feb 7, 2022 at 23:22

1 Answer 1

5

The wide math accents in legacy TeX fonts have a maximum width.

If you're willing to go with XeLaTeX or LuaLaTeX…

\documentclass{article}
\usepackage{unicode-math}

\begin{document}

\[
\wideoverbar{b}+\wideoverbar{a+b}+\wideoverbar{a+b+c}+\wideoverbar{a+b+c+d}
\]

\[
\overline{b}+\overline{a+b}+\overline{a+b+c}+\overline{a+b+c+d}
\]

\end{document}

enter image description here

You must log in to answer this question.

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