Ian Jauslin
summaryrefslogtreecommitdiff
blob: e22c41029bd41871029844fa0c57d890f4a3db11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
%% open slidelist file
\AtBeginDocument{
  \newwrite\slidelist
  \immediate\openout\slidelist=slidelist.txt
}
%% close file
\AtEndDocument{
  \immediate\closeout\slidelist
}

%% redefine \begin{frame}
\let\oldframe\frame
% tmp counter
\newcount\slidecount
\def\frame{
  % the actual page number should be 1 less than \thepage
  \slidecount=\thepage
  \advance\slidecount by-1
  % only write if the page number is positive
  \ifnum\the\slidecount>0
    \immediate\write\slidelist{\thepage}
  \fi
  \oldframe
}