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)^*$
TraditionalForm[expr]
gets special handling, which can be seen by examining the cell expression of the * form: There's no*
in it, just aTemplateBox
that I assume the FE typesets. (Menu Cell > Show Expression, to see it.) I don't know off hand how to modify it. $\endgroup$