下方带有标题和图片的框架

下方带有标题和图片的框架

我想创建幻灯片。对于某些幻灯片,我想在图片上方添​​加标题,但幻灯片的其余部分则由图片填充。这怎么可能?也许用\usepackage{tikz}?如果可以,有人能帮我设置吗?

目前这些幻灯片如下所示:

\documentclass[aspectratio=169]{beamer}
\usepackage{media9}
\usepackage{graphicx}
\usepackage{tikz}
\usetheme{default}
\usecolortheme{wolverine}
\begin{document}
\begin{frame}{Some Caption}
 \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{somepicture.jpg}
\end{frame}
\end{document}

答案1

像这样?调整图形宽度以适合标题下方:

\documentclass[aspectratio=169]{beamer}

\usepackage{tikz}
\usetikzlibrary{calc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% absolute positioning of typeset material    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\placetextbox}[4][center]{%
  % [#1]: box anchor: center (default) | 
  %                 south west | west | north west | north |
  %                 north east | east | south east | south | 
  %                 mid west | mid | mid east |
  %                 base west | base | base east 
  % #2: horizontal position (fraction of page width)
  % #3: vertical position (fraction of page height)
  % #4: content
  %
  \tikz[remember picture,overlay,x=\paperwidth,y=\paperheight]{%
    \node[anchor=#1,inner sep=0pt]
    at ($(current page.south west)+(#2,#3)$) {#4};
  }%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{frame}{Some Caption}
  \placetextbox[south]{0.5}{0}{\includegraphics[width=0.68\paperwidth]{example-image-a}}
\end{frame}
\end{document}

相关内容