Why do the following two nearly identical pieces of code get different results?
\tr{#}::LaTeXForm("{\rm Tr}"). \tr{#}::Trace. ex:=\tr{-A+B}; distribute(_); \tr{A??}::LaTeXForm("\langle ",A??,"\rangle"). \tr{#}::Trace. ex:=\tr{-A+B}; distribute(_);
Well spotted. LaTeXForm wasn't handling the multiplier attribute correctly. A fix is on github now (2.3.1.8).
LaTeXForm
By the way, why does the following code report an error?
\comm{A??}{B??}::LaTeXForm("\commutator{",A??,"}{",B??,"}"). ex:=\comm{A}{B};