6

1

I am (mis)using Mathematica as a WYSIWYG LaTex editor. I want to put a (long) tilde over an expression.

```
DisplayForm[OverscriptBox[a + b, "_"]]
DisplayForm[OverscriptBox[a + b, "~"]]
```

This Is how it looks:

(Of course I'm using cntrl-7 to type in the above)

I want that the tilde stretched out over the whole expression, not just a small tilde in the middle. Just the same as with the underscore.

The corresponding LaTex expressions are

```
\overline{a+b}
\widetilde{a+b}
```

And the same issue with "^" and `\widehat`

I know I can mark the tilde (or hat) and use Command-"+" to increase the font size, but that doesn't look right.

Ideally, it would be something that exports easily to the mentioned Latex commands.

By the way,

```
FullForm[ToExpression["\\widetilde{a+b}", TeXForm]]
```

results in

```
OverTilde[Plus[a, b]]
```

which looks just like the above (tilde only above "+", not whole).

version: Mathematica 11.0

**Edit/Clarification**

I am well aware that this is not an issue with LaTeX itself, and that other, better working LaTeX editors exist. I want to continue writing Mathematica notebooks having parts which look like theorems or proofs look in math text books, referring to that look loosely as "LaTeX" (parts of which might later be exported for publication), and this question is about how to make those parts look right. So don't suggest any alternative LaTeX editors, that's not what the question is about.

3My guess would be that there is currently no good way to do it, that

`OverTilde[something]`

is supposed to (=planned to by later Mathematica version) look like LaTeX's widetilde, and that this will be accomplished in a later version by there being a new special "widetilde" character, which will be a "strechable" tilde. I think that, because with`\[OverBrace]`

(esc-o{-esc), it works just as it does with "_", and as one would wish for with "~", and`[OverBrace]`

is just another special character. – mathheadinclouds – 2019-06-15T21:26:39.683yes, a new extensible character is what you want, but I don't know of any way to make new characters (extensible or not). Code for a palette of Mathematica's extensible brackets etc. can be found in the answers to this question

– Andrew Norton – 2019-07-09T03:22:43.770