2

I'd like to align the subscript of E_m with the subscript of E_m^\dagger. Unfortunately, I can't find a solution that both aligns the subscripts and that does not break the alignement of the \sqrt command:

enter image description here

MWE:

\documentclass[]{memoir}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}

\begin{document}
Without vphantom: $E^\dagger_m E_m$, $\sqrt{E_m}$

With vphantom: $E^\dagger_m E^{\vphantom{\dagger}}_m$, $\sqrt{E^{\vphantom{\dagger}}_m}$.

With mathstrut: $E^\dagger_m E^{\mathstrut}_m$, $\sqrt{E^{\mathstrut}_m}$.
\end{document}

-- EDIT --

I'm having another problem now: when the dagger is used inside a Trace operation, the index is lifted: enter image description here

Why is it the case? Can I adapt the E_m^{} code to also adapt depending on weather it is inside a trace or not? And I actually like this typesetting with the dagger a bit above, maybe more than the "normal" formatting because it should be automatically aligned with E_m. Can I force LaTeX to always format it that way?

MWE:

\documentclass[]{article}

\usepackage{amssymb, amsthm, amsmath}
\DeclareMathOperator{\Tr}{Tr}
\newcommand*{\vect}[1]{\ensuremath{\mathbf{#1}}}

\begin{document}
\begin{align}
  \rho_m = \frac{\vect{M}_m^{}\rho \vect{M}_m^\dagger}{\Tr(\vect{M}_m^\dagger \vect{M}_m^{} \rho)}
\end{align}

\end{document}

1 Answer 1

0

I found a different approach which solves both issues: the package subdepth "harmonizes" all the subscripts to ensure they all have the same depth by setting a depth in between the E_m and the E_m^{}, by raising a bit the superscript to compensate:

enter image description here

\documentclass[]{article}

\usepackage{amssymb, amsthm, amsmath}
\usepackage{subdepth}
\DeclareMathOperator{\Tr}{Tr}
\newcommand*{\vect}[1]{\ensuremath{\mathbf{#1}}}

\begin{document}
\begin{align}
  \rho_m = \frac{\vect{M}_m^{}\rho \vect{M}_m^\dagger}{\Tr(\vect{M}_m^\dagger \vect{M}_m^{} \rho)}
\end{align}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .