Desenhe uma seta da equação para o texto fora da equação

Desenhe uma seta da equação para o texto fora da equação

Gostaria de desenhar uma seta de uma caixa dentro de uma equação
para uma parte específica (por exemplo, o =sinal) no texto fora da equação.
A seta não deve passar pelo texto.

Meu 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}

O resultado desejado: insira a descrição da imagem aqui

Responder1

Você pode usar tikzmarkspara conseguir isso. Ele vem como uma biblioteca para TikZ, que é carregado automaticamente se você carregar a skinsbiblioteca da tcolorboxqual será necessária para que isso funcione. Usando esta biblioteca, você pode colocar marcas ou nós dentro do seu texto e referir-se a essas marcas e nós usando um tikzpictureque possui as opções remember picture, overlay. Por exemplo, se você colocar \tikzmarknode{mynode}{some text}texto dentro de seu texto, poderá posteriormente desenhar uma linha para esse nó usando algo como \tikz \draw (mynode) -- +(0,1);. Esta técnica permite desenhar uma seta da \tcboxmathsua equação para a parte relevante da fórmula no texto abaixo.

Para poder fazer referência ao \tcboxmath, você precisa adicionar as opções enhanced, remember as=[name], que só estarão disponíveis se você carregar a skinsbiblioteca previamente.

Para que a seta contorne o texto da página, você pode usar o pacote tikzpagenodespara fazer referência à margem direita do texto. Por conveniência, criei primeiro algumas coordenadas que facilitam o alinhamento da seta.

\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}

insira a descrição da imagem aqui

informação relacionada