From 00d4e709063e769aca917ad0f43f7a9ab30627b6 Mon Sep 17 00:00:00 2001
From: Michael Eischer <eischer@cs.fau.de>
Date: Sun, 1 Jul 2018 11:44:28 +0200
Subject: [PATCH] Fix pdfpc notes appearing one slide too early

Beamer start with slide number 0 for the title page, whereas pdfpc
starts counting from 1.
---
 beamertheme-source/pdfpcnotes.dtx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/beamertheme-source/pdfpcnotes.dtx b/beamertheme-source/pdfpcnotes.dtx
index 04eb9ce..ab96e32 100644
--- a/beamertheme-source/pdfpcnotes.dtx
+++ b/beamertheme-source/pdfpcnotes.dtx
@@ -92,7 +92,11 @@
 		\let\lastframenumber\theframenumber
 		\begingroup
 			\let\#\hashchar
-			\immediate\write\pdfpcnotesfile{\#\#\# \theframenumber}%
+			% pdfpc counts the title page as slide 1
+			% thus all note numbers are off by one
+			\newcount\pdfpcframenumber
+			\pdfpcframenumber=\numexpr\theframenumber + 1\relax
+			\immediate\write\pdfpcnotesfile{\#\#\# \the\pdfpcframenumber}%
 		\endgroup
 	\fi
 
-- 
GitLab