在 RMarkdown 中更改新部分幻灯片的 beamercolorbox 的宽度

Change width of beamercolorbox of new section slide in RMarkdown

我是 beamer 的新手,正在用 RMarkdown 进行演示,其 MWE 如下:

---
title: "Presentation Title"
author: "Name"
institute: "Institute"
date: "Date"
output:
  beamer_presentation:
    incremental: true
    theme: "Berlin"
    colortheme: "dove"
    fonttheme: "structurebold"
    includes:
      in_header: preamble.tex
classoption: "aspectratio=169"

---

# Introductions

## subsection 1

- content A

- content B

# Course Details

# Getting Started

# Summary

preamble.tex如下:

\usepackage{caption}
\captionsetup[figure]{labelformat=empty}
\setbeamercolor{frametitle}{fg=white,bg=black} %section slide title
\setbeamercolor{section in foot}{fg=white, bg=black} % footsections
\setbeamercolor{part title}{fg=white, bg=black}
\setbeamertemplate{footline}
{
 \hbox{%
  \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.6ex,dp=1ex,left,leftskip=2ex]{section in foot} % footsection 1
    \usebeamerfont{section in foot}\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.6ex,dp=1ex,center]{section in foot} % footsection 2
    \usebeamerfont{section in foot} \inserttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.34\paperwidth,ht=2.6ex,dp=1ex,right,rightskip=2ex]{section in foot} % footsection 3
    \usebeamerfont{section in foot} email
  \end{beamercolorbox}}%

  \vskip0pt%
}

目前章节标题如下所示:

我希望包含部分标题的 beamercolorbox 延伸到整个页面宽度。我无法确定正确的 beamer 属性来执行此操作。请建议我如何实现这一目标。

您可以这样修改您的 preamble.tex

\usepackage{caption}
\captionsetup[figure]{labelformat=empty}
\setbeamercolor{frametitle}{fg=white,bg=black} %section slide title
\setbeamercolor{section in foot}{fg=white, bg=black} % footsections
\setbeamercolor{part title}{fg=white, bg=black}
\setbeamertemplate{footline}
{
 \hbox{%
  \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.6ex,dp=1ex,left,leftskip=2ex]{section in foot} % footsection 1
    \usebeamerfont{section in foot}\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.6ex,dp=1ex,center]{section in foot} % footsection 2
    \usebeamerfont{section in foot} \inserttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.34\paperwidth,ht=2.6ex,dp=1ex,right,rightskip=2ex]{section in foot} % footsection 3
    \usebeamerfont{section in foot} email
  \end{beamercolorbox}}%

  \vskip0pt%
}


\setbeamertemplate{section page}{
  \centering
  \begin{columns}
  \begin{column}{\paperwidth}
  \begin{beamercolorbox}[sep=12pt,center]{part title}
    \usebeamerfont{section title}\insertsection\par
  \end{beamercolorbox}
  \end{column}
  \end{columns}
}