1

enter image description here

$\left(x+a\right)^{2}+2ax+a^{2}$
CarLaTeX
  • 62,716
  • 3
    Welcome to TeX.SE. Please clarify what exactly it is that you're trying to accomplish. (Remark: The wording of the title is not clear at present.) – Mico Aug 17 '21 at 05:58
  • 3
    Welcome to TeX.SE! What you try so far? At least you should write equation that we don't need to write it from scratch. What you looking for, can be done by use of the tikzmark library. – Zarko Aug 17 '21 at 06:00

1 Answers1

4

As starting point:

enter image description here

\documentclass{article}

\usepackage{tikz} \usetikzlibrary{tikzmark}

\begin{document} [ (x + \tikzmarknode{A}{a})^2 = x^2 + 2\tikzmarknode{B}{a}x + \tikzmarknode{C}{a}^2 % \begin{tikzpicture}[overlay, remember picture,shorten <=1mm, shorten <=1mm, shorten >=1mm] \draw[->] (A.south) -- ++ (0,-0.5) -| node[pos=0.25, fill=white] {text} (B.south); \draw[->] (A.south) -- ++ (0,-1.0) -| node[pos=0.25, fill=white] {text} (C.south); \end{tikzpicture} \vspace{3ex} % space for image ] \end{document}

Note: For correct result you need to compile document at least two times, typically three times.

Zarko
  • 296,517