I wanted to create a function for maths notes that makes this result but in an easy way, like the function
\underset{}{}
where you place between the brackets what you want to appear below the text, so this function I am asking for is one that box the equation and allows you to put something under (longer than a line) and something with in the right with the structure that I made.
Also if you see this could you comment any post related to math notes or margin notes, just for see examples of what to do. Thank you for your help.
\documentclass{book}
\usepackage{amsmath,amssymb}
\usepackage{nccmath}
\usepackage{tcolorbox}
\tcbuselibrary{most}
\newtcolorbox[auto counter,
number within=chapter,
list inside=myexercise
]{myexercise}[1][]{%
enhanced,
title={{\begin{minipage}{\linewidth}\textbf{Ejercicio}~\thetcbcounter.~\textit{#1}\end{minipage}}},
halign title=left,
sharp corners,
colback=white,
coltitle=black,
colbacktitle=white,
boxrule=0pt,frame hidden,
overlay unbroken={\draw[black,double] (interior.north west)--(segmentation.west);},
boxed title style={%
colframe=white,
boxrule=0pt,
colback=white,
left=0pt,
right=0pt},
attach boxed title to top left={xshift={-5pt}},
underlay unbroken={\draw[help lines,step=3.8mm,black!20!white](interior.south west) grid (segmentation.east);},
lower separated=false,
before lower = {\tcbsubtitle[colback=white, opacityback=0, colframe=black, opacityframe=0, boxrule=1pt, height=1cm, width=2.55cm, valign=center]{\textbf{Solution:}}}
}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\underset{Hi}{\fbox{$\vec{m}_{total}=\displaystyle\int_{V'}\vec{M}(\vec{r'})d\tau'$}} $\longrightarrow\left|\substack{\\\text{ }\\d\tau'\text{debe ser lo suficientemente}\\\text{grande para que podamos}\\\text{considerar a }\vec{M}\text{ una función suave}\\\text{ }}\right.$
\end{document}
parbox
; you will have to specify a width, but since you know how long the longest line should be, you can measure it and use that.Hi
below the left block of your figure!