What I'm trying to do is to put an equation inside an fbox.
Here's my MWE:
\documentclass[12pt]{article}
\usepackage[italian]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage{tikzsymbols}
\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\tikzset{square arrow/.style={
to path={-- ++(0,-.25) -| (\tikztotarget) \tikztonodes},below,pos=.25}}
\begin{document}
\noindent\fbox{
\parbox{\textwidth}{
\begin{equation}
\underline{Ricorda}: \text{dalla densità}\tikzmark{ddc} \text{ congiunta} \xrightarrow{\text{ricavo}}
\text{le densità}\tikzmark{dm} \text{ marginali}
\tikz[overlay,remember picture]{\draw[->,square arrow] (dm.south) to node{\text{non ho informazioni
sulla dipendenza}} (ddc.south);}
\end{equation}
}
}
\end{document}
Since I needed a square arrow, I borrowed the idea from this answer.
My main problem now is that the equation works properly, but the to node{\text{non ho informazioni sulla dipendenza}} part is out of the box as you can see in the following picture
Have you got any idea why this happens?
Thanks in advance

