templates: add beamer template
This commit is contained in:
parent
3e8347b65d
commit
50d9159ec9
|
@ -238,6 +238,11 @@
|
||||||
path = ./templates/default;
|
path = ./templates/default;
|
||||||
description = "A very basic flake (with dragnpkgs)";
|
description = "A very basic flake (with dragnpkgs)";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
beamer = {
|
||||||
|
path = ./templates/beamer;
|
||||||
|
description = "A very basic presentation with Beamer";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultTemplate = self.templates.default;
|
defaultTemplate = self.templates.default;
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
|
@ -0,0 +1,13 @@
|
||||||
|
/my-beamer-presentation.pdf
|
||||||
|
|
||||||
|
*.aux
|
||||||
|
*.fdb_latexmk
|
||||||
|
*.fls
|
||||||
|
*.log
|
||||||
|
*.nav
|
||||||
|
*.out
|
||||||
|
*.snm
|
||||||
|
*.synctex.gz
|
||||||
|
*.toc
|
||||||
|
|
||||||
|
/result
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
description = "A very basic presentation with Beamer";
|
||||||
|
|
||||||
|
outputs = { self, dragnpkgs } @ inputs: dragnpkgs.lib.mkFlake {
|
||||||
|
# Define a texlive environment to use
|
||||||
|
packages.texlive-custom = { texlive }: texlive.combine {
|
||||||
|
inherit (texlive)
|
||||||
|
scheme-medium
|
||||||
|
appendixnumberbeamer
|
||||||
|
fontawesome5
|
||||||
|
moloch;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Package definition for building the PDF
|
||||||
|
packages.default = { system, stdenvNoCC }: stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "my-beamer-presentation";
|
||||||
|
|
||||||
|
name = "${pname}.pdf";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
self.packages.${system}.texlive-custom
|
||||||
|
];
|
||||||
|
|
||||||
|
src = self;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
latexmk -pdf ${pname}.tex
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp ${pname}.pdf $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Runnable package (ie `nix run`) to start the presentation
|
||||||
|
apps.default = { lib, system, writeShellScript, pympress }: {
|
||||||
|
type = "app";
|
||||||
|
program = "${writeShellScript "start-presentation" ''
|
||||||
|
exec ${lib.getExe pympress} ${self.packages.${system}.default}
|
||||||
|
''}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Devshell definition to expose the texlive environment to eg nvim
|
||||||
|
devShells.default = { mkShell, system }: mkShell {
|
||||||
|
packages = [ self.packages.${system}.texlive-custom ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
\documentclass[aspectratio=169]{beamer}
|
||||||
|
\usepackage[english]{babel}
|
||||||
|
\usepackage{fontawesome5}
|
||||||
|
\usepackage{tikz}
|
||||||
|
\usetikzlibrary{arrows,calc,fit,positioning}
|
||||||
|
\usepackage{appendixnumberbeamer}
|
||||||
|
|
||||||
|
|
||||||
|
\usetheme{moloch}
|
||||||
|
\usefonttheme[onlymath]{serif}
|
||||||
|
|
||||||
|
|
||||||
|
\tikzset{%
|
||||||
|
icon/.value required,
|
||||||
|
icon/.style={%
|
||||||
|
node contents={\faIcon{#1}},
|
||||||
|
icon size=normal,
|
||||||
|
},
|
||||||
|
icon size/.is choice,
|
||||||
|
icon size/.default=normal,
|
||||||
|
icon size/normal/.style={%
|
||||||
|
font={\fontsize{20.74}{20.74}\selectfont}
|
||||||
|
},
|
||||||
|
icon size/small/.style={%
|
||||||
|
font={\fontsize{12}{12}\selectfont}
|
||||||
|
},
|
||||||
|
rounded box/.style={%
|
||||||
|
inner sep=0.3em,
|
||||||
|
draw,
|
||||||
|
rounded corners,
|
||||||
|
line width=0.1em
|
||||||
|
},
|
||||||
|
sequence diagram/.style={%
|
||||||
|
font=\small,
|
||||||
|
line width=1pt,
|
||||||
|
sequence/.style={%
|
||||||
|
every to/.style={%
|
||||||
|
to path={(\tikztostart) -- (\tikztostart -| \tikztotarget) \tikztonodes} % chktex 1 chktex 8
|
||||||
|
},
|
||||||
|
->/.style={-stealth,every node/.style={above}},
|
||||||
|
<-/.style={stealth-,every node/.style={below}},
|
||||||
|
},
|
||||||
|
note/.style={%
|
||||||
|
color=example text.fg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
\title{My Beamer Presentation}
|
||||||
|
\subtitle{(From the template)}
|
||||||
|
\author{You}
|
||||||
|
\institute{Institute of Swag Nix Templates}
|
||||||
|
\date{Now}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\section{My Section}
|
||||||
|
\subsection{My Subsection}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Some Slide Title}
|
||||||
|
|
||||||
|
Sample text
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Some Other Slide Title}
|
||||||
|
|
||||||
|
Sample text 2
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\appendix
|
||||||
|
|
||||||
|
\begin{frame}[standout]
|
||||||
|
Backup Slides
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Backup slide 1}
|
||||||
|
|
||||||
|
Some backup slide content
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\end{document}
|
Loading…
Reference in New Issue