TeX - LaTeX Asked on February 5, 2021
I would like to obtain the following plot where all the sign equals must be aligned and the rectangle centered regarding the signs equal.
How can I acheive this ?
Draw as image? See, if the following MWE produce what you after:
documentclass[tikz, margin=1pt]{standalone}
usetikzlibrary{arrows.meta,
positioning}
begin{document}
begin{tikzpicture}[
node distance = 3mm and 0mm,
> = {Straight Barb[scale=0.5]},
every node/.style = {inner xsep=1pt}
]
node (a0) {=};
node (aL) [left =of a0] {$2x+3$};
node (aR) [right=of a0] {$5x-4$};
%
node (b0) [draw, minimum width=4em,
below=of a0] {$-3$};
%
node (c0) [below=of b0] {$=$};
node (cL) [left =of c0] {$2x$};
node (cR) [right=of c0] {$5x-7$};
%
scoped[transform canvas={xshift= 1em}]
{
draw (aL) -- (aL |- b0.north);
draw[->] (aL |- b0.south) -- (aL |- cL.north);
}
scoped[transform canvas={xshift=-1em}]
{
draw (aR) -- (aR |- b0.north);
draw[->] (aR |- b0.south) -- (aR |- cR.north);
}
end{tikzpicture}
end{document}
Note, if needed, you can insert image in equation environment.
Answered by Zarko on February 5, 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