Skip to content

Instantly share code, notes, and snippets.

@rhz
Created September 16, 2020 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhz/0e0f25f553096fd584b54b0a170954e4 to your computer and use it in GitHub Desktop.
Save rhz/0e0f25f553096fd584b54b0a170954e4 to your computer and use it in GitHub Desktop.
Beamer dark template
% This is for XeLaTeX
\documentclass[12pt,svgnames,dvipsnames]{beamer}
% https://kbroman.org/blog/2013/10/07/better-looking-latexbeamer-slides/
\usepackage{graphicx}
\setbeameroption{hide notes}
\setbeamertemplate{note page}[plain]
% use the default Beamer theme
% and get rid of all of the navigation stuff
\usetheme{default}
\beamertemplatenavigationsymbolsempty{}
% don't show bookmarks on initial view
\hypersetup{pdfpagemode=UseNone}
% change the font to Helvetica Neue
% with Palatino used for the notes pages
\usefonttheme{professionalfonts}
\usefonttheme{serif}
\usepackage{microtype}
\usepackage{fontspec}
\setmainfont[BoldFont={HelveticaNeueLTStd-Roman}]{%
HelveticaNeueLTStd-Th} % sans serif
\setbeamerfont{note page}{% Palatino for notes
family*=pplx,size=\footnotesize}
% https://tex.stackexchange.com/questions/218697/a-tex-math-font-for-helvetica-neue
% \usepackage{unicode-math}
\usepackage{newtxsf}
\AtBeginDocument{%
\DeclareMathSymbol{0}{\mathalpha}{operators}{`0}%
\DeclareMathSymbol{1}{\mathalpha}{operators}{`1}%
\DeclareMathSymbol{2}{\mathalpha}{operators}{`2}%
\DeclareMathSymbol{3}{\mathalpha}{operators}{`3}%
\DeclareMathSymbol{4}{\mathalpha}{operators}{`4}%
\DeclareMathSymbol{5}{\mathalpha}{operators}{`5}%
\DeclareMathSymbol{6}{\mathalpha}{operators}{`6}%
\DeclareMathSymbol{7}{\mathalpha}{operators}{`7}%
\DeclareMathSymbol{8}{\mathalpha}{operators}{`8}%
\DeclareMathSymbol{9}{\mathalpha}{operators}{`9}%
}
% change bullet points
\setbeamertemplate{items}[circle]
% define a bunch of colors
\definecolor{foreground}{RGB}{255,255,255}
\definecolor{background}{RGB}{46,40,40}
\definecolor{title}{RGB}{107,174,214}
\definecolor{gray}{RGB}{155,155,155}
\definecolor{subtitle}{RGB}{102,255,204}
\definecolor{hilight}{RGB}{102,255,204}
\definecolor{vhilight}{RGB}{255,111,207}
\colorlet{hilight2}{RedOrange!70!Grey}
% colors for the titles, subtitle, institute, etc
\setbeamercolor{titlelike}{fg=title}
\setbeamercolor{subtitle}{fg=subtitle}
\setbeamercolor{institute}{fg=gray}
\setbeamercolor{normal text}{fg=foreground, bg=background}
% color of bullets in itemize environments and changes nested
% bullet symbols to en-dashes (-) in gray, and a bit smaller
\setbeamercolor{item}{fg=foreground}
\setbeamercolor{subitem}{fg=gray}
\setbeamercolor{itemize/enumerate subbody}{fg=gray}
\setbeamertemplate{itemize subitem}{{\textendash}}
\setbeamerfont{itemize/enumerate subbody}{size=\footnotesize}
\setbeamerfont{itemize/enumerate subitem}{size=\footnotesize}
% slide number in the lower-right, in gray
\setbeamertemplate{footline}{%
\raisebox{5pt}{\makebox[\paperwidth]{%
\hfill\makebox[20pt]{\color{gray}%
\scriptsize\insertframenumber}}}\hspace*{5pt}}
% adds a bit of space between paragraphs on the notes pages
\addtobeamertemplate{note page}{\setlength{\parskip}{12pt}}
\usepackage{polyglossia}
\setmainlanguage{spanish}
\usepackage{tikz}
\usetikzlibrary{positioning}
% https://tex.stackexchange.com/questions/146908/beamer-overlay-specifications-for-a-tikzpicture
\tikzset{
invisible/.style={opacity=0,text opacity=0},
visible on/.style={alt={#1{}{invisible}}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}},
highlight on/.style={alt={#1{}{text=Grey}}},
appear on/.style={temp={#1{invisible}{}{text=Grey}}},
temp/.code args={<#1>#2#3#4}{%
\temporal<#1>{%
\pgfkeysalso{#2}}{%
\pgfkeysalso{#3}}{%
\pgfkeysalso{#4}}}}
\newcommand*{\bi}{\begin{list}{$\bullet$}{%
\leftmargin=0em \itemindent=0em}}
\newcommand*{\ei}{\end{list}}
\begin{document}
{
\setbeamertemplate{footline}{} % no page number here
\frame[noframenumbering]{\titlepage}
}
\begin{frame}
\frametitle{}
\begin{center}
\begin{tikzpicture}
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment