投影機 - 幻燈片模板

投影機 - 幻燈片模板

是否很難為下面的程式碼設定選項,以便我的投影機幻燈片看起來像這樣:

在此輸入影像描述

\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}

在此輸入影像描述

相關內容