我想在 LaTeX 的 beamer 中设置我从 Power Point 获得的模板:
我的代码到目前为止还没有真正重现所需的模板:
\documentclass[9pt]{beamer}
\usetheme{Madrid}
\usecolortheme{beaver}
\useinnertheme{circles}
%\colorlet{beamer@blendedblue}{gray!40!black}
%\setbeamercolor{structure}{fg=beamer@blendedblue}
\definecolor{ULgrey}{RGB}{128, 128, 128} % UL grey (primary)
\definecolor{ULred}{RGB}{218, 31, 40} % UL Red (secondary)
%
\setbeamercolor{palette primary}{bg=ULgrey,fg=white}
\setbeamercolor{palette secondary}{bg=ULgrey,fg=white}
\setbeamercolor{palette tertiary}{bg=ULgrey,fg=white}
\setbeamercolor{palette quaternary}{bg=ULgrey,fg=white}
\setbeamercolor{structure}{fg=ULred} % itemize, enumerate, etc
\setbeamercolor{section in toc}{bg=ULgrey} % TOC sections
\setbeamercolor{frametitle}{bg=ULgrey,fg=white}
\setbeamercolor{title}{bg=ULgrey,fg=white}
% Override palette coloring with secondary
\setbeamercolor{section in head/foot}{bg=ULgrey,fg=ULred}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{textpos}
\usepackage{lmodern}
\title{TITLE}
\subtitle{SUBTITLE}
\author{AUTHOR}
\institute{University of Luxembourg}
\date{DATE}
%\logo{\includegraphics[scale=0.15]{logo.png}}
\begin{document}
% -----------------------------------------------------------------------
% SLIDE
% -----------------------------------------------------------------------
\usebackgroundtemplate{% declare it
\tikz[overlay,remember picture] \node[opacity=1, at=(current page.center)] {
\includegraphics[height=\paperheight,width=\paperwidth]{background.png}};
}
\begin{frame}
\titlepage
\end{frame}
% -----------------------------------------------------------------------
% SLIDE
% -----------------------------------------------------------------------
\usebackgroundtemplate{}
\addtobeamertemplate{frametitle}{}{%
\begin{textblock*}{20mm}(.9\textwidth,-0.75cm)
\includegraphics[scale=0.125]{UniLU_logo.png}
\end{textblock*}}
\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}
% -----------------------------------------------------------------------
% SLIDE
% -----------------------------------------------------------------------
\section{Section}
\begin{frame}
\frametitle{Slide Title}
Text
\end{frame}
\end{document}
如何制作标题页背景矩形?如何制作徽标的圆形边框?如何制作幻灯片左侧的红色小矩形?
答案1
这是我的尝试:
\documentclass[9pt]{beamer}
\usetheme{Madrid}
\usecolortheme{beaver}
\useinnertheme{circles}
%\colorlet{beamer@blendedblue}{gray!40!black}
%\setbeamercolor{structure}{fg=beamer@blendedblue}
\definecolor{ULgrey}{RGB}{128, 128, 128} % UL grey (primary)
\definecolor{ULred}{RGB}{218, 31, 40} % UL Red (secondary)
%
\setbeamercolor{palette primary}{bg=ULgrey,fg=white}
\setbeamercolor{palette secondary}{bg=ULgrey,fg=white}
\setbeamercolor{palette tertiary}{bg=ULgrey,fg=white}
\setbeamercolor{palette quaternary}{bg=ULgrey,fg=white}
\setbeamercolor{structure}{fg=ULred} % itemize, enumerate, etc
\setbeamercolor{section in toc}{bg=ULgrey} % TOC sections
\setbeamercolor{frametitle}{bg=ULgrey,fg=white}
\setbeamercolor{title}{bg=ULgrey,fg=white}
% Override palette coloring with secondary
\setbeamercolor{section in head/foot}{bg=ULgrey,fg=ULred}
\setbeamertemplate{title page}
{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,fill=ULgrey,text width=\paperwidth,text height=9ex,draw=ULgrey,opacity=0.5] (bgnode) at ([yshift=-1cm]current page.north west)
{};
\fill[ULred] (bgnode.north west) rectangle ([xshift=1mm]bgnode.south west);
\node[anchor=west] (uni) at ([xshift=2ex]bgnode.west){%
\usebeamercolor[fg]{title}\insertinstitute};
\matrix[anchor=west](listTAD) at ([xshift=3ex]uni.east) {%
\node{\usebeamercolor[fg]{title}\inserttitle}; \\
\node{\usebeamercolor[fg]{title}\insertauthor}; \\ \node{\usebeamercolor[fg]{title}\insertdate}; \\
};
\node at ([xshift=-1.5ex]listTAD.west){\usebeamercolor[fg]{title}\rule{0.5pt}{13mm}};
\node[anchor=south east,inner sep=0pt] (logoPos) at ([xshift=-2mm]current page.south east) {\phantom{\includegraphics[scale=0.05]{logo.png}}};
\clip (logoPos.north west) |- (logoPos.south east) [rounded corners] -- (logoPos.north east) -- cycle;
\node[inner sep=0pt] at (logoPos) {\includegraphics[scale=0.05]{logo.png}};
\end{tikzpicture}%
}
\setbeamertemplate{frametitle}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,fill=ULgrey,text width=\paperwidth,text height=7ex,draw=none] (bgnode) at (current page.north west)
{};
\node[above right=0.3ex and 2ex] (ntitle) at (bgnode.west){\usebeamercolor[fg]{title}\insertframetitle};
\node[anchor=north west] at (ntitle.south west) {\usebeamercolor[fg]{title}\insertframesubtitle};
\fill[ULred] ([yshift=-2mm]bgnode.north west) rectangle ([shift={(1.7mm,2mm)}]bgnode.south west);
\node[anchor=south east,inner sep=0pt] (logoPos) at ([xshift=-4mm]bgnode.south east) {\phantom{\includegraphics[scale=0.03]{logo.png}}};
\clip (logoPos.north west) |- (logoPos.south east) [rounded corners] -- (logoPos.north east) -- cycle;
\node[inner sep=0pt] at (logoPos) {\includegraphics[scale=0.03]{logo.png}};
\end{tikzpicture}
}
\setbeamertemplate{navigation symbols}{}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{matrix,positioning}
\usepackage{textpos}
\usepackage{lmodern}
\title{TITLE}
\subtitle{SUBTITLE}
\author{AUTHOR}
\institute{University of Luxembourg}
\date{DATE}
%\logo{\includegraphics[scale=0.15]{logo.png}}
\begin{document}
% -----------------------------------------------------------------------
% SLIDE
% -----------------------------------------------------------------------
\usebackgroundtemplate{% declare it
\tikz[overlay,remember picture] \node[opacity=1, at=(current page.center)] {
\includegraphics[height=\paperheight,width=\paperwidth]{background.png}};
}
\begin{frame}[plain]
\titlepage
\end{frame}
% -----------------------------------------------------------------------
% SLIDE
% -----------------------------------------------------------------------
\usebackgroundtemplate{}
\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}
% -----------------------------------------------------------------------
% SLIDE
% -----------------------------------------------------------------------
\section{Section}
\begin{frame}
\frametitle{Slide Title}
\framesubtitle{subtitle}
Text
\end{frame}
\end{document}