Make details of solution for system of equation

systemetikz-pgf

I want to indicate that, in the 2nd set of equations, we are adding 3rd equation to 1st and 2nd with arrow, for example.

I tried with 'WithArrows' but couldn't get it to work. Then I tried doing tikzpicture in equation (and equation in tikzpicture) but set of equations couldn't be centered (I tried with \centering and \begin{center}).

Then I used \node but it didn't work inside of \systeme. Lastly, I used tikzmark and this is closest I got. I drew arrows but couldn't position it next to the system.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{amssymb,amsthm,amsmath}
\usepackage{systeme}
\usetikzlibrary{arrows}

\newcommand{\tikzmark}[1]{%
    \tikz[overlay, remember picture, baseline] \node (#1) {};%
}
                 
                
\begin{document}

\begin{equation*}
\sysdelim..\systeme{
2x + 5y + 2z  =  - 38,
 3x - 2y + 4z  = 17,
  - 6x + y - 7z  =  - 12
  }
  \end{equation*}
    \begin{center}
  \rule{5cm}{0.4pt}
 \begin{equation*} 
\sysdelim..\systeme{
6x+15y+6z=-114 \tikzmark {3},
6x-4y+8z=34 \tikzmark {2},
-6x+y-7z=-12 \tikzmark {1}
  }
  \end{equation*}
  \begin{tikzpicture}
  \draw[->] ({2}) arc (-90:90:.5cm and 1cm) node[anchor=west]{$+$};
   \draw[->] ({2}) arc (-90:90:.25cm and 0.5cm) node[anchor=west]{$+$};
  \end{tikzpicture}
  \rule{5cm}{0.4pt}
  \end{center}
\end{document}

.

Instead of arcs I also tried:

  \draw[->] ({1}.east) .. controls +(right:7mm) and +(right:7mm) .. ({3}.east);
  \draw[->] ({1}.east) .. controls +(right:3mm) and +(right:5mm) .. ({2}.east);

But same issue occurs.

Best Answer

You tried to use the old definition of tikzmark. Now it's a complete TikZ library that you can load and use. You need to add [remember picture, overlay] to your tikzpicture declaration and it's easier to use \tikzmarknode instead of simple \tikzmark which would need to call the nodes with pic cs:. Heres' a simple example on your code (not sure that the systeme package is really interesting in this case, you may want to use something else).

EDIT

I changed my solution to a better way to draw arrows (with to[out=<>,in=<>] format) and added plus signs along the path.

tikzmark

\documentclass{article}
% https://tex.stackexchange.com/q/643095/204164
\usepackage{tikz}
\usetikzlibrary{calc, tikzmark}
\usepackage{amssymb,amsthm,amsmath}
\usepackage{systeme}
\usetikzlibrary{arrows}
                 
                
\begin{document}
\tikzset{
    every node/.style={outer sep=1pt}}

\begin{equation*}
\sysdelim..\systeme{
2x + 5y + 2z  =  - 38,
 3x - 2y + 4z  = 17,
  - 6x + y - 7z  =  - 12
  }
  \end{equation*}
    \begin{center}
  \rule{5cm}{0.4pt}
 \begin{equation*} 
    \sysdelim..\systeme{
        6x+15y+6z=\tikzmarknode{C}{-114},
        6x-4y+8z=\tikzmarknode{B}{34},
        -6x+y-7z=\tikzmarknode{A}{-12}
      }
  \end{equation*}
  \begin{tikzpicture}[remember picture, overlay]
        %\draw[->] (A.east) .. controls +(right:7mm) and +(right:7mm) .. (C.east) node[signode,right,midway]{$+$};
        %\draw[->] (A.east) .. controls +(right:3mm) and +(right:5mm) .. (B.east) node[signode,right,pos=0.8]{$+$};
        \draw[red,->] (A.east) to[out=0,in=0,looseness=3]  node[right,pos=0.7]{$+$}(C.east) ;
        \draw[blue,->] (A.east)  to[out=30,in=0,looseness=2] node[right,pos=0.8]{$+$} (B.east) ;
  \end{tikzpicture}
  \rule{5cm}{0.4pt}
  \end{center}
\end{document}