Circa le frecce nei prodotti notevoli, il codice di Liverpool mi sballa tutta l’impaginazione. Il codice di Claudio funziona, ma non riesco ad adattarlo agli altri casi, che per fortuna sono “solo” tre:
1. $9x^2-12xy+4y^2$
`\begin{tikzpicture}[x=5mm,y=5mm]
\matrix (a)[matrix of nodes, nodes in empty cells,nodes={text width=1em, text height=2ex,text depth=1pt, align=center, inner sep=0pt},column sep={.155em},% \, sarebbe .16667em
row 3 column 1/.style={execute at begin cell={\hspace*{-.4em}}},% (a)^2 è troppo grande per un box di 1em x 2ex quindi sborda e risulta non centrato; per centrarlo inseriamo uno spazio negativo prima
row 3 column 5/.style={execute at begin cell={\hspace*{-.2em}}},
row sep=1ex]{
$9x^2$ & $-$ & $12xy$ & $+$ & $4y^2$\\
& & & & \\
$(3x)^2$ & \hphantom{$-$} & \hphantom{$12xy$} & \hphantom{$+$} & $(2y)^2$\\
};
\begin{scope}[-stealth, blue,thick,shorten <=2pt,shorten >=1pt]
\draw([xshift=-.25em]a-1-1.south)–([xshift=-.25em]a-3-1.north);
\draw(a-1-5.south)–(a-3-5.north);
\end{scope}
\end{tikzpicture}`
2. $9x^2-y^2$
`\begin{tikzpicture}[x=5mm,y=5mm]
\matrix (a)[matrix of nodes, nodes in empty cells,nodes={text width=1em, text height=2ex,text depth=1pt, align=center, inner sep=0pt},column sep={.155em},% \, sarebbe .16667em
row 3 column 1/.style={execute at begin cell={\hspace*{-.4em}}},% (a)^2 è troppo grande per un box di 1em x 2ex quindi sborda e risulta non centrato; per centrarlo inseriamo uno spazio negativo prima
row 3 column 5/.style={execute at begin cell={\hspace*{-.2em}}},
row sep=1ex]{
$9x^2$ & $-$ & $y^2$ \\
& & \\
$(3x)^2$ & \hphantom{$-$} & $(y)^2$\\
};
\begin{scope}[-stealth, blue,thick,shorten <=2pt,shorten >=1pt]
\draw([xshift=-.25em]a-1-1.south)–([xshift=-.25em]a-3-1.north);
\draw(a-1-5.south)–(a-3-5.north);
\end{scope}
\end{tikzpicture}`
3. $25y^2-1$
Claudio, hai fatto trenta, ti chiedo di fare trentuno: riesci a darmi il codice per gli altri tre disegni?
Grazie! 🙂