我正在用 LaTeX 为我的第零次评审(项目)准备幻灯片。现在,这个主题非常吸引我:。主题链接如下:关联。但是,它不可用。我获得了基本主题Copenhagen
,但现在我需要将其自定义为主题中应用的颜色和渐变。我该怎么做?这是我的 MWE:
\documentclass[12pt]{beamer}
\usetheme{Copenhagen}
\title{The title of the paper}
\author{Subham Soni \and Sakthivel \and Syed Rabbani}
\date{\today}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Agenda}
\tableofcontents
\end{frame}
\end{document}
答案1
定制beamer
主题可能需要大量的工作,因为主题涉及很多元素,不幸的是,单个框架并不能提供有关主题所涉及的所有元素的足够信息。
下面我提出了一个选项,它可以对问题附图中显示的元素产生类似的结果。
最初我以哥本哈根为起点(参见下面的“初始版本”),但如果采取以下做法,代码会更短Warsaw
:
精简版本(使用Warsaw
主题)
\documentclass[12pt]{beamer}
\usetheme{Warsaw}
\definecolor{myblue1}{RGB}{35,119,189}
\definecolor{myblue2}{RGB}{95,179,238}
\definecolor{myblue3}{RGB}{129,168,207}
\definecolor{myblue4}{RGB}{26,89,142}
\setbeamercolor*{structure}{fg=myblue1,bg=blue}
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}
\setbeamercolor*{palette quaternary}{fg=black,bg=white}
\setbeamercolor*{item projected}{fg=red,bg=myblue3!80}
\setbeamercolor*{block title example}{fg=white,bg=myblue4}
\setbeamercolor*{frametitle}{fg=black}
\setbeamertemplate{blocks}[rounded][shadow=true]
\makeatletter
\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
color(0pt)=(myblue2);
color(\paperwidth)=(white)}
\defbeamertemplate*{footline}{mysplit theme}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fill,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle\hfill
\insertframenumber/\inserttotalframenumber\hspace*{0.5em}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\title{The title of the paper}
\author{Subham Soni \and Sakthivel \and Syed Rabbani}
\date{\today}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\section{Propositional Argumentation Systems}
\subsection{Propositional Logic}
\begin{frame}
\frametitle{Logical consequences}
\begin{itemize}
\item First.
\item Second.
\item Third.
\begin{exampleblock}{Entailment Relation}
\begin{itemize}
\item First.
\item Second.
\end{itemize}
\end{exampleblock}
\item Fourth.
\end{itemize}
\end{frame}
\subsection{Argumentation Systems}
\begin{frame}
\frametitle{Logical consequences}
\end{frame}
\subsection{Probabilistic Argumentation Systems}
\begin{frame}
\frametitle{Logical consequences}
\end{frame}
\section{Argumentation Systems on Set Constraint Logic}
\begin{frame}
test
\end{frame}
\end{document}
初始版本(使用Copenhagen
主题)
\documentclass[12pt]{beamer}
\usepackage[many]{tcolorbox}
\usetheme{Copenhagen}
\definecolor{myblue1}{RGB}{35,119,189}
\definecolor{myblue2}{RGB}{95,179,238}
\definecolor{myblue3}{RGB}{129,168,207}
\definecolor{myblue4}{RGB}{26,89,142}
\setbeamercolor*{structure}{fg=myblue1,bg=blue}
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}
\setbeamercolor*{palette quaternary}{fg=black,bg=white}
\setbeamercolor*{item projected}{fg=red,bg=myblue3!80}
\setbeamercolor*{block title example}{fg=white,bg=myblue4}
\setbeamertemplate{blocks}[rounded][shadow=true]
\makeatletter
\defbeamertemplate*{frametitle}{mydefault}[1][left]
{
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\nointerlineskip%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{tcolorbox}[
enhanced,
outer arc=0pt,
arc=0pt,
boxrule=0pt,
top=0pt,
bottom=0pt,
enlarge left by=-\beamer@leftmargin,
enlarge right by=-\beamer@rightmargin,
width=\paperwidth,
nobeforeafter,
interior style={
left color=myblue2,
right color=white
},
shadow={0mm}{-0.4mm}{0mm}{black!60,opacity=0.6},
shadow={0mm}{-0.8mm}{0mm}{black!40,opacity=0.4},
]
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fte#1\endcsname\fi%
\insertframetitle\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{tcolorbox}%
}
\defbeamertemplate*{footline}{mysplit theme}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fill,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle\hfill
\insertframenumber/\inserttotalframenumber\hspace*{0.5em}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\title{The title of the paper}
\author{Subham Soni \and Sakthivel \and Syed Rabbani}
\date{\today}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\section{Propositional Argumentation Systems}
\subsection{Propositional Logic}
\begin{frame}
\frametitle{Logical consequences}
\begin{itemize}
\item First.
\item Second.
\item Third.
\begin{exampleblock}{Entailment Relation}
\begin{itemize}
\item First.
\item Second.
\end{itemize}
\end{exampleblock}
\item Fourth.
\end{itemize}
\end{frame}
\subsection{Argumentation Systems}
\begin{frame}
\frametitle{Logical consequences}
\end{frame}
\subsection{Probabilistic Argumentation Systems}
\begin{frame}
\frametitle{Logical consequences}
\end{frame}
\section{Argumentation Systems on Set Constraint Logic}
\begin{frame}
test
\end{frame}
\end{document}
如果您想要修改主题的其他元素,请针对该特定元素打开一个新问题。
最后要说的是,在提供的链接中,可以看到这个主题是为瑞士弗里堡大学的理论计算机科学研究小组设计的,而那里提供的链接已损坏。该主题可能存在版权问题,因此您最好先检查一下制作和使用此主题是否存在法律问题;事实上,如果您联系该小组,您可以直接向他们索要主题的源文件。