设置以下代码的选项是否困难,以便我的投影仪幻灯片看起来像这样:
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
\usetheme{Frankfurt} % or any other theme!
\beamertemplatenavigationsymbolsempty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{frame}
\frametitle{Title}
\end{frame}
\end{document}
答案1
这使用 TikZ 进行绘图和默认(空)主题。
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
\usepackage{tikz}
% \usetheme{Frankfurt}
\setbeamertemplate{frametitle}{%
\tikz[remember picture,overlay]{
\node(a)[fill=blue,rectangle,minimum width=.25cm,minimum height=1cm,anchor=north west]at(current page.north west){};
\node[anchor=west]at(a.east){\insertframetitle};
\draw[red](a.south west)--+(10,0);
}
\vskip.5cm % increase the skip if you want more space between the frame title and content
}
\setbeamertemplate{footline}{%
\tikz[overlay, remember picture]\draw[blue,line width=1cm](current page.south west)rectangle(current page.south east);
}
\beamertemplatenavigationsymbolsempty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{Section}
\subsection{Subsection}
\begin{frame}
\frametitle{Title}
\end{frame}
\end{document}
为了适应两行标题,请更改以下几行:
\node(a)[fill=blue,rectangle,minimum width=.25cm,minimum height=1cm,anchor=north west]at(current page.north west){};
\node[anchor=west]at(a.east){\insertframetitle};
到:
\node(a)[fill=blue,rectangle,minimum width=.25cm,minimum height=1.2cm,anchor=north west]at(current page.north west){};
\node[anchor=west,text width=\textwidth]at(a.east){\insertframetitle}