tikz add tag
topnush
```
\documentclass{beamer}
\usepackage[beamer,customcolors]{hf-tikz}
\hfsetfillcolor{structure.fg!20}
\hfsetbordercolor{structure.fg!20}
\beamertemplatenavigationsymbolsempty
\setbeamersize{text margin left=10mm,text margin right=5mm} 
\setbeamertemplate{frametitle}[default][center]
\usepackage[many]{tcolorbox}
\usepackage{bm}
\usepackage{listings}

\tcbuselibrary{skins}
\tcbset{
%	arc=0pt,
%	outer arc=0pt,
	colback=white,
}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
	shapes,
	tikzmark, shapes.geometric}
\usetikzmarklibrary{listings}


\newtcolorbox{mytheorem}[2][]{%
	text width=7.5cm, text height=1.5cm, enhanced,colback=white,colframe=framecolour, coltitle=comcolor,
	sharp corners,boxrule=0.8mm,
	attach boxed title to top left={yshift=-0.3\baselineskip-0.4pt,xshift=2mm},
	boxed title style={tile,size=minimal,left=0.5mm,right=0.5mm,
		colback=white,before upper=\strut},
	title=#2,#1
}


\definecolor{comcolor}{RGB}{10,161,119}
\definecolor{framecolour}{HTML}{009980}


\begin{document}

\begin{frame}[fragile]
	\tikzset{baseline, 
	E/.style={ellipse, fill=blue!20, inner sep=2pt, anchor=base},
	N/.style={draw, very thick, rounded corners, fill=green!30,
		font=\scriptsize, rotate=0, anchor=east}
}
\frametitle{}
\addtolength{\leftmargini}{-0.7cm}
\begin{itemize}[<+->]
\setlength\itemsep{5pt plus 1fill}
\item one
\item two
\item three 
\item The space usage is lots and lots and lots of bits.
\item  Assuming we set something, for an arbitrary something, the probability that something's estimate is further than  $\epsilon \tikzmarkin<6>{a}(0.05,-0.2)(-0.01,0.4)||\tikzmark{bar}\bm{f}_{-a}||_2\tikzmarkend{a}$ from the correct something is at most something.
\begin{tikzpicture}[remember picture, overlay]
\node<6>[xshift=-0.5cm, yshift=0.6cm, text width=5.9cm] (b) [N]
				at (current page.east)
				{$\bm{f_{-a}}$ is the really really really important\\$||\bm{f}_{-a}||_2$ is even more important };
				\draw<6>[-Stealth, shorten <=1mm, shorten >=1mm, dashed]
								(pic cs:bar) to [bend left] (b.south);
\end{tikzpicture}
\end{itemize}
\end{frame}
\end{document}
```

How do I get the arrow to leave from the top middle instead of from inside the highlighted text?

![Screen Shot 2021-04-22 at 18.48.24.png](/image?hash=23f25335c0dea7125735007b2add1f549c182e8aa6c5e550be17a60f01aa7bbd)
Top Answer
samcarter
You don't need to manually add a `tikzmark`, instead you can accesses the node you defined with `\tikzmarkin{a}... \tikzmarkend{a}`. This is automatically located at the top left of the box:

```
\documentclass{beamer}

\usepackage[beamer,customcolors]{hf-tikz}
\usepackage{tikz}

\begin{document}

\begin{frame}[fragile]
text $\tikzmarkin<1>{a} text \tikzmarkend{a}$ text 
\begin{tikzpicture}[remember picture, overlay]
\fill[red] (a.north) circle (0.05);
\fill[red] (a.south) circle (0.05);
\fill[red] (a.east) circle (0.05);
\fill[red] (a.west) circle (0.05);
\fill[red] (a) circle (0.05);
\end{tikzpicture}
\end{frame}

\end{document}
```

![Screen Shot 2021-04-23 at 11.53.52.png](/image?hash=617be486219a4a9b6c5f70dfdff5b55dd8db727759208ab42585ddfb2cf3fa85)


MWE:

```
\documentclass{beamer}
\usepackage[beamer,customcolors]{hf-tikz}
\hfsetfillcolor{structure.fg!20}
\hfsetbordercolor{structure.fg!20}
\beamertemplatenavigationsymbolsempty
\setbeamersize{text margin left=10mm,text margin right=5mm} 
\setbeamertemplate{frametitle}[default][center]
\usepackage[many]{tcolorbox}
\usepackage{bm}
\usepackage{listings}

\tcbuselibrary{skins}
\tcbset{
%	arc=0pt,
%	outer arc=0pt,
	colback=white,
}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
	shapes,
	tikzmark, shapes.geometric,
  calc}
\usetikzmarklibrary{listings}


\newtcolorbox{mytheorem}[2][]{%
	text width=7.5cm, text height=1.5cm, enhanced,colback=white,colframe=framecolour, coltitle=comcolor,
	sharp corners,boxrule=0.8mm,
	attach boxed title to top left={yshift=-0.3\baselineskip-0.4pt,xshift=2mm},
	boxed title style={tile,size=minimal,left=0.5mm,right=0.5mm,
		colback=white,before upper=\strut},
	title=#2,#1
}


\definecolor{comcolor}{RGB}{10,161,119}
\definecolor{framecolour}{HTML}{009980}


\begin{document}

\begin{frame}[fragile]
	\tikzset{baseline, 
	E/.style={ellipse, fill=blue!20, inner sep=2pt, anchor=base},
	N/.style={draw, very thick, rounded corners, fill=green!30,
		font=\scriptsize, rotate=0, anchor=east}
}
\frametitle{}
\addtolength{\leftmargini}{-0.7cm}
\begin{itemize}[<+->]
\setlength\itemsep{5pt plus 1fill}
\item one
\item two
\item three 
\item The space usage is lots and lots and lots of bits.
\item  Assuming we set something, for an arbitrary something, the probability that something's estimate is further than  $\epsilon \tikzmarkin<6>{a}(0.05,-0.2)(-0.01,0.4)||\bm{f}_{-a}||_2\tikzmarkend{a}$ from the correct something is at most something.
\begin{tikzpicture}[remember picture, overlay]
\node<6>[xshift=-0.5cm, yshift=0.6cm, text width=5.9cm] (b) [N]
				at (current page.east)
				{$\bm{f_{-a}}$ is the really really really important\\$||\bm{f}_{-a}||_2$ is even more important };
				\draw<6>[-Stealth, shorten <=1mm, shorten >=1mm, dashed]
								(a.north east) to [bend left] (b.south);
\end{tikzpicture}
\end{itemize}
\end{frame}
\end{document}
```

![Screen Shot 2021-04-22 at 18.50.45.png](/image?hash=09571aaa785190fac9e301b6eb43c5495870368df4e86e0bc4124a0f32036fda)

If you would like to shift the start of the arrow further right, you could use the tikz `calc` library:

```
\documentclass{beamer}
\usepackage[beamer,customcolors]{hf-tikz}
\hfsetfillcolor{structure.fg!20}
\hfsetbordercolor{structure.fg!20}
\beamertemplatenavigationsymbolsempty
\setbeamersize{text margin left=10mm,text margin right=5mm} 
\setbeamertemplate{frametitle}[default][center]
\usepackage[many]{tcolorbox}
\usepackage{bm}
\usepackage{listings}

\tcbuselibrary{skins}
\tcbset{
%	arc=0pt,
%	outer arc=0pt,
	colback=white,
}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
	shapes,
	tikzmark, shapes.geometric,
  calc}
\usetikzmarklibrary{listings}


\newtcolorbox{mytheorem}[2][]{%
	text width=7.5cm, text height=1.5cm, enhanced,colback=white,colframe=framecolour, coltitle=comcolor,
	sharp corners,boxrule=0.8mm,
	attach boxed title to top left={yshift=-0.3\baselineskip-0.4pt,xshift=2mm},
	boxed title style={tile,size=minimal,left=0.5mm,right=0.5mm,
		colback=white,before upper=\strut},
	title=#2,#1
}


\definecolor{comcolor}{RGB}{10,161,119}
\definecolor{framecolour}{HTML}{009980}


\begin{document}

\begin{frame}[fragile]
	\tikzset{baseline, 
	E/.style={ellipse, fill=blue!20, inner sep=2pt, anchor=base},
	N/.style={draw, very thick, rounded corners, fill=green!30,
		font=\scriptsize, rotate=0, anchor=east}
}
\frametitle{}
\addtolength{\leftmargini}{-0.7cm}
\begin{itemize}[<+->]
\setlength\itemsep{5pt plus 1fill}
\item one
\item two
\item three 
\item The space usage is lots and lots and lots of bits.
\item  Assuming we set something, for an arbitrary something, the probability that something's estimate is further than  $\epsilon \tikzmarkin<6>{a}(0.05,-0.2)(-0.01,0.4)||\bm{f}_{-a}||_2\tikzmarkend{a}$ from the correct something is at most something.
\begin{tikzpicture}[remember picture, overlay]
\node<6>[xshift=-0.5cm, yshift=0.6cm, text width=5.9cm] (b) [N]
				at (current page.east)
				{$\bm{f_{-a}}$ is the really really really important\\$||\bm{f}_{-a}||_2$ is even more important };
				\draw<6>[-Stealth, shorten <=1mm, shorten >=1mm, dashed]
								($(a.north east)+(0.5cm,0)$) to [bend left] (b.south);
\end{tikzpicture}
\end{itemize}
\end{frame}
\end{document}
```

![Screen Shot 2021-04-22 at 18.44.54.png](/image?hash=e7b84c8bec2cc80aa90e1b0fedf6643a24df5839dc8448160442720a3cacec4c)
Answer #2
marmot
You can also use a `\tikzmarknode` and its `north` anchor.
```
\documentclass{beamer}
\usepackage[beamer,customcolors]{hf-tikz}
\hfsetfillcolor{structure.fg!20}
\hfsetbordercolor{structure.fg!20}
\beamertemplatenavigationsymbolsempty
\setbeamersize{text margin left=10mm,text margin right=5mm} 
\setbeamertemplate{frametitle}[default][center]
\usepackage[many]{tcolorbox}
\usepackage{bm}
\usepackage{listings}
\tcbuselibrary{skins}
\tcbset{
%   arc=0pt,
%   outer arc=0pt,
    colback=white,
}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
    shapes,
    tikzmark, shapes.geometric}
\usetikzmarklibrary{listings}
\newtcolorbox{mytheorem}[2][]{%
    text width=7.5cm, text height=1.5cm, enhanced,colback=white,colframe=framecolour, coltitle=comcolor,
    sharp corners,boxrule=0.8mm,
    attach boxed title to top left={yshift=-0.3\baselineskip-0.4pt,xshift=2mm},
    boxed title style={tile,size=minimal,left=0.5mm,right=0.5mm,
        colback=white,before upper=\strut},
    title=#2,#1
}
\definecolor{comcolor}{RGB}{10,161,119}
\definecolor{framecolour}{HTML}{009980}
\begin{document}
\begin{frame}[fragile]
    \tikzset{baseline, 
    E/.style={ellipse, fill=blue!20, inner sep=2pt, anchor=base},
    N/.style={draw, very thick, rounded corners, fill=green!30,
        font=\scriptsize, rotate=0, anchor=east}
}
\frametitle{}
\addtolength{\leftmargini}{-0.7cm}
\begin{itemize}[<+->]
\setlength\itemsep{5pt plus 1fill}
\item one
\item two
\item three 
\item The space usage is lots and lots and lots of bits.
\item  Assuming we set something, for an arbitrary something, the probability
that something's estimate is further than  $\epsilon
\tikzmarknode[fill=blue!20,inner sep=2pt,rounded corners]{a}{\|\bm{f}_{-a}\|_2}$
from the correct something is at most something.
\begin{tikzpicture}[remember picture, overlay]
\node<6>[xshift=-0.5cm, yshift=0.6cm, text width=5.9cm] (b) [N]
                at (current page.east)
                {$\bm{f_{-a}}$ is the really really really important\\$||\bm{f}_{-a}||_2$ is even more important };
                \draw<6>[-Stealth, shorten <=1mm, shorten >=1mm, dashed]
                                (a.north) to [bend left] (b.south);
\end{tikzpicture}
\end{itemize}
\end{frame}
\end{document}
```
![Screen Shot 2021-04-22 at 11.53.57 AM.png](/image?hash=3f4b4ee7053526e112618d64e9ba5fa12c3e8c6a27badf6923532f6892e701f2)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.