Upload files
This commit is contained in:
parent
03c1c193a7
commit
f045fc63cc
|
@ -0,0 +1,313 @@
|
|||
%%
|
||||
%% This is file `beamerfontthemetrex.sty',
|
||||
%% generated with the docstrip utility.
|
||||
%%
|
||||
%% The original source files were:
|
||||
%%
|
||||
%% beamerfontthemetrex.dtx (with options: `package')
|
||||
%% ---------------------------------------------------------------------------
|
||||
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
|
||||
%% contributors can be found at
|
||||
%%
|
||||
%% https://github.com/matze/mtheme/graphs/contributors
|
||||
%%
|
||||
%% and the original template was based on the HSRM theme by Benjamin Weiss.
|
||||
%%
|
||||
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
|
||||
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
|
||||
%% ---------------------------------------------------------------------------
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{beamerfontthemetrex}[2017/01/23 trex font theme]
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{ifxetex}
|
||||
\RequirePackage{ifluatex}
|
||||
\RequirePackage{pgfopts}
|
||||
\ifboolexpr{bool {xetex} or bool {luatex}}{
|
||||
\@ifpackageloaded{fontspec}{
|
||||
\PassOptionsToPackage{no-math}{fontspec}
|
||||
}{
|
||||
\RequirePackage[no-math]{fontspec}
|
||||
}
|
||||
\newcounter{fontsnotfound}
|
||||
\newcommand{\checkfont}[1]{%
|
||||
\suppressfontnotfounderror=1%
|
||||
\font\x = "#1" at 10pt
|
||||
\selectfont
|
||||
\ifx\x\nullfont%
|
||||
\stepcounter{fontsnotfound}%
|
||||
\fi%
|
||||
\suppressfontnotfounderror=0%
|
||||
}
|
||||
|
||||
\newcommand{\iffontsavailable}[3]{%
|
||||
\setcounter{fontsnotfound}{0}%
|
||||
\expandafter\forcsvlist\expandafter%
|
||||
\checkfont\expandafter{#1}%
|
||||
\ifnum\value{fontsnotfound}=0%
|
||||
#2%
|
||||
\else%
|
||||
#3%
|
||||
\fi%
|
||||
}
|
||||
\iffontsavailable{Fira Sans Light,%
|
||||
Fira Sans Light Italic,%
|
||||
Fira Sans,%
|
||||
Fira Sans Italic}%
|
||||
{%
|
||||
\setsansfont[ItalicFont={Fira Sans Light Italic},%
|
||||
BoldFont={Fira Sans},%
|
||||
BoldItalicFont={Fira Sans Italic}]%
|
||||
{Fira Sans Light}%
|
||||
}{%
|
||||
\iffontsavailable{Fira Sans Light OT,%
|
||||
Fira Sans Light Italic OT,%
|
||||
Fira Sans OT,%
|
||||
Fira Sans Italic OT}%
|
||||
{%
|
||||
\setsansfont[ItalicFont={Fira Sans Light Italic OT},%
|
||||
BoldFont={Fira Sans OT},%
|
||||
BoldItalicFont={Fira Sans Italic OT}]%
|
||||
{Fira Sans Light OT}%
|
||||
}{%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Could not find Fira Sans fonts%
|
||||
}
|
||||
}
|
||||
}
|
||||
\iffontsavailable{Fira Mono, Fira Mono Bold}{%
|
||||
\setmonofont[BoldFont={Fira Mono Medium}]{Fira Mono}%
|
||||
}{%
|
||||
\iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{%
|
||||
\setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}%
|
||||
}{%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Could not find Fira Mono fonts%
|
||||
}
|
||||
}
|
||||
}
|
||||
\AtBeginEnvironment{tabular}{%
|
||||
\addfontfeature{Numbers={Monospaced}}%
|
||||
}
|
||||
}{%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts%
|
||||
}
|
||||
}
|
||||
\setbeamerfont{title}{size=\Large,%
|
||||
series=\bfseries}
|
||||
\setbeamerfont{author}{size=\small}
|
||||
\setbeamerfont{date}{size=\small}
|
||||
\setbeamerfont{section title}{size=\Large,%
|
||||
series=\bfseries}
|
||||
\setbeamerfont{block title}{size=\normalsize,%
|
||||
series=\bfseries}
|
||||
\setbeamerfont{block title alerted}{size=\normalsize,%
|
||||
series=\bfseries}
|
||||
\setbeamerfont*{subtitle}{size=\large}
|
||||
\setbeamerfont{frametitle}{size=\large,%
|
||||
series=\bfseries}
|
||||
\setbeamerfont{caption}{size=\small}
|
||||
\setbeamerfont{caption name}{series=\bfseries}
|
||||
\setbeamerfont{description item}{series=\bfseries}
|
||||
\setbeamerfont{page number in head/foot}{size=\scriptsize}
|
||||
\setbeamerfont{bibliography entry author}{size=\normalsize,%
|
||||
series=\normalfont}
|
||||
\setbeamerfont{bibliography entry title}{size=\normalsize,%
|
||||
series=\bfseries}
|
||||
\setbeamerfont{bibliography entry location}{size=\normalsize,%
|
||||
series=\normalfont}
|
||||
\setbeamerfont{bibliography entry note}{size=\small,%
|
||||
series=\normalfont}
|
||||
\setbeamerfont{standout}{size=\Large,%
|
||||
series=\bfseries}
|
||||
\pgfkeys{
|
||||
/trex/font/titleformat title/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\trex@titleformat\@empty%
|
||||
\setbeamerfont{title}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\trex@titleformat\@empty%
|
||||
\setbeamerfont{title}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\trex@titleformat\lowercase%
|
||||
\setbeamerfont{title}{shape=\scshape}%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat title=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\trex@titleformat\uppercase%
|
||||
\setbeamerfont{title}{shape=\normalfont}
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat title=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
\pgfkeys{
|
||||
/trex/font/titleformat subtitle/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\trex@subtitleformat\@empty%
|
||||
\setbeamerfont{subtitle}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\trex@subtitleformat\@empty%
|
||||
\setbeamerfont{subtitle}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\trex@subtitleformat\lowercase%
|
||||
\setbeamerfont{subtitle}{shape=\scshape}%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\trex@subtitleformat\uppercase%
|
||||
\setbeamerfont{subtitle}{shape=\normalfont}%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat subtitle=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
\pgfkeys{
|
||||
/trex/font/titleformat section/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\trex@sectiontitleformat\@empty%
|
||||
\setbeamerfont{section title}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\trex@sectiontitleformat\@empty%
|
||||
\setbeamerfont{section title}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\trex@sectiontitleformat\MakeLowercase%
|
||||
\setbeamerfont{section title}{shape=\scshape}%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat section=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\trex@sectiontitleformat\MakeUppercase%
|
||||
\setbeamerfont{section title}{shape=\normalfont}%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat section=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
\pgfkeys{
|
||||
/trex/font/titleformat frame/.cd,
|
||||
.is choice,
|
||||
regular/.code={%
|
||||
\let\trex@frametitleformat\@empty%
|
||||
\setbeamerfont{frametitle}{shape=\normalfont}%
|
||||
},
|
||||
smallcaps/.code={%
|
||||
\let\trex@frametitleformat\@empty%
|
||||
\setbeamerfont{frametitle}{shape=\scshape}%
|
||||
},
|
||||
allsmallcaps/.code={%
|
||||
\let\trex@frametitleformat\MakeLowercase%
|
||||
\setbeamerfont{frametitle}{shape=\scshape}%
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat frame=allsmallcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
allcaps/.code={%
|
||||
\let\trex@frametitleformat\MakeUppercase%
|
||||
\setbeamerfont{frametitle}{shape=\normalfont}
|
||||
\PackageWarning{beamerthemetrex}{%
|
||||
Be aware that titleformat frame=allcaps can lead to problems%
|
||||
}
|
||||
},
|
||||
}
|
||||
\pgfkeys{
|
||||
/trex/font/.cd,
|
||||
titleformattitle/.code=\pgfkeysalso{titleformat title=#1},
|
||||
titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1},
|
||||
titleformatsection/.code=\pgfkeysalso{titleformat section=#1},
|
||||
titleformatframe/.code=\pgfkeysalso{titleformat frame=#1},
|
||||
}
|
||||
\newcommand{\trex@font@setdefaults}{
|
||||
\pgfkeys{/trex/font/.cd,
|
||||
titleformat title=regular,
|
||||
titleformat subtitle=regular,
|
||||
titleformat section=regular,
|
||||
titleformat frame=regular,
|
||||
}
|
||||
}
|
||||
\def\trex@titleformat#1{#1}
|
||||
\def\trex@subtitleformat#1{#1}
|
||||
\def\trex@sectiontitleformat#1{#1}
|
||||
\def\trex@frametitleformat#1{#1}
|
||||
\patchcmd{\beamer@title}%
|
||||
{\def\inserttitle{#2}}%
|
||||
{\def\inserttitle{\trex@titleformat{#2}}}%
|
||||
{}%
|
||||
{\PackageError{beamerfontthemetrex}{Patching title failed}\@ehc}
|
||||
\patchcmd{\beamer@subtitle}%
|
||||
{\def\insertsubtitle{#2}}%
|
||||
{\def\insertsubtitle{\trex@subtitleformat{#2}}}%
|
||||
{}%
|
||||
{\PackageError{beamerfontthemetrex}{Patching subtitle failed}\@ehc}
|
||||
\patchcmd{\sectionentry}
|
||||
{\def\insertsectionhead{#2}}
|
||||
{\def\insertsectionhead{\trex@sectiontitleformat{#2}}}
|
||||
{}
|
||||
{\PackageError{beamerfontthemetrex}{Patching section title failed}\@ehc}
|
||||
\@tempswafalse
|
||||
\patchcmd{\beamer@section}
|
||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{%
|
||||
\trex@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@section}
|
||||
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\trex@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\if@tempswa\else
|
||||
\PackageError{beamerfontthemetrex}{Patching section title failed}\@ehc
|
||||
\fi
|
||||
\@tempswafalse
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{%
|
||||
\trex@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\trex@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\if@tempswa\else
|
||||
\PackageError{beamerfontthemetrex}{Patching section title failed}\@ehc
|
||||
\fi
|
||||
\patchcmd{\beamer@@frametitle}
|
||||
{{%
|
||||
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space%
|
||||
\usebeamertemplate*{frametitle continuation}\fi}}%
|
||||
\gdef\beamer@frametitle{#2}%
|
||||
\gdef\beamer@shortframetitle{#1}%
|
||||
}}
|
||||
{{%
|
||||
\gdef\insertframetitle{{\trex@frametitleformat{#2}\ifnum%
|
||||
\beamer@autobreakcount>0\relax{}\space%
|
||||
\usebeamertemplate*{frametitle continuation}\fi}}%
|
||||
\gdef\beamer@frametitle{#2}%
|
||||
\gdef\beamer@shortframetitle{#1}%
|
||||
}}
|
||||
{}
|
||||
{\PackageError{beamerfontthemetrex}{Patching frame title failed}\@ehc}
|
||||
\trex@font@setdefaults
|
||||
\ProcessPgfPackageOptions{/trex/font}
|
||||
\endinput
|
||||
%%
|
||||
%% End of file `beamerfontthemetrex.sty'.
|
|
@ -0,0 +1,34 @@
|
|||
\mode<presentation>
|
||||
|
||||
\setbeamertemplate{background}{
|
||||
\ifnum\thepage>1
|
||||
\includegraphics[height=\paperheight]{beamerbackgroundtrex.png}
|
||||
\else
|
||||
\includegraphics[height=\paperheight]{beamertitletrex.png}
|
||||
\fi
|
||||
}
|
||||
|
||||
% Title page
|
||||
\defbeamertemplate*{title page}{trex}[1][]
|
||||
{
|
||||
\vskip2cm%
|
||||
\begin{beamercolorbox}[wd=6.cm,leftskip=-0.5cm,#1]{title page header}
|
||||
\usebeamerfont{title}\inserttitle\par%
|
||||
\end{beamercolorbox}%
|
||||
\vskip0.2cm%
|
||||
\begin{beamercolorbox}[wd=6.cm,leftskip=-0.5cm,#1]{author}
|
||||
\usebeamerfont{author}\insertauthor%
|
||||
\end{beamercolorbox}
|
||||
\vskip0.5cm%
|
||||
\begin{beamercolorbox}[wd=6cm,leftskip=-0.5cm,#1]{date}
|
||||
\usebeamerfont{author}\insertdate%
|
||||
\end{beamercolorbox}
|
||||
\vskip0.3cm%
|
||||
\begin{beamercolorbox}[wd=7cm,leftskip=-0.5cm,#1]{institute}
|
||||
\usebeamerfont{author}{\tiny \insertinstitute}%
|
||||
\end{beamercolorbox}
|
||||
\vfill
|
||||
}
|
||||
|
||||
\mode
|
||||
<all>
|
|
@ -0,0 +1,22 @@
|
|||
\mode<presentation>
|
||||
|
||||
% Frame title
|
||||
\defbeamertemplate*{frametitle}{texsx}[1][]
|
||||
{
|
||||
\begin{beamercolorbox}[wd=\paperwidth,ht=0.95cm]{frametitle}
|
||||
\begin{tikzpicture}
|
||||
\useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,1.);
|
||||
\fill[red!80!black] (0,0) rectangle(2.95,1.);
|
||||
\fill[blue!50!cyan!80!black] (3.05,0) rectangle(\the\paperwidth,1.);
|
||||
\ifx\insertframesubtitle\@empty%
|
||||
{\node[anchor=west, white,font=\large] at (3.2,0.51){\insertframetitle};}
|
||||
\else%
|
||||
{\node[anchor= west, white,font=\large] at (3.2,0.61){\insertframetitle};%
|
||||
\node[anchor= west, white,font=\small] at (3.2,0.11){\insertframesubtitle};}%
|
||||
\fi
|
||||
\end{tikzpicture}
|
||||
\end{beamercolorbox}
|
||||
}
|
||||
|
||||
\mode<all>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
\mode<presentation>
|
||||
|
||||
|
||||
% Requirement
|
||||
\RequirePackage{tikz}
|
||||
|
||||
% Settings
|
||||
\useinnertheme{trex}
|
||||
\useoutertheme{trex}
|
||||
\usecolortheme{trex}
|
||||
\usefonttheme{trex}
|
||||
|
||||
|
||||
% we remove the navigation symbols and define blocks aspect.
|
||||
\setbeamertemplate{navigation symbols}{}
|
||||
\setbeamertemplate{blocks}[rounded][shadow=true]
|
||||
|
||||
\mode<all>
|
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
Loading…
Reference in New Issue