Skip to main content
edited tags
Link
Tweeted twitter.com/StackMma/status/1524539945972645890
Became Hot Network Question
added 344 characters in body
Source Link
Marco
  • 140
  • 6

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)^*$

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?

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)^*$

Source Link
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?