此图片来自 -https://www.nature.com/scitable/ebooks/english-communication-for-scientists-14053993/118520812#bookContentViewAreaDivID(玛丽的幻灯片)
如何使用 Beamer 动态引用文本位置绘制对象,以便它们与文本位置相关?我想为我的 Beamer 演示文稿制作一个这样的模板。
答案1
使用 tikz 你可以做这样的事情:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
\newcommand{\fancyitem}[3]{%
\node[anchor=west] at (1,-\theitemnumber) (titlenode) {\color{gray}\textcolor<+>{black}{#2}};
\fill[alt=<.>{fill=#1}{fill=#1!40!white}] (titlenode.west)++(0,-0.4) rectangle ++(-0.2,0.8);
\only<.>{
\fill[#1] (titlenode.west)++(-0.2,-0.4) rectangle ++(5,0.05);
\node[anchor=north west] (textnode) at (titlenode.west) [xshift=5cm,yshift=-0.3cm, text width=5cm] {#3};
\fill[#1] (titlenode.west)++(4.8,-0.35) rectangle (textnode.south west);
}
\addtocounter{itemnumber}{1}
}
\newcounter{itemnumber}
\begin{document}
\begin{frame}
\begin{overlayarea}{\linewidth}{.47\textheight}
\begin{tikzpicture}
\setcounter{itemnumber}{0}
\fancyitem{orange}{nanooptics}{confining and guiding light photonic components fabrication}
\fancyitem{cyan}{focussed ion beam}{confining and guiding}
\fancyitem{violet}{aligment procedure}{confining and guiding light photonic}
\end{tikzpicture}
\end{overlayarea}
\end{frame}
\end{document}