使用自己的模板删除标题中的项目符号不起作用

使用自己的模板删除标题中的项目符号不起作用

我在投影仪演示中使用 Ilmenau(第一张图片)

外部主题迷你框架/Ilmenau

我想隐藏项目符号,所以我使用自己的标题模板(我的想法来自是否可以去掉 miniframes 外部主题中的项目符号)。我删除了项目符号,但幻灯片顶部却出现了一个白色框(第二张图片)。我想删除项目符号,其余标题元素移至顶部。

我正在使用这个代码:

\usetheme{Ilmenau}

\setbeamertemplate{headline}
{%
  \begin{beamercolorbox}{section in head/foot}
  \vskip2pt\insertsectionnavigationhorizontal{\textwidth}{}{}\vskip2pt
  \end{beamercolorbox}
}

自己的标题

更新:完整片段:空模板在顶部输出空白,但如果取消注释标题模板主体,则更加奇怪。

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage{listings}
\usepackage{graphicx}

\title{Active Galactic Nuclei}
\author{John Doe}
\usetheme{Ilmenau}
\usecolortheme[rgb={0,0.4,0}]{structure}

\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent=20}
\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
  \oldmacro\hfill%
  \insertframenumber}

\begin{document}

\setbeamertemplate{headline}[default]
 {%
%%   \begin{beamercolorbox}{section in head/foot}
%%   \insertsectionnavigationhorizontal{\textwidth}{}{}
%%   \end{beamercolorbox}%
}

\section{Introduction}
\subsection{Active Galactic Nuclei}

\frame{
\frametitle{Active Galactic Nuclei}
In some galaxies, the nucleus produces more radiation than the entire rest of the galaxy. Gas spirals towards a supermassive black hole (SMBH) assuming a disk shaped structure, generating massive amounts of radiation before falling onto the black hole. 
}

\section{Other}
\subsection{Other}

\frame{
\frametitle{Active Galactic Nuclei}
In some galaxies, the nucleus produces more radiation than the entire rest of the galaxy. Gas spirals towards a supermassive black hole (SMBH) assuming a disk shaped structure, generating massive amounts of radiation before falling onto the black hole. 
}

\end{document}

答案1

将 的重新定义移至headline序言部分:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage{listings}
\usepackage{graphicx}

\title{Active Galactic Nuclei}
\author{John Doe}
\usetheme{Ilmenau}
\usecolortheme[rgb={0,0.4,0}]{structure}

\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent=20}
\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
  \oldmacro\hfill%
  \insertframenumber}

\setbeamertemplate{headline}
 {%
  \begin{beamercolorbox}{section in head/foot}
  \insertsectionnavigationhorizontal{\textwidth}{}{}
  \end{beamercolorbox}%
}

\begin{document}


\section{Introduction}
\subsection{Active Galactic Nuclei}

\frame{
\frametitle{Active Galactic Nuclei}
In some galaxies, the nucleus produces more radiation than the entire rest of the galaxy. Gas spirals towards a supermassive black hole (SMBH) assuming a disk shaped structure, generating massive amounts of radiation before falling onto the black hole. 
}

\section{Other}
\subsection{Other}

\frame{
\frametitle{Active Galactic Nuclei}
In some galaxies, the nucleus produces more radiation than the entire rest of the galaxy. Gas spirals towards a supermassive black hole (SMBH) assuming a disk shaped structure, generating massive amounts of radiation before falling onto the black hole. 
}

\end{document}

在此处输入图片描述

相关内容