Within my larger pdf document I have what is basically a slideshow that steps through a set of frames created using the animateinline environment. I would like to add a frame counter of the form "Frame 12 of 32".

I can imagine two possible approaches:

  • When the frames are created by the animate package, if there was a LaTeX counter available that corresponded to the frame number then it could be simply displayed as part of that frame.
  • Or, when the frames are being played back, have some javascript which updates a frame counter displayed somewhere on the page. I know from the animate documentation that I can get or set the frame number but don't know how to display and update this info.

The following example uses animate-internal counters and a macro to write information (frame count) into the aux file. This corresponds to the first of your suggested approaches. The counter is inserted using the \framecounter command.


%%%%%%%%%%%%%%%%%%%%%%%% \framecounter %%%%%%%%%%%%%%%%%%%%%%%%%
% Within `animateinline', inserts `curr. #frame / total #frame'.



  end=\framecounter %insert at the end of every frame

  • Excellent. Just what I needed. Sorry I can't vote up your answer but this is my first foray into tex.stackexchange and I don't have enough points to do so. – Paul Rippon Mar 18 '15 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.