Boyd 的凸優化投影片中使用什麼 Beamer 主題?

Boyd 的凸優化投影片中使用什麼 Beamer 主題?

我真的很喜歡這裡使用的主題:

http://www.stanford.edu/~boyd/cvxbook/bv_cvxslides.pdf 有人可以辨識主題的名稱嗎? 在此輸入影像描述

答案1

我不知道博伊德是如何製作他的幻燈片的(powerdot根據上面的percusse 評論,他可能使用了),但我的演講模板很大程度上是基於他的,因為我喜歡它清醒的風格和打印友善性。

以下程式碼可能需要一些額外的調整才能準確複製 Boyd 的模板。請特別注意,

  1. 原始模板的紙張尺寸不同,我沒有費心去匹配(即使我的模板中的比例是相同的);
  2. 扉頁與博伊德的略有不同。
  3. 我將物品符號更改為陰影灰色球,我發現它比純黑色球更容易被眼睛看到。

不過,我認為我的模板應該能讓您成功一半。


在此輸入影像描述


在此輸入影像描述


\documentclass[
    smaller,
    %handout,
]{beamer}

% -------- Packages ---------
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{pgfpages}
\usepackage{fancyhdr}


% ----- Beamer tweaks -----
\let\Tiny=\tiny % to prevent warnings from LaTeX (due to Beamer)
\useoutertheme{infolines} 
\mode<beamer>{\usetheme{default}}
\usecolortheme{dove}
\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent}
\usefonttheme[onlymath]{serif}

\linespread{1.5}
\setbeamersize{text margin left=30pt}
\setbeamersize{text margin right=30pt}

\setbeamertemplate{itemize items}[ball]
\setlength{\leftmargini}{1.2em}
\setlength{\leftmarginii}{1em}

\setcounter{tocdepth}{1}
\setbeamertemplate{section in toc}[ball unnumbered]
\AtBeginSection[]{ 
  \begin{frame}[handout:0]
    \frametitle{Contents} 
    \tableofcontents[currentsection] 
  \end{frame} 
  \addtocounter{framenumber}{-1} 
} 
\setbeamerfont{itemize/enumerate body}{size=\normalsize}

\setbeamertemplate{frametitle}
{
    \begin{centering}
        \large      
        \textbf{\insertframetitle}
        \par
    \end{centering}
}

% ----- Redefinition of frame (to reset footnote numbering at each frame) -----
\let\oldframe\frame                         % backup old frame
\let\endoldframe\endframe                   % backup old endframe
\renewenvironment{frame}{%
    \setcounter{footnote}{0}\oldframe%
}{\endoldframe}                             % Reset the footnote counter at each frame


% ----- Footnote symbols -----
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}   


% ----- Handout settings -----
\mode<handout>{\usetheme{default}}
\mode<handout>{\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm, landscape]}
\mode<handout>{\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}}
\mode<handout>{\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}}
\mode<handout>{\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}}}
\mode<handout>{\pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke}}}


% ----- fancyhdr -----
\setbeamertemplate{headline}{} % No header
\setbeamertemplate{footline}{ % Footer
    \leavevmode
    \vskip0pt
    \hbox{ 
        % left
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{title in head/foot}
        \hspace*{25pt}
        \usebeamerfont{title in head/foot}\textcolor{gray}{\inserttitle}
    \end{beamercolorbox}

    % right
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{page number in head/foot}
            \usebeamerfont{page number in head/foot}\arabic{lectnum}-\insertpagenumber{}
        \hspace*{30pt}
    \end{beamercolorbox}
    }
    \vskip17pt 
}


\newcounter{lectnum}        % Lecture counter
\setcounter{lectnum}{99}    % lecture counter
\title{my title}            % topic from syllabus
\subtitle[EE2376234]{Convex Optimization}
\author{Jubobs}
\institute[JA]{Jubobs academy}
\date{}



\begin{document}
% ----- Title Page -----
{% these braces define the local group associated to the titlepage

\setbeamertemplate{headline}{ % header
    \leavevmode
    \vskip20pt
    \hbox{
    % left
    \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.25ex,dp=1ex,left]{subtitle in head/foot}
            \hspace*{25pt}
            \usebeamerfont{subtitle in head/foot}\insertshortsubtitle
    \end{beamercolorbox}

    % center
    \begin{beamercolorbox}[wd=.33\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}
        % nothing
    \end{beamercolorbox}

    % right
    \begin{beamercolorbox}[wd=.32\paperwidth,ht=2.25ex,dp=1ex,right]{institute in head/foot}
            \hfill
            \usebeamerfont{institute in head/foot}\insertinstitute
            \hspace*{30pt}
    \end{beamercolorbox}
    }
}

\setbeamertemplate{footline}{ % footer
    \leavevmode
    \vskip0pt%
    \hbox{
    % left
    \begin{beamercolorbox}[wd=.333\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}
        \hspace*{25pt}
        \usebeamerfont{author in head/foot}\insertauthor
    \end{beamercolorbox}

    % center
    \begin{beamercolorbox}[wd=.333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}
        \usebeamerfont{author in head/foot}\texttt{[email protected]}
    \end{beamercolorbox}

    % right
    \begin{beamercolorbox}[wd=.333\paperwidth,ht=2.25ex,dp=1ex,right]{page number in head/foot}
        \usebeamerfont{page number in head/foot}\textcolor{black}{\arabic{lectnum}-\insertpagenumber{}}
        \hspace*{30pt}
    \end{beamercolorbox}
    }
    \vskip17pt
}

\begin{frame}
\frametitle{}
    \begin{center}
    %\vspace{-3mm}
    {\large \textbf{Lecture~\arabic{lectnum}}}\\
    {\Large \textbf{\inserttitle}}
    \end{center}
    \tableofcontents
\end{frame}  

} 

%
\section{Introduction}  

    %
    \begin{frame}
    \frametitle{Objectives}
        By the end of this lecture, you should
        \begin{itemize}
            \item be able to solve a big nonconvex QCQP without a computer
            \item be a Matlab and Python guru
            \item know CVX like the back of your hand   
        \end{itemize}
    \end{frame}  

\section{Linear systems}

\section{Convex optimization}

\end{document}

相關內容