Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions pdfpcnotes.sty
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,32 @@
\endgroup


\def\lastframenumber{0}
\global\def\lastframenumber{0}


% define command \pnote{} that works like note but
% additionally writes notes to file in pdfpc readable format
\newcommand{\pnote}[1]{%
\newcommand<>{\pnote}[2][]{%
% keep normal notes working
\note{#1}%

\note#3[#1]{#2}%

% if frame changed - write a new header
\ifdim\theframenumber pt>\lastframenumber pt
\let\lastframenumber\theframenumber
\ifdim\theframenumber pt >\lastframenumber pt

\global\edef\lastframenumber{\theframenumber}

\begingroup
\let\#\hashchar
\immediate\write\pdfpcnotesfile{\#\#\# \theframenumber}%
\endgroup
\fi

\fi
% write note to file
\immediate\write\pdfpcnotesfile{\unexpanded{#1}}%
% inside frame there's no point doing it twice if there's an overlay
\only<1>{\immediate\write\pdfpcnotesfile{\unexpanded{#2}}}%

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, sorry for the long delay. I finally found some time to check this pull request. I tested it with some of my old slides and found that this line breaks notes that are placed on slides that are repeated with \againframe{}. Notes only show up on the first slide and are then not displayed on further usages of that slide.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a solution to this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into it!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jesus time flies, but I saw the surge in interest and seems I have a little time on my hands:) Do you think it would be possible to make a few simple set of slides as a benchmark slides, so we can check what not to break?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the demo code in #16 an appropriate test case?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created a tests folder and set up travis-ci tests to run them automatically. Will add more tests to verify current behavior.


}
% close file on \begin{document}
\AtEndDocument{%
Expand Down