rewrite content and modify templates

This commit is contained in:
zbowang 2018-11-26 18:29:10 +08:00
parent 64d70f206a
commit 8beb4e8a15
5 changed files with 394 additions and 0 deletions

207
content.tex Normal file
View File

@ -0,0 +1,207 @@
%-------------------main body-------------------------%
\usepackage[english]{babel}
\usepackage{amsmath,amssymb,amstext} % math
\usepackage{float}
\usepackage{array} % array table
\usepackage{fancyhdr} % header footer
\usepackage{graphicx} % figure
\usepackage{lmodern}
\usepackage{xcolor}
\usepackage{algorithm2e}
\usepackage{booktabs}
\author{Zhibo Wang}
\title{Beamer Theme}
\date{November 26th, 2018}
\AtBeginSection[]{
\frame{\frametitle{Outline}\tableofcontents[currentsection,
subsectionstyle=show/show/shaded]}
}
\begin{document}
\frame[plain]{\titlepage}
\frame{\frametitle{Outline}\tableofcontents}
\section{Introduction}
\begin{frame}
\frametitle{Latex and Beamer}
LaTeX is a high-quality typesetting system;
it includes features designed for the production of
technical and scientific documentation.
\vspace{0.4cm}
\pause
Beamer is a LaTeX class to create powerful,
flexible and nice-looking presentations and slides.
The beamer class is focussed on producing (on-screen) presentations,
along with support material such as handouts and speaker notes.
\end{frame}
\section{Beamer Basic}
\subsection{Hightlight}
\begin{frame}
\frametitle{Block and Alert}
\vspace{-1.1cm}
\begin{block}{Pythagorean theorem}
\vspace*{-\baselineskip}\setlength\belowdisplayshortskip{0.6pt}
$$a^2 + b^2 = c^2$$
% \vspace*{-\baselineskip}\setlength\belowdisplayshortskip{0.1pt}
where c represents the length of the hypotenuse and
a and b the lengths of the triangle's other two sides.
\end{block}
\begin{alertblock}{Remark}
\begin{itemize}
\item the environment above is \alert{block}
\item the environment here is \alert{alertblock}
\end{itemize}
\end{alertblock}
\alert{Hightlight} these words are highlighted by $\backslash alert$.
\end{frame}
\begin{frame}
\frametitle{Proof}
\begin{block}{Pythagorean theorem}
\vspace*{-\baselineskip}\setlength\belowdisplayshortskip{0.1pt}
$$a^2 + b^2 = c^2$$
% \vspace*{-\baselineskip}\setlength\belowdisplayshortskip{0.2pt}
\end{block}
\vspace{0.4cm}
\begin{proof}
\vspace*{-\baselineskip}\setlength\belowdisplayshortskip{0pt}
\begin{align*}
&3^2 + 4^2 = 5^2\\
&5^2 + 12^2 = 13^2
\end{align*}
% \vspace*{-\baselineskip}\setlength\belowdisplayshortskip{0pt}
\end{proof}
\end{frame}
\subsection{Other Environments}
\begin{frame}[shrink=15]{Algorithm}
\begin{algorithm}[H]
\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\caption{How to write algorithms
(copied from \href{https://en.wikibooks.org/wiki/LaTeX/Algorithms}{here})}
\end{algorithm}
\end{frame}
\begin{frame}{More}
More environments such as
\begin{itemize}
\item Definition
\item lemma
\item corollary
\item example
\end{itemize}
\end{frame}
\section{Beamer More}
\subsection{Split Screen}
\begin{frame}{Minipage}
\begin{minipage}{0.5\linewidth}
\begin{figure}[h]
\includegraphics[width=\textwidth]{imgs/pythagorean.jpg}
\end{figure}
\end{minipage}%
\hfill
\begin{minipage}{0.4\linewidth}
\begin{itemize}
\item item
\item another
\item more
\begin{enumerate}
\item first
\item second
\item third
\end{enumerate}
\end{itemize}
\end{minipage}
\end{frame}
\begin{frame}{Columns}
\begin{columns}
\column{0.5\textwidth}
This is a text in first column.
$$E=mc^2$$
\begin{itemize}
\item First item
\item Second item
\end{itemize}
\column{0.5\textwidth}
\begin{block}{first block}
columns achieves splitting the screen
\end{block}
\begin{block}{second block}
stack block in columns
\end{block}
\end{columns}
\end{frame}
\subsection{Table}
\begin{frame}{Create Tables}
\begin{center}
\begin{table}[!t]
% \caption{Three line}
% \label{table_time}
\begin{tabular}{ccc}
\toprule
first&second&third\\
\midrule
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\bottomrule
\end{tabular}
\end{table}
\end{center}
\end{frame}
\section{Conclusion}
\begin{frame}{End}
This document just aims to test styles in beamer.
\end{frame}
\end{document}

3
example169.tex Normal file
View File

@ -0,0 +1,3 @@
\documentclass[aspectratio=169]{beamer}
\input{template_long.tex}
\input{content.tex}

10
example43.tex Normal file
View File

@ -0,0 +1,10 @@
\documentclass{beamer}
\usetheme{Copenhagen}
\usecolortheme{beaver}
\input{template_short.tex}
\input{content.tex}

87
setting169.tex Normal file
View File

@ -0,0 +1,87 @@
% footline
% delete navigation below
\setbeamertemplate{navigation symbols}{}
% define footline
\makeatother
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle\hspace*{13em}
\insertframenumber{} / \inserttotalframenumber\hspace*{0ex}
\end{beamercolorbox}}
\vskip0pt%
}
\makeatletter
% footline color
\setbeamercolor{author in head/foot}{fg=black, bg=mygrey!5!white}
\setbeamercolor{title in head/foot}{fg=black, bg=mygrey!5!white}
% sidebar color
\setbeamercolor{structure}{fg=main, bg=mygrey!10!white}
% sidebar
% on the right
\useoutertheme[width=5\baselineskip,right]{sidebar}
% delete title and author
\makeatletter
\setbeamertemplate{sidebar right}{\insertverticalnavigation{\beamer@sidebarwidth}}
\makeatother
% fontsize
\setbeamerfont{section in sidebar}{size=\scriptsize}
\setbeamerfont{subsection in sidebar}{size=\scriptsize}
% margin
\setbeamersize{sidebar width right=3cm}
\setbeamersize{sidebar width left=2cm}
% item settings
\setbeamertemplate{itemize item}{$\color{main}\bullet$}
\setbeamertemplate{enumerate items}[square]
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[square]
% color definition
%\definecolor{alizarin}{rgb}{0.82, 0.1, 0.26} % red
\definecolor{myblack}{rgb}{0.24, 0.17, 0.12}
\definecolor{mygrey}{rgb}{0.52, 0.52, 0.51}
\definecolor{berlin}{rgb}{0.64, 0, 0} % red
\colorlet{main}{berlin}
\colorlet{text}{myblack!100!white}
%% main candidates
%% 1
% \definecolor{DarkFern}{HTML}{407428} % green
% \colorlet{main}{DarkFern!100!white}
%% 2
% \definecolor{bluegreen}{rgb}{0.047 0.282 0.259} % green
% \colorlet{main}{bluegreen}
%% 3
% \definecolor{mybrown}{HTML}{967249} % brown
% \colorlet{main}{mybrown}
% set colors to elements
%% fg: itself
%% bg: background
%% !num!: gradient
\setbeamercolor{title}{fg=main}
\setbeamercolor{frametitle}{fg=main, bg=white}
\setbeamercolor{section in toc}{fg=text}
\setbeamercolor{normal text}{fg=text}
\setbeamercolor{block title}{fg=main,bg=mygrey!14!white}
\setbeamercolor{block body}{fg=black,bg=mygrey!10!white}
\setbeamercolor{block body alerted}{bg=white}
\setbeamercolor{block title alerted}{fg=main,bg=white}
\setbeamercolor{alerted text}{fg=main}
\setbeamercolor{qed symbol}{fg=main} % proof end square
\setbeamercolor{math text}{fg=black}
\hypersetup{colorlinks,linkcolor=,urlcolor=main!80!white}

87
setting43.tex Normal file
View File

@ -0,0 +1,87 @@
% footline
% delete navigation below
\setbeamertemplate{navigation symbols}{}
% define footline
\makeatother
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle\hspace*{13em}
\insertframenumber{} / \inserttotalframenumber\hspace*{0ex}
\end{beamercolorbox}}
\vskip0pt%
}
\makeatletter
% footline color
\setbeamercolor{author in head/foot}{fg=black, bg=mygrey!5!white}
\setbeamercolor{title in head/foot}{fg=black, bg=mygrey!5!white}
% sidebar color
\setbeamercolor{structure}{fg=main, bg=mygrey!10!white}
% sidebar
% delete title and author
\makeatletter
\setbeamertemplate{sidebar right}{\insertverticalnavigation{\beamer@sidebarwidth}}
\makeatother
% fontsize
\setbeamerfont{section in sidebar}{size=\scriptsize}
\setbeamerfont{subsection in sidebar}{size=\scriptsize}
% item settings
\setbeamertemplate{itemize item}{$\color{main}\bullet$}
\setbeamertemplate{enumerate items}[square]
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[square]
% color definition
%\definecolor{alizarin}{rgb}{0.82, 0.1, 0.26} % red
\definecolor{myblack}{rgb}{0.24, 0.17, 0.12}
\definecolor{mygrey}{rgb}{0.52, 0.52, 0.51}
\definecolor{berlin}{rgb}{0.64, 0, 0} % red
\colorlet{main}{berlin}
\colorlet{text}{myblack!100!white}
%% main candidates
%% 1
% \definecolor{DarkFern}{HTML}{407428} % green
% \colorlet{main}{DarkFern!100!white}
%% 2
% \definecolor{bluegreen}{rgb}{0.047 0.282 0.259} % green
% \colorlet{main}{bluegreen}
%% 3
% \definecolor{mybrown}{HTML}{967249} % brown
% \colorlet{main}{mybrown}
% set colors to elements
%% fg: itself
%% bg: background
%% !num!: gradient
\setbeamercolor{title}{fg=main}
\setbeamercolor{frametitle}{fg=main, bg=white}
\setbeamercolor{section in toc}{fg=text}
\setbeamercolor{normal text}{fg=text}
\setbeamercolor{block title}{fg=main,bg=mygrey!14!white}
\setbeamercolor{block body}{fg=black,bg=mygrey!10!white}
\setbeamercolor{block body alerted}{bg=white}
\setbeamercolor{block title alerted}{fg=main,bg=white}
\setbeamercolor{alerted text}{fg=main}
\setbeamercolor{qed symbol}{fg=main} % proof end square
\setbeamercolor{math text}{fg=black}
\hypersetup{colorlinks,linkcolor=,urlcolor=main!80!white}