TikZ - 단계별 계산을 구축하기 위한 몇 가지 조언을 찾고 있습니다.

TikZ - 단계별 계산을 구축하기 위한 몇 가지 조언을 찾고 있습니다.

나는 모든 기호가 정렬되어야 하고 사각형이 기호와 동일하다는 점을 중심으로 정렬되어야 하는 다음 플롯을 얻고 싶습니다.

어떻게 해야 이 문제를 해결할 수 있나요?

여기에 이미지 설명을 입력하세요

답변1

이미지로 그리시겠습니까? 다음 MWE가 귀하가 원하는 것을 생산하는지 확인하십시오.

\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}

필요한 경우 방정식 환경에 이미지를 삽입할 수 있습니다.

여기에 이미지 설명을 입력하세요

관련 정보