在 LaTex 中使用 beamer 定义单个背景

问题描述 投票:0回答:2

我在 Beamer 中使用新加坡主题有多种原因(这个主题有点干净,到处都没有太多的垂直/水平条,进度点,......)所以,我想保留它。

无论如何,我用tikz定义了一个背景,带有圆形颜色渐变背景用于幻灯片内容。但是,标题也定义了背景,我无法成功删除它的背景(即使在互联网上 2 小时后大声笑)。

这是一个 mwe,您可以在其中看到两个背景之间的差异,这两个背景形成了一条我不想要的水平白线。

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{lipsum}

\usetheme{Singapore}

\begin{document}
\usebackgroundtemplate{
  \begin{tikzpicture}
    \path [outer color = blue!5, inner color = blue!1]
      (0,0) rectangle (\paperwidth,\paperheight);
  \end{tikzpicture}
}

\section{Section}
\begin{frame}
\lipsum[1]   
\end{frame}

\end{document}

如何为幻灯片的全尺寸制作具有圆形颜色渐变的背景?不中断标题 ?

background latex beamer
2个回答
1
投票

没有颜色渐变的

Singapore
归结为以下设置:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{lipsum}

%\usetheme{Singapore}

\useoutertheme[subsection=false]{miniframes}
\setbeamertemplate{frametitle}[default][center]
\beamertemplatedotitem


\begin{document}
\usebackgroundtemplate{
  \begin{tikzpicture}
    \path [outer color = blue!5, inner color = blue!1]
      (0,0) rectangle (\paperwidth,\paperheight);
  \end{tikzpicture}
}

\section{Section}
\begin{frame}
\lipsum[1]   
\end{frame}

\end{document}


0
投票

使用来自 github 的 beamer development 版本或 beamer v3.70(或更新版本),您可以更改标题渐变的颜色以融入您的背景:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{lipsum}

\usetheme{Singapore}
\setbeamercolor{section in head/foot}{bg=blue!5}

\begin{document}
\usebackgroundtemplate{
  \begin{tikzpicture}
    \path [outer color = blue!5, inner color = blue!1]
      (0,0) rectangle (\paperwidth,\paperheight);
  \end{tikzpicture}
}

\section{Section}
\begin{frame}
\lipsum[1]   
\end{frame}

\end{document}

© www.soinside.com 2019 - 2024. All rights reserved.