I have been using TikZ to draw this type of equations
using this
\begin{equation}
\begin{tikzpicture}[
inner sep=0pt,
outer sep=0pt,
baseline=(hat.base),
]
\path[every node/.append style={anchor=base west}]
(0,0)
\foreach \name/\code in {
bra0/,
bra/Z,
sub/_1,
sub2/_2,
angle/%
} {
node (\name) {$\code$}
(\name.base east)
}
;
\path[
every node/.append style={
anchor=base,
font=\slshape\scriptsize,
},
]
(bra0.base) -- node[below=3\baselineskip] (geb_2) {12} (ket)
;
\begin{scope}[
>={Stealth[length=5pt]},
thick,
rounded corners=0pt,
shorten <=.3em,
shorten >=.3em,
]
\def\GebArrow#1#2#3{
\draw[<->]
(#2.north) ++(0, .3em) coordinate (tmp)
(#1) |- (tmp) -| (#3)
;%
}
\GebArrow{sub2}{geb_2}{sub}
\end{scope}
\end{tikzpicture}
\end{equation}
but I can't seem to find the way to do this equation
which seems easier but I don't know how to produce the simple arrows that don't connect.




pic cscoordinates, which can only be used for coordinates defined by\tikzmarkitself.\tikzmarknodedefines an ordinary node-type coordinate. Just delete thepic cs:and it works. – Andrew Stacey Sep 18 '18 at 19:28