Compare commits

...

10 Commits

Author SHA1 Message Date
8be8423ee5 Some Refinements 2026-04-16 16:57:07 +02:00
64ba597489 Fix: Numbering and remove logo from last page 2026-04-16 12:39:58 +02:00
c719f2676f Simple mods 2026-04-16 11:26:52 +02:00
Lukas Pietzschmann
c5d66ccc17 Smile is now on codeberg 2026-03-27 10:11:10 +01:00
Lukas Pietzschmann
4a1e1a3597 Cleaned up the code a bit 2025-06-16 09:08:12 +02:00
Lukas Pietzschmann
e1260b3f31 Update README 2024-10-20 13:49:59 +02:00
Lukas Pietzschmann
5aa0e310c7 Added line at edge of title image 2024-08-30 21:54:30 +02:00
Lukas Pietzschmann
02db660235 Update README 2024-05-13 15:50:13 +02:00
Lukas Pietzschmann
85742c3219 Fixed modal environment 2024-04-30 13:14:52 +02:00
Lukas Pietzschmann
416e70bdd1 Divider line in tcolorbox is now rounded 2024-04-28 17:06:33 +02:00
2 changed files with 55 additions and 88 deletions

View File

@@ -2,7 +2,7 @@
The kinda awesome beamer theme!
## Using the theme
First of all you will need the [smile](https://github.com/LukasPietzschmann/smile) package. If that's available, just copy and paste `beamerthemeawesome.sty` into your project, add `\usetheme{awesome}` into your main file and you're good to go :)
First of all you will need the [smile](https://codeberg.org/LukasPietzschmann/smile) package. If that's available, just copy and paste `beamerthemeawesome.sty` into your project, add `\usetheme{awesome}` into your main file and you're good to go :)
## Options
This theme provides some settings you can tweak:
@@ -10,7 +10,7 @@ This theme provides some settings you can tweak:
- Extra slides: For each section and subsection an extra slide containing the title can be inserted. This is controlled by passing `secslide` or/and `subsecslide`. The absence of `secslide` indicates that you don't want an extra slide for every section. Analog for `subsecslide`.
- Automatic toc: A table of contents is automatically inserted with the `\maketitle` command (After the title slide). If you want to disable this behavior, you have to set the `notoc` option.
- Section numbers in frame title: Each frage contains the current section (and subsection) number in its title. To disable this, you have to pass the `nonumbersinframetitle` option. If you disable section numbers in the title, and you use use the `wide` environment inside a frame, it can look weird when the title is shifted to the right, but the content is not. To cope with this, you can pass the `wide` option to the frame. This will also shift the title to the left.
- Others: Every option that is not recognized by awesome-beamer will be passed to [smile](https://github.com/LukasPietzschmann/smile).
- Others: Every option that is not recognized by awesome-beamer will be passed to [smile](https://codeberg.org/LukasPietzschmann/smile).
If you wanna set one (or more) of those values, you have to pass it to `\usetheme`. The usage of different options can be seen in the examples below (just click on the 'Repo' link).
@@ -21,6 +21,8 @@ If you're using latexmk you don't have to do this manually as latexmk can figure
## Example slides
I already prepared many presentations using this style. Here are some examples:
- [Zigtoberfest Talk](https://raw.githubusercontent.com/LukasPietzschmann/zigtoberfest-talk/build/talk.pdf) ([Repo](https://github.com/LukasPietzschmann/zigtoberfest-talk))
- [Haskell's lenses](https://raw.githubusercontent.com/LukasPietzschmann/haskell-lenses/build/slides/talk.pdf) ([Repo](https://github.com/LukasPietzschmann/haskell-lenses))
- [Hydrogen is an energy carrier](https://raw.githubusercontent.com/LukasPietzschmann/hydrogen-energy/build/talk.pdf) ([Repo](https://github.com/LukasPietzschmann/hydrogen-energy))
- [SIMD intrinsics](https://github.com/LukasPietzschmann/SIMD-Intrinsics/files/12775327/talk.pdf) ([Repo](https://github.com/LukasPietzschmann/SIMD-Intrinsics))
- [Building a dataflow graph for java](https://github.com/LukasPietzschmann/java-dataflow-graph/files/13249805/main.pdf) ([Repo](https://github.com/LukasPietzschmann/java-dataflow-graph))

View File

@@ -1,4 +1,4 @@
\ProvidesPackage{awesome-beamer-theme}[]
\ProvidesPackage{beamerthemeawesome}[]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -8,9 +8,8 @@
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=awesome,prefix=awesome@}
\newif\ifawesome@english@
\DeclareVoidOption{english}{\awesome@english@true}
\DeclareVoidOption{german}{\awesome@english@false}
\DeclareBoolOption{english}
\DeclareComplementaryOption{german}{english}
\DeclareBoolOption{notoc}
\DeclareBoolOption{secslide}
@@ -21,7 +20,7 @@
\ProcessKeyvalOptions*
\ifawesome@english@\RequirePackage[english]{babel}\else\RequirePackage[ngerman]{babel}\fi
\ifawesome@english\RequirePackage[english]{babel}\else\RequirePackage[ngerman]{babel}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -43,7 +42,7 @@
\usetikzlibrary{overlay-beamer-styles,decorations.markings}
\tikzset{
node distance = 5mm,
node distance=5mm,
invisible/.style={opacity=0},
muted/.style={opacity=0.3},
visible on/.style={alt={#1{}{invisible}}},
@@ -69,7 +68,7 @@
\end{frame}
\ifawesome@notoc\else
\begin{frame}{Agenda}
\tableofcontents
\tableofcontents[hidesubsections]
\end{frame}
\fi
}
@@ -83,8 +82,6 @@
\fi%
}
\BeforeBeginEnvironment{tabular}{\def\arraystretch{1.1}}
\providebool{wideframe}
\define@key{beamerframe}{wide}[true]{
\booltrue{wideframe}
@@ -118,12 +115,10 @@
\stepcounter{framesinsubsection}%
\fi%
\fi%
\ifnum\theframesinsection=0\setcounter{framesinsection}{1}\fi%
\ifnum\theframesinsubsection=0\setcounter{framesinsubsection}{1}\fi%
}
\BeforeBeginEnvironment{frame}{\stepframe}
\pretocmd\againframe{\stepframe}{}{}
% \BeforeBeginEnvironment{frame}{\stepframe}
% \pretocmd\againframe{\stepframe}{}{}
\def\refreshcountsinaux{%
\immediate\write\@auxout{\global\noexpand\@namedef{s@totalsubsectionframes-\arabic{section}-\arabic{subsection}}{\theframesinsubsection}}%
@@ -179,7 +174,9 @@
\setbeamercolor{alerted text}{fg=accent}
\setbeamercolor{title}{fg=black}
\setbeamercolor{subtitle}{fg=darkgray}
\setbeamercolor{frametitle}{fg=black}
\setbeamercolor{framesubtitle}{fg=darkgray}
@@ -203,59 +200,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamerfont{title}{
size=\LARGE,
shape=\bfseries\scshape
}
\setbeamerfont{title}{size=\LARGE,shape=\bfseries\scshape}
\setbeamerfont{subtitle}{size=\large,shape=\normalfont}
\setbeamerfont{subtitle}{
size=\large,
shape=\normalfont
}
\setbeamerfont{author}{size=\normalsize,shape=\normalfont}
\setbeamerfont{details}{size=\footnotesize,shape=\normalfont}
\setbeamerfont{author}{
size=\normalsize,
shape=\normalfont
}
\setbeamerfont{footline}{size=\tiny,shape=\normalfont}
\setbeamerfont{details}{
size=\footnotesize,
shape=\normalfont
}
\setbeamerfont{footnote}{size=\tiny,shape=\normalfont}
\setbeamerfont{footline}{
size=\tiny,
shape=\normalfont
}
\setbeamerfont{frametitle}{size=\LARGE,shape=\bfseries\scshape}
\setbeamerfont{footnote}{
size=\tiny,
shape=\normalfont
}
\setbeamerfont{framesubtitle}{size=\normalsize,shape=\normalfont}
\setbeamerfont{frametitle}{
size=\LARGE,
shape=\bfseries\scshape
}
\setbeamerfont{block title}{size=\normalfont,shape=\strut}
\setbeamerfont{blockdef}{size=\large,shape=\bfseries}
\setbeamerfont{framesubtitle}{
size=\normalsize,
shape=\normalfont
}
\setbeamerfont{block title}{
size=\normalfont,
shape=\strut
}
\setbeamerfont{blockdef}{
size=\large,
shape=\bfseries
}
\setbeamerfont{description item}{
shape=\bfseries
}
\setbeamerfont{description item}{shape=\bfseries}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -319,7 +281,7 @@
\begin{beamercolorbox}{frametitle}%
\insertframetitle%
\end{beamercolorbox}
\ifx\insertframesubtitle\empty\else%
\ifx\usebeamercolor{subtitle}\insertframesubtitle\empty\else%
\begin{beamercolorbox}{framesubtitle}%
\ifawesome@nonumbersinframetitle\ifbool{wideframe}{\hspace{-\awesome@sidebarwidth}}{}\fi\usebeamerfont{subtitle}\insertframesubtitle%
\end{beamercolorbox}\fi%
@@ -330,7 +292,7 @@
\newtcolorbox{beamerbox}[3][]{boxrule=\smile@linewidth,
IfBlankTF={#3}{toprule=2mm}{title=#3},colback=#2!5!white,colframe=#2!75!black,left=0em,
lefttitle=4mm, arc=\smile@rounding, enhanced, segmentation engine=path,
segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewidth},#1}
segmentation style={lcr, solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewidth},#1}
\renewenvironment{definition}[1][\empty]{%
\begin{beamerbox}{gray}{#1}%
@@ -350,7 +312,7 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\newenvironment<>{modal}[1][]{%
\def\titlename{#1}%
\onlyenv#2%
\visibleenv#2%
\begin{tikzpicture}[o,node distance=0pt]%
\fill[modal background] (current page.south west) rectangle (current page.north east);%
\node[modal box] at (current page) (MODALCONTENT) \bgroup%
@@ -358,7 +320,7 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\egroup;%
\if\expandafter\isempty\expandafter{\titlename}\else\node[modal title] at (MODALCONTENT.north) {\titlename};\fi
\end{tikzpicture}%
\endonlyenv%
\endvisibleenv%
}
\ensureinfocommand{title}
@@ -390,49 +352,45 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\setbeamertemplate{title page}{\begin{wide}
\def\titlecontent{\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle}%
\def\subtitlecontent{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle}%
\settowidth\titlewidth\titlecontent%
\settowidth\subtitlewidth\subtitlecontent%
\setlength\maxwidth{\ifdim\titlewidth>\subtitlewidth\titlewidth\else\subtitlewidth\fi}%
\thispagestyle{navigation@titlepage}%
\begin{minipage}{\lhswidth}
\raggedright%
\titlecontent\\
\subtitlecontent\\
\includegraphics[height=6em]{\imagepath/images/logos/logo.png}
% \leavevmode\titlecontent\\
% \leavevmode\subtitlecontent\\
\textcolor{accent}{\rule{\ifdim\maxwidth<\lhswidth\maxwidth\else\lhswidth\fi}{\smile@linewidth}}\\[2em]
\usebeamerfont{author}\usebeamercolor[fg]{author}%
\insertauthor\\
\usebeamerfont{details}\usebeamercolor[fg]{details}%
\insertemail\\[2em]
\usebeamerfont{details}\usebeamercolor[fg]{details}%
\insertinstitute\\
\insertuni\\[2em]
\insertinstitute\\[2em]
\insertdate
\end{minipage}
\ifdefined\@background
\begin{tikzpicture}[remember picture, overlay]
\begin{tikzpicture}[o]
\clip (current page.south east)
-- (current page.north east)
-- ++(-5.1, 0)
-- ++(-3, -\paperheight)
-- cycle;
\node[
anchor=south east,
inner sep=0,
outer sep=0
] at (current page.south east) {
\node[anchor=south east,inner sep=0,outer sep=0] at (current page.south east) {
\includegraphics[height=\paperheight]{\@background}
};
\fill[
black, path fading=title page picture fading,
fading angle=-15
]
(current page.south east)
rectangle
++(-10, \dimexpr\paperheight+1cm);
\fill[accent,path fading=title page picture fading,fading angle=-15]
(current page.south east) rectangle ++(-10, \dimexpr\paperheight+1cm);
\end{tikzpicture}
\tikz[o]\draw[accent,lcr,line width=2*\smile@linewidth]
([shift={(-5.1,0)}]current page.north east)
-- ++(-3,-\paperheight);
\fi
\end{wide}}
@@ -463,7 +421,7 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\newcounter{pagenumbertolinkto}
\setbeamertemplate{footline}{%
\setfooter{\insertshortauthor}{%
\setfooter{}{%
\hyperlinkdocumentstart{\insertshorttitle}\hspace{.7em}\awesome@smalldot\hspace{.7em}\insertsection%
\ifx\insertsubsection\empty%
\hspace{.4em}%
@@ -491,7 +449,7 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
}%
\fi%
\fi%
}{\ifawesome@english@ Page\else Seite\fi~\insertframenumber~/~\inserttotalframenumber}%
}{\ifawesome@english Page\else Seite\fi~\insertframenumber~/~\inserttotalframenumber}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -505,7 +463,7 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\setbeamertemplate{footline}{%
\setfooter{\insertshortauthor}%
{\hyperlinkdocumentstart{\insertshorttitle}}%
{\ifawesome@english@ Section\else Kapitel\fi~\thesection\ifx\insertsubsection\empty\else.\thesubsection\fi}%
{\ifawesome@english Section\else Kapitel\fi~\thesection\ifx\insertsubsection\empty\else.\thesubsection\fi}%
}%
\@nameuse{ps@navigation}%
}
@@ -519,6 +477,7 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
% Kinda hacky, but AtBeginEnvironment does not work with beamer tex.stackexchange.com/a/436338/286979
\pretocmd\beamer@checkframetitle{%
\stepframe%
\transfade[duration=0.1]%
\ifbeamer@isfragile%
\label{page:\insertframenumber}%
@@ -531,7 +490,7 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\begin{wide}\centering%
\usebeamerfont{title}%
\usebeamercolor[fg]{section number projected}%
\scalebox{1.3}{ \raisebox{-1pt}{\insertsectionnumber}}.~%
% \scalebox{1.3}{ \raisebox{-1pt}{\insertsectionnumber}}.~%
\usebeamercolor[fg]{title}%
\insertsectionhead%
\end{wide}%
@@ -543,9 +502,9 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\begin{wide}\centering%
\usebeamerfont{title}%
\usebeamercolor[fg]{section number projected}%
\scalebox{1.3}{\raisebox{-1pt}{\insertsectionnumber}}.%
% \scalebox{1.3}{\raisebox{-1pt}{\insertsectionnumber}}.%
\usebeamercolor[fg]{subsection number projected}%
\textsubscript{\insertsubsectionnumber}~%
% \textsubscript{\insertsubsectionnumber}~%
\usebeamercolor[fg]{title}%
\insertsubsectionhead%
\end{wide}%
@@ -553,10 +512,16 @@ segmentation style={solid, shorten >=1mm,shorten <=1mm, line width=\smile@linewi
\fi}
\AtEndDocument{
\begingroup
\logo{}
{\setbeamercolor{background canvas}{bg=accent}
\begin{frame}[b,noframenumbering]\thispagestyle{navigation@titlepage}%
\begin{wide}\color{white}%
\huge\textbf\inserttitle \\
\LARGE\insertsubtitle \\
\vskip2em
\Large\textbf{\insertauthor}\vskip0.5em\scriptsize\insertlocation,~\insertdate\hfill\insertemail%
\end{wide}%
\end{frame}}
\endgroup
}