我正在尝试使用 Rmarkdown 在 beamer 中制作类似这样的结论幻灯片。但是,我想在幻灯片左侧制作蓝色矩形,并在其后跟灰色矩形。问题是我无法制作这两个矩形。框架标题仍然存在,即使我尝试在 YAML 标头中使用,也无法将其删除:
- \makeatletter
- \def\ps@navigation@conclusion{\setbeamertemplate{headline}{}\setbeamertemplate{footline}{}\setbeamercolor{frametitle}{bg=white, fg = white}\@nameuse{ps@navigation}}
- \makeatother
\thispagestyle{navigation@conclusion}
并在右侧幻灯片上使用。
矩形也不想从幻灯片的左下角开始。我现在正在使用此代码。矩形的颜色应该是我定义为 BlueM 的蓝色,但这也不起作用。
### Conclusion
\thispagestyle{navigation@conclusion}
\begin{tikzpicture}
\filldraw[color=red!60, fill=red!5, very thick](-1,0) rectangle (5,20);
\end{tikzpicture}
我知道我可以用 来制作点,\draw[fill=white] (5.8,2) circle (0.6) node[align=center]{\includegraphics[width=0.07\textwidth]{FIGURE}};
但我不知道如何让它们从灰色矩形的末端开始。另外,如何将文本与点对齐对我来说也是一个问题。
使用时\draw[fill=white] (5.8,2) circle (0.6) node[align=center]{\includegraphics[width=0.07\textwidth]{FIGURE}}
。图为
有人能帮我吗?
这是我现在正在使用的主题:
output:
beamer_presentation:
latex_engine: xelatex
theme: "metropolis"
slide_level: 3
navigation: horizontal
classoption: "aspectratio=169"
header-includes:
- \metroset{block=fill}
- \useoutertheme{infolines}
- \usepackage{xcolor}
- \definecolor{GreenM}{RGB}{107, 169, 36}
- \definecolor{BlueM}{RGB}{6, 48, 96}
- \setbeamercolor{title}{fg=BlueM}
- \setbeamercolor{title separator}{fg = GreenM}
- \setbeamercolor{author}{fg=BlueM}
- \setbeamercolor{date}{fg=BlueM}
- \setbeamercolor{progress bar in section page}{fg = GreenM,bg = gray}
- \setbeamercolor{frametitle}{bg=GreenM, fg = white}
- \setbeamercolor{normal text}{fg=BlueM}
- \setbeamercolor{structure}{fg=BlueM}
- \setbeamercolor{item}{fg=GreenM}
- \setbeamercolor{block title alerted}{fg=red}
- \setbeamercolor{section in head/foot}{fg=BlueM, bg=white}
- \setbeamercolor{subsection in head/foot}{fg=white,bg=BlueM}
- \setbeamercolor{author in head/foot}{fg=BlueM}
- \setbeamercolor{date in head/foot}{fg=white, bg=BlueM}
答案1
如果您使用该remember picture
选项tikzpicture
,您可以根据页面定位矩形等:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{frame}
\begin{tikzpicture}[remember picture, overlay]
\fill[white] (current page.south west) rectangle (current page.north east);
\fill[blue!40!black] (current page.south) rectangle (current page.north east);
\fill[lightgray!30] (current page.south) rectangle ([xshift=1.25cm]current page.north);
% red circle
\node[fill=red,draw=white,circle,font=\color{white}\Huge,ultra thick] (1) at ([yshift=-2cm]current page.north) {1};
\node[left=of 1,anchor=east,text width=.3\textwidth,align=left] {\textbf{Conclusions}\\some other text};
% blue circle
\node[fill=blue!40!black,draw=white,circle,font=\color{white}\Huge,ultra thick,below=of 1] (2) {2};
\node[left=of 2,anchor=east,text width=.3\textwidth,align=left] {\textbf{Conclusions}\\some other text};
\end{tikzpicture}
\end{frame}
\end{document}