-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTAMUBeamer.tex
192 lines (154 loc) · 6.06 KB
/
TAMUBeamer.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
%Note that this tamu template was developed upon Dr. Miller's work. You can find his original template from the link below.
%http://svmiller.com/blog/2019/08/r-markdown-template-beamer-presentations/
\documentclass[10pt,ignorenonframetext,,aspectratio=149]{beamer}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
\setbeamercolor{caption name}{fg=normal text.fg}
\usepackage{lmodern}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
\else
\usepackage{fontspec}
\fi
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\newcommand{\euro}{€}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
%
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
\title{TAMUBeamer}
\author{Yabin Da}
\date{2020-10-19}
%% Add any required packages here.
%%--------------------------
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{wasysym}
\usepackage{booktabs}
\usepackage{ThreePartTable}
% Get rid of navigation symbols.
%-------------------------------
\setbeamertemplate{navigation symbols}{}
% Optional institute tags and titlegraphic.
% Do feel free to change the titlegraphic if you don't want it as a Markdown field.
%----------------------------------------------------------------------------------
\institute{Department of Agricultural Economics}
% Somehow, the if sentence below did not work for me. I, therefore, placed the absolute path below and it worked.
\titlegraphic{\includegraphics[width=0.4\paperwidth]{C:/work/TAMUBeamer/TAMUBeamer/tamu/tamu.png}}
% -----------------------------------------------------------------------------------------------------
%
% Some additional title page adjustments.
%----------------------------------------
\setbeamertemplate{title page}[empty]
%\date{}
\setbeamerfont{subtitle}{size=\small}
\setbeamercovered{transparent}
% Some optional colors. Change or add as you see fit.
%---------------------------------------------------
\definecolor{tamumaroon}{HTML}{500000}
\definecolor{tamuwhite}{HTML}{FFFFFF}
% Some optional color adjustments to Beamer. Change as you see fit.
%------------------------------------------------------------------
\setbeamercolor{frametitle}{fg=tamuwhite,bg=tamumaroon}
\setbeamercolor{title}{fg=tamuwhite,bg=tamumaroon}
\setbeamercolor{local structure}{fg=tamumaroon}
\setbeamercolor{section in toc}{fg=tamuwhite,bg=tamumaroon}
\setbeamercolor{subsection in toc}{fg=tamuwhite,bg=tamumaroon}
\setbeamercolor{footline}{fg=tamumaroon, bg=tamuwhite}
\setbeamercolor{block title}{fg=tamuwhite, bg=tamumaroon}
\let\Tiny=\tiny
% Sections and subsections should not get their own damn slide.
%--------------------------------------------------------------
\AtBeginPart{}
\AtBeginSection{}
\AtBeginSubsection{}
\AtBeginSubsubsection{}
% Suppress some of Markdown's weird default vertical spacing.
%------------------------------------------------------------
\setlength{\emergencystretch}{0em} % prevent overfull lines
\setlength{\parskip}{0pt}
% Allow for those simple two-tone footlines I like.
% Edit the colors as you see fit.
%--------------------------------------------------
\defbeamertemplate*{footline}{my footline}{%
\ifnum\insertpagenumber=1
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=.8ex,dp=1ex,center]{}%
% empty environment to raise height
\end{beamercolorbox}%
}%
\vskip0pt%
\else%
\Tiny{%
\hfill%
\vspace*{1pt}%
\insertframenumber/\inserttotalframenumber \hspace*{0.1cm}%
\newline%
\color{tamumaroon}{\rule{\paperwidth}{0.4mm}}\newline%
\color{tamumaroon}{\rule{\paperwidth}{.4mm}}%
}%
\fi%
}
% Various cosmetic things, though I must confess I forget what exactly these do and why I included them.
%-------------------------------------------------------------------------------------------------------
\setbeamercolor{structure}{fg=blue}
\setbeamercolor{local structure}{parent=structure}
\setbeamercolor{item projected}{parent=item,use=item,fg=tamumaroon,bg=white}
\setbeamercolor{enumerate item}{parent=item}
% Adjust some item elements. More cosmetic things.
%-------------------------------------------------
\setbeamertemplate{itemize item}{\color{tamumaroon}$\bullet$}
\setbeamertemplate{itemize subitem}{\color{tamumaroon}\scriptsize{$\bullet$}}
\setbeamertemplate{itemize/enumerate body end}{\vspace{.6\baselineskip}} % So I'm less inclined to use \medskip and \bigskip in Markdown.
% Automatically center images
% ---------------------------
% Note: this is for  images
% Use "fig.align = "center" for R chunks
% \usepackage{etoolbox}
%
% \AtBeginDocument{%
% \letcs\oig{@orig\string\includegraphics}%
% \renewcommand<>\includegraphics[2][]{%
% \only#3{%
% {\centering\oig[{#1}]{#2}\par}%
% }%
% }%
% }
% I think I've moved to xelatex now. Here's some stuff for that.
% --------------------------------------------------------------
% I could customize/generalize this more but the truth is it works for my circumstances.
\ifxetex
\setbeamerfont{title}{family=\fontspec{serif}}
\setbeamerfont{frametitle}{family=\fontspec{serif}}
\usepackage[font=small,skip=0pt]{caption}
\else
\fi
% Okay, and begin the actual document...
\begin{document}
\frame{\titlepage}
\begin{frame}{A TAMU Beamer Example}
\protect\hypertarget{a-tamu-beamer-example}{}
\begin{figure}
{\centering \includegraphics[width=0.6\linewidth]{tamu/Reveille IX}
}
\caption{Reveille IX}\label{fig:unnamed-chunk-1}
\end{figure}
\end{frame}
%Comment this off if you need a table of content slide.
% \section[]{}
% \frame{\small \frametitle{Table of Contents}
% \tableofcontents}
\end{document}