2

I am trying to recreate this (link) and there is already a page for the double brackets distributive property. I have tried to modify it and change a few things but I keep getting errors.

Here is the link to the page How to illustrate double distributive property?

I have got this so far:

\usepackage{amsmath}
\begin{document}

\noindent The \textbf{distributive law} states that \begin{align} a(b + c) &= a \times b + a \times c\ & = ab + ac \end{align}

\end{document}

JamesT
  • 3,169
  • As remarked in the answer, it would have been helpful if you'd noted how you are trying to modify this code and what you are trying to achieve (and not make us follow a link to understand the question). – Teepeemm Apr 22 '23 at 14:34

1 Answers1

2
  • it is unknown, how you try to change answer in given link
  • If I understand correctly your problem, you only need to remove some arrows:
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, 
                quotes,
                tikzmark}
\tikzset{
        is/.style = {inner ysep=2pt, minimum height=2ex},
       num/.style = {circle, draw, fill=white,font=\tiny,
                     inner sep=0.5pt, outer sep=1pt},
every edge/.style = {draw, -Straight Barb},
every edge quotes/.append style = {num, anchor=center}
       }

\begin{document} [ \tikzmarknode[is]{A}{a}\cdot(\tikzmarknode[is]{B}{b} + \tikzmarknode[is]{C}{c}) = \tikzmarknode{AB}{ab}+\tikzmarknode{AC}{ac} ]

\begin{tikzpicture}[remember picture, overlay, cyan] \draw (A.north) edge[out=60,in=120,looseness=2,"1"] (B.north) (A.north) edge[out=75,in=115,looseness=2,"2"] (C.north) ; \foreach \n [count=\i] in {AB,AC} \node[num,above=10pt] at (\n.south) {\i}; \end{tikzpicture} \end{document}

Note: cdot is inserted that between a and b is more space for drawing arrow.

After three compilation above MWE produces:

enter image description here

Is this what you after?

Zarko
  • 296,517