I would like to declare a new MathOperator for the trace of a matrix / an operator.
So far I have: \DeclareMathOperator{\Tr}{Tr}
, but I don't know how to implement the parentheses.
What may make it more complicated, is that I would also like to compute the partial Trace, which I would like to write in the tex file as $ \Tr_{i} { ... } $
and have the effect of $ Tr_{i} \left( ... \right) $
.
I prefer \left(
and \right)
to (
and )
, respectively because some of the objects I will compute the trace of have hats and \left(
and \right)
seem to adjust the size of the brackets.
I am new to Latex, so if declaring a math operator is not the way to go about things to accomplish what I want, I am open to other suggestions.
\DeclareMathOperator{\Tr}{Tr}
in the preamble, followed by\Tr_i\left(...\right)
in the body of the document?\left
and\right
whenever you have(
and)
. Doint so is even wrong.$ \mleft( \frac{1}{2} \mright) $
whould be$ (\frac{1}{2}) $
even though the parantheses don't resize because that's the way it's supposed to be?