使用 tikz 和可点击链接构建里程碑路线图

使用 tikz 和可点击链接构建里程碑路线图
\documentclass[aspectratio=169, 11pt]{beamer}
\usetheme{Berlin}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usetheme{default}
\newdimen\ipefs
\newcounter{ipePage}\newcounter{ipeView}
\newcounter{ipePages}\newcounter{ipeViews}
\newcommand{\PageTitle}[1]{#1}
\newcommand{\ipesymbol}[4]{$\bullet$}
\def\ipedefinecolors#1{\ipecolorpreamble{#1}\let\ipecolorpreamble\relax}
\def\ipecolorpreamble#1{\usepackage[#1]{xcolor}
    \definecolor{red}{rgb}{1,0,0}
    \definecolor{blue}{rgb}{0,0,1}
    \definecolor{green}{rgb}{0,1,0}
    \definecolor{yellow}{rgb}{1,1,0}
    \definecolor{orange}{rgb}{1,0.647,0}
    \definecolor{gold}{rgb}{1,0.843,0}
    \definecolor{purple}{rgb}{0.627,0.125,0.941}
    \definecolor{gray}{gray}{0.745}
    \definecolor{brown}{rgb}{0.647,0.165,0.165}
    \definecolor{navy}{rgb}{0,0,0.502}
    \definecolor{pink}{rgb}{1,0.753,0.796}
    \definecolor{seagreen}{rgb}{0.18,0.545,0.341}
    \definecolor{turquoise}{rgb}{0.251,0.878,0.816}
    \definecolor{violet}{rgb}{0.933,0.51,0.933}
    \definecolor{darkblue}{rgb}{0,0,0.545}
    \definecolor{darkcyan}{rgb}{0,0.545,0.545}
    \definecolor{darkgray}{gray}{0.663}
    \definecolor{darkgreen}{rgb}{0,0.392,0}
    \definecolor{darkmagenta}{rgb}{0.545,0,0.545}
    \definecolor{darkorange}{rgb}{1,0.549,0}
    \definecolor{darkred}{rgb}{0.545,0,0}
    \definecolor{lightblue}{rgb}{0.678,0.847,0.902}
    \definecolor{lightcyan}{rgb}{0.878,1,1}
    \definecolor{lightgray}{gray}{0.827}
    \definecolor{lightgreen}{rgb}{0.565,0.933,0.565}
    \definecolor{lightyellow}{rgb}{1,1,0.878}
    \definecolor{black}{gray}{0}
    \definecolor{white}{gray}{1}
}
\makeatletter
\def\ipesetcolor#1#2#3{\def\current@color{#1 #2 #3 rg #1 #2 #3 RG}\pdfcolorstack\@pdfcolorstack push{\current@color}}
\def\iperesetcolor{\pdfcolorstack\@pdfcolorstack pop}
\makeatother



% The following is auto-generated by the TikZ exporter.
\usepackage{tikz}
\usetikzlibrary{arrows.meta,patterns}
\usetikzlibrary{ipe} % ipe compatibility library




\ipedefinecolors{}
\pagestyle{empty}
\newcount\bigpoint\dimen0=0.01bp\bigpoint=\dimen0
\begin{document}
\begin{frame}
    %   \frametitle{Pic}
            \begin{picture}(100,300)
            \setbox0=\hbox{\normalsize
                \ipesetcolor{0}{0}{0}%
                \begin{tikzpicture}[ipe import, baseline, trim left]
                    \filldraw[black]
                    (160, 320)
                    .. controls (128, 288) and (128, 280) .. (165.3333, 273.3333)
                    .. controls (202.6667, 266.6667) and (277.3333, 261.3333) .. (320, 253.3333)
                    .. controls (362.6667, 245.3333) and (373.3333, 234.6667) .. (365.3333, 218.6667)
                    .. controls (357.3333, 202.6667) and (330.6667, 181.3333) .. (317.3333, 168)
                    .. controls (304, 154.6667) and (304, 149.3333) .. (352, 144)
                    .. controls (400, 138.6667) and (496, 133.3333) .. (546.6667, 130.6667)
                    .. controls (597.3333, 128) and (602.6667, 128) .. (610.6667, 128)
                    .. controls (618.6667, 128) and (629.3333, 128) .. (634.6667, 128)
                    .. controls (640, 128) and (640, 128) .. (640, 120)
                    .. controls (640, 112) and (640, 96) .. (640, 88)
                    .. controls (640, 80) and (640, 80) .. (584, 80)
                    .. controls (528, 80) and (416, 80) .. (349.3333, 90.6667)
                    .. controls (282.6667, 101.3333) and (261.3333, 122.6667) .. (253.3333, 138.6667)
                    .. controls (245.3333, 154.6667) and (250.6667, 165.3333) .. (261.3333, 176)
                    .. controls (272, 186.6667) and (288, 197.3333) .. (293.3333, 205.3333)
                    .. controls (298.6667, 213.3333) and (293.3333, 218.6667) .. (258.6667, 224)
                    .. controls (224, 229.3333) and (160, 234.6667) .. (128, 245.3333)
                    .. controls (96, 256) and (96, 272) .. (144, 320);
                    \filldraw[draw=white, dashed, fill=black]
                    (128, 80)
                    -- (128, 80);
                    \draw[ ->]
                    (0, 240)
                    .. controls (0, 240) and (0, 240) .. (0, 240);
                    \draw[ dashed, ->]
                    (464, 0)
                    .. controls (464, 0) and (464, 0) .. (464, 0);
                    \draw[white, dashed, ->]
                    (151.3815, 321.3463)
                    .. controls (140.9296, 308.7319) and (136.7849, 303.8664) .. (133.4511, 299.5115)
                    .. controls (130.1173, 295.1565) and (127.5945, 291.3122) .. (126.1528, 287.7682)
                    .. controls (124.7112, 284.2241) and (124.3508, 280.9804) .. (124.3508, 277.4965)
                    .. controls (124.3508, 274.0125) and (124.7112, 270.2883) .. (127.3542, 267.4651)
                    .. controls (129.9972, 264.6419) and (134.9228, 262.7197) .. (162.4941, 257.8542)
                    .. controls (190.0654, 252.9887) and (240.2824, 245.1798) .. (269.9561, 240.2542)
                    .. controls (299.6298, 235.3286) and (308.7601, 233.2863) .. (315.9683, 231.4242)
                    .. controls (323.1765, 229.5621) and (328.4625, 227.8802) .. (331.0454, 225.057)
                    .. controls (333.6284, 222.2338) and (333.5082, 218.2693) .. (328.6427, 211.902)
                    .. controls (323.7772, 205.5348) and (314.1663, 196.7648) .. (306.0571, 188.2352)
                    .. controls (297.9479, 179.7055) and (291.3404, 171.4161) .. (287.2557, 165.169)
                    .. controls (283.1711, 158.9219) and (281.6093, 154.7171) .. (281.6694, 150.8727)
                    .. controls (281.7294, 147.0284) and (283.4114, 143.5444) .. (287.6762, 139.64)
                    .. controls (291.941, 135.7356) and (298.7888, 131.4106) .. (309.2407, 127.8666)
                    .. controls (319.6925, 124.3226) and (333.7485, 121.5595) .. (350.5676, 118.6762)
                    .. controls (367.3867, 115.7929) and (386.9689, 112.7895) .. (412.1375, 110.6271)
                    .. controls (437.3061, 108.4646) and (468.061, 107.1431) .. (499.8971, 106.3622)
                    .. controls (531.7333, 105.5813) and (564.6506, 105.3411) .. (595.4356, 105.311)
                    .. controls (626.2205, 105.281) and (654.873, 105.4612) .. (654.873, 105.4612);
                    \filldraw[fill=darkcyan]
                    (469.7547, 61.608) circle[radius=6.6152];
                    \fill[red]
                    (469.7547, 61.411) circle[radius=2.4723];
                    \filldraw[fill=darkcyan]
                    (393.6759, 158.5021) circle[radius=6.6152];
                    \fill[red]
                    (393.6759, 158.3051) circle[radius=2.4723];
                    \filldraw[fill=darkcyan]
                    (239.2, 119.035) circle[radius=6.6152];
                    \fill[red]
                    (239.2, 118.838) circle[radius=2.4723];
                    \filldraw[fill=darkcyan]
                    (126.498, 218.0607) circle[radius=6.6152];
                    \fill[red]
                    (126.498, 217.8637) circle[radius=2.4723];
                    \node[ipe node, font=\Large]
                    at (432, 32) {\thesection \quad Introduction};
                    \node[ipe node, font=\Large]
                    at (352, 176) { \hyperlink{thesentence}{Literature Review}};
                    \node[ipe node, font=\Large]
                    at (96, 192) {References};
                    \node[ipe node, font=\Large]
                    at (192, 96) {Objectives};
                    \node[ipe node, font=\Large]
                    at (352, 256) {Work};
                    \filldraw[fill=darkcyan]
                    (374.498, 244.0607) circle[radius=6.6152];
                    \fill[red]
                    (374.498, 243.8637) circle[radius=2.4723];
                \end{tikzpicture}
                %
                \iperesetcolor}
            \count0=\dp0\divide\count0 by \bigpoint
            \pdfxform attr{/IpeId 1 /IpeStretch 1 /IpeDepth \the\count0}0\put(-110,40){\pdfrefxform\pdflastxform}
        \end{picture}
    \end{frame}
\section{Introduction}
\begin{frame}
    \frametitle{Introduction}
\end{frame}
\section{Literature Review}
\begin{frame}
    \hypertarget{thesentence}{Literature Review}
    \frametitle{Literature Review}
\end{frame}
\section{Objectives}
\begin{frame}
    \frametitle{Objectives}
\end{frame}
\section{Work}
\begin{frame}
    \frametitle{Work}
\end{frame}
\section{References}
\begin{frame}
    \frametitle{References}
\end{frame}
\end{document}

故意的

答案1

(您的代码无法编译,并且包含我没有的自定义库,因此我将示例精简了“一点点”...)

您可以让 TikZ 节点充当指向您所在部分的链接,如下所示:

\documentclass[aspectratio=169, 11pt]{beamer}
\usetheme{Berlin}

\usepackage{tikz}

\AtBeginSection[]{\label{sec:\thesection}}

\newcommand{\foo}[1]{\hyperlink{sec:#1}{#1\quad\nameref{sec:#1}}}

\begin{document}
\begin{frame}
  \begin{tikzpicture}[scale=.01]
      \node[font=\Large] at (432, 32) {\foo{1}};
      \node[font=\Large] at (352, 176) {\foo{2}};
  \end{tikzpicture}
\end{frame}

\section{Introduction}
\begin{frame}
    \frametitle{Introduction}
\end{frame}

\section{Literature Review}
\begin{frame}
    \frametitle{Literature Review}
\end{frame}

\end{document}

在此处输入图片描述

相关内容