3
$\begingroup$

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

$\endgroup$

2 Answers 2

-2
$\begingroup$

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.

$\endgroup$
6
  • $\begingroup$ genius! IQ good look thought $\endgroup$
    – user8784
    Commented Jun 7, 2012 at 9:48
  • $\begingroup$ Sorry I can't see the trick since I can't edit and latex commands say "\dag" again :O $\endgroup$ Commented Sep 17, 2019 at 13:58
  • $\begingroup$ @MoreAnonymous :O I'm ashamed by this enigmatic old post of mine. It should be clearer now, after edit $\endgroup$ Commented Sep 17, 2019 at 18:52
  • $\begingroup$ It's okay .. I figured this works too \dagger $\endgroup$ Commented Sep 17, 2019 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
    Commented Sep 17, 2019 at 22:48
  • $\begingroup$ @KyleKanos this is no longer the case. $\endgroup$ Commented Apr 1, 2020 at 12:57
8
$\begingroup$

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.

$\endgroup$
1

You must log in to answer this question.