TeX - LaTeX Asked by Mathy on June 23, 2021
In huge calculations it’s often very helpful as reader to have nice remarks about which manipulation was made. Also, other remarks in equations can help alot, e.g., this one
which I like more than the ^-convention.
I am generating the above with the following code
vertarrowbox{e_j}{$i$textsuperscript{th} spot}
where
newcommandvertarrowbox[3][2ex]{%
begin{array}[t]{@{}c@{}} #2 [-0.7ex]
leftuparrowvcenter{hrule height #1}right.kern-nulldelimiterspace[-1.2ex]
makebox[0pt]{scriptsize#3}
end{array}%
}
My goal now is to achieve something similar. I am looking for something like this
to denote that the exchange of the two variables gives a minus sign.
I wonder how I could implement this. I am not sure if tikz-cd is the way to go (I don’t have experience with tikz-cd in equations like this and don’t know if it is even possible to use it this way).
Thank you for your ideas!
After @daleif gave me the tip to use tikz and tikzmark I found how to do it with some trial and error (tikz seems super complex and powerful). Please correct or improve this solution (I am not fully aware of every comment and if this could be done more nicely of if I am doing something very stupid here).
usepackage{tikz}
usetikzlibrary{tikzmark}
begin{equation*}
f(tikzmarknode{a}a,b,c,d,tikzmarknode{e}e) = -f(e,b,c,d,a)
end{equation*}
begin{tikzpicture}[overlay,remember picture]
draw [>=latex,<->]
(a.south) to[out=-90,in=-90,looseness=1] node [below,sloped] (TextNode1)
{scriptsize$cdot (-1)$} (e.south);
end{tikzpicture}
yields
However two problems remain:
I want to apply this in an align environment. But then the spacing is messed up:
begin{align*}
f(a,b,c,d,e) &= f(tikzmarknode{a}a,b,c,d,tikzmarknode{e}e)
&= -f(e,b,c,d,a)
end{align*}
Any help is very much appreciated!
EDIT: I added a brace underneath to better symbolize what term exactly is moved. Also read my comment under this answer.
Answered by Mathy on June 23, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP