Normally it is enough just to write \dag, i.e. as in A^{\dag}, but it doesn't work here: $$A^{\dag}.$$


If you type $\newcommand\dag\dagger$ $\newcommand\dag\dagger$ at the beginning of your post, you can type $$a^\dag$$$$a^\dag$$ and $$b^\dag$$$$b^\dag$$ later. It will work as expected.

I actually use $\newcommand\ket[1]{\left| #1 \right>}$ quite often in quantum physics related posts, so I can confirm it works.

  • $\begingroup$ genius! IQ good look thought $\endgroup$ – user8784 Jun 7 '12 at 9:48
  • $\begingroup$ Sorry I can't see the trick since I can't edit and latex commands say "\dag" again :O $\endgroup$ – More Anonymous Sep 17 '19 at 13:58
  • $\begingroup$ @MoreAnonymous :O I'm ashamed by this enigmatic old post of mine. It should be clearer now, after edit $\endgroup$ – Frédéric Grosshans Sep 17 '19 at 18:52
  • $\begingroup$ It's okay .. I figured this works too \dagger $\endgroup$ – More Anonymous Sep 17 '19 at 18:55
  • 5
    $\begingroup$ Please don't use newcommand in MathJax as this becomes a global setting for all users on the page. Just use the long commands, it's not much of a burden to not be lazy. $\endgroup$ – Kyle Kanos Sep 17 '19 at 22:48
  • $\begingroup$ @KyleKanos this is no longer the case. $\endgroup$ – Emilio Pisanty Apr 1 '20 at 12:57

Not all LaTeX commands are supported. We use MathJax for LaTeX rendering, and the list of macros that are implemented is given on their website. In this case you can use \dagger instead.


You must log in to answer this question.