Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create templates for Beamer and LaTeX. #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
674 changes: 674 additions & 0 deletions Beamer/LICENSE

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions Beamer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# How to use Fedora Presentation Template

The Beamer template is defined by several **style files** (*.sty*), these are:

1. `beamertheme*.sty`

2. `beamerinnertheme*.sty`

3. `beameroutertheme*.sty`

4. `beamercolortheme*.sty`

In this repository, there are two directories called `fedora43` and `fedora169` that hold settings for different slide ratios, such as 4:3 and 16:9. They include the above files. You can see, that the file names also have an addition where the asterisk is put in the above list. For 4:3 ratio, the files use another `Fedora` addition, while for 16:9 they use `Fedora169`.

## Preparing your TeX installation

You have to install some packages to use the templates without getting errors:

1. Install the font package (`texlive-montserrat`) which will enable using the Fedora Montserrat Font.

2. Install the **ly1** package (`texlive-ly1`) to enable using the above font without error messages.

## Using the 4:3 ratio in your presentation.

### Using the style sheet

1. Copy the content of the `fedora43` directory to the place where you will be building your Beamer files.

Now, you can start working on your presentation in Beamer.

### Beamer preambule settings

There are some requirements, that you have to set in the preambule (Beamer header), so that Beamer would use the templates correctly. Check one possible working preambule:

~~~~
\documentclass[12pt]{beamer} % Setting different fontsize will break the template.
\usepackage[utf8]{inputenc} % Support for UTF-8.
\usepackage[T1]{fontenc} % Support for T1 fonts.
\usepackage{lmodern} % Using modern fonts metrics
\usetheme{Fedora} % Loads the Fedora template for 4:3 slide ratio.
\usepackage{graphicx} % If you want graphics.
\usepackage{montserrat} % Fedora presentation font
~~~~

## Using the 16:9 ratio in your presentation.

### Using the style sheet

1. Copy the content of the `fedora169` directory to the place where you will be building your Beamer files.

Now, you can start working on your presentation in Beamer.

### Beamer preambule settings

There are some requirements, that you have to set in the preambule (Beamer header), so that Beamer would use the templates correctly. The preambule is the same as in the previous section, with only two changes:

1. The `documentclass` command needs another parameter to define the new ratio. Insert the following into the square brackets - `aspectratio=169`.

2. The `usetheme` command will use a new theme, i.e. `Fedora169`.

If you used the `Fedora` theme as in the previous example, the title page graphics would lose correct proportions. See the working preambule:

~~~~
\documentclass[12pt, aspectratio=169]{beamer} % Setting different fontsize will break the template.
\usepackage[utf8]{inputenc} % Support for UTF-8.
\usepackage[T1]{fontenc} % Support for T1 fonts.
\usepackage{lmodern} % Using modern fonts metrics
\usetheme{Fedora169} % Loads the Fedora template for 16:9 slide ratio.
\usepackage{graphicx} % If you want graphics.
\usepackage{montserrat} % Fedora presentation font
~~~~
### Necessary steps to make that work flawlessly
In order not to have the sidebar on the title page, which kind of spoils the whole experience, use the `[plain]` option of the ***title frame*** environment.
~~~~
\begin{frame}[plain]
\maketitle
\end{frame}
~~~~

## Enjoy the template

Write your slides and present on Fedora related topics.


43 changes: 43 additions & 0 deletions Beamer/fedora169/beamercolorthemeFedora169.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
% Copyright 2007 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.

\mode<presentation>

\definecolor{bgaqua} {rgb} {0.235, 0.565, 0.706}

\definecolor{bgblue} {rgb} {0.235, 0.431, 0.706}
\definecolor{fblack} {rgb} {0.302, 0.302, 0.302}
\definecolor{fblue} {rgb} {0.318, 0.635, 0.855}
\definecolor{fgray} {rgb} {0.702, 0.702, 0.702}
\definecolor{lgray} {rgb} {0.9, 0.9, 0.9}
\definecolor{white} {rgb} {1.0, 1.0, 1.0}

\setbeamercolor{palette primary} {fg=fblack, bg=white}
\setbeamercolor{background canvas}{parent=palette primary}

\setbeamercolor{palette titleslide} {fg=white, bg=bgblue!90!bgaqua}

\setbeamercolor*{frametitle}{fg=fblack}
\setbeamercolor*{title page header}{fg=white}
\setbeamercolor*{docinfo}{fg=white}

\setbeamercolor*{normal text}{fg=fblack}

\setbeamercolor*{item}{fg=fblue}

\setbeamercolor*{block body}{fg=fblack, bg=lgray}
\setbeamercolor*{block title}{fg=fblue, bg=lgray}
\setbeamercolor*{block body alerted}{fg=fblack, bg=lgray}
\setbeamercolor*{block title alerted}{fg=red, bg=lgray}
\setbeamercolor*{block body example}{fg=fblack, bg=lgray}
\setbeamercolor*{block title example}{fg=bgblue, bg=lgray}


\mode
<all>
40 changes: 40 additions & 0 deletions Beamer/fedora169/beamerinnerthemeFedora169.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
\mode<presentation>

\setbeamertemplate{background}{
% \begin{tikzpicture}
% \ifnum\thepage=1\relax%
% \draw (0,0) node [rectangle, left color=bgblue, right color=bgblue!10!bgaqua, anchor=north, minimum width=\paperwidth, minimum height=\paperheight, shading=axis, shading angle=0] {};
% \fi
% \end{tikzpicture}
\ifnum\thepage=1\relax%
\includegraphics[width=\paperwidth,height=\paperheight]{titlepage169.png}
\fi

}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded]



% Title page
\defbeamertemplate*{title page}{Fedora}[1][]
{
\vskip2cm%
\begin{beamercolorbox}[wd=12cm,leftskip=1cm,sep=8pt,#1]{title page header}
\usebeamerfont{title}{\bf \inserttitle\par}%
\vskip0.3cm%
\usebeamerfont{subtitle}\insertsubtitle\par%
\end{beamercolorbox}%
\vskip0.3cm%
\begin{beamercolorbox}[wd=12cm,leftskip=8cm,#1]{docinfo}
\usebeamerfont{author}\insertauthor%
\vskip0.2cm%
\insertinstitute%
\vskip0.4cm%
\insertdate%
\end{beamercolorbox}
\vfill
}

\mode
<all>
113 changes: 113 additions & 0 deletions Beamer/fedora169/beamerouterthemeFedora169.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
% Copyright 2007 by Till Tantau
% Copyright 2015 by Vedran Mileti\'c, Joseph Wright
% Copyright 2017,2018 by Louis Stuart, Joseph Wright
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.

\newdimen\beamer@sidebarwidth
\newdimen\beamer@headheight
\usebeamerfont{frametitle}
\beamer@sidebarwidth=2.5\baselineskip
\beamer@headheight=2.5\baselineskip
\reset@font

\def\beamer@lefttext{left}

\DeclareOptionBeamer{hideothersubsections}[]{\beamer@nav@subsectionstyle{show/show/hide}}
\DeclareOptionBeamer{hideallsubsections}[]{\beamer@nav@subsectionstyle{hide}}

\DeclareOptionBeamer{width}{\beamer@sidebarwidth=#1}
\DeclareOptionBeamer{height}{\beamer@headheight=#1}
\DeclareOptionBeamer{left}{\def\beamer@sidebarside{left}}
\DeclareOptionBeamer{right}{\def\beamer@sidebarside{right}}
\ExecuteOptionsBeamer{left}
\ProcessOptionsBeamer


\mode<presentation>

\ifdim\beamer@headheight>0pt
% if head height is 0pt, use default frame title

\setbeamercolor*{frametitle}{parent=sidebar}

\defbeamertemplate*{frametitle}{sidebar theme}
{%
\nointerlineskip%
\ifbeamer@plainframe%
\hbox{\usebeamercolor[bg]{frametitle}%
\@tempdima\paperwidth\advance\@tempdima-\beamer@sidebarwidth
\hskip-\beamer@leftmargin\vrule height\beamer@headheight width\@tempdima\hskip-\beamer@rightmargin}%
\nointerlineskip%
\fi%
\vskip-\beamer@headheight%
\vbox to \beamer@headheight{%
\vfil
\leftskip=-\beamer@leftmargin%
\advance\leftskip by0.3cm%
\rightskip=-\beamer@rightmargin%
\advance\rightskip by0.3cm plus1fil%
{\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
{\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
\vbox{}%
\vskip-1em%
\vfil
}%
}

\defbeamertemplate*{headline}{sidebar theme}
{%
\begin{beamercolorbox}[wd=\paperwidth]{frametitle}
\ifx\beamer@sidebarside\beamer@lefttext%
\else%
\hfill%
\fi%
\ifdim\beamer@sidebarwidth>0pt%
\usebeamercolor[bg]{logo}%
\vrule width\beamer@sidebarwidth height \beamer@headheight%
\hskip-\beamer@sidebarwidth%
\hbox to \beamer@sidebarwidth{\hss\vbox to
\beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
\else%
\vrule width0pt height \beamer@headheight%
\fi%
\end{beamercolorbox}
}
\fi


\def\beamer@sidebarformat#1#2#3{%
\begin{beamercolorbox}[wd=\beamer@sidebarwidth,leftskip=#1,rightskip=1ex plus1fil,vmode]{#2}
\vbox{}%
#3\par%
\vbox{}%
\vskip-1.5ex%
\end{beamercolorbox}
}


\ifdim\beamer@sidebarwidth>0pt

% Sidebar
\setbeamersize{sidebar width \beamer@sidebarside=\beamer@sidebarwidth}
\defbeamertemplate*{sidebar \beamer@sidebarside}{sidebar theme}
{
\beamer@tempdim=\beamer@sidebarwidth%
\advance\beamer@tempdim by -6pt%
\vskip0cm
\hskip0cm
\includegraphics[height=\paperheight]{sidebar}
}%
%\addtobeamertemplate{sidebar}{\includegraphics[width=25pt]{fedora-logo}}%

% Margins
\setbeamersize{text margin left=0.5cm,text margin right=0.5cm}
\fi

\mode
<all>
38 changes: 38 additions & 0 deletions Beamer/fedora169/beamerthemeFedora169.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
% Copyright 2007 by Till Tantau
% Copyright 2015 by Vedran Mileti\'c, Joseph Wright
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.

\newif\ifbeamer@sidebartab
\newif\ifbeamer@sidebardark

\beamer@sidebartabfalse
\beamer@sidebardarkfalse

\PassOptionsToPackage{width=2cm}{beamerouterthemesidebar}

\DeclareOptionBeamer{width}{\PassOptionsToPackage{width=#1}{beamerouterthemesidebar}}

\ProcessOptionsBeamer

\mode<presentation>
\RequirePackage{tikz}
\useinnertheme{Fedora169}
\useoutertheme[right,height=0pt]{Fedora169}

\usecolortheme{Fedora169}
\usebeamercolor{sidebar}
\setbeamertemplate{sidebar canvas right}[vertical shading][top=bgblue,bottom=bgaqua]

\ifbeamer@sidebartab
\usecolortheme{Fedora169}
\fi

\mode
<all>

Binary file added Beamer/fedora169/sidebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Beamer/fedora169/titlepage169.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions Beamer/fedora43/beamercolorthemeFedora.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
% Copyright 2007 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.

\mode<presentation>

\definecolor{bgaqua} {rgb} {0.235, 0.565, 0.706}

\definecolor{bgblue} {rgb} {0.235, 0.431, 0.706}
\definecolor{fblack} {rgb} {0.302, 0.302, 0.302}
\definecolor{fblue} {rgb} {0.318, 0.635, 0.855}
\definecolor{fgray} {rgb} {0.702, 0.702, 0.702}
\definecolor{lgray} {rgb} {0.9, 0.9, 0.9}
\definecolor{white} {rgb} {1.0, 1.0, 1.0}

\setbeamercolor{palette primary} {fg=fblack, bg=white}
\setbeamercolor{background canvas}{parent=palette primary}

\setbeamercolor{palette titleslide} {fg=white, bg=bgblue!90!bgaqua}

\setbeamercolor*{frametitle}{fg=fblack}
\setbeamercolor*{title page header}{fg=white}
\setbeamercolor*{docinfo}{fg=white}

\setbeamercolor*{normal text}{fg=fblack}

\setbeamercolor*{item}{fg=fblue}

\setbeamercolor*{block body}{fg=fblack, bg=lgray}
\setbeamercolor*{block title}{fg=fblue, bg=lgray}
\setbeamercolor*{block body alerted}{fg=fblack, bg=lgray}
\setbeamercolor*{block title alerted}{fg=red, bg=lgray}
\setbeamercolor*{block body example}{fg=fblack, bg=lgray}
\setbeamercolor*{block title example}{fg=bgblue, bg=lgray}


\mode
<all>
Loading