我正在尝试重新创建此内容(链接),并且已经有一个关于双括号分配律的页面。我尝试对其进行修改并更改了一些内容,但一直出现错误。
以下是页面链接怎样说明双重分配律?
到目前为止我已经得到了这个:
\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}
答案1
- 尚不清楚您如何尝试更改给定链接中的答案
- 如果我正确理解了你的问题,你只需要删除一些箭头:
\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}
注意:在和cdot
之间插入了更多空间用于绘制箭头。a
b
经过上述三次编译后,MWE 生成:
这就是你所追求的吗?