Dibujar una flecha desde la ecuación al texto fuera de la ecuación

Dibujar una flecha desde la ecuación al texto fuera de la ecuación

Me gustaría dibujar una flecha desde un cuadro dentro de una ecuación
hacia una parte específica (por ejemplo, el =signo) en el texto fuera de la ecuación.
La flecha no debe atravesar el texto.

Mi código:

\documentclass[
    pdftex,a4paper,11pt,oneside,fleqn,
    bibliography=totoc,listof=totoc,
    headlines=2.1,headsepline,
    numbers=noenddot
]{scrreprt}


%%%----- Mathe ----------------------------------
\usepackage{amsmath,amsfonts,amssymb,bm}
\usepackage[squaren,textstyle]{SIunits}
\usepackage{icomma}
    
\usepackage{mathtools}
\usepackage[makeroom]{cancel}
\usepackage{trfsigns}
    
    
    
%%% ------ Formel schöner darstellen ------------
\usepackage{tcolorbox}
\tcbuselibrary{listings,theorems}
\def\mathunderline#1#2{\color{#1}\underline{{\color{black}#2}}\color{black}}

%%%--------------------------------------------------------
%%%----- Beginn Dokument ----------------------------------
\begin{document}

    \begin{equation}
\tcbset{fonttitle=\scriptsize}
 \begin{split}
    \sigma_{\mathrm{n}} &= \sigma_{\mathrm{n}, \nu = 1} + \sigma_{\mathrm{n}, \nu = 1, \mu = 1} + \sigma_{\mathrm{n}, \mu = 1}\\
    &= \Bigg( \dfrac{\hat{B}_{\delta \mathrm{s}, \nu = 1}^{2} + \hat{B}_{\delta \mathrm{r}, \mu = 1}^{2}}{4 \cdot \mu_{0}} + \dfrac{\hat{B}_{\delta \mathrm{s}, \nu = 1} \cdot \hat{B}_{\delta \mathrm{r}, \mu = 1}}{2 \cdot \mu_{0}} \Bigg) \cdot \Big( 1 + \cos \left(2 p \alpha - 2 \omega_{\mathrm{el}} t \right) \Big)\\
    &= \dfrac{\hat{B}_{\delta \mathrm{s}, \nu = 1}^{2} + \hat{B}_{\delta \mathrm{r}, \mu = 1}^{2} + 2 \cdot \hat{B}_{\delta \mathrm{s}, \nu = 1} \cdot \hat{B}_{\delta \mathrm{r}, \mu = 1}}{4 \cdot \mu_{0}} \cdot \Big( 1 + \cos \left(2 p \alpha - 2 \omega_{\mathrm{el}} t \right) \Big)\\
    &= \dfrac{\left( \hat{B}_{\delta \mathrm{s}, \nu = 1} + \hat{B}_{\delta \mathrm{r}, \mu = 1} \right)^{2}}{4 \cdot \mu_{0}} \cdot \Big( 1 + \cos \big(2 p \alpha - \tcboxmath[boxsep=1pt,left=2pt,right=2pt,top=1pt,bottom=1pt, colback=white,colframe=red]{2 \omega_{\mathrm{el}}} \, t \big) \Big) \, \text{.}
 \end{split}
 \label{eq: Radialkraftwelle_Grundwelle}
\end{equation}

Das Ergebnis für das Grundwellen-Luftspaltfeld ist eine Radialkraftwelle, die sich mit einer Frequenz von $f_{\mathrm{h}} = 2f_{\mathrm{el}}$ (1. Hauptordnung) ausbreitet.

\end{document}

El resultado deseado: ingrese la descripción de la imagen aquí

Respuesta1

Puedes utilizar tikzmarkspara lograr esto. Viene como una biblioteca para Ti.kZ que se carga automáticamente si carga la skinsbiblioteca tcolorboxque necesitará de todos modos para que esto funcione. Con esta biblioteca, puede colocar marcas o nodos dentro de su texto y hacer referencia a estas marcas y nodos usando un tikzpicturearchivo que tiene las opciones remember picture, overlay. Por ejemplo, si coloca \tikzmarknode{mynode}{some text}dentro de su texto, luego podrá dibujar una línea hacia este nodo usando algo como \tikz \draw (mynode) -- +(0,1);. Esta técnica le permite dibujar una flecha desde \tcboxmathen su ecuación hasta la parte relevante de la fórmula en el texto a continuación.

Para poder consultar \tcboxmath, debe agregar las opciones enhanced, remember as=[name], que solo están disponibles si carga la skinsbiblioteca de antemano.

Para que la flecha recorra el texto de la página, puede utilizar el paquete tikzpagenodespara hacer referencia al margen derecho del texto. Por conveniencia, primero creé algunas coordenadas que facilitan la alineación de la flecha.

\documentclass[
    pdftex,a4paper,11pt,oneside,fleqn,
    bibliography=totoc,listof=totoc,
    headlines=2.1,headsepline,
    numbers=noenddot
]{scrreprt}

%%%----- Mathe ----------------------------------
\usepackage{amsmath,amsfonts,amssymb,bm}
\usepackage[squaren,textstyle]{SIunits}
\usepackage{icomma}
    
\usepackage{mathtools}
\usepackage[makeroom]{cancel}
\usepackage{trfsigns}

%%% ------ Formel schöner darstellen ------------
\usepackage{tcolorbox}
\tcbuselibrary{listings,theorems,skins}
\def\mathunderline#1#2{\color{#1}\underline{{\color{black}#2}}\color{black}}

\usepackage{tikzpagenodes}
\usetikzlibrary{tikzmark}

%%%--------------------------------------------------------
%%%----- Beginn Dokument ----------------------------------
\begin{document}

\begin{equation}
\tcbset{fonttitle=\scriptsize}
 \begin{split}
    \sigma_{\mathrm{n}} &= \sigma_{\mathrm{n}, \nu = 1} + \sigma_{\mathrm{n}, \nu = 1, \mu = 1} + \sigma_{\mathrm{n}, \mu = 1}\\
    &= \Bigg( \dfrac{\hat{B}_{\delta \mathrm{s}, \nu = 1}^{2} + \hat{B}_{\delta \mathrm{r}, \mu = 1}^{2}}{4 \cdot \mu_{0}} + \dfrac{\hat{B}_{\delta \mathrm{s}, \nu = 1} \cdot \hat{B}_{\delta \mathrm{r}, \mu = 1}}{2 \cdot \mu_{0}} \Bigg) \cdot \Big( 1 + \cos \left(2 p \alpha - 2 \omega_{\mathrm{el}} t \right) \Big)\\
    &= \dfrac{\hat{B}_{\delta \mathrm{s}, \nu = 1}^{2} + \hat{B}_{\delta \mathrm{r}, \mu = 1}^{2} + 2 \cdot \hat{B}_{\delta \mathrm{s}, \nu = 1} \cdot \hat{B}_{\delta \mathrm{r}, \mu = 1}}{4 \cdot \mu_{0}} \cdot \Big( 1 + \cos \left(2 p \alpha - 2 \omega_{\mathrm{el}} t \right) \Big)\\
    &= \dfrac{\left( \hat{B}_{\delta \mathrm{s}, \nu = 1} + \hat{B}_{\delta \mathrm{r}, \mu = 1} \right)^{2}}{4 \cdot \mu_{0}} \cdot \Big( 1 + \cos \big(2 p \alpha - \tcboxmath[enhanced,remember as=from,boxsep=1pt,left=2pt,right=2pt,top=1pt,bottom=1pt,colback=white,colframe=red,]{2 \omega_{\mathrm{el}}} \, t \big) \Big) \, \text{.}
 \end{split}
 \label{eq:Radialkraftwelle_Grundwelle}
\end{equation}

Das Ergebnis für das Grundwellen-Luftspaltfeld ist eine Radialkraftwelle, die sich mit einer Frequenz von $f_{\mathrm{h}} = \tikzmarknode{to}{2f_{\mathrm{el}}}$ (1. Hauptordnung) ausbreitet.

\begin{tikzpicture}[overlay, remember picture]
    \coordinate (south of from) at ([yshift=-0.25cm]from.south);
    \coordinate (south of to) at ([yshift=-0.25cm]to.south);
    \coordinate (text margin right) at ([xshift=0.5cm]current page text area.east);
    \draw[thick, red, -stealth, rounded corners=2.5pt] (from.south) -- (south of from) -- 
    (south of from -| text margin right) -- (south of to -| text margin right) -- (south of to) -- (to.south);
\end{tikzpicture}

\end{document}

ingrese la descripción de la imagen aquí

información relacionada