Skip to main content
2 of 3
added 344 characters in body
Marco
  • 140
  • 6

Display Conjugate[x_] as a long overbar permanently

In TraditionalForm output, I would like to have Conjugate be always displayed as an overbar, not an asterisk superscript. In particular for complicated expressions like Conjugate[Log[z]], I would like to have a long overbar.

There are various solutions proposed in other threads, including the simplest version:

Unprotect[Conjugate];
Format[Conjugate[x_], TraditionalForm] := OverBar@Pane@x;
Protect[Conjugate];

This gives the desired result, but only the first time I call // TraditionalForm on some output.

How can I ensure that this new format rule is applied throughout the rest of my notebook?

PS: As requested here a full MWE with Mathematica 13.0.1.0.

Quit[];
Unprotect[Conjugate];
Format[Conjugate[x_], TraditionalForm] := OverBar@Pane@x;
Protect[Conjugate];
Conjugate[Log[z]] // TraditionalForm
Conjugate[Log[z]] // TraditionalForm

I obtain the output

$\overline{\log z}$

$(\log z)^*$

Marco
  • 140
  • 6