Tikz 箭头/节点无法通过 Beamer 正确显示

Tikz 箭头/节点无法通过 Beamer 正确显示

我正在制作一个演示文稿,需要用箭头指向方程式的各个部分。
尝试复制粘贴以下 2 个示例:
https://texample.net/tikz/examples/beamer-arrows/
如何绘制好的箭头来解释方程的各个部分?(jonalv 针对他自己的问题提供的解决方案)。

以下是它们在我的幻灯片中单独显示的方式:

投影箭头

在此处输入图片描述

看起来所有箭头都指向/来自一个节点,而不是多个节点。有人能解释一下这是为什么吗?

这是我的设置文件:

\documentclass[hyperref={unicode=true}]{beamer}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}

\usepackage{lmodern}
\usepackage{tempora} % this supports Cyrillic
\usepackage{newtxmath}
\usepackage{bm}
\usepackage{comment}

\usefonttheme{serif}
\usecolortheme{default}
\usefonttheme{professionalfonts}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
\usepackage{appendixnumberbeamer}

\usepackage [section]{placeins}
\usepackage{graphicx} % for pdf, bitmapped graphics files
\usepackage{epsfig} % for postscript graphics files
\usepackage{epstopdf}
\usepackage[caption=false]{subfig}
\usepackage{xcolor}
\usepackage{array}
\usepackage{amsmath}
\usepackage{amssymb}  % assumes amsmath package installed
\usepackage{amsfonts}  % assumes amsmath package installed
\usepackage{bm} % for bold math, improved
\usepackage{cancel}
\usepackage{mathrsfs}  % adds \mathscr for nice capital letters

\usepackage{tikz}
\usetikzlibrary{calc}

\newcommand{\tikzmark}[1]{\tikz[baseline,remember picture] \coordinate (#1) {};}

\usepackage{tabularx}

\everymath{\displaystyle}

\usepackage{subfig}
\usepackage{cancel}
\usepackage{mathtools}
\newcommand{\sign}{\operatorname{sgn}}
\DeclarePairedDelimiter{\homd}{\lceil}{\rfloor}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand\Ccancel[2][black]{\renewcommand\CancelColor{\color{#1}}\cancel{#2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\graphicspath{{Figs/}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\beamertemplatenavigationsymbolsempty
\usetheme{Boadilla}

\makeatletter
\defbeamertemplate*{footline}{my theme}{
    \leavevmode%
    \hbox{%
    \begin{beamercolorbox}[wd=.9\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
        \usebeamerfont{title in head/foot}Управление по выходу параметрическим неопределенным нелинейным объектом с нарушением условий согласования
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
        \usebeamerfont{date in head/foot}{}\hspace*{2em}
        \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
    \end{beamercolorbox}}%
}
\makeatother

\setbeamertemplate{bibliography entry title}{}
\setbeamertemplate{bibliography entry location}{}
\setbeamertemplate{bibliography entry note}{}

\graphicspath{{Figs/}{../Figs/}}
\usepackage{subfiles}

% ------------------- PRESENTATION INFO ---------------------------
\title{ИТЕРАТИВНАЯ ПРОЦЕДУРА СИНТЕЗА АДАПТИВНОГО УПРАВЛЕНИЯ НА БАЗЕ ИНТЕГРАЛЬНОГО АЛГОРИТМА АДАПТАЦИИ}

\date{}
\author[Олег Суздалев, R3435]{\large{\textbf{Докладчик: Суздалев Олег Димитрий}\\
Научный руководитель: Герасимов Д.Н., к.т.н.\\}}

\institute{\large{\centering\\ Университет ИТМО \\ Факультет СУиР \vspace{1em} }}

先感谢您!

答案1

在此处输入图片描述

我只使用了您提到的第二个示例。我修改了命令\tikzmark(主要是将其替换\coordinate\node在上下文中更自然的命令),并稍微清理了代码。

整个代码粘贴在下面。第一部分是你的序言,我没有动过。我的修改从百分比行之后开始。

\documentclass[hyperref={unicode=true}]{beamer}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}

\usepackage{lmodern}
\usepackage{tempora} % this supports Cyrillic
\usepackage{newtxmath}
\usepackage{bm}
\usepackage{comment}

\usefonttheme{serif}
\usecolortheme{default}
\usefonttheme{professionalfonts}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
\usepackage{appendixnumberbeamer}

\usepackage [section]{placeins}
\usepackage{graphicx} % for pdf, bitmapped graphics files
\usepackage{epsfig} % for postscript graphics files
\usepackage{epstopdf}
\usepackage[caption=false]{subfig}
\usepackage{xcolor}
\usepackage{array}
\usepackage{amsmath}
\usepackage{amssymb}  % assumes amsmath package installed
\usepackage{amsfonts}  % assumes amsmath package installed
\usepackage{bm} % for bold math, improved
\usepackage{cancel}
\usepackage{mathrsfs}  % adds \mathscr for nice capital letters


\usepackage{tabularx}

\everymath{\displaystyle}

\usepackage{subfig}
\usepackage{cancel}
\usepackage{mathtools}
\newcommand{\sign}{\operatorname{sgn}}
\DeclarePairedDelimiter{\homd}{\lceil}{\rfloor}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand\Ccancel[2][black]{\renewcommand\CancelColor{\color{#1}}\cancel{#2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\graphicspath{{Figs/}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\beamertemplatenavigationsymbolsempty
\usetheme{Boadilla}

\makeatletter
\defbeamertemplate*{footline}{my theme}{
    \leavevmode%
    \hbox{%
    \begin{beamercolorbox}[wd=.9\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
        \usebeamerfont{title in head/foot}Управление по выходу параметрическим неопределенным нелинейным объектом с нарушением условий согласования
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
        \usebeamerfont{date in head/foot}{}\hspace*{2em}
        \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
    \end{beamercolorbox}}%
}
\makeatother


\setbeamertemplate{bibliography entry title}{}
\setbeamertemplate{bibliography entry location}{}
\setbeamertemplate{bibliography entry note}{}

\graphicspath{{Figs/}{../Figs/}}
\usepackage{subfiles}


% ------------------- PRESENTATION INFO ---------------------------
\title{ИТЕРАТИВНАЯ ПРОЦЕДУРА СИНТЕЗА АДАПТИВНОГО УПРАВЛЕНИЯ НА БАЗЕ ИНТЕГРАЛЬНОГО АЛГОРИТМА АДАПТАЦИИ}

\date{}
\author[Олег Суздалев, R3435]{\large{\textbf{Докладчик: Суздалев Олег Димитрий}\\
Научный руководитель: Герасимов Д.Н., к.т.н.\\}}

\institute{\large{\centering\\ Университет ИТМО \\ Факультет СУиР \vspace{1em} }}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikz}
\usetikzlibrary{calc}

\newcommand{\tikzmark}[1]{%
  \begin{tikzpicture}[baseline, remember picture]
    \node[inner sep=0pt, outer sep=.5ex] (#1) {};
  \end{tikzpicture}
}

\begin{document}


\begin{frame}{Tests}

  This is the example ``How to draw good arrows explaining parts of
  equation?'' you were pointing to in the question.

  \vfill
  
  \hspace{4em}
  $\tikzmark{V}V
  = \tikzmark{Vp}V_p
  + \tikzmark{Vt}V_t\,\frac{fu\tikzmark{fu}}{fu_t\tikzmark{fut}}$

  \begin{tikzpicture}[overlay, remember picture,
    every node/.style={scale=.7, inner sep=3pt},
    spear/.style={->, blue, shorten <=3pt, shorten >=3pt}]
      
    \node
    (Ve) [below of=V, node distance=10em, anchor=west]
    {\textsf{distribution volume}};
    \node (Vpe) [below of=Vp, node distance=7em, anchor=west]
    {\textsf{volume water in plasma}};
    \node (Vte) [below of=Vt, node distance=4em, anchor=west]
    {\textsf{volume water in tissue}};
    \node (fue) [above right of=fu, node distance=4em, anchor=west]
    {\textsf{fraction unbound drug in plasma}};
    \node (fute) [right of=fut, node distance=4em, anchor=west]
    {\textsf{Fraction unbound drug in tissue}};
    
    \draw
    (Ve) edge[spear, out=175, in=-115] (V)
    (Vpe) edge[spear, out=180, in=-110] (Vp)
    (Vte) edge[spear, out=180, in=-105] (Vt)
    (fue) edge[spear, out=182, in=40] (fu)
    (fute) edge[spear, out=180, in=-20] (fut);
  \end{tikzpicture}
\end{frame}

\end{document}

相关内容