我正在尝试创建一个框架,其中的图像被拉伸到整个页面的高度,并且在左侧有一些评论帖子。
但是,如图所示,图像与框架的右边缘之间存在一个小间隙。是什么原因导致出现这个间隙?如何消除它,使图像完全与右边缘对齐?我相信这可能是因为如何tikz
处理锚点
\documentclass[aspectratio=169, t]{beamer}
\usepackage{tikzpagenodes}
\usepackage{adjustbox}
\usepackage{blindtext}
\newcommand{\removeNavigation}{\setbeamertemplate{navigation symbols}{}}
\setbeamercolor{background canvas}{bg=cyan}
\begin{document}
{\removeNavigation
\begin{frame}[plain]
\begin{adjustbox}{minipage={0.4\paperwidth}}
\blindlist{itemize}
\end{adjustbox}
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=east] at (current page.east)
{\includegraphics[height=\paperheight, width=0.5\paperwidth]{example-image}};
\end{tikzpicture}
\end{frame}
}
\end{document}
答案1
间距是由节点的初始非零值inner sep
(0.3333em) 引起的。设置inner sep=0pt
会删除该间距。
完整示例:
\documentclass[aspectratio=169, t]{beamer}
\usepackage{tikzpagenodes}
\usepackage{adjustbox}
\usepackage{blindtext}
\newcommand{\removeNavigation}{\setbeamertemplate{navigation symbols}{}}
\setbeamercolor{background canvas}{bg=cyan}
\begin{document}
{\removeNavigation
\begin{frame}[plain]
\begin{adjustbox}{minipage={0.4\paperwidth}}
\blindlist{itemize}
\end{adjustbox}
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=east, inner sep=0pt] at (current page.east)
{\includegraphics[height=\paperheight, width=0.5\paperwidth]{example-image}};
\end{tikzpicture}
\end{frame}
}
\end{document}