aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-09-20 16:35:50 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-09-20 16:35:50 +0200
commit1e94bf0ac71a322fc108f301bb7ebd2cb1c0a069 (patch)
tree7f88754efa68f8cd1c8e12836a64fc634a979870
parent542113341665e9ebf58d794ec496f7eca52c3f7b (diff)
downloadunterricht-1e94bf0ac71a322fc108f301bb7ebd2cb1c0a069.tar.gz
unterricht-1e94bf0ac71a322fc108f301bb7ebd2cb1c0a069.zip
add beamer gap macro
-rw-r--r--latex/fmts/slides.tex19
-rw-r--r--templates/slides.md2
2 files changed, 20 insertions, 1 deletions
diff --git a/latex/fmts/slides.tex b/latex/fmts/slides.tex
index dd72633d..8f922cca 100644
--- a/latex/fmts/slides.tex
+++ b/latex/fmts/slides.tex
@@ -16,6 +16,7 @@
\usepackage[school]{pgf-umlcd}
\usepackage{fontawesome5}
\usepackage{tabularx}
+\usepackage{ulem}
\usepackage[most]{tcolorbox}
\usetikzlibrary{decorations.pathmorphing} % For my tcolorboxes
@@ -56,5 +57,23 @@
% My commands
\newcommand{\boldred}[1]{\textcolor{red}{\textbf{#1}}}
+
+\newcommand{\beamersolution}[2]{%
+\only<-\fpeval{#1-1}>{\textcolor{white}{#2}}%
+\only<#1->{#2}%
+}
+\newcommand{\beamerpsolution}[2]{%
+\only<-\fpeval{#1-1}>{\phantom{#2}}%
+\only<#1->{#2}%
+}
+
+\ifluatex
+ \newcommand{\beamergap}[2]{\underLine{\beamersolution{#1}{#2}}}
+ \newcommand{\beamerpgap}[2]{\underLine{\beamerpsolution{#1}{#2}}}
+\else
+ \newcommand{\beamergap}[2]{\uline{\beamersolution{#1}{#2}}}
+ \newcommand{\beamerpgap}[2]{\uline{\beamerpsolution{#1}{#2}}}
+\fi
+
\begin{document}
\end{document}
diff --git a/templates/slides.md b/templates/slides.md
index d3c3d701..26eba53a 100644
--- a/templates/slides.md
+++ b/templates/slides.md
@@ -84,7 +84,7 @@ class AKTE {
## Some Text in custom tcolorboxes
`\begin{merke}`{=latex}
-Der Grundsatz der **Datenkapselung** besagt, dass nur ein Objekt selbst Zugriff auf seine Attribute haben sollte.
+Der Grundsatz der \beamerpgap{2}{\boldred{Datenkapselung}} besagt, dass nur ein Objekt selbst Zugriff auf seine Attribute haben sollte.
`\end{merke}`{=latex}
\pause