summaryrefslogtreecommitdiffstats
path: root/beamer
diff options
context:
space:
mode:
Diffstat (limited to 'beamer')
-rw-r--r--beamer/flake.nix1
-rw-r--r--beamer/slides.md23
-rw-r--r--beamer/template.latex62
3 files changed, 75 insertions, 11 deletions
diff --git a/beamer/flake.nix b/beamer/flake.nix
index 3bfc9b3..97ae895 100644
--- a/beamer/flake.nix
+++ b/beamer/flake.nix
@@ -68,6 +68,7 @@
68 latexmk 68 latexmk
69 69
70 beamercolorthemeowl 70 beamercolorthemeowl
71 tcolorbox environ
71 72
72 fvextra pgfopts minted catchfile upquote xstring framed; 73 fvextra pgfopts minted catchfile upquote xstring framed;
73 beamertheme-metropolis = { pkgs = [ beamertheme-metropolis' ]; }; 74 beamertheme-metropolis = { pkgs = [ beamertheme-metropolis' ]; };
diff --git a/beamer/slides.md b/beamer/slides.md
index 1dbce3c..2a70071 100644
--- a/beamer/slides.md
+++ b/beamer/slides.md
@@ -11,8 +11,8 @@ colortheme: owl
11 11
12# Light theme 12# Light theme
13#colorthemeoptions: snowy 13#colorthemeoptions: snowy
14#mintedstyle: perldoc 14#minted:
15#mintedstyle: xcode 15# style: perldoc
16 16
17links-as-notes: true 17links-as-notes: true
18beameroption: "show notes on second screen=right" 18beameroption: "show notes on second screen=right"
@@ -45,6 +45,25 @@ These are some-notes
45 45
46Much content 46Much content
47 47
48## Set code title
49
50```{=latex}
51\tcbset{title=My Title}
52```
53
54```haskell
55main :: IO ()
56main = print . md5 . pack . unwords =<< getArgs
57 where
58 md5 x = hash x :: Digest MD5
59```
60
61```{=latex}
62\tcbset{title=}
63```
64
65## Blocks
66
48### Block 67### Block
49 68
50This is an block 69This is an block
diff --git a/beamer/template.latex b/beamer/template.latex
index 09960e9..2b8db35 100644
--- a/beamer/template.latex
+++ b/beamer/template.latex
@@ -326,6 +326,8 @@ $if(pagestyle)$
326\pagestyle{$pagestyle$} 326\pagestyle{$pagestyle$}
327$endif$ 327$endif$
328 328
329$if(beamer)$
330% Make toc brighter
329\setbeamercolor{section in toc}{ 331\setbeamercolor{section in toc}{
330 use=normal text, 332 use=normal text,
331 fg=normal text.fg 333 fg=normal text.fg
@@ -334,12 +336,40 @@ $endif$
334 use=normal text, 336 use=normal text,
335 fg=normal text.fg 337 fg=normal text.fg
336} 338}
339% Add background to blocks
340\setbeamercolor*{block title}{
341 bg=normal text.bg!80!normal text.fg,
342}
343\setbeamercolor*{block body}{
344 bg=normal text.bg!90!normal text.fg,
345}
346$else$
347\definecolor{normal text.fg}{named}{black}
348\definecolor{normal text.bg}{named}{white}
349% From Owl
350\definecolor{OwlRed}{RGB}{ 255, 92, 168}
351\definecolor{OwlGreen}{RGB}{ 90, 168, 0}
352\definecolor{OwlBlue}{RGB}{ 0, 152, 233}
353\definecolor{OwlYellow}{RGB}{ 242, 147, 24}
354\colorlet{OwlViolet}{OwlRed!50!OwlBlue}
355\colorlet{OwlBrown}{OwlRed!50!OwlGreen}
356\colorlet{OwlOrange}{OwlRed!50!OwlYellow}
357\colorlet{OwlCyan}{OwlGreen!50!OwlBlue}
358\colorlet{red}{OwlRed}
359\colorlet{green}{OwlGreen}
360\colorlet{blue}{OwlBlue}
361\colorlet{yellow}{OwlYellow}
362\colorlet{violet}{OwlViolet}
363\colorlet{brown}{OwlBrown}
364\colorlet{orange}{OwlOrange}
365\colorlet{cyan}{OwlCyan}
366$endif$
337 367
338\usepackage{fvextra} 368\usepackage{fvextra}
339 369
340\usepackage[outputdir=build]{minted} 370\usepackage[outputdir=build]{minted}
341\usemintedstyle{$if(mintedstyle)$$mintedstyle$$else$inkpot$endif$} 371\usemintedstyle{$if(minted.style)$$minted.style$$else$$if(beamer)$inkpot$else$perldoc$endif$$endif$}
342\setminted{bgcolor=normal text.bg!90!normal text.fg,tabsize=4,breaklines} 372\setminted{tabsize=4,breaklines,numbersep=3mm,linenos,highlightcolor=violet!40!normal text.bg}
343 373
344\setmonofont{Fira Code}[ 374\setmonofont{Fira Code}[
345 Scale=0.87096774193548387, % 459/527 375 Scale=0.87096774193548387, % 459/527
@@ -348,14 +378,28 @@ $endif$
348 StylisticSet={6,8}, 378 StylisticSet={6,8},
349] 379]
350 380
351% Add background to blocks 381\usepackage{tcolorbox}
352\setbeamercolor*{block title}{ 382\tcbuselibrary{skins,breakable}
353 bg=normal text.bg!80!normal text.fg,
354}
355 383
356\setbeamercolor*{block body}{ 384\renewcommand{\theFancyVerbLine}{\ttfamily\scriptsize\textcolor{normal text.fg!60!normal text.bg}{\arabic{FancyVerbLine}}}
357 bg=normal text.bg!90!normal text.fg, 385
358} 386\BeforeBeginEnvironment{minted}{\begin{tcolorbox}[
387 breakable,
388 tile,
389 enhanced,
390 left=6mm,
391 colbacktitle=normal text.bg!80!normal text.fg,
392 coltitle=normal text.fg,
393 coltext=normal text.fg,
394 fonttitle=\ttfamily\bfseries,
395 colback=normal text.bg!90!normal text.fg,
396 overlay={
397 \begin{tcbclipinterior}
398 \fill[normal text.bg!85!normal text.fg] (frame.south west) rectangle ([xshift=5mm]frame.north west);
399 \end{tcbclipinterior}
400 }
401]}
402\AfterEndEnvironment{minted}{\end{tcolorbox}}
359 403
360\makeatletter 404\makeatletter
361\def\verbatim@nolig@list{} 405\def\verbatim@nolig@list{}