Add build script and fix errors

This commit is contained in:
2024-09-16 16:57:49 +02:00
parent 3da4bbda41
commit 5b4622d8ff
3 changed files with 32 additions and 1 deletions

29
spnotes.tex Normal file
View File

@@ -0,0 +1,29 @@
% create a new file handle
\newwrite\pdfpcnotesfile
% open file on \begin{document}
\AtBeginDocument{%
\immediate\openout\pdfpcnotesfile\jobname-Notizen.txt.tmp\relax
\immediate\write\pdfpcnotesfile{}
}
% define a # https://tex.stackexchange.com/a/37757/10327
\begingroup
\catcode`\#=12
\gdef\hashchar{#}%
\endgroup
% define command \pnote{} that works exactly like \note but
% additionally writes notes to file in pdfpc readable format
\newcommand{\spnote}[1]{%
% keep normal notes working
\note{#1}%
% write notes to file
\begingroup
\let\#\hashchar
%\immediate\write\pdfpcnotesfile{\#\theframenumber\#\unexpanded{#1}}%
\immediate\write\pdfpcnotesfile{\#\thepage\#\unexpanded{#1}}%
\endgroup
}
% close file on \end{document}
\AtEndDocument{%
\immediate\closeout\pdfpcnotesfile
}