From a66026b36496300971253da168f524c7e1da9733 Mon Sep 17 00:00:00 2001 From: zbowang <609474663@qq.com> Date: Tue, 27 Nov 2018 20:50:51 +0800 Subject: [PATCH] split by functions --- content.tex | 353 +++++++++++++++++++++++-------------------------- example169.tex | 8 +- example43.tex | 15 +-- global.tex | 8 ++ pkgs.tex | 5 + 5 files changed, 189 insertions(+), 200 deletions(-) create mode 100644 global.tex create mode 100644 pkgs.tex diff --git a/content.tex b/content.tex index c33c13e..9817136 100644 --- a/content.tex +++ b/content.tex @@ -1,207 +1,182 @@ -%-------------------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} +\frame[plain]{\titlepage} +\frame{\frametitle{Outline}\tableofcontents} -\author{Zhibo Wang} -\title{Beamer Theme} -\date{November 26th, 2018} +\section{Introduction} -\AtBeginSection[]{ - \frame{\frametitle{Outline}\tableofcontents[currentsection, - subsectionstyle=show/show/shaded]} -} +\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. -\begin{document} + \vspace{0.4cm} - \frame[plain]{\titlepage} - \frame{\frametitle{Outline}\tableofcontents} + \pause - \section{Introduction} + 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} - \begin{frame} - \frametitle{Latex and Beamer} +\section{Beamer Basic} +\subsection{Hightlight} + +\begin{frame} + \frametitle{Block and Alert} - 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 + \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 Definition - \item lemma - \item corollary - \item example + \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} - \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} + \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{frame} + \end{columns} +\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} - \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} - \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} - \section{Conclusion} - - \begin{frame}{End} - This document just aims to test styles in beamer. - \end{frame} - -\end{document} \ No newline at end of file +\begin{frame}{End} + This document just aims to test styles in beamer. +\end{frame} \ No newline at end of file diff --git a/example169.tex b/example169.tex index 4c4cd1c..50cc89f 100644 --- a/example169.tex +++ b/example169.tex @@ -1,3 +1,7 @@ \documentclass[aspectratio=169]{beamer} -\input{template_long.tex} -\input{content.tex} \ No newline at end of file + \input{pkgs.tex} + \input{setting169.tex} + \input{global.tex} + \begin{document} + \input{content.tex} + \end{document} \ No newline at end of file diff --git a/example43.tex b/example43.tex index 11ff7d5..2198416 100644 --- a/example43.tex +++ b/example43.tex @@ -1,10 +1,7 @@ \documentclass{beamer} - - \usetheme{Copenhagen} - \usecolortheme{beaver} - \input{template_short.tex} - - \input{content.tex} - - - + \input{pkgs.tex} + \input{global.tex} + \input{setting43.tex} + \begin{document} + \input{content.tex} + \end{document} \ No newline at end of file diff --git a/global.tex b/global.tex new file mode 100644 index 0000000..a0157bb --- /dev/null +++ b/global.tex @@ -0,0 +1,8 @@ +\author{Zhibo Wang} +\title{Beamer Theme} +\date{November 26th, 2018} + +\AtBeginSection[]{ + \frame{\frametitle{Outline}\tableofcontents[currentsection, + subsectionstyle=show/show/shaded]} +} \ No newline at end of file diff --git a/pkgs.tex b/pkgs.tex new file mode 100644 index 0000000..698c05d --- /dev/null +++ b/pkgs.tex @@ -0,0 +1,5 @@ +\usepackage[english]{babel} +\usepackage{fancyhdr} % header footer +\usepackage{graphicx} % figure +\usepackage{algorithm2e} +\usepackage{booktabs} \ No newline at end of file