
我正在嘗試創建一個框架,其中圖像被拉伸到頁面的整個高度,並在左側發布一些評論。
然而,正如您在圖片中看到的,圖像和框架右邊緣之間存在一個小間隙。是什麼原因導致這種差距的出現呢?如何擺脫它,使影像完全齊平到右邊緣?我相信這可能是因為如何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}