Mercurial > latex
view wikileaks/pdfpcnotes.sty @ 168:cc6bb3ca79fb default tip
6/4 is not 2
author | Markus Kaiser <markus.kaiser@in.tum.de> |
---|---|
date | Fri, 28 Nov 2014 01:41:50 +0100 |
parents | 4b5abc34de8c |
children |
line wrap: on
line source
\ProvidesPackage{pdfpcnotes} % create a new file handle \newwrite\pdfpcnotesfile % open file on \begin{document} \AtBeginDocument{% \immediate\openout\pdfpcnotesfile\jobname.pdfpc\relax \immediate\write\pdfpcnotesfile{[notes]} } % define a # http://tex.stackexchange.com/a/37757/10327 \begingroup \catcode`\#=12 \gdef\hashchar{#}% \endgroup \def\lastframenumber{0} % define command \pnote{} that works like note but % additionally writes notes to file in pdfpc readable format \newcommand{\pnote}[1]{% % keep normal notes working \note{#1}% % if frame changed - write a new header \ifdim\theframenumber pt>\lastframenumber pt \let\lastframenumber\theframenumber \begingroup \let\#\hashchar \immediate\write\pdfpcnotesfile{\#\#\# \theframenumber}% \endgroup \fi % write note to file \immediate\write\pdfpcnotesfile{\unexpanded{#1}}% } % close file on \begin{document} \AtEndDocument{% \immediate\closeout\pdfpcnotesfile }